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 2596D13877A for ; Wed, 30 Jul 2014 19:35:10 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id D6975E082D; Wed, 30 Jul 2014 19:35:07 +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 59E8BE082D for ; Wed, 30 Jul 2014 19:35:07 +0000 (UTC) Received: from spoonbill.gentoo.org (spoonbill.gentoo.org [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 CD5F634012A for ; Wed, 30 Jul 2014 19:35:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 3E4A818810 for ; Wed, 30 Jul 2014 19:35:04 +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: <1406748561.1ea428272dd5d364468a5fbb403544e877405d64.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: 1ea428272dd5d364468a5fbb403544e877405d64 X-VCS-Branch: master Date: Wed, 30 Jul 2014 19:35:04 +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: aa941db7-1e14-4bdb-af09-4341625c57a0 X-Archives-Hash: 12da91cbe858c5873238ef3bc1a8826d commit: 1ea428272dd5d364468a5fbb403544e877405d64 Author: Davide Pesavento gentoo org> AuthorDate: Wed Jul 30 19:29:21 2014 +0000 Commit: Davide Pesavento gentoo org> CommitDate: Wed Jul 30 19:29:21 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=1ea42827 [qt5-build.eclass] Refactor qt5_install_module_qconfigs(). --- eclass/qt5-build.eclass | 32 +++++++++++++++----------------- 1 file changed, 15 insertions(+), 17 deletions(-) diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass index 96c3d77..f64ab35 100644 --- a/eclass/qt5-build.eclass +++ b/eclass/qt5-build.eclass @@ -65,7 +65,7 @@ EGIT_REPO_URI=( IUSE="debug test" DEPEND=" - >=dev-lang/perl-5.14 + dev-lang/perl virtual/pkgconfig " if [[ ${PN} != qttest ]]; then @@ -612,7 +612,12 @@ qt5_qmake() { # @DESCRIPTION: # Creates and installs gentoo-specific ${PN}-qconfig.{h,pri} files. qt5_install_module_qconfigs() { - local x + local x qconfig_add= qconfig_remove= + + > "${T}"/${PN}-qconfig.h + > "${T}"/${PN}-qconfig.pri + + # generate qconfig_{add,remove} and ${PN}-qconfig.h for x in "${QT5_GENTOO_CONFIG[@]}"; do local flag=${x%%:*} x=${x#${flag}:} @@ -622,30 +627,23 @@ qt5_install_module_qconfigs() { macro=$(tr 'a-z-' 'A-Z_' <<< "${macro}") if [[ -z ${flag} ]] || { [[ ${flag} != '!' ]] && use ${flag}; }; then - [[ -n ${feature} ]] && QCONFIG_ADD+=("${feature}") - [[ -n ${macro} ]] && QCONFIG_DEFINE+=("QT_${macro}") + [[ -n ${feature} ]] && qconfig_add+=" ${feature}" + [[ -n ${macro} ]] && echo "#define QT_${macro}" >> "${T}"/${PN}-qconfig.h else - [[ -n ${feature} ]] && QCONFIG_REMOVE+=("${feature}") - [[ -n ${macro} ]] && QCONFIG_DEFINE+=("QT_NO_${macro}") + [[ -n ${feature} ]] && qconfig_remove+=" ${feature}" + [[ -n ${macro} ]] && echo "#define QT_NO_${macro}" >> "${T}"/${PN}-qconfig.h fi done - # qconfig.h - > "${T}"/${PN}-qconfig.h - for x in "${QCONFIG_DEFINE[@]}"; do - echo "#define ${x}" >> "${T}"/${PN}-qconfig.h - done + # install ${PN}-qconfig.h [[ -s ${T}/${PN}-qconfig.h ]] && ( insinto "${QT5_HEADERDIR#${EPREFIX}}"/Gentoo doins "${T}"/${PN}-qconfig.h ) - # qconfig.pri - > "${T}"/${PN}-qconfig.pri - [[ -n ${QCONFIG_ADD[@]} ]] && echo "QCONFIG_ADD=${QCONFIG_ADD[@]}" \ - >> "${T}"/${PN}-qconfig.pri - [[ -n ${QCONFIG_REMOVE[@]} ]] && echo "QCONFIG_REMOVE=${QCONFIG_REMOVE[@]}" \ - >> "${T}"/${PN}-qconfig.pri + # generate and install ${PN}-qconfig.pri + [[ -n ${qconfig_add} ]] && echo "QCONFIG_ADD=${qconfig_add}" >> "${T}"/${PN}-qconfig.pri + [[ -n ${qconfig_remove} ]] && echo "QCONFIG_REMOVE=${qconfig_remove}" >> "${T}"/${PN}-qconfig.pri [[ -s ${T}/${PN}-qconfig.pri ]] && ( insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo doins "${T}"/${PN}-qconfig.pri