From 1a425565950f6e40014e4fa9272377b967f819ce Mon Sep 17 00:00:00 2001 From: =?utf8?q?Bo=20=C3=98rsted=20Andresen?= Date: Mon, 10 Mar 2008 21:41:56 +0000 Subject: [PATCH] Add support for split qt-4.4. Add {CPPUNIT,OPENGL}_REQUIRED. Split out kde4-base_apply_patches(). --- eclass/kde4-base.eclass | 137 +++++++++++++++++++++++++++++++--------- 1 file changed, 107 insertions(+), 30 deletions(-) diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index b1b6387a80a6..73ff792220cd 100644 --- a/eclass/kde4-base.eclass +++ b/eclass/kde4-base.eclass @@ -1,6 +1,6 @@ # Copyright 2007-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.3 2008/02/18 17:00:32 ingmar Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.4 2008/03/10 21:41:56 zlin Exp $ # @ECLASS: kde4-base.eclass # @MAINTAINER: @@ -17,7 +17,37 @@ inherit base eutils multilib cmake-utils kde4-functions EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm -COMMONDEPEND=">=x11-libs/qt-4.3.3:4" +COMMONDEPEND="|| ( ( + x11-libs/qt-core:4 + x11-libs/qt-gui:4 + x11-libs/qt-qt3support:4 + x11-libs/qt-svg:4 + x11-libs/qt-test:4 ) + >=x11-libs/qt-4.3.3:4 )" + +# @ECLASS-VARIABLE: OPENGL_REQUIRED +# @DESCRIPTION: +# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'. +# This variable must be set before inheriting any eclasses. Defaults to 'never'. +OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}" + +OPENGLDEPEND="|| ( x11-libs/qt-opengl:4 + >=x11-libs/qt-4.3.3:4 )" +case "${OPENGL_REQUIRED}" in + always) + COMMONDEPEND="${COMMONDEPEND} + ${OPENGLDEPEND}" + ;; + optional) + IUSE="${IUSE} opengl" + COMMONDEPEND="${COMMONDEPEND} + opengl? ( ${OPENGLDEPEND} )" + ;; + *) + OPENGL_REQUIRED="never" + ;; +esac + DEPEND="${DEPEND} ${COMMONDEPEND} >=dev-util/cmake-2.4.7-r1 dev-util/pkgconfig @@ -25,10 +55,25 @@ DEPEND="${DEPEND} ${COMMONDEPEND} x11-proto/xf86vidmodeproto" RDEPEND="${RDEPEND} ${COMMONDEPEND}" -if has test ${IUSE//+}; then +# @ECLASS-VARIABLE: CPPUNIT_REQUIRED +# @DESCRIPTION: +# Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'. +# This variable must be set before inheriting any eclasses. Defaults to 'never'. +CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}" + +case "${CPPUNIT_REQUIRED}" in + always) + DEPEND="${DEPEND} dev-util/cppunit" + ;; + optional) + IUSE="${IUSE} test" DEPEND="${DEPEND} test? ( dev-util/cppunit )" -fi + ;; + *) + CPPUNIT_REQUIRED="never" + ;; +esac # @ECLASS-VARIABLE: NEED_KDE # @DESCRIPTION: @@ -207,25 +252,44 @@ kde4-base_pkg_setup() { debug-print-function $FUNCNAME "$@" # KDE4 applications require qt4 compiled with USE="accessibility dbus gif jpeg png qt3support ssl zlib". - QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} accessibility dbus gif jpeg png qt3support ssl zlib" + if has_version '