Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/
Date: Sat, 03 Feb 2018 13:37:32
Message-Id: 1517665016.7ff82a5a2031a540bb774b0d27b6c4c4b4ddaa0a.kensington@gentoo
1 commit: 7ff82a5a2031a540bb774b0d27b6c4c4b4ddaa0a
2 Author: i.Dark_Templar <darktemplar <AT> dark-templar-archives <DOT> net>
3 AuthorDate: Thu Oct 19 20:58:00 2017 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Sat Feb 3 13:36:56 2018 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=7ff82a5a
7
8 qt5-build.eclass: fix qconfig.pri regeneration.
9
10 eclass/qt5-build.eclass | 14 ++++++++++++--
11 1 file changed, 12 insertions(+), 2 deletions(-)
12
13 diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
14 index 82855656e04..25d4136c80b 100644
15 --- a/eclass/qt5-build.eclass
16 +++ b/eclass/qt5-build.eclass
17 @@ -803,6 +803,11 @@ qt5_install_module_qconfigs() {
18 insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo
19 doins "${T}"/${PN}-qconfig.pri
20 )
21 +
22 + if [[ ${PN} = qtcore && ${QT5_MINOR_VERSION} -ge 9 ]]; then
23 + insinto "${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/gentoo
24 + newins "${D}${QT5_ARCHDATADIR#${EPREFIX}}"/mkspecs/qconfig.pri qconfig-qtcore.pri
25 + fi
26 }
27
28 # @FUNCTION: qt5_regenerate_global_qconfigs
29 @@ -824,9 +829,14 @@ qt5_regenerate_global_qconfigs() {
30 einfo "Updating QT_CONFIG in qconfig.pri"
31
32 local qconfig_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri
33 + local qconfig_pri_orig=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/gentoo/qconfig-qtcore.pri
34 if [[ -f ${qconfig_pri} ]]; then
35 local x qconfig_add= qconfig_remove=
36 - local qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri}")
37 + if [[ -f ${qconfig_pri_orig} ]]; then
38 + local qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri_orig}")
39 + else
40 + local qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri}")
41 + fi
42 local new_qt_config=
43
44 # generate list of QT_CONFIG entries from the existing list,
45 @@ -847,6 +857,6 @@ qt5_regenerate_global_qconfigs() {
46 sed -i -e "s/^QT_CONFIG\s*+=.*/QT_CONFIG +=${new_qt_config}/" \
47 "${qconfig_pri}" || eerror "Failed to sed QT_CONFIG in ${qconfig_pri}"
48 else
49 - ewarn "${qconfig_pri} does not exist or is not a regular file"
50 + ewarn "${qconfig_pri} or ${qconfig_pri_orig} does not exist or is not a regular file"
51 fi
52 }