/[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.139 Revision 1.142
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2013 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.139 2012/11/12 09:28:53 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.142 2013/01/03 08:39:49 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.
34 EGIT_REPO_URI="git://gitorious.org/qt/qt.git 34 EGIT_REPO_URI="git://gitorious.org/qt/qt.git
35 https://git.gitorious.org/qt/qt.git" 35 https://git.gitorious.org/qt/qt.git"
36 EGIT_BRANCH=${PV%.9999} 36 EGIT_BRANCH=${PV%.9999}
37 ;; 37 ;;
38 release) 38 release)
39 if version_is_at_least 4.8.1; then
40 SRC_URI="http://releases.qt-project.org/qt4/source/${MY_P}.tar.gz" 39 SRC_URI="http://releases.qt-project.org/qt4/source/${MY_P}.tar.gz"
41 else
42 SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.gz"
43 fi
44 ;; 40 ;;
45esac 41esac
46 42
47IUSE="aqua debug pch" 43IUSE="aqua debug pch"
48[[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]] && IUSE+=" +exceptions" 44[[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]] && IUSE+=" +exceptions"
49if version_is_at_least 4.8; then
50 [[ ${CATEGORY}/${PN} != x11-libs/qt-webkit ]] && IUSE+=" c++0x" 45[[ ${CATEGORY}/${PN} != x11-libs/qt-webkit ]] && IUSE+=" c++0x"
51 version_is_at_least 4.8.3 || IUSE+=" qpa"
52fi
53 46
54DEPEND="virtual/pkgconfig" 47DEPEND="virtual/pkgconfig"
55if [[ ${QT4_BUILD_TYPE} == live ]]; then 48if [[ ${QT4_BUILD_TYPE} == live ]]; then
56 DEPEND+=" dev-lang/perl" 49 DEPEND+=" dev-lang/perl"
57fi 50fi
272 -i configure \ 265 -i configure \
273 || die "sed SYSTEM_VARIABLES failed" 266 || die "sed SYSTEM_VARIABLES failed"
274 267
275 # Respect CC, CXX, LINK and *FLAGS in config.tests 268 # Respect CC, CXX, LINK and *FLAGS in config.tests
276 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \ 269 find config.tests/unix -name '*.test' -type f -print0 | xargs -0 \
277 sed -i -e "/bin\/qmake/ s: \"QT_BUILD_TREE=: \ 270 sed -i -e "/bin\/qmake/ s: \"\$SRCDIR/: \
278 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \ 271 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \
279 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \ 272 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \
280 || die "sed config.tests failed" 273 || die "sed config.tests failed"
281
282 if ! version_is_at_least 4.8; then
283 # Strip predefined CFLAGS from mkspecs (bugs 312689 and 352778)
284 sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf || die
285 fi
286 274
287 # Bug 172219 275 # Bug 172219
288 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 276 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
289 277
290 if [[ ${CHOST} == *-darwin* ]]; then 278 if [[ ${CHOST} == *-darwin* ]]; then
409 conf+=" -no-separate-debug-info" 397 conf+=" -no-separate-debug-info"
410 398
411 # exceptions USE flag 399 # exceptions USE flag
412 conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)" 400 conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)"
413 401
414 # disable rpath on Qt >= 4.8 (bug 380415) 402 # disable rpath (bug 380415), except on prefix (bug 417169)
415 # but leave it enabled on prefix (bug 417169) 403 use prefix || conf+=" -no-rpath"
416 version_is_at_least 4.8 && use !prefix && conf+=" -no-rpath"
417 404
418 # precompiled headers don't work on hardened, where the flag is masked 405 # precompiled headers don't work on hardened, where the flag is masked
419 conf+=" $(qt_use pch)" 406 conf+=" $(qt_use pch)"
420 407
421 # -reduce-relocations 408 # -reduce-relocations
434 if use_if_iuse glib; then 421 if use_if_iuse glib; then
435 local glibflags="$(pkg-config --cflags --libs glib-2.0 gthread-2.0)" 422 local glibflags="$(pkg-config --cflags --libs glib-2.0 gthread-2.0)"
436 # avoid the -pthread argument 423 # avoid the -pthread argument
437 conf+=" ${glibflags//-pthread}" 424 conf+=" ${glibflags//-pthread}"
438 unset glibflags 425 unset glibflags
439 fi
440
441 if use_if_iuse qpa; then
442 echo
443 ewarn "The qpa useflag enables the Qt Platform Abstraction, formely"
444 ewarn "known as Qt Lighthouse. If you are not sure what that is, then"
445 ewarn "disable it before reporting any bugs related to this useflag."
446 echo
447 conf+=" -qpa"
448 fi 426 fi
449 427
450 if use aqua; then 428 if use aqua; then
451 # On (snow) leopard use the new (frameworked) cocoa code. 429 # On (snow) leopard use the new (frameworked) cocoa code.
452 if [[ ${CHOST##*-darwin} -ge 9 ]]; then 430 if [[ ${CHOST##*-darwin} -ge 9 ]]; then

Legend:
Removed from v.1.139  
changed lines
  Added in v.1.142

  ViewVC Help
Powered by ViewVC 1.1.20