commit:     bd9b392f33aaf1810c7d59830f495d0ae2ae728d
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Thu Jan 25 12:09:55 2018 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Thu Jan 25 12:10:20 2018 +0000
URL:        https://gitweb.gentoo.org/proj/qt.git/commit/?id=bd9b392f

qt5-build.eclass: restrict qconfig.pri regeneration changes to 5.9.4 and later

 eclass/qt5-build.eclass | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
index 54e4b321..bc477889 100644
--- a/eclass/qt5-build.eclass
+++ b/eclass/qt5-build.eclass
@@ -804,7 +804,7 @@ qt5_install_module_qconfigs() {
                doins "${T}"/${PN}-qconfig.pri
        )
 
-       if [[ ${PN} = qtcore ]]; then
+       if [[ ${PN} = qtcore && ${QT5_MINOR_VERSION} -ge 9 && 
${QT5_PATCH_VERSION} -ge 4 ]]; then
                insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo
                newins "${D}${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/qconfig.pri 
qconfig-qtcore.pri
        fi
@@ -830,9 +830,13 @@ qt5_regenerate_global_qconfigs() {
 
        local qconfig_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri
        local 
qconfig_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qconfig-qtcore.pri
-       if [[ -f ${qconfig_pri} && -f ${qconfig_pri_orig} ]]; then
+       if [[ -f ${qconfig_pri} ]]; then
                local x qconfig_add= qconfig_remove=
-               local qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' 
"${qconfig_pri_orig}")
+               if [[ -f ${qconfig_pri_orig} ]]; then
+                       local qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' 
"${qconfig_pri_orig}")
+               else
+                       local qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' 
"${qconfig_pri}")
+               fi
                local new_qt_config=
 
                # generate list of QT_CONFIG entries from the existing list,

Reply via email to