/[gentoo-x86]/eclass/qt4-build.eclass
Gentoo

Diff of /eclass/qt4-build.eclass

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.111 Revision 1.113
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.111 2011/12/27 16:04:27 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.113 2011/12/31 00:46:04 pesa Exp $
4 4
5# @ECLASS: qt4-build.eclass 5# @ECLASS: qt4-build.eclass
6# @MAINTAINER: 6# @MAINTAINER:
7# Qt herd <qt@gentoo.org> 7# Qt herd <qt@gentoo.org>
8# @BLURB: Eclass for Qt4 split ebuilds. 8# @BLURB: Eclass for Qt4 split ebuilds.
136# @FUNCTION: qt4-build_src_unpack 136# @FUNCTION: qt4-build_src_unpack
137# @DESCRIPTION: 137# @DESCRIPTION:
138# Unpacks the sources. 138# Unpacks the sources.
139qt4-build_src_unpack() { 139qt4-build_src_unpack() {
140 setqtenv 140 setqtenv
141 local target targets= 141
142 local tarball="${MY_P}.tar.gz" target= targets=
142 for target in configure LICENSE.GPL3 LICENSE.LGPL projects.pro \ 143 for target in configure LICENSE.GPL3 LICENSE.LGPL projects.pro \
143 src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \ 144 src/{qbase,qt_targets,qt_install}.pri bin config.tests \
144 ${QT4_EXTRACT_DIRECTORIES}; do 145 mkspecs qmake ${QT4_EXTRACT_DIRECTORIES}
146 do
145 targets+=" ${MY_P}/${target}" 147 targets+="${MY_P}/${target} "
146 done 148 done
147 149
150 ebegin "Unpacking parts of ${tarball}:" ${targets//${MY_P}\/}
148 echo tar xzf "${DISTDIR}"/${MY_P}.tar.gz ${targets} 151 tar -xzf "${DISTDIR}/${tarball}" ${targets}
149 tar xzf "${DISTDIR}"/${MY_P}.tar.gz ${targets} || die 152 eend $? || die "failed to unpack"
150} 153}
151 154
152# @ECLASS-VARIABLE: PATCHES 155# @ECLASS-VARIABLE: PATCHES
153# @DEFAULT_UNSET 156# @DEFAULT_UNSET
154# @DESCRIPTION: 157# @DESCRIPTION:
235 CFLAGS='${CFLAGS}'\n\ 238 CFLAGS='${CFLAGS}'\n\
236 CXXFLAGS='${CXXFLAGS}'\n\ 239 CXXFLAGS='${CXXFLAGS}'\n\
237 LDFLAGS='${LDFLAGS}'\n" \ 240 LDFLAGS='${LDFLAGS}'\n" \
238 -i configure || die "sed SYSTEM_VARIABLES failed" 241 -i configure || die "sed SYSTEM_VARIABLES failed"
239 242
240 # Bug 321335 243 # Respect CC, CXX, LINK and *FLAGS in config.tests
241 find config.tests/unix -name '*.test' -type f -exec grep -lZ \$MAKE '{}' \; | xargs -0 \ 244 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \
242 sed -e "s:\(\$MAKE\):\1 CC='$(tc-getCC)' CXX='$(tc-getCXX)' LINK='$(tc-getCXX)':g" \ 245 sed -i -e "/bin\/qmake/ s: \"QT_BUILD_TREE=: \
243 -i || die "sed test compilers failed" 246 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \
247 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \
248 || die "sed config.tests failed"
244 249
245 # Bug 172219 250 # Bug 172219
246 sed -e "s:X11R6/::" -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 251 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
247 252
248 if [[ ${CHOST} == *-darwin* ]]; then 253 if [[ ${CHOST} == *-darwin* ]]; then
249 # Set FLAGS *and* remove -arch, since our gcc-apple is multilib 254 # Set FLAGS *and* remove -arch, since our gcc-apple is multilib
250 # crippled (by design) :/ 255 # crippled (by design) :/
251 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ 256 sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \
293 # use GCC over SunStudio 298 # use GCC over SunStudio
294 sed -i -e '/PLATFORM=solaris-cc/s/cc/g++/' configure || die 299 sed -i -e '/PLATFORM=solaris-cc/s/cc/g++/' configure || die
295 # don't flirt with non-Prefix stuff, we're quite possessive 300 # don't flirt with non-Prefix stuff, we're quite possessive
296 sed -i -e '/^QMAKE_\(LIB\|INC\)DIR\(_X11\|_OPENGL\|\)\t/s/=.*$/=/' \ 301 sed -i -e '/^QMAKE_\(LIB\|INC\)DIR\(_X11\|_OPENGL\|\)\t/s/=.*$/=/' \
297 mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 302 mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
303
298 # strip predefined CFLAGS from qmake ( bug #312689 ) 304 # strip predefined CFLAGS from mkspecs (bug 312689)
299 sed -i '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf 305 sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf
300 306
301 base_src_prepare 307 base_src_prepare
302} 308}
303 309
304# @FUNCTION: qt4-build_src_configure 310# @FUNCTION: qt4-build_src_configure

Legend:
Removed from v.1.111  
changed lines
  Added in v.1.113

  ViewVC Help
Powered by ViewVC 1.1.20