| 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.11 2008/04/10 14:23:45 ingmar Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.12 2008/04/14 21:51:15 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. |
| 9 | # @DESCRIPTION: |
9 | # @DESCRIPTION: |
| 10 | # This eclass contains various functions that are used when building Qt4 |
10 | # This eclass contains various functions that are used when building Qt4 |
| 11 | |
11 | |
| 12 | inherit eutils multilib toolchain-funcs flag-o-matic |
12 | inherit eutils multilib toolchain-funcs flag-o-matic |
| 13 | |
13 | |
| 14 | IUSE="${IUSE} debug" |
14 | IUSE="${IUSE} debug pch" |
| 15 | |
15 | |
| 16 | case "${PV}" in |
16 | case "${PV}" in |
| 17 | 4.4.0_beta*) |
17 | 4.4.0_beta*) |
| 18 | SRCTYPE="${SRCTYPE:-opensource-src}" |
18 | SRCTYPE="${SRCTYPE:-opensource-src}" |
| 19 | MY_PV="${PV/_beta/-beta}" |
19 | MY_PV="${PV/_beta/-beta}" |
| … | |
… | |
| 142 | [[ $(get_libdir) != "lib" ]] && myconf="${myconf} -L/usr/$(get_libdir)" |
142 | [[ $(get_libdir) != "lib" ]] && myconf="${myconf} -L/usr/$(get_libdir)" |
| 143 | |
143 | |
| 144 | # Disable visibility explicitly if gcc version isn't 4 |
144 | # Disable visibility explicitly if gcc version isn't 4 |
| 145 | if [[ "$(gcc-major-version)" -lt "4" ]]; then |
145 | if [[ "$(gcc-major-version)" -lt "4" ]]; then |
| 146 | myconf="${myconf} -no-reduce-exports" |
146 | myconf="${myconf} -no-reduce-exports" |
|
|
147 | fi |
|
|
148 | |
|
|
149 | # precompiled headers doesn't work on hardened, where the flag is masked. |
|
|
150 | if use pch; then |
|
|
151 | myconf="${myconf} -pch" |
|
|
152 | else |
|
|
153 | myconf="${myconf} -no-pch" |
| 147 | fi |
154 | fi |
| 148 | |
155 | |
| 149 | if use debug; then |
156 | if use debug; then |
| 150 | myconf="${myconf} -debug -no-separate-debug-info" |
157 | myconf="${myconf} -debug -no-separate-debug-info" |
| 151 | else |
158 | else |