diff options
author | Tomas Chvatal <scarabeus@gentoo.org> | 2009-03-09 19:41:26 +0000 |
---|---|---|
committer | Tomas Chvatal <scarabeus@gentoo.org> | 2009-03-09 19:41:26 +0000 |
commit | cbaed539c09a59794ae1d49ee61315de675b38e6 (patch) | |
tree | 54fc92b79a6802dc382761a2509eed8c19f0291d /eclass/kde4-meta.eclass | |
parent | Version bump. Per bug #256463. (diff) | |
download | gentoo-2-cbaed539c09a59794ae1d49ee61315de675b38e6.tar.gz gentoo-2-cbaed539c09a59794ae1d49ee61315de675b38e6.tar.bz2 gentoo-2-cbaed539c09a59794ae1d49ee61315de675b38e6.zip |
Sync kde4 eclasses with kde-testing (review by scarabeus and jmbsvicetto).
Diffstat (limited to 'eclass/kde4-meta.eclass')
-rw-r--r-- | eclass/kde4-meta.eclass | 169 |
1 files changed, 113 insertions, 56 deletions
diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass index 0b1e220e0a4b..51bb74f78094 100644 --- a/eclass/kde4-meta.eclass +++ b/eclass/kde4-meta.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/kde4-meta.eclass,v 1.11 2009/03/01 11:44:09 scarabeus Exp $ +# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.12 2009/03/09 19:41:26 scarabeus Exp $ # # @ECLASS: kde4-meta.eclass # @MAINTAINER: @@ -33,59 +33,95 @@ esac # Add dependencies that all packages in a certain module share. case ${KMNAME} in - kdebase|kdebase-workspace|kdebase-runtime) - DEPEND="${DEPEND} >=kde-base/qimageblitz-0.0.4" - RDEPEND="${RDEPEND} >=kde-base/qimageblitz-0.0.4" + kdebase|kdebase-{apps,workspace,runtime}) + DEPEND="${DEPEND} + >=kde-base/qimageblitz-0.0.4 + " + RDEPEND="${RDEPEND} + >=kde-base/qimageblitz-0.0.4 + " + ;; + kdenetwork) + DEPEND="${DEPEND} + >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] + " + RDEPEND="${RDEPEND} + >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] + " ;; kdepim) - DEPEND="${DEPEND} dev-libs/boost app-office/akonadi-server" - RDEPEND="${RDEPEND} dev-libs/boost" - if [[ ${PN} != kode ]]; then - DEPEND="${DEPEND} >=kde-base/kode-${PV}:${SLOT}[kdeprefix=]" - RDEPEND="${RDEPEND} >=kde-base/kode-${PV}:${SLOT}[kdeprefix=]" - fi + DEPEND="${DEPEND} + dev-libs/boost + >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] + " + RDEPEND="${RDEPEND} + dev-libs/boost + >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=] + " case ${PN} in akregator|kaddressbook|kjots|kmail|kmobiletools|knode|knotes|korganizer|ktimetracker) IUSE="+kontact" - DEPEND="${DEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )" - RDEPEND="${RDEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )" + RDEPEND="${RDEPEND} + kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] ) + " ;; esac ;; kdegames) if [[ ${PN} != libkdegames ]]; then - DEPEND="${DEPEND} >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]" - RDEPEND="${RDEPEND} >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=]" + DEPEND="${DEPEND} + >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] + " + RDEPEND="${RDEPEND} + >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] + " fi ;; koffice) [[ ${PN} != koffice-data ]] && IUSE="debug" case ${PV} in - 9999*) DEPEND="${DEPEND} !app-office/${PN}:2" ;; - 1.9*|2*) DEPEND="${DEPEND} !app-office/${PN}:live" ;; + 9999*) + DEPEND="${DEPEND} + !app-office/${PN}:2 + " + ;; + 1.9*|2*) + DEPEND="${DEPEND} + !app-office/${PN}:live + " + ;; esac DEPEND="${DEPEND} !app-office/${PN}:0 !app-office/koffice:0 - !app-office/koffice-meta:0" + !app-office/koffice-meta:0 + " case ${PN} in koffice-data) - DEPEND="${DEPEND} media-libs/lcms" - RDEPEND="${RDEPEND} media-libs/lcms" + DEPEND="${DEPEND} + media-libs/lcms + " + RDEPEND="${RDEPEND} + media-libs/lcms + " ;; *) - DEPEND="${DEPEND} + COMMON_DEPEND=" dev-cpp/eigen:2 media-gfx/imagemagick[openexr?] media-libs/fontconfig media-libs/freetype:2 " - RDEPEND="${DEPEND}" + DEPEND="${DEPEND} ${COMMON_DEPEND}" + RDEPEND="${RDEPEND} ${COMMON_DEPEND}" + unset COMMON_DEPEND if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then DEPEND="${DEPEND} - >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]" + >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=] + " RDEPEND="${RDEPEND} - >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]" + >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=] + " fi ;; esac @@ -213,14 +249,14 @@ kde4-meta_src_extract() { fi # Copy all subdirectories for subdir in $(__list_needed_subdirectories); do - targetdir="" - if [[ $subdir = doc/* && ! -e "$ESVN_WC_PATH/$kmnamedir$subdir" ]]; then - continue - fi + targetdir="" + if [[ $subdir = doc/* && ! -e "$ESVN_WC_PATH/$kmnamedir$subdir" ]]; then + continue + fi - [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}" - rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}${subdir%/}" "${S}/${targetdir}" \ - || die "${ESVN}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'." + [[ ${subdir%/} = */* ]] && targetdir=${subdir%/} && targetdir=${targetdir%/*} && mkdir -p "${S}/${targetdir}" + rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}${subdir%/}" "${S}/${targetdir}" \ + || die "${ESVN}: can't export subdirectory '${subdir}' to '${S}/${targetdir}'." done if [[ ${KMNAME} = kdebase-runtime && ${PN} != kdebase-data ]]; then @@ -228,18 +264,38 @@ kde4-meta_src_extract() { "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed" fi else - local abort tarball tarfile f extractlist moduleprefix - - case $KMNAME in + local abort tarball tarfile f extractlist moduleprefix postfix + case ${PV} in + 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) + KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma + postfix="lzma" + ;; + *) + KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2 + postfix="bz2" + ;; + esac + case ${KMNAME} in kdebase-apps) - tarball="${KMNAME#-apps}-${PV}.tar.bz2" + # kdebase/apps -> kdebasa-apps + tarball="kdebase-${PV}.tar.${postfix}" + # Go one level deeper for kdebase-apps in tarballs + moduleprefix=apps/ + KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||" ;; *) - tarball="${KMNAME}-${PV}.tar.bz2" + # Create tarball name from module name (this is the default) + tarball="${KMNAME}-${PV}.tar.${postfix}" ;; esac + + # Full patch to source tarball tarfile="${DISTDIR}/${tarball}" + # Detect real toplevel dir from tarball name - it will be used upon extraction + # and in __list_needed_subdirectories + topdir="${tarball%.tar.*}/" + ebegin "Unpacking parts of ${tarball} to ${WORKDIR}" kde4-meta_create_extractlists @@ -247,17 +303,16 @@ kde4-meta_src_extract() { for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \ AUTHORS COPYING INSTALL README NEWS ChangeLog do - extractlist="${extractlist} ${KMNAME}-${PV}/${f}" + extractlist="${extractlist} ${topdir}${moduleprefix}${f}" done extractlist="${extractlist} $(__list_needed_subdirectories)" - KMTARPARAMS="${KMTARPARAMS} -j" pushd "${WORKDIR}" > /dev/null [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2 tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} 2> /dev/null # Default $S is based on $P; rename the extracted directory to match $S if necessary - mv ${KMNAME}-${PV} ${P} || die "Died while moving \"${KMNAME}-${PV}\" to \"${P}\"" + mv ${topdir} ${P} || die "Died while moving \"${topdir}\" to \"${P}\"" popd > /dev/null @@ -275,6 +330,9 @@ kde4-meta_src_extract() { done [[ -n ${abort} ]] && die "There were missing files." fi + + # We don't need it anymore + unset topdir fi } @@ -326,9 +384,12 @@ kde4-meta_create_extractlists() { fi ;; kdepim) + if [[ ${PN} != libkdepim ]]; then + KMEXTRACTONLY="${KMEXTRACTONLY} + libkdepim" + fi KMEXTRACTONLY="${KMEXTRACTONLY} - kleopatra/ConfigureChecks.cmake - libkdepim/kdepim_export.h" + kleopatra/ConfigureChecks.cmake" if has kontact ${IUSE//+} && use kontact; then KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}" KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/" @@ -364,7 +425,7 @@ kde4-meta_create_extractlists() { } __list_needed_subdirectories() { - local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist topdir + local i j kmextra kmextra_expanded kmmodule_expanded kmcompileonly_expanded extractlist # We expand KMEXTRA by adding CMakeLists.txt files kmextra="${KMEXTRA}" @@ -402,12 +463,8 @@ __list_needed_subdirectories() { debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmmodule_expanded: ${kmmodule_expanded}" debug-print "line ${LINENO} ${ECLASS} ${FUNCNAME} - kmcompileonly_expanded: ${kmcompileonly_expanded}" - case ${PV} in - scm|9999*) : ;; - *) topdir="${KMNAME}-${PV}/" ;; - esac # Create final list of stuff to extract - # We append topleveldir only when specified (usually for tarballs) + # We append topdir only when specified (usually for tarballs) for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \ ${KMEXTRACTONLY} do @@ -427,7 +484,6 @@ kde4-meta_src_prepare() { kde4-base_src_prepare } - # FIXME: no comment here? _change_cmakelists_parent_dirs() { debug-print-function ${FUNCNAME} "$@" @@ -470,8 +526,17 @@ kde4-meta_change_cmakelists() { _change_cmakelists_parent_dirs ${KMMODULE} fi - # KMCOMPILEONLY local i + + # KMEXTRACTONLY section - Some ebuilds need to comment out some subdirs in KMMODULE and they use KMEXTRACTONLY + for i in ${KMEXTRACTONLY}; do + if [[ -d "${S}"/${i} && -f "${S}"/${i}/../CMakeLists.txt ]]; then + sed -i -e "/([[:space:]]*$(basename $i)[[:space:]]*)/s/^/#DONOTCOMPILE /" "${S}"/${i}/../CMakeLists.txt || \ + die "${LINENO}: sed died while working in the KMEXTRACTONLY section while processing ${i}" + fi + done + + # KMCOMPILEONLY for i in ${KMCOMPILEONLY}; do debug-print "${LINENO}: KMCOMPILEONLY, processing ${i}" # Uncomment "add_subdirectory" instructions inside $KMCOMPILEONLY, then comment "install" instructions. @@ -503,14 +568,6 @@ kde4-meta_change_cmakelists() { fi done - # KMEXTRACTONLY section - Some ebuilds need to comment out some subdirs in KMMODULE and they use KMEXTRACTONLY - for i in ${KMEXTRACTONLY}; do - if [[ -d "${S}"/${i} && -f "${S}"/${i}/../CMakeLists.txt ]]; then - sed -i -e "/([[:space:]]*$(basename $i)[[:space:]]*)/s/^/#DONOTCOMPILE /" "${S}"/${i}/../CMakeLists.txt || \ - die "${LINENO}: sed died while working in the KMEXTRACTONLY section while processing ${i}" - fi - done - case ${KMNAME} in kdebase-workspace) # COLLISION PROTECT section |