diff options
author | Wulf Krueger <philantrop@gentoo.org> | 2008-04-03 18:12:48 +0000 |
---|---|---|
committer | Wulf Krueger <philantrop@gentoo.org> | 2008-04-03 18:12:48 +0000 |
commit | 21a3679e7a015679389a2a67dd111f54624d1034 (patch) | |
tree | 3014258a25cdb36cb128eca6d020f912a8497f41 /eclass/kde4-base.eclass | |
parent | Version bump. (diff) | |
download | historical-21a3679e7a015679389a2a67dd111f54624d1034.tar.gz historical-21a3679e7a015679389a2a67dd111f54624d1034.tar.bz2 historical-21a3679e7a015679389a2a67dd111f54624d1034.zip |
Added support for EAPI=kdebuild-1. Hard depend on qt-4.4.x when PV >= 4.1.
Diffstat (limited to 'eclass/kde4-base.eclass')
-rw-r--r-- | eclass/kde4-base.eclass | 160 |
1 files changed, 102 insertions, 58 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index 7956be9c51ca..9ac67447696b 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.6 2008/03/26 20:39:05 zlin Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.7 2008/04/03 18:12:48 philantrop Exp $ # @ECLASS: kde4-base.eclass # @MAINTAINER: @@ -17,36 +17,67 @@ 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-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 )" +kde4-base_set_qt_dependencies() { + local qt qtcore qtgui qt3support qtsvg qttest qtopengl qtdepend qtopengldepend + + # use dependencies + case "${EAPI}" in + kdebuild-1) + qt="[accessibility][dbus][debug?][gif][jpeg][png][qt3support][ssl][zlib]" + qtcore="[debug?][qt3support][ssl]" + qtgui="[accessibility][dbus][debug?]" + qt3support="[accessibility][debug?]" + qtsvg="[debug?]" + qttest="[debug?]" + qtopengl="[debug?]" + case "${OPENGL_REQUIRED}" in + always) + qt="${qt}[opengl]" + ;; + optional) + qt="${qt}[opengl?]" + ;; + esac + ;; + esac + + # split qt + qtdepend=" + x11-libs/qt-core:4${qtcore} + x11-libs/qt-gui:4${qtgui} + x11-libs/qt-qt3support:4${qt3support} + x11-libs/qt-svg:4${qtsvg} + x11-libs/qt-test:4${qttest}" + qtopengldepend="x11-libs/qt-opengl:4${qtopengl}" + + # allow monolithic qt for PV < 4.1 + case "${PV}" in + scm|9999.4|4.1*) : ;; + *) + qtdepend="|| ( ( ${qtdepend} ) >=x11-libs/qt-4.3.3:4${qt} )" + qtopengldepend="|| ( ${qtopengldepend} >=x11-libs/qt-4.3.3:4 )" + ;; + esac -# @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}" + # opengl dependencies + case "${OPENGL_REQUIRED}" in + always) + qtdepend="${qtdepend} + ${qtopengldepend}" + ;; + optional) + IUSE="${IUSE} opengl" + qtdepend="${qtdepend} + opengl? ( ${qtopengldepend} )" + ;; + *) + OPENGL_REQUIRED="never" + ;; + esac -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 + COMMONDEPEND="${COMMONDEPEND} ${qtdepend}" +} +kde4-base_set_qt_dependencies DEPEND="${DEPEND} ${COMMONDEPEND} >=dev-util/cmake-2.4.7-r1 @@ -55,6 +86,12 @@ DEPEND="${DEPEND} ${COMMONDEPEND} x11-proto/xf86vidmodeproto" RDEPEND="${RDEPEND} ${COMMONDEPEND}" +# @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}" + # @ECLASS-VARIABLE: CPPUNIT_REQUIRED # @DESCRIPTION: # Is cppunit required for tests? Possible values are 'always', 'optional' and 'never'. @@ -120,7 +157,7 @@ case ${NEED_KDE} in _pv=":kde-4" fi ;; - svn|9999*|:kde-svn) + scm|svn|9999*|:kde-svn) _kdedir="svn" _pv=":kde-svn" export NEED_KDE="svn" @@ -251,40 +288,47 @@ debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SLOT ${SLOT} - KDEDIR ${KDEDIR} - kde4-base_pkg_setup() { debug-print-function $FUNCNAME "$@" - # KDE4 applications require qt4 compiled with USE="accessibility dbus gif jpeg png qt3support ssl zlib". - if has_version '<x11-libs/qt-4.4_alpha:4'; then - QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} accessibility dbus gif jpeg png qt3support ssl zlib" - else - KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK} - x11-libs/qt-core qt3support ssl - x11-libs/qt-gui accessibility dbus - x11-libs/qt-qt3support accessibility" - fi - - if has debug ${IUSE//+} && use debug; then - if has_version '<x11-libs/qt-4.4.0_alpha:4'; then - QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} debug" + case "${EAPI}" in + kdebuild-1) + [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK} ]] && \ + die "built_with_use illegal in this EAPI!" + ;; + *) + # KDE4 applications require qt4 compiled with USE="accessibility dbus gif jpeg png qt3support ssl zlib". + if has_version '<x11-libs/qt-4.4_alpha:4'; then + QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} accessibility dbus gif jpeg png qt3support ssl zlib" else KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK} - x11-libs/qt-core:4 debug - x11-libs/qt-gui:4 debug - x11-libs/qt-qt3support:4 debug - x11-libs/qt-svg:4 debug - x11-libs/qt-test:4 debug" - if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then + x11-libs/qt-core qt3support ssl + x11-libs/qt-gui accessibility dbus + x11-libs/qt-qt3support accessibility" + fi + + if has debug ${IUSE//+} && use debug; then + if has_version '<x11-libs/qt-4.4.0_alpha:4'; then + QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} debug" + else KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK} - x11-libs/qt-opengl:4 debug" + x11-libs/qt-core:4 debug + x11-libs/qt-gui:4 debug + x11-libs/qt-qt3support:4 debug + x11-libs/qt-svg:4 debug + x11-libs/qt-test:4 debug" + if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then + KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK} + x11-libs/qt-opengl:4 debug" + fi fi fi - fi - if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then - if has_version '<x11-libs/qt-4.4.0_alpha:4'; then - QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} opengl" + if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then + if has_version '<x11-libs/qt-4.4.0_alpha:4'; then + QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} opengl" + fi fi - fi - - kde4-functions_check_use + kde4-functions_check_use + ;; + esac } # @FUNCTION: kde4-base_apply_patches @@ -358,7 +402,7 @@ kde4-base_src_unpack() { ebegin "Updating cmake/ directory..." rm -rf "${KDE_S}/cmake" || die "Unable to remove old cmake/ directory" ln -s "${WORKDIR}/cmake" "${KDE_S}/cmake" || die "Unable to symlink the new cmake/ directory" - eend 0 + eend 0 fi } |