| 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.128 2012/05/07 21:28:01 pesa Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.132 2012/06/07 15:36: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" |
|
|
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 | ;; |
| 41 | esac |
45 | esac |
| 42 | |
46 | |
| 43 | IUSE="aqua debug pch" |
47 | IUSE="aqua debug pch" |
| 44 | if [[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]]; then |
48 | if [[ ${CATEGORY}/${PN} != x11-libs/qt-xmlpatterns ]]; then |
| … | |
… | |
| 52 | if [[ ${QT4_BUILD_TYPE} == live ]]; then |
56 | if [[ ${QT4_BUILD_TYPE} == live ]]; then |
| 53 | DEPEND+=" dev-lang/perl" |
57 | DEPEND+=" dev-lang/perl" |
| 54 | fi |
58 | fi |
| 55 | |
59 | |
| 56 | RDEPEND=" |
60 | RDEPEND=" |
| 57 | !<x11-libs/qt-assistant-${PV} |
61 | !<x11-libs/qt-assistant-${PV}:4 |
| 58 | !>x11-libs/qt-assistant-${PV}-r9999 |
62 | !>x11-libs/qt-assistant-${PV}-r9999:4 |
| 59 | !<x11-libs/qt-bearer-${PV} |
63 | !<x11-libs/qt-bearer-${PV}:4 |
| 60 | !>x11-libs/qt-bearer-${PV}-r9999 |
64 | !>x11-libs/qt-bearer-${PV}-r9999:4 |
| 61 | !<x11-libs/qt-core-${PV} |
65 | !<x11-libs/qt-core-${PV}:4 |
| 62 | !>x11-libs/qt-core-${PV}-r9999 |
66 | !>x11-libs/qt-core-${PV}-r9999:4 |
| 63 | !<x11-libs/qt-dbus-${PV} |
67 | !<x11-libs/qt-dbus-${PV}:4 |
| 64 | !>x11-libs/qt-dbus-${PV}-r9999 |
68 | !>x11-libs/qt-dbus-${PV}-r9999:4 |
| 65 | !<x11-libs/qt-declarative-${PV} |
69 | !<x11-libs/qt-declarative-${PV}:4 |
| 66 | !>x11-libs/qt-declarative-${PV}-r9999 |
70 | !>x11-libs/qt-declarative-${PV}-r9999:4 |
| 67 | !<x11-libs/qt-demo-${PV} |
71 | !<x11-libs/qt-demo-${PV}:4 |
| 68 | !>x11-libs/qt-demo-${PV}-r9999 |
72 | !>x11-libs/qt-demo-${PV}-r9999:4 |
| 69 | !<x11-libs/qt-gui-${PV} |
73 | !<x11-libs/qt-gui-${PV}:4 |
| 70 | !>x11-libs/qt-gui-${PV}-r9999 |
74 | !>x11-libs/qt-gui-${PV}-r9999:4 |
| 71 | !<x11-libs/qt-multimedia-${PV} |
75 | !<x11-libs/qt-multimedia-${PV}:4 |
| 72 | !>x11-libs/qt-multimedia-${PV}-r9999 |
76 | !>x11-libs/qt-multimedia-${PV}-r9999:4 |
| 73 | !<x11-libs/qt-opengl-${PV} |
77 | !<x11-libs/qt-opengl-${PV}:4 |
| 74 | !>x11-libs/qt-opengl-${PV}-r9999 |
78 | !>x11-libs/qt-opengl-${PV}-r9999:4 |
| 75 | !<x11-libs/qt-openvg-${PV} |
79 | !<x11-libs/qt-openvg-${PV}:4 |
| 76 | !>x11-libs/qt-openvg-${PV}-r9999 |
80 | !>x11-libs/qt-openvg-${PV}-r9999:4 |
| 77 | !<x11-libs/qt-phonon-${PV} |
81 | !<x11-libs/qt-phonon-${PV}:4 |
| 78 | !>x11-libs/qt-phonon-${PV}-r9999 |
82 | !>x11-libs/qt-phonon-${PV}-r9999:4 |
| 79 | !<x11-libs/qt-qt3support-${PV} |
83 | !<x11-libs/qt-qt3support-${PV}:4 |
| 80 | !>x11-libs/qt-qt3support-${PV}-r9999 |
84 | !>x11-libs/qt-qt3support-${PV}-r9999:4 |
| 81 | !<x11-libs/qt-script-${PV} |
85 | !<x11-libs/qt-script-${PV}:4 |
| 82 | !>x11-libs/qt-script-${PV}-r9999 |
86 | !>x11-libs/qt-script-${PV}-r9999:4 |
| 83 | !<x11-libs/qt-sql-${PV} |
87 | !<x11-libs/qt-sql-${PV}:4 |
| 84 | !>x11-libs/qt-sql-${PV}-r9999 |
88 | !>x11-libs/qt-sql-${PV}-r9999:4 |
| 85 | !<x11-libs/qt-svg-${PV} |
89 | !<x11-libs/qt-svg-${PV}:4 |
| 86 | !>x11-libs/qt-svg-${PV}-r9999 |
90 | !>x11-libs/qt-svg-${PV}-r9999:4 |
| 87 | !<x11-libs/qt-test-${PV} |
91 | !<x11-libs/qt-test-${PV}:4 |
| 88 | !>x11-libs/qt-test-${PV}-r9999 |
92 | !>x11-libs/qt-test-${PV}-r9999:4 |
| 89 | !<x11-libs/qt-webkit-${PV} |
93 | !<x11-libs/qt-webkit-${PV}:4 |
| 90 | !>x11-libs/qt-webkit-${PV}-r9999 |
94 | !>x11-libs/qt-webkit-${PV}-r9999:4 |
| 91 | !<x11-libs/qt-xmlpatterns-${PV} |
95 | !<x11-libs/qt-xmlpatterns-${PV}:4 |
| 92 | !>x11-libs/qt-xmlpatterns-${PV}-r9999 |
96 | !>x11-libs/qt-xmlpatterns-${PV}-r9999:4 |
| 93 | " |
97 | " |
| 94 | |
98 | |
| 95 | S=${WORKDIR}/${MY_P} |
99 | S=${WORKDIR}/${MY_P} |
| 96 | |
100 | |
| 97 | # @FUNCTION: qt4-build_pkg_setup |
101 | # @FUNCTION: qt4-build_pkg_setup |
| … | |
… | |
| 100 | qt4-build_pkg_setup() { |
104 | qt4-build_pkg_setup() { |
| 101 | [[ ${EAPI} == 2 ]] && use !prefix && EPREFIX= |
105 | [[ ${EAPI} == 2 ]] && use !prefix && EPREFIX= |
| 102 | |
106 | |
| 103 | # Protect users by not allowing downgrades between releases |
107 | # Protect users by not allowing downgrades between releases |
| 104 | # Downgrading revisions within the same release should be allowed |
108 | # Downgrading revisions within the same release should be allowed |
| 105 | if has_version '>'${CATEGORY}/${P}-r9999; then |
109 | if has_version ">${CATEGORY}/${P}-r9999:4"; then |
| 106 | if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then |
110 | if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then |
| 107 | eerror |
111 | eerror |
| 108 | eerror "Sanity check to keep you from breaking your system:" |
112 | eerror "Sanity check to keep you from breaking your system:" |
| 109 | eerror " Downgrading Qt is completely unsupported and will break your system!" |
113 | eerror " Downgrading Qt is completely unsupported and will break your system!" |
| 110 | eerror |
114 | eerror |
| … | |
… | |
| 411 | conf+=" -no-separate-debug-info" |
415 | conf+=" -no-separate-debug-info" |
| 412 | |
416 | |
| 413 | # exceptions USE flag |
417 | # exceptions USE flag |
| 414 | conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)" |
418 | conf+=" $(in_iuse exceptions && qt_use exceptions || echo -exceptions)" |
| 415 | |
419 | |
| 416 | # disable RPATH on Qt >= 4.8 (bug 380415) |
420 | # disable rpath on Qt >= 4.8 (bug 380415) |
|
|
421 | # but leave it enabled on prefix (bug 417169) |
| 417 | version_is_at_least 4.8 && conf+=" -no-rpath" |
422 | version_is_at_least 4.8 && use !prefix && conf+=" -no-rpath" |
| 418 | |
423 | |
| 419 | # precompiled headers don't work on hardened, where the flag is masked |
424 | # precompiled headers don't work on hardened, where the flag is masked |
| 420 | conf+=" $(qt_use pch)" |
425 | conf+=" $(qt_use pch)" |
| 421 | |
426 | |
| 422 | # -reduce-relocations |
427 | # -reduce-relocations |
| … | |
… | |
| 578 | QTDEMOSDIR=${QTDATADIR}/demos |
583 | QTDEMOSDIR=${QTDATADIR}/demos |
| 579 | QMAKE_LIBDIR_QT=${QTLIBDIR} |
584 | QMAKE_LIBDIR_QT=${QTLIBDIR} |
| 580 | QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4 |
585 | QT_INSTALL_PREFIX=${EPREFIX}/usr/$(get_libdir)/qt4 |
| 581 | |
586 | |
| 582 | PLATFORM=$(qt_mkspecs_dir) |
587 | PLATFORM=$(qt_mkspecs_dir) |
| 583 | |
|
|
| 584 | unset QMAKESPEC |
588 | unset QMAKESPEC |
|
|
589 | |
|
|
590 | export XDG_CONFIG_HOME="${T}" |
| 585 | } |
591 | } |
| 586 | |
592 | |
| 587 | # @FUNCTION: prepare_directories |
593 | # @FUNCTION: prepare_directories |
| 588 | # @USAGE: < directories > |
594 | # @USAGE: < directories > |
| 589 | # @INTERNAL |
595 | # @INTERNAL |