| 1 | # Copyright 2007-2008 Gentoo Foundation |
1 | # Copyright 2007-2008 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.12 2008/04/14 21:51:15 ingmar Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.14 2008/05/26 14:30:44 ingmar Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: qt4-build.eclass |
5 | # @ECLASS: qt4-build.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Caleb Tennis <caleb@gentoo.org> |
7 | # Caleb Tennis <caleb@gentoo.org> |
| 8 | # @BLURB: Eclass for Qt4 split ebuilds. |
8 | # @BLURB: Eclass for Qt4 split ebuilds. |
| … | |
… | |
| 31 | S=${WORKDIR}/${MY_P} |
31 | S=${WORKDIR}/${MY_P} |
| 32 | |
32 | |
| 33 | SRC_URI="ftp://ftp.trolltech.com/qt/source/${MY_P}.tar.bz2" |
33 | SRC_URI="ftp://ftp.trolltech.com/qt/source/${MY_P}.tar.bz2" |
| 34 | |
34 | |
| 35 | case "${PV}" in |
35 | case "${PV}" in |
| 36 | 4.4.0_rc*) |
36 | 4.4.0|4.4.0_rc*) |
| 37 | SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" |
37 | SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" |
| 38 | ;; |
38 | ;; |
| 39 | *) |
39 | *) |
| 40 | ;; |
40 | ;; |
| 41 | esac |
41 | esac |
| … | |
… | |
| 67 | |
67 | |
| 68 | qt4_unpack() { |
68 | qt4_unpack() { |
| 69 | local target targets |
69 | local target targets |
| 70 | for target in configure LICENSE.{GPL2,GPL3,QPL} projects.pro \ |
70 | for target in configure LICENSE.{GPL2,GPL3,QPL} projects.pro \ |
| 71 | src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \ |
71 | src/{qbase,qt_targets,qt_install}.pri bin config.tests mkspecs qmake \ |
| 72 | ${QT4_EXTRACT_DIRECTORIES} ${QT4_TARGET_DIRECTORIES}; do |
72 | ${QT4_EXTRACT_DIRECTORIES}; do |
| 73 | targets="${targets} ${MY_P}/${target}" |
73 | targets="${targets} ${MY_P}/${target}" |
| 74 | done |
74 | done |
| 75 | |
75 | |
| 76 | echo tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets} |
76 | echo tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets} |
| 77 | tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets} |
77 | tar xjpf "${DISTDIR}"/${MY_P}.tar.bz2 ${targets} |
| 78 | |
78 | |
| 79 | case "${PV}" in |
79 | case "${PV}" in |
| 80 | 4.4.0_rc*) |
80 | 4.4.0|4.4.0_rc*) |
| 81 | echo tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2 |
81 | echo tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2 |
| 82 | tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2 |
82 | tar xjpf "${DISTDIR}"/${MY_P}-headers.tar.bz2 |
| 83 | ;; |
83 | ;; |
| 84 | esac |
84 | esac |
| 85 | } |
85 | } |
| … | |
… | |
| 162 | # ARCH is set on Gentoo. QT now falls back to generic on an unsupported |
162 | # ARCH is set on Gentoo. QT now falls back to generic on an unsupported |
| 163 | # ${ARCH}. Therefore we convert it to supported values. |
163 | # ${ARCH}. Therefore we convert it to supported values. |
| 164 | case "${ARCH}" in |
164 | case "${ARCH}" in |
| 165 | amd64) myconf="${myconf} -arch x86_64" ;; |
165 | amd64) myconf="${myconf} -arch x86_64" ;; |
| 166 | ppc|ppc64) myconf="${myconf} -arch powerpc" ;; |
166 | ppc|ppc64) myconf="${myconf} -arch powerpc" ;; |
| 167 | x86) myconf="${myconf} -arch i386" ;; |
167 | x86|x86-*) myconf="${myconf} -arch i386" ;; |
| 168 | alpha|arm|ia64|mips|s390|sparc) myconf="${myconf} -arch ${ARCH}" ;; |
168 | alpha|arm|ia64|mips|s390|sparc) myconf="${myconf} -arch ${ARCH}" ;; |
| 169 | hppa|sh) myconf="${myconf} -arch generic" ;; |
169 | hppa|sh) myconf="${myconf} -arch generic" ;; |
| 170 | *) die "${ARCH} is unsupported by this eclass. Please file a bug." ;; |
170 | *) die "${ARCH} is unsupported by this eclass. Please file a bug." ;; |
| 171 | esac |
171 | esac |
| 172 | |
172 | |