diff options
author | Markos Chandras <hwoarang@gentoo.org> | 2010-07-08 15:45:01 +0000 |
---|---|---|
committer | Markos Chandras <hwoarang@gentoo.org> | 2010-07-08 15:45:01 +0000 |
commit | 1e9bd42d988d675b9fa59b222f9fc3b4d786827f (patch) | |
tree | dc82d9174badb7e2fad82e95bdd95317c291f882 /eclass | |
parent | Marking e2fsprogs-libs-1.41.11 for sec bug 323893 (diff) | |
download | gentoo-2-1e9bd42d988d675b9fa59b222f9fc3b4d786827f.tar.gz gentoo-2-1e9bd42d988d675b9fa59b222f9fc3b4d786827f.tar.bz2 gentoo-2-1e9bd42d988d675b9fa59b222f9fc3b4d786827f.zip |
Introduce functions from -edge eclass. Use them for 4.7.0_beta2 ebuild for now
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/qt4-build.eclass | 43 |
1 files changed, 41 insertions, 2 deletions
diff --git a/eclass/qt4-build.eclass b/eclass/qt4-build.eclass index c131d80b011c..3a02a67ec797 100644 --- a/eclass/qt4-build.eclass +++ b/eclass/qt4-build.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2009 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.76 2010/07/03 15:49:39 ayoy Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/qt4-build.eclass,v 1.77 2010/07/08 15:45:01 hwoarang Exp $ # @ECLASS: qt4-build.eclass # @MAINTAINER: @@ -162,13 +162,19 @@ qt4-build_src_unpack() { qt4-build_src_prepare() { setqtenv cd "${S}" - + # fix qt 4.7 regression that skips -fvisibility=hidden if version_is_at_least "4.7.0_beta1"; then sed -e "s/^gcc|g++)/*gcc|*g++)/" \ -i config.tests/unix/fvisibility.test || die "visibility fixing sed failed" fi + # fix libx11 dependency on non X packages + if version_is_at_least "4.7.0_beta2"; then + local NOLIBX11PKG="qt-core qt-dbus qt-script qt-sql qt-test qt-xmlpatterns" + hasq ${PN} ${NOLIBX11PKG} && qt_nolibx11 + [[ ${PN} == "qt-assistant" ]] && qt_assistant_cleanup + fi if use aqua; then # provide a proper macx-g++-64 @@ -751,4 +757,37 @@ qt_mkspecs_dir() { echo "${spec}" } +# @FUNCTION: qt_assistant_cleanup +# @RETURN: nothing +# @DESCRIPTION: +# Tries to clean up tools.pro for qt-assistant ebuilds +# Meant to be called in src_prepare +qt_assistant_cleanup() { + # different versions (and branches...) may need different handling, + # add a case if you need special handling + case "${MY_PV_EXTRA}" in + *kde-qt*) + sed -e "/^[ \t]*porting/,/^[ \t]*win32.*activeqt$/d" \ + -e "/mac/,/^embedded.*makeqpf$/d" \ + -i tools/tools.pro || die "patching tools.pro failed" + ;; + *) + sed -e "/^[ \t]*porting/,/^[ \t]*win32.*activeqt$/d" \ + -e "/mac/,/^embedded.*makeqpf$/d" \ + -e "s/^\([ \t]*pixeltool\) /\1 qdoc3 /" \ + -i tools/tools.pro || die "patching tools.pro failed" + ;; + esac +} + +# @FUNCTION: qt_nolibx11 +# @RETURN: nothing +# @DESCRIPTION: +# Ignore X11 tests for packages that don't need X libraries installed +qt_nolibx11() { + einfo "removing X11 check to allow X-less compilation" + sed -i "/unixtests\/compile.test.*config.tests\/x11\/xlib/,/fi$/d" "${S}"/configure || + die "x11 check sed failed" +} + EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_install src_test pkg_postrm pkg_postinst |