/[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.124 Revision 1.130
1# Copyright 1999-2012 Gentoo Foundation 1# Copyright 1999-2012 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.124 2012/04/04 16:37:50 pesa Exp $ 3# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.130 2012/05/22 13:41:59 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"
41 else
39 SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.gz" 42 SRC_URI="http://get.qt.nokia.com/qt/source/${MY_P}.tar.gz"
43 fi
40 ;; 44 ;;
41esac 45esac
42 46
43IUSE="aqua debug pch" 47IUSE="aqua debug pch"
44if [[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]]; then 48if [[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]]; then
46fi 50fi
47if version_is_at_least 4.8; then 51if version_is_at_least 4.8; then
48 IUSE+=" c++0x qpa" 52 IUSE+=" c++0x qpa"
49fi 53fi
50 54
51DEPEND="dev-util/pkgconfig" 55DEPEND="virtual/pkgconfig"
52if [[ ${QT4_BUILD_TYPE} == live ]]; then 56if [[ ${QT4_BUILD_TYPE} == live ]]; then
53 DEPEND+=" dev-lang/perl" 57 DEPEND+=" dev-lang/perl"
54fi 58fi
55 59
56RDEPEND=" 60RDEPEND="
57 !<x11-libs/qt-assistant-${PV} 61 !<x11-libs/qt-assistant-${PV}
58 !>x11-libs/qt-assistant-${PV}-r9999 62 !>x11-libs/qt-assistant-${PV}-r9999
63 !<x11-libs/qt-bearer-${PV}
64 !>x11-libs/qt-bearer-${PV}-r9999
59 !<x11-libs/qt-core-${PV} 65 !<x11-libs/qt-core-${PV}
60 !>x11-libs/qt-core-${PV}-r9999 66 !>x11-libs/qt-core-${PV}-r9999
61 !<x11-libs/qt-dbus-${PV} 67 !<x11-libs/qt-dbus-${PV}
62 !>x11-libs/qt-dbus-${PV}-r9999 68 !>x11-libs/qt-dbus-${PV}-r9999
63 !<x11-libs/qt-declarative-${PV} 69 !<x11-libs/qt-declarative-${PV}
279 sed -i -e "/bin\/qmake/ s: \"QT_BUILD_TREE=: \ 285 sed -i -e "/bin\/qmake/ s: \"QT_BUILD_TREE=: \
280 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \ 286 'QMAKE_CC=$(tc-getCC)' 'QMAKE_CXX=$(tc-getCXX)' 'QMAKE_LINK=$(tc-getCXX)' \
281 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \ 287 'QMAKE_CFLAGS+=${CFLAGS}' 'QMAKE_CXXFLAGS+=${CXXFLAGS}' 'QMAKE_LFLAGS+=${LDFLAGS}'&:" \
282 || die "sed config.tests failed" 288 || die "sed config.tests failed"
283 289
290 if ! version_is_at_least 4.8; then
284 # Strip predefined CFLAGS from mkspecs (bug 312689) 291 # Strip predefined CFLAGS from mkspecs (bugs 312689 and 352778)
285 sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf || die 292 sed -i -e '/^QMAKE_CFLAGS_RELEASE/s:+=.*:+=:' mkspecs/common/g++.conf || die
293 fi
286 294
287 # Bug 172219 295 # Bug 172219
288 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die 296 sed -e 's:/X11R6/:/:' -i mkspecs/$(qt_mkspecs_dir)/qmake.conf || die
289 297
290 if [[ ${CHOST} == *-darwin* ]]; then 298 if [[ ${CHOST} == *-darwin* ]]; then
500# @DESCRIPTION: 508# @DESCRIPTION:
501# For MacOS X we need to add some symlinks when frameworks are 509# For MacOS X we need to add some symlinks when frameworks are
502# being used, to avoid complications with some more or less stupid packages. 510# being used, to avoid complications with some more or less stupid packages.
503fix_includes() { 511fix_includes() {
504 if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then 512 if use aqua && [[ ${CHOST##*-darwin} -ge 9 ]]; then
513 local frw dest f h rdir
505 # Some packages tend to include <Qt/...> 514 # Some packages tend to include <Qt/...>
506 dodir "${QTHEADERDIR#${EPREFIX}}"/Qt 515 dodir "${QTHEADERDIR#${EPREFIX}}"/Qt
507 516
508 # Fake normal headers when frameworks are installed... eases life later on 517 # Fake normal headers when frameworks are installed... eases life later
509 local dest f h 518 # on, make sure we use relative links though, as some ebuilds assume
519 # these dirs exist in src_install to add additional files
520 f=${QTHEADERDIR}
521 h=${QTLIBDIR}
522 while [[ -n ${f} && ${f%%/*} == ${h%%/*} ]] ; do
523 f=${f#*/}
524 h=${h#*/}
525 done
526 rdir=${h}
527 f="../"
528 while [[ ${h} == */* ]] ; do
529 f="${f}../"
530 h=${h#*/}
531 done
532 rdir="${f}${rdir}"
533
510 for frw in "${D}${QTLIBDIR}"/*.framework; do 534 for frw in "${D}${QTLIBDIR}"/*.framework; do
511 [[ -e "${frw}"/Headers ]] || continue 535 [[ -e "${frw}"/Headers ]] || continue
512 f=$(basename ${frw}) 536 f=$(basename ${frw})
513 dest="${QTHEADERDIR#${EPREFIX}}"/${f%.framework} 537 dest="${QTHEADERDIR#${EPREFIX}}"/${f%.framework}
514 dosym "${QTLIBDIR#${EPREFIX}}"/${f}/Headers "${dest}" 538 dosym "${rdir}"/${f}/Headers "${dest}"
515 539
516 # Link normal headers as well. 540 # Link normal headers as well.
517 for hdr in "${D}/${QTLIBDIR}/${f}"/Headers/*; do 541 for hdr in "${D}/${QTLIBDIR}/${f}"/Headers/*; do
518 h=$(basename ${hdr}) 542 h=$(basename ${hdr})
519 dosym "${QTLIBDIR#${EPREFIX}}"/${f}/Headers/${h} "${QTHEADERDIR#${EPREFIX}}"/Qt/${h} 543 dosym "../${rdir}"/${f}/Headers/${h} \
544 "${QTHEADERDIR#${EPREFIX}}"/Qt/${h}
520 done 545 done
521 done 546 done
522 fi 547 fi
523} 548}
524 549
557 QTDEMOSDIR=${QTDATADIR}/demos 582 QTDEMOSDIR=${QTDATADIR}/demos
558 QMAKE_LIBDIR_QT=${QTLIBDIR} 583 QMAKE_LIBDIR_QT=${QTLIBDIR}
559 QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4 584 QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4
560 585
561 PLATFORM=$(qt_mkspecs_dir) 586 PLATFORM=$(qt_mkspecs_dir)
562
563 unset QMAKESPEC 587 unset QMAKESPEC
588
589 export XDG_CONFIG_HOME="${T}"
564} 590}
565 591
566# @FUNCTION: prepare_directories 592# @FUNCTION: prepare_directories
567# @USAGE: < directories > 593# @USAGE: < directories >
568# @INTERNAL 594# @INTERNAL

Legend:
Removed from v.1.124  
changed lines
  Added in v.1.130

  ViewVC Help
Powered by ViewVC 1.1.20