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: Sat, 31 Mar 2012 12:21:58
Message-Id: 1333196452.efbb37fbd3df94148660e4417504f3b591633b8d.pesa@gentoo
1 commit: efbb37fbd3df94148660e4417504f3b591633b8d
2 Author: Davide Pesavento <davidepesa <AT> gmail <DOT> com>
3 AuthorDate: Sat Mar 31 12:20:52 2012 +0000
4 Commit: Davide Pesavento <pesa <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 31 12:20:52 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/qt.git;a=commit;h=efbb37fb
7
8 [qt4-build.eclass] Apply prefix fixes for qt 4.8, bug #407523.
9
10 ---
11 eclass/qt4-build.eclass | 27 +++++++++++++++++++++------
12 1 files changed, 21 insertions(+), 6 deletions(-)
13
14 diff --git a/eclass/qt4-build.eclass b/eclass/qt4-build.eclass
15 index e3c60cf..78d699f 100644
16 --- a/eclass/qt4-build.eclass
17 +++ b/eclass/qt4-build.eclass
18 @@ -227,8 +227,9 @@ qt4-build_src_prepare() {
19 fi
20
21 if [[ ${CHOST} == *86*-apple-darwin* ]]; then
22 - # qmake bus errors with -O2 but -O3 works
23 - replace-flags -O2 -O3
24 + # qmake bus errors with -O2 or -O3 but -O1 works
25 + # Bug 373061
26 + replace-flags -O[23] -O1
27 fi
28
29 # Bug 178652
30 @@ -289,17 +290,31 @@ qt4-build_src_prepare() {
31 if [[ ${CHOST} == *-darwin* ]]; then
32 # Set FLAGS *and* remove -arch, since our gcc-apple is multilib
33 # crippled (by design) :/
34 + local mac_gpp_conf=
35 + if [[ -f mkspecs/common/mac-g++.conf ]]; then
36 + # qt < 4.8 has mac-g++.conf
37 + mac_gpp_conf="mkspecs/common/mac-g++.conf"
38 + elif [[ -f mkspecs/common/g++-macx.conf ]]; then
39 + # qt >= 4.8 has g++-macx.conf
40 + mac_gpp_conf="mkspecs/common/g++-macx.conf"
41 + else
42 + die "no known conf file for mac found"
43 + fi
44 sed \
45 -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
46 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
47 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=-headerpad_max_install_names ${LDFLAGS}:" \
48 -e "s:-arch\s\w*::g" \
49 - -i mkspecs/common/mac-g++.conf \
50 - || die "sed mkspecs/common/mac-g++.conf failed"
51 + -i ${mac_gpp_conf} \
52 + || die "sed ${mac_gpp_conf} failed"
53
54 # Fix configure's -arch settings that appear in qmake/Makefile and also
55 # fix arch handling (automagically duplicates our -arch arg and breaks
56 # pch). Additionally disable Xarch support.
57 + local mac_gcc_confs="${mac_gpp_conf}"
58 + if [[ -f mkspecs/common/gcc-base-macx.conf ]]; then
59 + mac_gcc_confs+=" mkspecs/common/gcc-base-macx.conf"
60 + fi
61 sed \
62 -e "s:-arch i386::" \
63 -e "s:-arch ppc::" \
64 @@ -310,14 +325,14 @@ qt4-build_src_prepare() {
65 -e "s:CFG_MAC_XARCH=yes:CFG_MAC_XARCH=no:g" \
66 -e "s:-Xarch_x86_64::g" \
67 -e "s:-Xarch_ppc64::g" \
68 - -i configure mkspecs/common/mac-g++.conf \
69 + -i configure ${mac_gcc_confs} \
70 || die "sed -arch/-Xarch failed"
71
72 # On Snow Leopard don't fall back to 10.5 deployment target.
73 if [[ ${CHOST} == *-apple-darwin10 ]]; then
74 sed -e "s:QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET.*:QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.6:g" \
75 -e "s:-mmacosx-version-min=10.[0-9]:-mmacosx-version-min=10.6:g" \
76 - -i configure mkspecs/common/mac-g++.conf \
77 + -i configure ${mac_gpp_conf} \
78 || die "sed deployment target failed"
79 fi
80 fi