diff options
author | Jonathan Callen <abcd@gentoo.org> | 2011-06-07 20:11:04 +0000 |
---|---|---|
committer | Jonathan Callen <abcd@gentoo.org> | 2011-06-07 20:11:04 +0000 |
commit | 9489e314f678f226e725b6bd4a69c3d9eb00ecd6 (patch) | |
tree | bf2a15982441e39be0b1c88203437401c019a555 /eclass | |
parent | Fix manifest. (diff) | |
download | gentoo-2-9489e314f678f226e725b6bd4a69c3d9eb00ecd6.tar.gz gentoo-2-9489e314f678f226e725b6bd4a69c3d9eb00ecd6.tar.bz2 gentoo-2-9489e314f678f226e725b6bd4a69c3d9eb00ecd6.zip |
Sync KDE eclasses with overlay again (prerequisite for slotmoves)
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kde4-base.eclass | 37 | ||||
-rw-r--r-- | eclass/kde4-functions.eclass | 30 | ||||
-rw-r--r-- | eclass/kde4-meta-pkg.eclass | 4 | ||||
-rw-r--r-- | eclass/kde4-meta.eclass | 40 |
4 files changed, 38 insertions, 73 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass index d327de1f5791..c81337a1e630 100644 --- a/eclass/kde4-base.eclass +++ b/eclass/kde4-base.eclass @@ -1,6 +1,6 @@ # 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.96 2011/06/06 21:38:18 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.97 2011/06/07 20:11:04 abcd Exp $ # @ECLASS: kde4-base.eclass # @MAINTAINER: @@ -41,32 +41,20 @@ if [[ ${CMAKE_REQUIRED} = always ]]; then export_fns="src_configure src_compile src_test src_install" fi -# Verify KDE_MINIMAL (display QA notice in pkg_setup, still we need to fix it here) -if [[ -n ${KDE_MINIMAL} ]]; then - for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do - [[ ${KDE_MINIMAL} = ${slot} ]] && KDE_MINIMAL_VALID=1 && break - done - unset slot - [[ -z ${KDE_MINIMAL_VALID} ]] && unset KDE_MINIMAL -else - KDE_MINIMAL_VALID=1 -fi - # @ECLASS-VARIABLE: KDE_MINIMAL # @DESCRIPTION: # This variable is used when KDE_REQUIRED is set, to specify required KDE minimal # version for apps to work. Currently defaults to 4.4 # One may override this variable to raise version requirements. -# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables. -# Note that it is fixed to ${SLOT} for kde-base packages. +# Note that it is fixed to ${PV} for kde-base packages. KDE_MINIMAL="${KDE_MINIMAL:-4.4}" # Set slot for KDEBASE known packages case ${KDEBASE} in kde-base) - SLOT=$(_calculate_kde_slot) - [[ -z ${SLOT} ]] && die "Unsupported ${PV}" - KDE_MINIMAL="${SLOT}" + SLOT=$(get_kde_version) + [[ -z ${SLOT} ]] && die "Unsupported PV ${PV}" + KDE_MINIMAL="${PV}" ;; koffice) SLOT="2" @@ -207,7 +195,7 @@ esac # @ECLASS-VARIABLE: QT_MINIMAL # @DESCRIPTION: # Determine version of qt we enforce as minimal for the package. -if slot_is_at_least 4.6 "${KDE_MINIMAL}"; then +if version_is_at_least 4.5.50 "${KDE_MINIMAL}"; then QT_MINIMAL="${QT_MINIMAL:-4.7.0}" else QT_MINIMAL="${QT_MINIMAL:-4.6.3}" @@ -494,7 +482,7 @@ _calculate_live_repo() { ;; *) # branch - branch_prefix="branches/KDE/${SLOT}" + branch_prefix="branches/KDE/$(get_kde_version)" # @ECLASS-VARIABLE: ESVN_PROJECT_SUFFIX # @DESCRIPTION # Suffix appended to ESVN_PROJECT depending on fetched branch. @@ -581,15 +569,15 @@ _calculate_live_repo() { case ${PV} in 9999*) ;; *) - # set EGIT_BRANCH and EGIT_COMMIT to ${SLOT} + # set EGIT_BRANCH and EGIT_COMMIT to $(get_kde_version) case ${_kmname} in kdeplasma-addons | kdepim | kdepim-runtime | kdepimlibs | okular) - EGIT_BRANCH="${SLOT}" + EGIT_BRANCH="$(get_kde_version)" ;; marble) - EGIT_BRANCH="kde-${SLOT}" + EGIT_BRANCH="kde-$(get_kde_version)" ;; - *) EGIT_BRANCH="KDE/${SLOT}" ;; + *) EGIT_BRANCH="KDE/$(get_kde_version)" ;; esac ;; esac @@ -636,9 +624,6 @@ kde4-base_pkg_setup() { die "kdeprefix support has been removed" fi - # QA ebuilds - [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})." - # Don't set KDEHOME during compilation, it will cause access violations unset KDEHOME diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index b40feb3d6f70..c37cbdbf400e 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.50 2011/06/06 21:38:18 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.51 2011/06/07 20:11:04 abcd Exp $ inherit versionator @@ -56,7 +56,7 @@ KDE_SLOTS=( "4.1" "4.2" "4.3" "4.4" "4.5" "4.6" "4.7" ) KDE_LIVE_SLOTS=( "live" ) # determine the build type -if [[ ${SLOT} = live || ${PV} = *9999* ]]; then +if [[ ${PV} = *9999* ]]; then BUILD_TYPE="live" else BUILD_TYPE="release" @@ -110,16 +110,6 @@ if [[ ${BUILD_TYPE} != live || -n ${KDE_LINGUAS_LIVE_OVERRIDE} ]]; then done fi -# @FUNCTION: slot_is_at_least -# @USAGE: <want> <have> -# @DESCRIPTION: -# Version aware slot comparator. -# Current implementation relies on the fact, that slots can be compared like -# string literals (and let's keep it this way). -slot_is_at_least() { - [[ "${2}" > "${1}" || "${2}" = "${1}" ]] -} - # @FUNCTION: buildsycoca # @DESCRIPTION: # Function to rebuild the KDE System Configuration Cache. @@ -310,7 +300,7 @@ migrate_store_dir() { # @DESCRIPTION: # Add exporting CMake dependencies for current package save_library_dependencies() { - local depsfile="${T}/${PN}:${SLOT}" + local depsfile="${T}/${PN}" ebegin "Saving library dependencies in ${depsfile##*/}" echo "EXPORT_LIBRARY_DEPENDENCIES(\"${depsfile}\")" >> "${S}/CMakeLists.txt" || \ @@ -322,7 +312,7 @@ save_library_dependencies() { # @DESCRIPTION: # Install generated CMake library dependencies to /var/lib/kde install_library_dependencies() { - local depsfile="${T}/${PN}:${SLOT}" + local depsfile="${T}/${PN}" ebegin "Installing library dependencies as ${depsfile##*/}" insinto /var/lib/kde @@ -340,7 +330,8 @@ load_library_dependencies() { i=0 for pn in ${KMLOADLIBS} ; do ((i++)) - depsfile="${EPREFIX}/var/lib/kde/${pn}:${SLOT}" + depsfile="${EPREFIX}/var/lib/kde/${pn}" + [[ -r ${depsfile} ]] || depsfile="${EPREFIX}/var/lib/kde/${pn}:$(get_kde_version)" [[ -r ${depsfile} ]] || die "Depsfile '${depsfile}' not accessible. You probably need to reinstall ${pn}." sed -i -e "${i}iINCLUDE(\"${depsfile}\")" "${S}/CMakeLists.txt" || \ die "Failed to include library dependencies for ${pn}" @@ -411,7 +402,7 @@ add_kdebase_dep() { elif [[ ${KDEBASE} != kde-base ]]; then ver=${KDE_MINIMAL} # FIXME remove hack when kdepim-4.4.* is gone - elif [[ ( ${KMNAME} == kdepim || ${PN} == kdepim-runtime ) && ${SLOT} == 4.4 && ${1} =~ ^(kde(pim)?libs|oxygen-icons)$ ]]; then + elif [[ ( ${KMNAME} == kdepim || ${PN} == kdepim-runtime ) && $(get_kde_version) == 4.4 && ${1} =~ ^(kde(pim)?libs|oxygen-icons)$ ]]; then ver=4.4.5 # FIXME remove hack when kdepim-4.6beta is gone elif [[ ( ${KMNAME} == kdepim || ${PN} == kdepim-runtime ) && ${PV} == 4.5.98 && ${1} =~ ^(kde(pim)?libs|oxygen-icons)$ ]]; then @@ -419,7 +410,7 @@ add_kdebase_dep() { # if building stable-live version depend just on slot # to allow merging packages against more stable basic stuff elif [[ ${PV} == *.9999 ]]; then - ver=${SLOT} + ver=$(get_kde_version) else ver=${PV} fi @@ -598,7 +589,10 @@ _enable_selected_linguas_dir() { popd > /dev/null } -_calculate_kde_slot() { +# @FUNCTION: get_kde_version +# Translates an ebuild version into a major.minor KDE SC +# release version. If no version is specified, ${PV} is used. +get_kde_version() { local ver=${1:-${PV}} local major=$(get_major_version ${ver}) local minor=$(get_version_component_range 2 ${ver}) diff --git a/eclass/kde4-meta-pkg.eclass b/eclass/kde4-meta-pkg.eclass index 2ed377e8c680..036e1b543544 100644 --- a/eclass/kde4-meta-pkg.eclass +++ b/eclass/kde4-meta-pkg.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta-pkg.eclass,v 1.3 2011/06/06 21:38:18 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta-pkg.eclass,v 1.4 2011/06/07 20:11:04 abcd Exp $ # @ECLASS: kde4-meta-pkg.eclass # @MAINTAINER: @@ -22,7 +22,7 @@ if [[ ${PV} < 4.6.4 ]]; then IUSE+=" kdeprefix" fi -SLOT=$(_calculate_kde_slot) +SLOT=$(get_kde_version) [[ -z ${SLOT} ]] && die "Unsupported ${PV}" RDEPEND="$(block_other_slots)" diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass index c1b17e5f52cb..81503a0dc966 100644 --- a/eclass/kde4-meta.eclass +++ b/eclass/kde4-meta.eclass @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.53 2011/06/06 17:51:26 abcd Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.54 2011/06/07 20:11:04 abcd Exp $ # # @ECLASS: kde4-meta.eclass # @MAINTAINER: @@ -208,7 +208,7 @@ kde4-meta_src_extract() { ;; esac else - local abort tarball tarfile f extractlist moduleprefix postfix + local abort tarball tarfile f extractlist postfix KMTARPARAMS+=" --bzip2" postfix="bz2" @@ -217,10 +217,6 @@ kde4-meta_src_extract() { kdebase-apps) # kdebase/apps -> kdebase-apps tarball="kdebase-${PV}.tar.${postfix}" - if ! slot_is_at_least 4.6 ${SLOT} || [[ ${PV} == "4.6.0" ]]; then - moduleprefix=apps/ - KMTARPARAMS+=" --transform=s|apps/||" - fi ;; *) # Create tarball name from module name (this is the default) @@ -241,7 +237,7 @@ kde4-meta_src_extract() { for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake do - extractlist+=" ${topdir}${moduleprefix}${f}" + extractlist+=" ${topdir}${f}" done extractlist+=" $(__list_needed_subdirectories)" @@ -268,9 +264,6 @@ kde4-meta_src_extract() { eend $? - # We need to clear it here to make verification below work - unset moduleprefix - if [[ -n ${KDE4_STRICTER} ]]; then for f in $(__list_needed_subdirectories fatal); do if [[ ! -e ${S}/${f#*/} ]]; then @@ -296,7 +289,7 @@ kde4-meta_create_extractlists() { # Add default handbook locations # FIXME - legacy code - remove when 4.4.5 is gone or preferrably port 4.4.5. - if ! slot_is_at_least 4.5 ${SLOT} && has handbook ${IUSE//+} && use handbook && [[ -z ${KMNOMODULE} ]]; then + if [[ $(get_kde_version) < 4.5 ]] && has handbook ${IUSE//+} && use handbook && [[ -z ${KMNOMODULE} ]]; then # We use the basename of $KMMODULE because $KMMODULE can contain # the path to the module subdirectory. KMEXTRA_NONFATAL+=" @@ -312,18 +305,7 @@ kde4-meta_create_extractlists() { # Note that this actually doesn't include KMEXTRA handling. # In those cases you should care to add the relevant files to KMEXTRACTONLY case ${KMNAME} in - kdebase) - if ! slot_is_at_least 4.6 ${SLOT} || [[ ${PV} == "4.6.0" ]]; then - KMEXTRACTONLY+=" - apps/config-apps.h.cmake - apps/ConfigureChecks.cmake" - else - KMEXTRACTONLY+=" - config-apps.h.cmake - ConfigureChecks.cmake" - fi - ;; - kdebase-apps | kde-baseapps) + kdebase | kdebase-apps | kde-base-apps) KMEXTRACTONLY+=" config-apps.h.cmake ConfigureChecks.cmake" @@ -356,7 +338,7 @@ kde4-meta_create_extractlists() { KMEXTRACTONLY+=" config-enterprise.h.cmake kleopatra/ConfigureChecks.cmake" - if slot_is_at_least 4.5 ${SLOT}; then + if ! [[ $(get_kde_version) < 4.5 ]]; then KMEXTRACTONLY+=" CTestCustom.cmake kdepim-version.h.cmake" @@ -391,7 +373,11 @@ kde4-meta_create_extractlists() { # Don't install cmake modules for split ebuilds, to avoid collisions. # note: kdegraphics >= 4.6.2 does not even have code to do that, so we # should not try in that case - if [[ ${KMNAME} != kdegraphics ]] || { [[ ${SLOT} != 4.6 || ${PV} < 4.6.2 ]] && ! slot_is_at_least 4.7 ${SLOT}; }; then + # note2: kdeedu 4.6.4 does not have a cmake/modules/ subdir anymore :( + # it may be possible to formulate this shorter, but it should also + # still be understandable... + if [[ ${KMNAME} != kdegraphics || ( ( $(get_kde_version) != 4.6 || ${PV} < 4.6.2 ) && $(get_kde_version) < 4.7 ) ]] \ + && ! [[ ${KMNAME} == kdeedu && ${PV} == 4.6.4 ]]; then case ${KMNAME} in kdebase-runtime|kde-runtime|kdebase-workspace|kde-workspace|kdeedu|kdegames|kdegraphics) case ${PN} in @@ -455,7 +441,7 @@ __list_needed_subdirectories() { for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ ${KMEXTRACTONLY} do - extractlist+=" ${topdir}${moduleprefix}${i}" + extractlist+=" ${topdir}${i}" done echo ${extractlist} @@ -603,7 +589,7 @@ kde4-meta_change_cmakelists() { -e '/if[[:space:]]*([[:space:]]*[[:alnum:]]*_FOUND[[:space:]]*)/s/^/#OVERRIDE /' \ -i kontact/plugins/CMakeLists.txt || die 'failed to override build logic' fi - if ! slot_is_at_least 4.5 ${SLOT}; then + if [[ $(get_kde_version) < 4.5 ]]; then case ${PN} in kalarm|kmailcvt|kontact|korganizer|korn) sed -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \ |