| 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.39 2009/06/27 12:37:32 yngwin Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.41 2009/06/28 15:24:42 hwoarang 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>, |
| … | |
… | |
| 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 | |
| 14 | inherit base eutils multilib toolchain-funcs flag-o-matic versionator |
14 | inherit base eutils multilib toolchain-funcs flag-o-matic versionator |
| 15 | |
15 | |
| 16 | IUSE="${IUSE} custom-cxxflags debug pch" |
16 | IUSE="${IUSE} debug pch" |
| 17 | RDEPEND=" |
17 | RDEPEND=" |
| 18 | !<x11-libs/qt-assistant-${PV} |
18 | !<x11-libs/qt-assistant-${PV} |
| 19 | !>x11-libs/qt-assistant-${PV}-r9999 |
19 | !>x11-libs/qt-assistant-${PV}-r9999 |
| 20 | !<x11-libs/qt-core-${PV} |
20 | !<x11-libs/qt-core-${PV} |
| 21 | !>x11-libs/qt-core-${PV}-r9999 |
21 | !>x11-libs/qt-core-${PV}-r9999 |
| … | |
… | |
| 107 | if ! version_is_at_least 4.1 $(gcc-version) ; then |
107 | if ! version_is_at_least 4.1 $(gcc-version) ; then |
| 108 | ewarn "Using a GCC version lower than 4.1 is not supported!" |
108 | ewarn "Using a GCC version lower than 4.1 is not supported!" |
| 109 | echo |
109 | echo |
| 110 | ebeep 3 |
110 | ebeep 3 |
| 111 | fi |
111 | fi |
| 112 | |
|
|
| 113 | if use custom-cxxflags; then |
|
|
| 114 | echo |
|
|
| 115 | ewarn "You have set USE=custom-cxxflags, which means Qt will be built with the" |
|
|
| 116 | ewarn "CXXFLAGS you have set in /etc/make.conf. This is not supported, and we" |
|
|
| 117 | ewarn "recommend to unset this useflag. But you are free to experiment with it." |
|
|
| 118 | ewarn "Just do not start crying if it breaks your system, or eats your kitten" |
|
|
| 119 | ewarn "for breakfast. ;-) " |
|
|
| 120 | echo |
|
|
| 121 | fi |
|
|
| 122 | |
|
|
| 123 | } |
112 | } |
| 124 | |
113 | |
| 125 | # @ECLASS-VARIABLE: QT4_TARGET_DIRECTORIES |
114 | # @ECLASS-VARIABLE: QT4_TARGET_DIRECTORIES |
| 126 | # @DESCRIPTION: |
115 | # @DESCRIPTION: |
| 127 | # Arguments for build_target_directories. Takes the directories, in which the |
116 | # Arguments for build_target_directories. Takes the directories, in which the |
| … | |
… | |
| 182 | |
171 | |
| 183 | if [[ ${PN} != qt-core ]]; then |
172 | if [[ ${PN} != qt-core ]]; then |
| 184 | skip_qmake_build_patch |
173 | skip_qmake_build_patch |
| 185 | skip_project_generation_patch |
174 | skip_project_generation_patch |
| 186 | symlink_binaries_to_buildtree |
175 | symlink_binaries_to_buildtree |
| 187 | fi |
|
|
| 188 | |
|
|
| 189 | if ! use custom-cxxflags;then |
|
|
| 190 | # Don't let the user go too overboard with flags. |
|
|
| 191 | strip-flags |
|
|
| 192 | replace-flags -O3 -O2 |
|
|
| 193 | fi |
176 | fi |
| 194 | |
177 | |
| 195 | # Bug 178652 |
178 | # Bug 178652 |
| 196 | if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then |
179 | if [[ "$(gcc-major-version)" == "3" ]] && use amd64; then |
| 197 | ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS" |
180 | ewarn "Appending -fno-gcse to CFLAGS/CXXFLAGS" |
| … | |
… | |
| 451 | ewarn "Packages that typically need to be recompiled are kdelibs from KDE4, any" |
434 | ewarn "Packages that typically need to be recompiled are kdelibs from KDE4, any" |
| 452 | ewarn "additional KDE4/Qt4 styles, qscintilla and PyQt4. Before filing a bug report," |
435 | ewarn "additional KDE4/Qt4 styles, qscintilla and PyQt4. Before filing a bug report," |
| 453 | ewarn "make sure all your Qt4 packages are up-to-date and built with the same" |
436 | ewarn "make sure all your Qt4 packages are up-to-date and built with the same" |
| 454 | ewarn "configuration." |
437 | ewarn "configuration." |
| 455 | ewarn |
438 | ewarn |
| 456 | ewarn "For more information, see http://doc.trolltech.com/4.4/plugins-howto.html" |
439 | ewarn "For more information, see http://doc.trolltech.com/${PV%.*}/plugins-howto.html" |
| 457 | echo |
440 | echo |
| 458 | } |
441 | } |
| 459 | |
442 | |
| 460 | # @FUNCTION: skip_qmake_build_patch |
443 | # @FUNCTION: skip_qmake_build_patch |
| 461 | # @DESCRIPTION: |
444 | # @DESCRIPTION: |