From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 293861381FA for ; Tue, 27 May 2014 10:49:02 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 52A05E07F5; Tue, 27 May 2014 10:49:01 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9EE4FE0827 for ; Tue, 27 May 2014 10:49:00 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 91C4833FD2E for ; Tue, 27 May 2014 10:48:59 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 3EB26182D6 for ; Tue, 27 May 2014 10:48:58 +0000 (UTC) From: "Davide Pesavento" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" Message-ID: <1401158485.1586bcba38ebe9f6a8922bb735b3d0eeaa534bb5.pesa@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qt4-build-multilib.eclass X-VCS-Directories: eclass/ X-VCS-Committer: pesa X-VCS-Committer-Name: Davide Pesavento X-VCS-Revision: 1586bcba38ebe9f6a8922bb735b3d0eeaa534bb5 X-VCS-Branch: master Date: Tue, 27 May 2014 10:48:58 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 127c1a57-8343-40bc-83bd-a54b423a3b8e X-Archives-Hash: aa8c79e2efff8cdee90ad1eaa68325f0 commit: 1586bcba38ebe9f6a8922bb735b3d0eeaa534bb5 Author: Davide Pesavento gentoo org> AuthorDate: Tue May 27 02:41:25 2014 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Tue May 27 02:41:25 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=1586bcba [qt4-build-multilib.eclass] Improve and rename qt_mkspecs_dir(). --- eclass/qt4-build-multilib.eclass | 84 ++++++++++++++++++++++------------------ 1 file changed, 46 insertions(+), 38 deletions(-) diff --git a/eclass/qt4-build-multilib.eclass b/eclass/qt4-build-multilib.eclass index 659b369..fb290ae 100644 --- a/eclass/qt4-build-multilib.eclass +++ b/eclass/qt4-build-multilib.eclass @@ -167,12 +167,9 @@ qt4-build-multilib_src_prepare() { fi if use_if_iuse aqua; then - # provide a proper macx-g++-64 - use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir) - sed -e '/^CONFIG/s:app_bundle::' \ -e '/^CONFIG/s:plugin_no_soname:plugin_with_soname absolute_library_soname:' \ - -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die + -i mkspecs/$(qt4_get_mkspec)/qmake.conf || die fi # Bug 261632 @@ -216,7 +213,7 @@ qt4-build-multilib_src_prepare() { || die "sed config.tests failed" # Bug 172219 - sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die + sed -e 's:/X11R6/:/:' -i mkspecs/$(qt4_get_mkspec)/qmake.conf || die if [[ ${CHOST} == *-darwin* ]]; then # Set FLAGS *and* remove -arch, since our gcc-apple is multilib @@ -278,12 +275,12 @@ qt4-build-multilib_src_prepare() { # we need some patches for Solaris sed -i -e '/^QMAKE_LFLAGS_THREAD/a\QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,' \ - mkspecs/$(qt_mkspecs_dir)/qmake.conf || die + mkspecs/$(qt4_get_mkspec)/qmake.conf || die # use GCC over SunStudio sed -i -e '/PLATFORM=solaris-cc/s/cc/g++/' configure || die # do not flirt with non-Prefix stuff, we're quite possessive sed -i -e '/^QMAKE_\(LIB\|INC\)DIR\(_X11\|_OPENGL\|\)\t/s/=.*$/=/' \ - mkspecs/$(qt_mkspecs_dir)/qmake.conf || die + mkspecs/$(qt4_get_mkspec)/qmake.conf || die # apply patches [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" @@ -326,7 +323,7 @@ qt4-build-multilib_src_configure() { *) die "$(tc-arch) is unsupported by this eclass. Please file a bug." ;; esac - conf+=" -platform $(qt_mkspecs_dir)" + conf+=" -platform $(qt4_get_mkspec)" # debug/release if use_if_iuse debug; then @@ -506,7 +503,7 @@ qt4_prepare_env() { QT4_SYSCONFDIR=${EPREFIX}/etc/qt4 QMAKE_LIBDIR_QT=${QT4_LIBDIR} - PLATFORM=$(qt_mkspecs_dir) + PLATFORM=$(qt4_get_mkspec) unset QMAKESPEC export XDG_CONFIG_HOME="${T}" @@ -710,58 +707,69 @@ fix_includes() { fi } -# @FUNCTION: qt_mkspecs_dir +# @FUNCTION: qt4_get_mkspec # @RETURN: the specs-directory w/o path # @INTERNAL # @DESCRIPTION: # Allows us to define which mkspecs dir we want to use. -qt_mkspecs_dir() { +qt4_get_mkspec() { local spec= - case "${CHOST}" in + case ${CHOST} in + *-linux*) + spec=linux ;; + *-darwin*) + use_if_iuse aqua && + spec=macx || # mac with carbon/cocoa + spec=darwin ;; # darwin/mac with X11 *-freebsd*|*-dragonfly*) spec=freebsd ;; - *-openbsd*) - spec=openbsd ;; *-netbsd*) spec=netbsd ;; - *-darwin*) - if use_if_iuse aqua; then - # mac with carbon/cocoa - spec=macx - else - # darwin/mac with x11 - spec=darwin - fi - ;; + *-openbsd*) + spec=openbsd ;; + *-aix*) + spec=aix ;; + hppa*-hpux*) + spec=hpux ;; + ia64*-hpux*) + spec=hpuxi ;; *-solaris*) spec=solaris ;; - *-linux-*|*-linux) - spec=linux ;; *) - die "${FUNCNAME}(): Unknown CHOST '${CHOST}'" ;; + die "${FUNCNAME}(): Unsupported CHOST '${CHOST}'" ;; esac - case "$(tc-getCXX)" in + case $(tc-getCXX) in *g++*) spec+=-g++ ;; - *icpc*) - spec+=-icc ;; *clang*) - spec+=-clang ;; + if [[ -d ${S}/mkspecs/unsupported/${spec}-clang ]]; then + spec=unsupported/${spec}-clang + else + ewarn "${spec}-clang mkspec does not exist, falling back to ${spec}-g++" + spec+=-g++ + fi ;; + *icpc*) + if [[ -d ${S}/mkspecs/${spec}-icc ]]; then + spec+=-icc + else + ewarn "${spec}-icc mkspec does not exist, falling back to ${spec}-g++" + spec+=-g++ + fi ;; *) - die "${FUNCNAME}(): Unknown compiler '$(tc-getCXX)'" ;; + die "${FUNCNAME}(): Unsupported compiler '$(tc-getCXX)'" ;; esac - # Add -64 for 64bit profiles - if use x64-freebsd || - use amd64-linux || + # Add -64 for 64-bit prefix profiles + if use amd64-linux || use ia64-linux || use ppc64-linux || use x64-macos || - use x64-solaris || - use sparc64-solaris + use sparc64-freebsd || use x64-freebsd || use x64-openbsd || + use ia64-hpux || + use sparc64-solaris || use x64-solaris then - spec+=-64 + [[ -d ${S}/mkspecs/${spec}-64 ]] && spec+=-64 fi - echo "${spec}" + echo ${spec} }