Gentoo Archives: gentoo-commits

From: Davide Pesavento <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/qt:master commit in: eclass/
Date: Fri, 29 Jun 2012 15:16:34
Message-Id: 1340982927.fe0b75cd32209b4981e74dcbdb38b396a6456e63.pesa@gentoo
1 commit: fe0b75cd32209b4981e74dcbdb38b396a6456e63
2 Author: Davide Pesavento <davidepesa <AT> gmail <DOT> com>
3 AuthorDate: Fri Jun 29 15:15:27 2012 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Fri Jun 29 15:15:27 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=fe0b75cd
7
8 [qt5-build.eclass] Some fixes in qt5_regenerate_global_qconfigs().
9
10 ---
11 eclass/qt5-build.eclass | 24 ++++++++++++------------
12 1 files changed, 12 insertions(+), 12 deletions(-)
13
14 diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass
15 index 9851c11..10ce73a 100644
16 --- a/eclass/qt5-build.eclass
17 +++ b/eclass/qt5-build.eclass
18 @@ -443,26 +443,27 @@ qt5_regenerate_global_qconfigs() {
19
20 find "${ROOT}${QTHEADERDIR}"/Gentoo -name 'qt-*-qconfig.h' -type f \
21 -exec cat {} + > "${T}"/gentoo-qconfig.h
22 - if [[ -s ${T}/gentoo-qconfig.h ]]; then
23 - mv -f "${T}"/gentoo-qconfig.h "${ROOT}${QTHEADERDIR}"/Gentoo/gentoo-qconfig.h \
24 - || eerror "Failed to install new gentoo-qconfig.h"
25 - else
26 - eerror "Generated gentoo-qconfig.h is empty"
27 - fi
28 +
29 + [[ -s ${T}/gentoo-qconfig.h ]] || ewarn "Generated gentoo-qconfig.h is empty"
30 + mv -f "${T}"/gentoo-qconfig.h "${ROOT}${QTHEADERDIR}"/Gentoo/gentoo-qconfig.h \
31 + || eerror "Failed to install new gentoo-qconfig.h"
32
33 einfo "Updating QT_CONFIG in qconfig.pri"
34
35 - if [[ -f ${ROOT}${QTDATADIR}/mkspecs/qconfig.pri ]]; then
36 + local qconfig_pri=${ROOT}${QTDATADIR}/mkspecs/qconfig.pri
37 + if [[ -f ${qconfig_pri} ]]; then
38 local x qconfig_add= qconfig_remove=
39 - local qt_config=$(sed -n 's/^QT_CONFIG +=//p' "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri)
40 + local qt_config=$(sed -n 's/^QT_CONFIG +=//p' "${qconfig_pri}")
41 local new_qt_config=
42
43 # generate list of QT_CONFIG entries from the existing list,
44 - # adding QCONFIG_ADD and excluding QCONFIG_REMOVE
45 + # appending QCONFIG_ADD and excluding QCONFIG_REMOVE
46 + eshopts_push -s nullglob
47 for x in "${ROOT}${QTDATADIR}"/mkspecs/gentoo/qt-*-qconfig.pri; do
48 qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")"
49 qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")"
50 done
51 + eshopts_pop
52 for x in ${qt_config} ${qconfig_add}; do
53 if ! has "${x}" ${new_qt_config} ${qconfig_remove}; then
54 new_qt_config+=" ${x}"
55 @@ -471,9 +472,8 @@ qt5_regenerate_global_qconfigs() {
56
57 # now replace the existing QT_CONFIG with the generated list
58 sed -i -e "s/^QT_CONFIG +=.*/QT_CONFIG +=${new_qt_config}/" \
59 - "${ROOT}${QTDATADIR}"/mkspecs/qconfig.pri \
60 - || eerror "Failed to sed QT_CONFIG in qconfig.pri"
61 + "${qconfig_pri}" || eerror "Failed to sed QT_CONFIG in qconfig.pri"
62 else
63 - eerror "qconfig.pri does not exist or is not a regular file"
64 + ewarn "'${qconfig_pri}' does not exist or is not a regular file"
65 fi
66 }