1 |
commit: c68366b7690a9d8c17a3e474a0021b52df39ccc3 |
2 |
Author: Davide Pesavento <davidepesa <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Jan 2 00:00:39 2013 +0000 |
4 |
Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org> |
5 |
CommitDate: Wed Jan 2 00:00:39 2013 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=c68366b7 |
7 |
|
8 |
[qt5-build.eclass] Make qconfig.pri parsing less strict. |
9 |
|
10 |
--- |
11 |
eclass/qt5-build.eclass | 20 ++++++++++---------- |
12 |
1 files changed, 10 insertions(+), 10 deletions(-) |
13 |
|
14 |
diff --git a/eclass/qt5-build.eclass b/eclass/qt5-build.eclass |
15 |
index 7295c8f..50fc114 100644 |
16 |
--- a/eclass/qt5-build.eclass |
17 |
+++ b/eclass/qt5-build.eclass |
18 |
@@ -515,28 +515,28 @@ qt5_install_module_qconfigs() { |
19 |
qt5_regenerate_global_qconfigs() { |
20 |
einfo "Regenerating gentoo-qconfig.h" |
21 |
|
22 |
- find "${ROOT}${QT5_HEADERDIR}"/Gentoo \ |
23 |
+ find "${ROOT%/}${QT5_HEADERDIR}"/Gentoo \ |
24 |
-name '*-qconfig.h' -a \! -name 'gentoo-qconfig.h' -type f \ |
25 |
-execdir cat '{}' + > "${T}"/gentoo-qconfig.h |
26 |
|
27 |
[[ -s ${T}/gentoo-qconfig.h ]] || ewarn "Generated gentoo-qconfig.h is empty" |
28 |
- mv -f "${T}"/gentoo-qconfig.h "${ROOT}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h \ |
29 |
+ mv -f "${T}"/gentoo-qconfig.h "${ROOT%/}${QT5_HEADERDIR}"/Gentoo/gentoo-qconfig.h \ |
30 |
|| eerror "Failed to install new gentoo-qconfig.h" |
31 |
|
32 |
einfo "Updating QT_CONFIG in qconfig.pri" |
33 |
|
34 |
- local qconfig_pri=${ROOT}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri |
35 |
+ local qconfig_pri=${ROOT%/}${QT5_ARCHDATADIR}/mkspecs/qconfig.pri |
36 |
if [[ -f ${qconfig_pri} ]]; then |
37 |
local x qconfig_add= qconfig_remove= |
38 |
- local qt_config=$(sed -n 's/^QT_CONFIG +=//p' "${qconfig_pri}") |
39 |
+ local qt_config=$(sed -n 's/^QT_CONFIG\s*+=\s*//p' "${qconfig_pri}") |
40 |
local new_qt_config= |
41 |
|
42 |
# generate list of QT_CONFIG entries from the existing list, |
43 |
# appending QCONFIG_ADD and excluding QCONFIG_REMOVE |
44 |
eshopts_push -s nullglob |
45 |
- for x in "${ROOT}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do |
46 |
- qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=//p' "${x}")" |
47 |
- qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=//p' "${x}")" |
48 |
+ for x in "${ROOT%/}${QT5_ARCHDATADIR}"/mkspecs/gentoo/*-qconfig.pri; do |
49 |
+ qconfig_add+=" $(sed -n 's/^QCONFIG_ADD=\s*//p' "${x}")" |
50 |
+ qconfig_remove+=" $(sed -n 's/^QCONFIG_REMOVE=\s*//p' "${x}")" |
51 |
done |
52 |
eshopts_pop |
53 |
for x in ${qt_config} ${qconfig_add}; do |
54 |
@@ -546,9 +546,9 @@ qt5_regenerate_global_qconfigs() { |
55 |
done |
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 |
- "${qconfig_pri}" || eerror "Failed to sed QT_CONFIG in qconfig.pri" |
60 |
+ sed -i -e "s/^QT_CONFIG\s*+=.*/QT_CONFIG +=${new_qt_config}/" \ |
61 |
+ "${qconfig_pri}" || eerror "Failed to sed QT_CONFIG in ${qconfig_pri}" |
62 |
else |
63 |
- ewarn "'${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 |
} |