diff options
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kde4-base.eclass | 39 | ||||
-rw-r--r-- | eclass/kde4-functions.eclass | 10 | ||||
-rw-r--r-- | eclass/kde4-meta.eclass | 80 |
3 files changed, 60 insertions, 69 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index ef9bde4ca4a2..2a29b3f8d9a2 100644 --- a/eclass/kde4-base.eclass +++ b/eclass/kde4-base.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.57 2009/12/14 19:44:15 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.58 2010/02/02 14:20:16 reavertm Exp $ # @ECLASS: kde4-base.eclass # @MAINTAINER: @@ -121,9 +121,9 @@ case ${KDEBASE} in # Determine SLOT from PVs case ${PV} in *.9999*) SLOT="${PV/.9999*/}" ;; # stable live + 4.5* | 4.4.[6-9]*) SLOT="4.5" ;; 4.4* | 4.3.[6-9]*) SLOT="4.4" ;; 4.3*) SLOT="4.3" ;; - 4.2*) SLOT="4.2" ;; 9999*) SLOT="live" ;; # regular live *) die "Unsupported ${PV}" ;; esac @@ -386,10 +386,10 @@ case ${BUILD_TYPE} in case ${KDEBASE} in kde-base) case ${PV} in - 4.3.8[05] | 4.3.9[0568]) + 4.[34].8[05] | 4.[34].9[0568]) # block for normally packed unstable releases SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;; - 4.3.[6-9]*) + 4.[34].[6-9]*) # Repacked tarballs: need to depend on xz-utils to ensure that they can be unpacked SRC_URI="http://dev.gentooexperimental.org/~alexxy/kde/${PV}/${_kmname_pv}.tar.xz" DEPEND+=" app-arch/xz-utils" @@ -493,10 +493,10 @@ kde4-base_src_unpack() { if [[ ${BUILD_TYPE} = live ]]; then migrate_store_dir subversion_src_unpack - elif [[ ${EAPI} == [23] ]]; then + elif [[ ${EAPI} == 2 ]]; then local file for file in ${A}; do - # This setup is because EAPI <= 3 cannot unpack *.tar.xz files + # This setup is because EAPI <= 2 cannot unpack *.tar.xz files # directly, so we do it ourselves (using the exact same code as portage) case ${file} in *.tar.xz) @@ -510,7 +510,7 @@ kde4-base_src_unpack() { esac done else - # For EAPI >= 4, we can just use unpack() directly + # For EAPI >= 3, we can just use unpack() directly unpack ${A} fi } @@ -537,7 +537,10 @@ kde4-base_src_prepare() { fi [[ ${BUILD_TYPE} = live ]] && subversion_src_prepare + + # Apply patches base_src_prepare + epatch_user # Save library dependencies if [[ -n ${KMSAVELIBS} ]] ; then @@ -675,16 +678,6 @@ kde4-base_src_make_doc() { fi done fi - - [[ -z ${ED} ]] && ED=${D} - - if [[ -n ${KDEBASE} ]] && [[ -d ${ED}usr/share/doc/${PF} ]]; then - # work around bug #97196 - dodir /usr/share/doc/KDE4 && \ - cp -r "${ED}usr/share/doc/${PF}" "${ED}usr/share/doc/KDE4/" || \ - die "Failed to move docs to KDE4/." - rm -rf "${ED}usr/share/doc/${PF}" - fi } # @FUNCTION: kde4-base_pkg_postinst @@ -711,6 +704,16 @@ kde4-base_pkg_postinst() { ewarn "take responsibilities for dead kittens." echo fi + if [[ -z ${I_KNOW_WHAT_I_AM_DOING} ]] && ! has_version 'kde-base/kdebase-runtime-meta' && ! has_version 'kde-base/kdebase-startkde'; then + # warn about not supported approach + if [[ ${KDE_REQUIRED} == always ]] || ( [[ ${KDE_REQUIRED} == optional ]] && use kde ); then + echo + ewarn "WARNING! Your system configuration contains neither \"kde-base/kdebase-runtime-meta\"" + ewarn "nor \"kde-base/kdebase-startkde\". You need one of above." + ewarn "With this setting you are unsupported by KDE team." + ewarn "All missing features you report for misc packages will be probably ignored or closed as INVALID." + fi + fi } # @FUNCTION: kde4-base_pkg_postrm diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index 1e80f29f026d..71911489675d 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.29 2009/12/14 19:44:15 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.30 2010/02/02 14:20:16 reavertm Exp $ inherit versionator @@ -41,7 +41,7 @@ fi # @DESCRIPTION: # The slots used by all KDE versions later than 4.0. The live KDE releases use # KDE_LIVE_SLOTS instead. Values should be ordered. -KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" ) +KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" "4.5" ) # @ECLASS-VARIABLE: KDE_LIVE_SLOTS # @DESCRIPTION: @@ -518,6 +518,6 @@ add_kdebase_dep() { local use=${2:+,${2}} - echo " !kdeprefix? ( >=kde-base/${1}-${PV}[-kdeprefix${use}] )" - echo " kdeprefix? ( >=kde-base/${1}-${PV}:${SLOT}[kdeprefix${use}] )" + echo " !kdeprefix? ( >=kde-base/${1}-${PV}[aqua=,-kdeprefix${use}] )" + echo " kdeprefix? ( >=kde-base/${1}-${PV}:${SLOT}[aqua=,kdeprefix${use}] )" } diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass index f7ff3eb23309..8c450387b947 100644 --- a/eclass/kde4-meta.eclass +++ b/eclass/kde4-meta.eclass @@ -1,6 +1,6 @@ -# Copyright 1999-2009 Gentoo Foundation +# Copyright 1999-2010 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.32 2010/01/11 17:27:35 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.33 2010/02/02 14:20:16 reavertm Exp $ # # @ECLASS: kde4-meta.eclass # @MAINTAINER: @@ -18,24 +18,17 @@ EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_ [[ -z ${KMNAME} ]] && die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild" -# Add khelpcenter dependency when installing handbooks -if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then - RDEPEND+=" handbook? ( $(add_kdebase_dep khelpcenter) )" -fi - # Add dependencies that all packages in a certain module share. case ${KMNAME} in kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics) COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4" ;; kdepim|kdepim-runtime) - COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)" + ! slot_is_at_least 4.4 ${SLOT} && COMMONDEPEND+=" $(add_kdebase_dep kdepimlibs)" case ${PN} in akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker) IUSE+=" +kontact" - if ! slot_is_at_least 4.4 ${SLOT}; then - RDEPEND+=" kontact? ( $(add_kdebase_dep kontactinterfaces) )" - fi + RDEPEND+=" kontact? ( $(add_kdebase_dep kontact) )" ;; esac ;; @@ -211,12 +204,12 @@ kde4-meta_src_extract() { else local abort tarball tarfile f extractlist moduleprefix postfix case ${PV} in - 4.3.8[05] | 4.3.9[0568]) + 4.[34].8[05] | 4.[34].9[0568]) # block for normally packed upstream unstable snapshots KMTARPARAMS+=" --bzip2" # bz2 postfix="bz2" ;; - 4.3.[6-9]*) + 4.[34].[6-9]*) # Not passing --xz, as it doesn't work with stable tar KMTARPARAMS+=" --use-compress-program=xz" # xz postfix="xz" @@ -334,6 +327,7 @@ kde4-meta_create_extractlists() { if [[ ${PN} != libkdegames ]]; then KMEXTRACTONLY+=" libkdegames/" + KMLOADLIBS="${KMLOADLIBS} libkdegames" fi ;; kdepim) @@ -341,15 +335,16 @@ kde4-meta_create_extractlists() { KMEXTRACTONLY+=" libkdepim/" fi - case ${SLOT} in - 4.3|4.4|live) - KMEXTRACTONLY+=" - kdepim-version.h - config-enterprise.h.cmake" - ;; - esac KMEXTRACTONLY+=" + config-enterprise.h.cmake kleopatra/ConfigureChecks.cmake" + if slot_is_at_least 4.5 ${SLOT}; then + KMEXTRACTONLY+=" + kdepim-version.h.cmake" + else + KMEXTRACTONLY+=" + kdepim-version.h" + fi if has kontact ${IUSE//+} && use kontact; then KMEXTRA+=" kontact/plugins/${PLUGINNAME:-${PN}}/" @@ -360,12 +355,8 @@ kde4-meta_create_extractlists() { fi ;; kdeutils) - case ${SLOT} in - 4.3|4.4|live) - KMEXTRACTONLY+=" - kdeutils-version.h" - ;; - esac + KMEXTRACTONLY+=" + kdeutils-version.h" ;; koffice) KMEXTRACTONLY+=" @@ -385,16 +376,6 @@ kde4-meta_create_extractlists() { esac # Don't install cmake modules for split ebuilds, to avoid collisions. case ${KMNAME} in - kdepim) - # No need for unpack since 4.2.86 - # Remove when 4.2 is wiped out from the tree - case ${PV} in - 4.2.[0-4]) - KMCOMPILEONLY+=" - cmake/modules/" - ;; - esac - ;; kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics) case ${PN} in libkdegames|libkdeedu|libkworkspace) @@ -588,17 +569,24 @@ kde4-meta_change_cmakelists() { -i CMakeLists.txt || die "failed to disable hardcoded checks" ;; kdepim) - case ${PN} in - kaddressbook|kalarm|kmailcvt|kontact|korganizer|korn) - sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \ - -e '/add_custom_target(kmail_xml /,/)/p' \ - -i kmail/CMakeLists.txt || die "uncommenting xml failed" - _change_cmakelists_parent_dirs kmail - ;; - esac + # Disable hardcoded checks + sed -r -e '/find_package\(KdepimLibs/s/REQUIRED//' \ + -e '/find_package\((KdepimLibs|Boost|QGpgme|Akonadi|ZLIB|Strigi|SharedDesktopOntologies|Soprano|Nepomuk)/{/macro_optional_/!s/find/macro_optional_&/}' \ + -e '/macro_log_feature\((Boost|QGPGME|Akonadi|ZLIB|STRIGI|SHAREDDESKTOPONTOLOGIES|Soprano|Nepomuk)_FOUND/s/ TRUE / FALSE /' \ + -i CMakeLists.txt || die "failed to disable hardcoded checks" + if ! slot_is_at_least 4.5 ${SLOT}; then + case ${PN} in + kalarm|kmailcvt|kontact|korganizer|korn) + sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \ + -e '/add_custom_target(kmail_xml /,/)/p' \ + -i kmail/CMakeLists.txt || die "uncommenting xml failed" + _change_cmakelists_parent_dirs kmail + ;; + esac + fi ;; kdewebdev) - # Disable hardcoded kdepimlibs check + # Disable hardcoded checks sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \ -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2)/' \ -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt)/' \ @@ -606,7 +594,7 @@ kde4-meta_change_cmakelists() { -i CMakeLists.txt || die "failed to disable hardcoded checks" ;; koffice) - # prevent collisions + # Prevent collisions if [[ ${PN} != koffice-data ]]; then sed -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \ -i cmake/modules/CMakeLists.txt || die "${LINENO}: sed died in collision prevention section" |