Only install qconfig.pri if one of QCONFIG_{ADD,REMOVE} is non-empty (bug #212491).
authorBo Ørsted Andresen <zlin@gentoo.org>
Thu, 6 Mar 2008 14:44:13 +0000 (14:44 +0000)
committerBo Ørsted Andresen <zlin@gentoo.org>
Thu, 6 Mar 2008 14:44:13 +0000 (14:44 +0000)
eclass/qt4-build.eclass

index 1b7ffa838ea6d865d9dd3112ccaeb11446d2501a..481b56620b6de753edc0f671486314d50e1b7f56 100644 (file)
@@ -1,6 +1,6 @@
 # Copyright 2007-2008 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.8 2008/03/06 01:23:51 ingmar Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.9 2008/03/06 14:44:13 zlin Exp $
 
 # @ECLASS: qt4-build.eclass
 # @MAINTAINER:
@@ -165,14 +165,16 @@ QCONFIG_REMOVE="${QCONFIG_REMOVE:-}"
 QCONFIG_DEFINE="${QCONFIG_DEFINE:-}"
 
 install_qconfigs() {
-       if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} || -n ${QCONFIG_DEFINE} ]]; then
-               local x
+       local x
+       if [[ -n ${QCONFIG_ADD} || -n ${QCONFIG_REMOVE} ]]; then
                for x in QCONFIG_ADD QCONFIG_REMOVE; do
                        [[ -n ${!x} ]] && echo ${x}=${!x} >> "${T}"/${PN}-qconfig.pri
                done
                insinto ${QTDATADIR}/mkspecs/gentoo
                doins "${T}"/${PN}-qconfig.pri || die "installing ${PN}-qconfig.pri failed"
+       fi
 
+       if [[ -n ${QCONFIG_DEFINE} ]]; then
                for x in ${QCONFIG_DEFINE}; do
                        echo "#define ${x}" >> "${T}"/gentoo-${PN}-qconfig.h
                done