From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 635E813877A for ; Wed, 27 Aug 2014 02:06:32 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 1B08FE08B0; Wed, 27 Aug 2014 02:06:29 +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 A4049E08B0 for ; Wed, 27 Aug 2014 02:06:28 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 4A6BE33FB12 for ; Wed, 27 Aug 2014 02:06:27 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E4CB73F0E for ; Wed, 27 Aug 2014 02:06:25 +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: <1409105106.8150517e34f5b825bc3ba8216a0682a9a44cce94.pesa@gentoo> Subject: [gentoo-commits] proj/qt:master commit in: eclass/ X-VCS-Repository: proj/qt X-VCS-Files: eclass/qt5-build.eclass X-VCS-Directories: eclass/ X-VCS-Committer: pesa X-VCS-Committer-Name: Davide Pesavento X-VCS-Revision: 8150517e34f5b825bc3ba8216a0682a9a44cce94 X-VCS-Branch: master Date: Wed, 27 Aug 2014 02:06:25 +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: dad45e9e-7377-4cbd-aede-2bc558e027de X-Archives-Hash: c32b457edea5ea17a90fc1f0d6d20e45 commit: 8150517e34f5b825bc3ba8216a0682a9a44cce94 Author: Davide Pesavento gentoo org> AuthorDate: Wed Aug 27 02:05:06 2014 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Wed Aug 27 02:05:06 2014 +0000 URL: http://sources.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=8150517e [qt5-build.eclass] Don't symlink tools for non-qtbase packages. Just run qmake directly from QT5_BINDIR. --- eclass/qt5-build.eclass | 35 +++++++++++++++++++++-------------- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 18218df..226c17a 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -163,11 +163,13 @@ qt5-build_src_unpack() { # @FUNCTION: qt5-build_src_prepare # @DESCRIPTION: -# Prepares the sources before the configure phase. +# Prepares the environment and patches the sources if necessary. qt5-build_src_prepare() { qt5_prepare_env if [[ ${QT5_MODULE} == qtbase ]]; then + qt5_symlink_tools_to_build_dir + # Avoid unnecessary qmake recompilations sed -i -re "s|^if true;.*(\[ '\!').*(\"\\\$outpath/bin/qmake\".*)|if \1 -e \2 then|" \ configure || die "sed failed (skip qmake bootstrap)" @@ -191,10 +193,6 @@ qt5-build_src_prepare() { || die "sed failed (config.tests)" fi - if [[ ${PN} != qtcore ]]; then - qt5_symlink_tools_to_build_dir - fi - # apply patches [[ ${PATCHES[@]} ]] && epatch "${PATCHES[@]}" epatch_user @@ -202,7 +200,8 @@ qt5-build_src_prepare() { # @FUNCTION: qt5-build_src_configure # @DESCRIPTION: -# Runs qmake, possibly preceded by ./configure. +# Runs qmake in the target directories. For packages +# in qtbase, ./configure is also run before qmake. qt5-build_src_configure() { if [[ ${QT5_MODULE} == qtbase ]]; then qt5_base_configure @@ -213,14 +212,14 @@ qt5-build_src_configure() { # @FUNCTION: qt5-build_src_compile # @DESCRIPTION: -# Compiles the code in target directories. +# Runs emake in the target directories. qt5-build_src_compile() { qt5_foreach_target_subdir emake } # @FUNCTION: qt5-build_src_test # @DESCRIPTION: -# Runs tests in target directories. +# Runs tests in the target directories. qt5-build_src_test() { echo ">>> Test phase [QtTest]: ${CATEGORY}/${PF}" @@ -252,7 +251,7 @@ qt5-build_src_test() { # @FUNCTION: qt5-build_src_install # @DESCRIPTION: -# Performs the actual installation of target directories. +# Runs emake install in the target directories. qt5-build_src_install() { qt5_foreach_target_subdir emake INSTALL_ROOT="${D}" install @@ -421,14 +420,17 @@ qt5_foreach_target_subdir() { # @FUNCTION: qt5_symlink_tools_to_build_dir # @INTERNAL # @DESCRIPTION: -# Symlinks qtcore tools to QT5_BUILD_DIR, so they can be used when building other modules. +# Symlinks qmake and a few other tools to QT5_BUILD_DIR, +# so that they can be used when building other modules. qt5_symlink_tools_to_build_dir() { mkdir -p "${QT5_BUILD_DIR}"/bin || die + [[ ${PN} == qtcore ]] && return + local bin - for bin in "${QT5_BINDIR}"/{qmake,moc,rcc,uic,qdoc,qdbuscpp2xml,qdbusxml2cpp}; do + for bin in "${QT5_BINDIR}"/{qmake,moc,rcc,qlalr,uic,qdbuscpp2xml,qdbusxml2cpp,qdoc}; do if [[ -e ${bin} ]]; then - ln -s "${bin}" "${QT5_BUILD_DIR}"/bin/ || die "failed to symlink ${bin}" + ln -s "${bin}" "${QT5_BUILD_DIR}"/bin || die "failed to symlink ${bin}" fi done } @@ -586,7 +588,6 @@ qt5_base_configure() { "${myconf[@]}" ) - mkdir -p "${QT5_BUILD_DIR}" || die pushd "${QT5_BUILD_DIR}" >/dev/null || die einfo "Configuring with: ${conf[@]}" @@ -602,8 +603,14 @@ qt5_base_configure() { # Intended to be called by qt5_foreach_target_subdir(). qt5_qmake() { local projectdir=${PWD/#${QT5_BUILD_DIR}/${S}} + local qmakepath= + if [[ ${QT5_MODULE} == qtbase ]]; then + qmakepath=${QT5_BUILD_DIR}/bin + else + qmakepath=${QT5_BINDIR} + fi - "${QT5_BUILD_DIR}"/bin/qmake \ + "${qmakepath}"/qmake \ QMAKE_AR="$(tc-getAR) cqs" \ QMAKE_CC="$(tc-getCC)" \ QMAKE_LINK_C="$(tc-getCC)" \