summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/kde4-meta.eclass')
-rw-r--r--eclass/kde4-meta.eclass199
1 files changed, 93 insertions, 106 deletions
diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass
index 46bc50ada8d6..4d36ff548040 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.22 2009/06/04 09:29:54 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.23 2009/08/03 21:59:53 wired Exp $
#
# @ECLASS: kde4-meta.eclass
# @MAINTAINER:
@@ -31,96 +31,64 @@ case ${KDEBASE} in
;;
esac
-# remove this codeblock when 4.2.3 is dropped
-if [[ ${PV} = "4.2.3" ]]; then
- [[ ${PN} != khelpcenter ]] && has doc ${IUSE//+} \
- RDEPEND="${RDEPEND} doc? ( >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=] )"
-else
# Add khelpcenter dependency when installing handbooks
if [[ ${PN} != khelpcenter ]] && has handbook ${IUSE//+}; then
- RDEPEND="${RDEPEND}
- handbook? ( >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=] )
- "
-fi
+ RDEPEND+=" handbook? ( >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=] )"
fi
+
# Add dependencies that all packages in a certain module share.
case ${KMNAME} in
kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphics)
- DEPEND="${DEPEND}
- >=kde-base/qimageblitz-0.0.4
- "
- RDEPEND="${RDEPEND}
- >=kde-base/qimageblitz-0.0.4
- "
+ COMMONDEPEND+=" >=kde-base/qimageblitz-0.0.4"
;;
kdenetwork)
- DEPEND="${DEPEND}
- >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
- "
- RDEPEND="${RDEPEND}
- >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
- "
+ COMMONDEPEND+=" >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]"
;;
- kdepim)
- DEPEND="${DEPEND}
- dev-libs/boost
- >=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
- "
- RDEPEND="${RDEPEND}
+ kdepim|kdepim-runtime)
+ COMMONDEPEND+="
dev-libs/boost
>=kde-base/kdepimlibs-${PV}:${SLOT}[kdeprefix=]
"
case ${PN} in
akregator|kaddressbook|kjots|kmail|knode|knotes|korganizer|ktimetracker)
- IUSE="+kontact"
- RDEPEND="${RDEPEND}
- kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT}[kdeprefix=] )
- "
+ IUSE+=" +kontact"
+ 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=]
- "
+ COMMONDEPEND+=" >=kde-base/libkdegames-${PV}:${SLOT}[kdeprefix=] "
fi
;;
koffice)
- [[ ${PN} != koffice-data ]] && IUSE="debug"
- RDEPEND="${RDEPEND}
+ [[ ${PN} != koffice-data ]] && IUSE+=" debug"
+ RDEPEND+="
!app-office/${PN}:0
!app-office/koffice:0
!app-office/koffice-meta:0
"
if has openexr ${IUSE//+}; then
- COMMON_DEPEND="media-gfx/imagemagick[openexr?]"
+ COMMONDEPEND+=" media-gfx/imagemagick[openexr?]"
else
- COMMON_DEPEND="media-gfx/imagemagick"
+ COMMONDEPEND+=" media-gfx/imagemagick"
fi
- COMMON_DEPEND="${COMMON_DEPEND}
+ COMMONDEPEND+="
dev-cpp/eigen:2
media-libs/fontconfig
media-libs/freetype:2
"
- 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}
- "
- RDEPEND="${RDEPEND}
- >=app-office/koffice-libs-${PV}:${SLOT}
- "
+ COMMONDEPEND+=" >=app-office/koffice-libs-${PV}:${SLOT}"
fi
;;
esac
+DEPEND+=" ${COMMONDEPEND}"
+RDEPEND+=" ${COMMONDEPEND}"
+unset COMMONDEPEND
+
debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-specific dependencies"
@@ -260,27 +228,27 @@ kde4-meta_src_extract() {
else
local abort tarball tarfile f extractlist moduleprefix postfix
case ${PV} in
- 4.2.85|4.2.90)
+ 4.3.85 | 4.3.90 | 4.3.95 | 4.3.96 | 4.3.98 | 4.2.85 | 4.2.90 | 4.2.95 | 4.2.96 | 4.2.98)
# block for normally packed upstream unstable snapshots
- KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
+ KMTARPARAMS+=" --bzip2" # bz2
postfix="bz2"
;;
- 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
- KMTARPARAMS="${KMTARPARAMS} --lzma" # lzma
+ 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6* | 4.3.9* | 4.3.8* | 4.3.7* | 4.3.6*)
+ KMTARPARAMS+=" --lzma" # lzma
postfix="lzma"
;;
*)
- KMTARPARAMS="${KMTARPARAMS} --bzip2" # bz2
+ KMTARPARAMS+=" --bzip2" # bz2
postfix="bz2"
;;
esac
case ${KMNAME} in
kdebase-apps)
- # kdebase/apps -> kdebasa-apps
+ # kdebase/apps -> kdebase-apps
tarball="kdebase-${PV}.tar.${postfix}"
# Go one level deeper for kdebase-apps in tarballs
moduleprefix=apps/
- KMTARPARAMS="${KMTARPARAMS} --transform=s|apps/||"
+ KMTARPARAMS+=" --transform=s|apps/||"
;;
*)
# Create tarball name from module name (this is the default)
@@ -288,7 +256,7 @@ kde4-meta_src_extract() {
;;
esac
- # Full patch to source tarball
+ # Full path to source tarball
tarfile="${DISTDIR}/${tarball}"
# Detect real toplevel dir from tarball name - it will be used upon extraction
@@ -302,9 +270,9 @@ kde4-meta_src_extract() {
for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
AUTHORS COPYING INSTALL README NEWS ChangeLog
do
- extractlist="${extractlist} ${topdir}${moduleprefix}${f}"
+ extractlist+=" ${topdir}${moduleprefix}${f}"
done
- extractlist="${extractlist} $(__list_needed_subdirectories)"
+ extractlist+=" $(__list_needed_subdirectories)"
pushd "${WORKDIR}" > /dev/null
[[ -n ${KDE4_STRICTER} ]] && echo tar -xpf "${tarfile}" ${KMTARPARAMS} ${extractlist} >&2
@@ -344,17 +312,11 @@ kde4-meta_create_extractlists() {
debug-print-function ${FUNCNAME} "$@"
# TODO change to KMEXTRA for more strict check
- # remvove 4.2.3 check when dropped
- if [[ ${PV} = "4.2.3" ]]; then
- if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then
- KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
- fi
- else
if has handbook ${IUSE//+} && use handbook && [[ -n ${KMMODULE} ]]; then
# We use the basename of $KMMODULE because $KMMODULE can contain
# the path to the module subdirectory.
- KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
- fi
+ KMEXTRA_NONFATAL+="
+ doc/${KMMODULE##*/}"
fi
# Add some CMake-files to KMEXTRACTONLY.
@@ -362,21 +324,21 @@ kde4-meta_create_extractlists() {
# In those cases you should care to add the relevant files to KMEXTRACTONLY
case ${KMNAME} in
kdebase)
- KMEXTRACTONLY="${KMEXTRACTONLY}
+ KMEXTRACTONLY+="
apps/config-apps.h.cmake
apps/ConfigureChecks.cmake"
;;
kdebase-apps)
- KMEXTRACTONLY="${KMEXTRACTONLY}
+ KMEXTRACTONLY+="
config-apps.h.cmake
ConfigureChecks.cmake"
;;
kdebase-runtime)
- KMEXTRACTONLY="${KMEXTRACTONLY}
+ KMEXTRACTONLY+="
config-runtime.h.cmake"
;;
kdebase-workspace)
- KMEXTRACTONLY="${KMEXTRACTONLY}
+ KMEXTRACTONLY+="
config-unix.h.cmake
ConfigureChecks.cmake
config-workspace.h.cmake
@@ -386,37 +348,53 @@ kde4-meta_create_extractlists() {
;;
kdegames)
if [[ ${PN} != libkdegames ]]; then
- KMEXTRACTONLY="${KMEXTRACTONLY}
- libkdegames"
+ KMEXTRACTONLY+="
+ libkdegames/"
fi
;;
kdepim)
if [[ ${PN} != libkdepim ]]; then
- KMEXTRACTONLY="${KMEXTRACTONLY}
- libkdepim"
+ KMEXTRACTONLY+="
+ libkdepim/"
fi
case ${SLOT} in
- 4.3|live)
- KMEXTRACTONLY="${KMEXTRACTONLY}
- kdepim-version.h
- config-enterprise.h.cmake"
+ 4.3|4.4|live)
+ KMEXTRACTONLY+="
+ kdepim-version.h
+ config-enterprise.h.cmake"
;;
esac
- KMEXTRACTONLY="${KMEXTRACTONLY}
+ KMEXTRACTONLY+="
kleopatra/ConfigureChecks.cmake"
if has kontact ${IUSE//+} && use kontact; then
- KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
- KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
+ KMEXTRA+="
+ kontact/plugins/${PLUGINNAME:-${PN}}/"
+ KMEXTRACTONLY+="
+ kontactinterfaces/"
fi
;;
+ kdeutils)
+ case ${SLOT} in
+ 4.3|4.4|live)
+ KMEXTRACTONLY+="
+ kdeutils-version.h"
+ ;;
+ esac
+ ;;
koffice)
- KMEXTRACTONLY="${KMEXTRACTONLY}
+ KMEXTRACTONLY+="
config-endian.h.cmake
filters/config-filters.h.cmake
- config-openctl.h.cmake
config-openexr.h.cmake
config-opengl.h.cmake
- config-prefix.h.cmake"
+ config-prefix.h.cmake
+ "
+ case ${PV} in
+ 2.0.*)
+ KMEXTRACTONLY+="
+ config-openctl.h.cmake"
+ ;;
+ esac
;;
esac
# Don't install cmake modules for split ebuilds, to avoid collisions.
@@ -426,20 +404,20 @@ kde4-meta_create_extractlists() {
# Remove when 4.2 is wiped out from the tree
case ${PV} in
4.1*|4.2.0|4.2.1|4.2.2|4.2.3|4.2.4|4.2.85)
- KMCOMPILEONLY="${KMCOMPILEONLY}
+ KMCOMPILEONLY+="
cmake/modules/"
- ;;
+ ;;
*) ;;
esac
;;
kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics)
case ${PN} in
libkdegames|libkdeedu|libkworkspace)
- KMEXTRA="${KMEXTRA}
+ KMEXTRA+="
cmake/modules/"
;;
*)
- KMCOMPILEONLY="${KMCOMPILEONLY}
+ KMCOMPILEONLY+="
cmake/modules/"
;;
esac
@@ -454,12 +432,12 @@ __list_needed_subdirectories() {
# We expand KMEXTRA by adding CMakeLists.txt files
kmextra="${KMEXTRA}"
- [[ ${1} != fatal ]] && kmextra="${kmextra} ${KMEXTRA_NONFATAL}"
+ [[ ${1} != fatal ]] && kmextra+=" ${KMEXTRA_NONFATAL}"
for i in ${kmextra}; do
- kmextra_expanded="${kmextra_expanded} ${i}"
+ kmextra_expanded+=" ${i}"
j=$(dirname ${i})
while [[ ${j} != "." ]]; do
- kmextra_expanded="${kmextra_expanded} ${j}/CMakeLists.txt";
+ kmextra_expanded+=" ${j}/CMakeLists.txt";
j=$(dirname ${j})
done
done
@@ -469,17 +447,17 @@ __list_needed_subdirectories() {
kmmodule_expanded="${KMMODULE}"
j=$(dirname ${KMMODULE})
while [[ ${j} != "." ]]; do
- kmmodule_expanded="${kmmodule_expanded} ${j}/CMakeLists.txt";
+ kmmodule_expanded+=" ${j}/CMakeLists.txt";
j=$(dirname ${j})
done
fi
# Expand KMCOMPILEONLY
for i in ${KMCOMPILEONLY}; do
- kmcompileonly_expanded="${kmcompileonly_expanded} ${i}"
+ kmcompileonly_expanded+=" ${i}"
j=$(dirname ${i})
while [[ ${j} != "." ]]; do
- kmcompileonly_expanded="${kmcompileonly_expanded} ${j}/CMakeLists.txt";
+ kmcompileonly_expanded+=" ${j}/CMakeLists.txt";
j=$(dirname ${j})
done
done
@@ -493,7 +471,7 @@ __list_needed_subdirectories() {
for i in ${kmmodule_expanded} ${kmextra_expanded} ${kmcompileonly_expanded} \
${KMEXTRACTONLY}
do
- extractlist="${extractlist} ${topdir}${moduleprefix}${i}"
+ extractlist+=" ${topdir}${moduleprefix}${i}"
done
echo ${extractlist}
@@ -607,7 +585,7 @@ kde4-meta_change_cmakelists() {
if [[ ${PN} != libkworkspace ]]; then
sed -i \
-e '/install(FILES ${CMAKE_CURRENT_BINARY_DIR}\/KDE4WorkspaceConfig.cmake/,/^[[:space:]]*FILE KDE4WorkspaceLibraryTargets.cmake )[[:space:]]*^/d' \
- CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section"
+ CMakeLists.txt || die "${LINENO}: sed died in kdebase-workspace strip config install and fix EXPORT section"
fi
;;
kdebase-runtime)
@@ -641,9 +619,18 @@ kde4-meta_change_cmakelists() {
sed -i -e '/install(.*FindKOfficeLibs.cmake/,/)/ d' \
"${S}"/cmake/modules/CMakeLists.txt || \
die "${LINENO}: sed died in collision prevention section"
- sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \
- "${S}"/CMakeLists.txt || \
- die "${LINENO}: sed died in collision prevention section"
+ case ${PV} in
+ 2.0.*)
+ sed -i -n -e '1h;1!H;${g;s/install(.\+config-openexr.h.\+)//;p}' \
+ "${S}"/CMakeLists.txt || \
+ die "${LINENO}: sed died in collision prevention section"
+ ;;
+ *)
+ sed -i -e '/install(.\+config-openexr\.h.\+)/d' \
+ "${S}"//CMakeLists.txt || \
+ die "${LINENO}: sed died in collision prevention section"
+ ;;
+ esac
fi
esac
@@ -680,7 +667,7 @@ kde4-meta_src_configure() {
kde4-meta_src_compile() {
debug-print-function ${FUNCNAME} "$@"
- kde4-base_src_compile
+ kde4-base_src_compile "$@"
}
# @FUNCTION: kde4-meta_src_test
@@ -705,7 +692,7 @@ kde4-meta_src_install() {
# @FUNCTION: kde4-meta_src_make_doc
# @DESCRIPTION:
# This function searches in ${S}/${KMMODULE},
-# and tries to install "AUTHORS ChangeLog* README* NEWS todo" if these files exist.
+# and tries to install "AUTHORS ChangeLog* README* NEWS TODO" if these files exist.
kde4-meta_src_make_doc() {
debug-print-function ${FUNCNAME} "$@"
@@ -726,7 +713,7 @@ kde4-meta_pkg_postinst() {
if has handbook ${IUSE//+} && ! use handbook; then
echo
einfo "Application handbook for ${PN} has not been installed."
- einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'handbook' USE flag."
+ einfo "To install handbook, reemerge =${CATEGORY}/${PF} with 'handbook' USE flag."
echo
fi