From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.60) (envelope-from ) id 1SeDFE-0000Tu-90 for garchives@archives.gentoo.org; Mon, 11 Jun 2012 22:37:56 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6AB4AE0511; Mon, 11 Jun 2012 22:37:44 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id 2C130E0511 for ; Mon, 11 Jun 2012 22:37:44 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 6FA591B400C for ; Mon, 11 Jun 2012 22:37:43 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id 1B6A9E5436 for ; Mon, 11 Jun 2012 22:37:41 +0000 (UTC) From: "Davide Pesavento" To: gentoo-commits@lists.gentoo.org Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Davide Pesavento" Message-ID: <1339454126.1041c1d2fe1db668faf0e1c62973c59c17e48a0e.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: 1041c1d2fe1db668faf0e1c62973c59c17e48a0e X-VCS-Branch: master Date: Mon, 11 Jun 2012 22:37:41 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: ec1a2207-804b-414d-b9c1-158a8006b84a X-Archives-Hash: 1d4afec187c1377f8f49de9b56fff9da commit: 1041c1d2fe1db668faf0e1c62973c59c17e48a0e Author: Davide Pesavento gmail com> AuthorDate: Mon Jun 11 22:35:26 2012 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Mon Jun 11 22:35:26 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=3Dproj/qt.git;a=3Dco= mmit;h=3D1041c1d2 [qt5-build.eclass] Refactoring. --- eclass/qt5-build.eclass | 52 +++++++++++++++++++++++------------------= ----- 1 files changed, 26 insertions(+), 26 deletions(-) diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index b8fd1e1..b1af0e9 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -161,7 +161,7 @@ qt5-build_src_prepare() { mkdir -p "${QT5_BUILD_DIR}" || die =20 if [[ ${PN} !=3D "qt-core" ]]; then - symlink_tools_to_buildtree + qt5_symlink_tools_to_buildtree fi =20 # Avoid unnecessary qmake recompilations @@ -201,7 +201,7 @@ qt5-build_src_prepare() { =20 # @FUNCTION: qt5-build_src_configure # @DESCRIPTION: -# Default configure phase. +# Runs ./configure and qmake. qt5-build_src_configure() { # configure arguments local conf=3D( @@ -261,30 +261,21 @@ qt5-build_src_configure() { popd >/dev/null || die =20 if [[ ${PN} !=3D "qt-core" ]]; then - local subdir - for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do - pushd "${QT5_BUILD_DIR}/${subdir}" >/dev/null || die - einfo "Running qmake in: ${subdir}" + qmake() { "${QT5_BUILD_DIR}"/bin/qmake \ "${S}/${subdir}/${subdir##*/}.pro" \ QMAKE_LIBDIR_QT=3D"${QTLIBDIR}" \ - || die "qmake failed in ${subdir}" - popd >/dev/null || die - done + || die + } + qt5_foreach_target_subdir qmake fi } =20 # @FUNCTION: qt5-build_src_compile # @DESCRIPTION: -# Compiles the code in QT5_TARGET_SUBDIRS. +# Compiles the code in target directories. qt5-build_src_compile() { - local subdir - for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do - pushd "${QT5_BUILD_DIR}/${subdir}" >/dev/null || die - einfo "Building in: ${subdir}" - emake - popd >/dev/null || die - done + qt5_foreach_target_subdir emake } =20 # @FUNCTION: qt5-build_src_test @@ -297,14 +288,9 @@ qt5-build_src_test() { =20 # @FUNCTION: qt5-build_src_install # @DESCRIPTION: -# Perform the actual installation including some library fixes. +# Performs the actual installation of target directories. qt5-build_src_install() { - local subdir - for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do - pushd "${QT5_BUILD_DIR}/${subdir}" >/dev/null || die - emake INSTALL_ROOT=3D"${D}" install - popd >/dev/null || die - done + qt5_foreach_target_subdir emake INSTALL_ROOT=3D"${D}" install =20 if [[ ${PN} =3D=3D "qt-core" ]]; then pushd "${QT5_BUILD_DIR}" >/dev/null || die @@ -372,11 +358,11 @@ qt5_prepare_env() { QTSYSCONFDIR=3D${EPREFIX}/etc/qt5 } =20 -# @FUNCTION: symlink_tools_to_buildtree +# @FUNCTION: qt5_symlink_tools_to_buildtree # @INTERNAL # @DESCRIPTION: # Symlinks qt-core tools to buildtree, so they can be used when building= other modules. -symlink_tools_to_buildtree() { +qt5_symlink_tools_to_buildtree() { mkdir -p "${QT5_BUILD_DIR}"/bin || die =20 local bin @@ -386,6 +372,20 @@ symlink_tools_to_buildtree() { done } =20 +# @FUNCTION: qt5_foreach_target_subdir +# @INTERNAL +# @DESCRIPTION: +# Executes the arguments inside each directory listed in QT5_TARGET_SUBD= IRS. +qt5_foreach_target_subdir() { + local subdir + for subdir in "${QT5_TARGET_SUBDIRS[@]}"; do + pushd "${QT5_BUILD_DIR}/${subdir}" >/dev/null || die + einfo "[${subdir}] $*" + "$@" + popd >/dev/null || die + done +} + # @FUNCTION: install_qconfigs # @INTERNAL # @DESCRIPTION: