| 1 | # Copyright 2007-2009 Gentoo Foundation |
1 | # Copyright 2007-2009 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.23 2009/02/14 23:47:44 hwoarang Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.25 2009/03/04 20:37:08 yngwin Exp $ |
| 4 | |
4 | |
| 5 | # @ECLASS: qt4-build.eclass |
5 | # @ECLASS: qt4-build.eclass |
| 6 | # @MAINTAINER: |
6 | # @MAINTAINER: |
| 7 | # Ben de Groot <yngwin@gentoo.org> |
7 | # Ben de Groot <yngwin@gentoo.org>, |
| 8 | # Markos Chandras <hwoarang@gentoo.org> |
8 | # Markos Chandras <hwoarang@gentoo.org>, |
| 9 | # Caleb Tennis <caleb@gentoo.org> |
9 | # Caleb Tennis <caleb@gentoo.org> |
| 10 | # @BLURB: Eclass for Qt4 split ebuilds. |
10 | # @BLURB: Eclass for Qt4 split ebuilds. |
| 11 | # @DESCRIPTION: |
11 | # @DESCRIPTION: |
| 12 | # This eclass contains various functions that are used when building Qt4 |
12 | # This eclass contains various functions that are used when building Qt4 |
| 13 | |
13 | |
| … | |
… | |
| 27 | esac |
27 | esac |
| 28 | MY_P=qt-x11-${SRCTYPE}-${MY_PV} |
28 | MY_P=qt-x11-${SRCTYPE}-${MY_PV} |
| 29 | S=${WORKDIR}/${MY_P} |
29 | S=${WORKDIR}/${MY_P} |
| 30 | |
30 | |
| 31 | HOMEPAGE="http://www.qtsoftware.com/" |
31 | HOMEPAGE="http://www.qtsoftware.com/" |
| 32 | SRC_URI="ftp://ftp.trolltech.com/qt/source/${MY_P}.tar.bz2" |
32 | SRC_URI="http://download.qtsoftware.com/qt/source/${MY_P}.tar.bz2" |
| 33 | |
33 | |
| 34 | case "${PV}" in |
34 | case "${PV}" in |
| 35 | 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;; |
35 | 4.4.?) SRC_URI="${SRC_URI} mirror://gentoo/${MY_P}-headers.tar.bz2" ;; |
| 36 | *) ;; |
36 | *) ;; |
| 37 | esac |
37 | esac |
|
|
38 | |
|
|
39 | if version_is_at_least 4.5 ${PV} ; then |
|
|
40 | LICENSE="|| ( LGPL-2.1 GPL-3 )" |
|
|
41 | fi |
| 38 | |
42 | |
| 39 | qt4-build_pkg_setup() { |
43 | qt4-build_pkg_setup() { |
| 40 | # EAPI=2 ebuilds set use-deps, others need this: |
44 | # EAPI=2 ebuilds set use-deps, others need this: |
| 41 | if [[ $EAPI != 2 ]]; then |
45 | if [[ $EAPI != 2 ]]; then |
| 42 | # Make sure debug setting corresponds with qt-core (bug 258512) |
46 | # Make sure debug setting corresponds with qt-core (bug 258512) |
| … | |
… | |
| 117 | if [[ ${PN} != qt-core ]]; then |
121 | if [[ ${PN} != qt-core ]]; then |
| 118 | skip_qmake_build_patch |
122 | skip_qmake_build_patch |
| 119 | skip_project_generation_patch |
123 | skip_project_generation_patch |
| 120 | symlink_binaries_to_buildtree |
124 | symlink_binaries_to_buildtree |
| 121 | fi |
125 | fi |
| 122 | |
126 | |
| 123 | if ! use custom-cxxflags;then |
127 | if ! use custom-cxxflags;then |
| 124 | # Don't let the user go too overboard with flags. |
128 | # Don't let the user go too overboard with flags. |
| 125 | strip-flags |
129 | strip-flags |
| 126 | replace-flags -O3 -O2 |
130 | replace-flags -O3 -O2 |
| 127 | fi |
131 | fi |
| … | |
… | |
| 137 | if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then |
141 | if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then |
| 138 | ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS" |
142 | ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS" |
| 139 | append-flags -fno-gcse |
143 | append-flags -fno-gcse |
| 140 | fi |
144 | fi |
| 141 | |
145 | |
| 142 | # Bug 172219 |
146 | # Bug 172219 |
| 143 | sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ |
147 | sed -e "s:QMAKE_CFLAGS_RELEASE.*=.*:QMAKE_CFLAGS_RELEASE=${CFLAGS}:" \ |
| 144 | -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ |
148 | -e "s:QMAKE_CXXFLAGS_RELEASE.*=.*:QMAKE_CXXFLAGS_RELEASE=${CXXFLAGS}:" \ |
| 145 | -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ |
149 | -e "s:QMAKE_LFLAGS_RELEASE.*=.*:QMAKE_LFLAGS_RELEASE=${LDFLAGS}:" \ |
| 146 | -e "s:X11R6/::" \ |
150 | -e "s:X11R6/::" \ |
| 147 | -i "${S}"/mkspecs/$(qt_mkspecs_dir)/qmake.conf || die "sed ${S}/mkspecs/$(qt_mkspecs_dir)/qmake.conf failed" |
151 | -i "${S}"/mkspecs/$(qt_mkspecs_dir)/qmake.conf || die "sed ${S}/mkspecs/$(qt_mkspecs_dir)/qmake.conf failed" |