| 1 | # Copyright 1999-2011 Gentoo Foundation |
1 | # Copyright 1999-2011 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.98 2011/11/12 19:01:56 pesa Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.99 2011/11/19 20:00:35 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. |
| … | |
… | |
| 183 | sed -e "s/^gcc|g++)/*gcc|*g++)/" \ |
183 | sed -e "s/^gcc|g++)/*gcc|*g++)/" \ |
| 184 | -i config.tests/unix/fvisibility.test || |
184 | -i config.tests/unix/fvisibility.test || |
| 185 | die "visibility fixing sed failed" |
185 | die "visibility fixing sed failed" |
| 186 | fi |
186 | fi |
| 187 | |
187 | |
|
|
188 | if version_is_at_least "4.7"; then |
| 188 | # fix libX11 dependency on non X packages |
189 | # fix libX11 dependency on non X packages |
| 189 | if version_is_at_least "4.7.0_beta2"; then |
|
|
| 190 | local nolibx11_pkgs="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns" |
190 | local nolibx11_pkgs="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns" |
| 191 | has ${PN} ${nolibx11_pkgs} && qt_nolibx11 |
191 | has ${PN} ${nolibx11_pkgs} && qt_nolibx11 |
| 192 | [[ ${PN} == "qt-assistant" ]] && qt_assistant_cleanup |
192 | |
|
|
193 | qt_assistant_cleanup |
| 193 | fi |
194 | fi |
| 194 | |
195 | |
| 195 | if use aqua; then |
196 | if use aqua; then |
| 196 | # provide a proper macx-g++-64 |
197 | # provide a proper macx-g++-64 |
| 197 | use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir) |
198 | use x64-macos && ln -s macx-g++ mkspecs/$(qt_mkspecs_dir) |
| … | |
… | |
| 821 | } |
822 | } |
| 822 | |
823 | |
| 823 | # @FUNCTION: qt_assistant_cleanup |
824 | # @FUNCTION: qt_assistant_cleanup |
| 824 | # @RETURN: nothing |
825 | # @RETURN: nothing |
| 825 | # @DESCRIPTION: |
826 | # @DESCRIPTION: |
| 826 | # Tries to clean up tools.pro for qt-assistant ebuilds |
827 | # Tries to clean up tools.pro for qt-assistant ebuilds. |
| 827 | # Meant to be called in src_prepare |
828 | # Meant to be called in src_prepare(). |
|
|
829 | # Since Qt 4.7.4 this function is a no-op. |
| 828 | qt_assistant_cleanup() { |
830 | qt_assistant_cleanup() { |
|
|
831 | # apply patching to qt-assistant ebuilds only |
|
|
832 | [[ ${PN} != "qt-assistant" ]] && return |
|
|
833 | |
|
|
834 | # no longer needed for 4.7.4 and later |
|
|
835 | version_is_at_least "4.7.4" && return |
|
|
836 | |
| 829 | # different versions (and branches...) may need different handling, |
837 | # different versions (and branches...) may need different handling, |
| 830 | # add a case if you need special handling |
838 | # add a case if you need special handling |
| 831 | case "${MY_PV_EXTRA}" in |
839 | case "${MY_PV_EXTRA}" in |
| 832 | *kde-qt*) |
840 | *kde-qt*) |
| 833 | sed -e "/^[ \t]*porting/,/^[ \t]*win32.*activeqt$/d" \ |
841 | sed -e "/^[ \t]*porting/,/^[ \t]*win32.*activeqt$/d" \ |