Gentoo Archives: gentoo-commits

From: "Davide Pesavento (pesa)" <pesa@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in eclass: qt4-build.eclass
Date: Sun, 01 Jan 2012 18:12:13
Message-Id: 20120101181203.AE44C2004B@flycatcher.gentoo.org
1 pesa 12/01/01 18:12:03
2
3 Modified: qt4-build.eclass
4 Log:
5 Minor coding style cleanup.
6
7 Revision Changes Path
8 1.114 eclass/qt4-build.eclass
9
10 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build.eclass?rev=1.114&view=markup
11 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build.eclass?rev=1.114&content-type=text/plain
12 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/qt4-build.eclass?r1=1.113&r2=1.114
13
14 Index: qt4-build.eclass
15 ===================================================================
16 RCS file: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v
17 retrieving revision 1.113
18 retrieving revision 1.114
19 diff -u -r1.113 -r1.114
20 --- qt4-build.eclass 31 Dec 2011 00:46:04 -0000 1.113
21 +++ qt4-build.eclass 1 Jan 2012 18:12:03 -0000 1.114
22 @@ -1,6 +1,6 @@
23 # Copyright 1999-2011 Gentoo Foundation
24 # Distributed under the terms of the GNU General Public License v2
25 -# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.113 2011/12/31 00:46:04 pesa Exp $
26 +# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.114 2012/01/01 18:12:03 pesa Exp $
27
28 # @ECLASS: qt4-build.eclass
29 # @MAINTAINER:
30 @@ -238,7 +238,8 @@
31 CFLAGS='${CFLAGS}'\n\
32 CXXFLAGS='${CXXFLAGS}'\n\
33 LDFLAGS='${LDFLAGS}'\n" \
34 - -i configure || die "sed SYSTEM_VARIABLES failed"
35 + -i configure \
36 + || die "sed SYSTEM_VARIABLES failed"
37
38 # Respect CC, CXX, LINK and *FLAGS in config.tests
39 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \
40 @@ -247,17 +248,22 @@
41 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \
42 || die "sed config.tests failed"
43
44 + # Strip predefined CFLAGS from mkspecs (bug 312689)
45 + sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf || die
46 +
47 # Bug 172219
48 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
49
50 if [[ ${CHOST} == *-darwin* ]]; then
51 # Set FLAGS *and* remove -arch, since our gcc-apple is multilib
52 # crippled (by design) :/
53 - sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
54 + sed \
55 + -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
56 -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \
57 -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=-headerpad_max_install_names ${LDFLAGS}:" \
58 -e "s:-arch\s\w*::g" \
59 - -i mkspecs/common/mac-g++.conf || die "sed mkspecs/common/mac-g++.conf failed"
60 + -i mkspecs/common/mac-g++.conf \
61 + || die "sed mkspecs/common/mac-g++.conf failed"
62
63 # Fix configure's -arch settings that appear in qmake/Makefile and also
64 # fix arch handling (automagically duplicates our -arch arg and breaks
65 @@ -272,38 +278,35 @@
66 -e "s:CFG_MAC_XARCH=yes:CFG_MAC_XARCH=no:g" \
67 -e "s:-Xarch_x86_64::g" \
68 -e "s:-Xarch_ppc64::g" \
69 - -i configure mkspecs/common/mac-g++.conf || die "sed -arch/-Xarch failed"
70 + -i configure mkspecs/common/mac-g++.conf \
71 + || die "sed -arch/-Xarch failed"
72
73 # On Snow Leopard don't fall back to 10.5 deployment target.
74 if [[ ${CHOST} == *-apple-darwin10 ]] ; then
75 sed -e "s:QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET.*:QMakeVar set QMAKE_MACOSX_DEPLOYMENT_TARGET 10.6:g" \
76 -e "s:-mmacosx-version-min=10.[0-9]:-mmacosx-version-min=10.6:g" \
77 - -i configure mkspecs/common/mac-g++.conf || die "sed deployment target failed"
78 + -i configure mkspecs/common/mac-g++.conf \
79 + || die "sed deployment target failed"
80 fi
81 fi
82
83 # this one is needed for all systems with a separate -liconv, apart from
84 # Darwin, for which the sources already cater for -liconv
85 if use !elibc_glibc && [[ ${CHOST} != *-darwin* ]] ; then
86 - sed \
87 - -e "s|mac:LIBS += -liconv|LIBS += -liconv|g" \
88 + sed -e 's|mac:\(LIBS += -liconv\)|\1|g' \
89 -i config.tests/unix/iconv/iconv.pro \
90 - || die "sed on iconv.pro failed"
91 + || die "sed iconv.pro failed"
92 fi
93
94 # we need some patches for Solaris
95 - sed -i \
96 - -e '/^QMAKE_LFLAGS_THREAD/a\QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,' \
97 + sed -i -e '/^QMAKE_LFLAGS_THREAD/a\QMAKE_LFLAGS_DYNAMIC_LIST = -Wl,--dynamic-list,' \
98 mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
99 # use GCC over SunStudio
100 sed -i -e '/PLATFORM=solaris-cc/s/cc/g++/' configure || die
101 - # don't flirt with non-Prefix stuff, we're quite possessive
102 + # do not flirt with non-Prefix stuff, we're quite possessive
103 sed -i -e '/^QMAKE_\(LIB\|INC\)DIR\(_X11\|_OPENGL\|\)\t/s/=.*$/=/' \
104 mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
105
106 - # strip predefined CFLAGS from mkspecs (bug 312689)
107 - sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf
108 -
109 base_src_prepare
110 }
111
112 @@ -344,7 +347,7 @@
113 # We are crazy and build cocoa + qt3support :-)
114 if use qt3support; then
115 sed -e "/case \"\$PLATFORM,\$CFG_MAC_COCOA\" in/,/;;/ s|CFG_QT3SUPPORT=\"no\"|CFG_QT3SUPPORT=\"yes\"|" \
116 - -i configure
117 + -i configure || die
118 fi
119
120 # We need the source's headers, not the installed ones.
121 @@ -394,7 +397,7 @@
122 dodir "${QTHEADERDIR#${EPREFIX}}"/Qt
123
124 # Fake normal headers when frameworks are installed... eases life later on
125 - local dest f
126 + local dest f h
127 for frw in "${D}${QTLIBDIR}"/*.framework; do
128 [[ -e "${frw}"/Headers ]] || continue
129 f=$(basename ${frw})
130 @@ -423,7 +426,7 @@
131 fix_includes
132
133 # remove .la files since we are building only shared Qt libraries
134 - find "${D}"${QTLIBDIR} -name "*.la" -print0 | xargs -0 rm
135 + find "${D}"${QTLIBDIR} -type f -name '*.la' -print0 | xargs -0 rm -f
136 }
137
138 # @FUNCTION: setqtenv