summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-01-12 17:25:59 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-01-12 17:25:59 +0000
commit9c5723f5c9a349abe2eb7bcbc99016a986f11d43 (patch)
tree1b54655b34cc4a137e8df2cf4063eb948e73e853 /eclass/kde4-meta.eclass
parent* bump (diff)
downloadgentoo-2-9c5723f5c9a349abe2eb7bcbc99016a986f11d43.tar.gz
gentoo-2-9c5723f5c9a349abe2eb7bcbc99016a986f11d43.tar.bz2
gentoo-2-9c5723f5c9a349abe2eb7bcbc99016a986f11d43.zip
Update of kde4 eclasses with ones which understand 4.2 and live :]
Report all broken (in meaning with kde4.2) things, i will be revbumping and fixing all packages using these eclasses but i might miss something. Such package could became blocker for 4.2 so bumb if you maintain such thing (i will write note on dev-ml today when i am done and if i wont forget).
Diffstat (limited to 'eclass/kde4-meta.eclass')
-rw-r--r--eclass/kde4-meta.eclass471
1 files changed, 258 insertions, 213 deletions
diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass
index a905d89770db..9ae7ad1b5c76 100644
--- a/eclass/kde4-meta.eclass
+++ b/eclass/kde4-meta.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.8 2009/01/03 18:20:00 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.9 2009/01/12 17:25:59 scarabeus Exp $
#
# @ECLASS: kde4-meta.eclass
# @MAINTAINER:
@@ -11,54 +11,47 @@
#
# You must define KMNAME to use this eclass, and do so before inheriting it. All other variables are optional.
# Do not include the same item in more than one of KMMODULE, KMMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY.
-#
-# NOTE: This eclass uses the SLOT dependencies from EAPI="1" or compatible,
-# hence you must define EAPI="1" in the ebuild, before inheriting any eclasses.
-inherit multilib kde4-functions kde4-base
+# we want opengl optional in each koffice package
+if [[ $KMNAME = koffice ]]; then
+ case ${PN} in
+ koffice-data)
+ ;;
+ *)
+ OPENGL_REQUIRED=optional
+ ;;
+ esac
+fi
+
+inherit kde4-base versionator
-case "${EAPI}" in
- 2)
- EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
- ;;
- *)
- EXPORT_FUNCTIONS pkg_setup src_unpack src_compile src_test src_install pkg_postinst pkg_postrm
- ;;
-esac
+EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
if [[ -z ${KMNAME} ]]; then
die "kde4-meta.eclass inherited but KMNAME not defined - broken ebuild"
fi
case ${KDEBASE} in
- kde-base) HOMEPAGE="http://www.kde.org/"
- LICENSE="GPL-2" ;;
- koffice) HOMEPAGE="http://www.koffice.org/"
- LICENSE="GPL-2" ;;
+ kde-base)
+ HOMEPAGE="http://www.kde.org/"
+ LICENSE="GPL-2"
+ ;;
+ koffice)
+ HOMEPAGE="http://www.koffice.org/"
+ LICENSE="GPL-2"
+ ;;
esac
-debug-print "${BASH_SOURCE} ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - before blockers"
-debug-print "${BASH_SOURCE} ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - before blockers"
-
-# Add a blocker on the package we're derived from
-if [[ -n ${KDEBASE} ]]; then
- DEPEND="${DEPEND} !$(get-parent-package ${CATEGORY}/${PN}):${SLOT}"
- RDEPEND="${RDEPEND} !$(get-parent-package ${CATEGORY}/${PN}):${SLOT}"
-fi
-
-debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after blockers"
-debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after blockers"
-
# 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"
- ;;
+ ;;
kdepim)
DEPEND="${DEPEND} dev-libs/boost app-office/akonadi-server"
RDEPEND="${RDEPEND} dev-libs/boost"
- if [[ ${PN} != kode ]]; then
+ if [[ $PN != kode ]]; then
DEPEND="${DEPEND} >=kde-base/kode-${PV}:${SLOT}"
RDEPEND="${RDEPEND} >=kde-base/kode-${PV}:${SLOT}"
fi
@@ -67,24 +60,40 @@ case ${KMNAME} in
IUSE="+kontact"
DEPEND="${DEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT} )"
RDEPEND="${RDEPEND} kontact? ( >=kde-base/kontactinterfaces-${PV}:${SLOT} )"
- ;;
+ ;;
esac
- ;;
+ ;;
kdegames)
- if [[ ${PN} != "libkdegames" ]]; then
+ if [[ $PN != libkdegames ]]; then
DEPEND="${DEPEND} >=kde-base/libkdegames-${PV}:${SLOT}"
RDEPEND="${RDEPEND} >=kde-base/libkdegames-${PV}:${SLOT}"
fi
- ;;
+ ;;
koffice)
+ case ${PV} in
+ 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"
case ${PN} in
- koffice-libs|koffice-data) : ;;
+ koffice-data)
+ DEPEND="${DEPEND} media-libs/lcms"
+ RDEPEND="${RDEPEND} media-libs/lcms"
+ ;;
*)
- DEPEND="${DEPEND} >=app-office/koffice-libs-${PV}:${SLOT}"
- RDEPEND="${RDEPEND} >=app-office/koffice-libs-${PV}:${SLOT}"
- ;;
+ IUSE="+crypt"
+ DEPEND="${DEPEND} crypt? ( >=app-crypt/qca-2 )"
+ RDEPEND="${RDEPEND} crypt? ( >=app-crypt/qca-2 )"
+ if [[ $PN != koffice-libs ]]; then
+ DEPEND="${DEPEND} >=app-office/koffice-libs-${PV}:${SLOT}"
+ RDEPEND="${RDEPEND} >=app-office/koffice-libs-${PV}:${SLOT}"
+ fi
+ ;;
esac
- ;;
+ ;;
esac
debug-print "line ${LINENO} ${ECLASS}: DEPEND ${DEPEND} - after metapackage-specific dependencies"
@@ -92,8 +101,9 @@ debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-sp
# @ECLASS-VARIABLE: KMNAME
# @DESCRIPTION:
-# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it _before_ inheriting this eclass,
-# (unlike the other parameters), since it's used to set $SRC_URI.
+# Name of the parent-module (e.g. kdebase, kdepim, ...). You _must_ set it
+# _before_ inheriting this eclass, (unlike the other parameters), since it's
+# used to set $SRC_URI.
# @ECLASS-VARIABLE: KMMODULE
# @DESCRIPTION:
@@ -108,9 +118,10 @@ debug-print "line ${LINENO} ${ECLASS}: RDEPEND ${RDEPEND} - after metapackage-sp
# If set to "true", $KMMODULE doesn't have to be defined.
#
# Example usage: If you're installing subdirectories of a package, like plugins,
-# you mark the topsubdirectory (containing the package) as $KMEXTRACTONLY, and set KMNOMODULE="true".
-if [[ ${KMNOMODULE} != "true" && -z ${KMMODULE} ]]; then
- KMMODULE=${PN}
+# you mark the top subdirectory (containing the package) as $KMEXTRACTONLY, and
+# set KMNOMODULE="true".
+if [[ -z $KMMODULE && $KMNOMODULE != true ]]; then
+ KMMODULE=$PN
fi
# @ECLASS-VARIABLE: KMEXTRA
@@ -126,9 +137,10 @@ fi
# @DESCRIPTION:
# All subdirectories listed here will be extracted & compiled, but not installed.
+# TODO: better formulation may be needed
# @ECLASS-VARIABLE: KMEXTRACTONLY
# @DESCRIPTION:
-# All subdirectories listed here will be extracted, but not compiled nor installed.
+# All subdirectories listed here will be extracted, but neither compiled nor installed.
# This can be used to avoid compilation in a subdirectory of a directory in $KMMODULE or $KMEXTRA
# @ECLASS-VARIABLE: KMTARPARAMS
@@ -138,8 +150,8 @@ fi
# @FUNCTION: kde4-meta_pkg_setup
# @DESCRIPTION:
-# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
-# ebuilds.
+# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in
+# split ebuilds.
kde4-meta_pkg_setup() {
kde4-base_pkg_setup
}
@@ -150,56 +162,111 @@ kde4-meta_pkg_setup() {
# kde4-meta-src_extract.
kde4-meta_src_unpack() {
debug-print-function ${FUNCNAME} "$@"
-
- kde4-meta_src_extract
- kde4-meta_change_cmakelists
+ if [[ $BUILD_TYPE = live ]]; then
+ kde4-base_src_unpack
+ kde4-meta_src_extract
+ else
+ kde4-meta_src_extract
+ fi
}
+# FIXME: the difference between kde4-meta_src_extract and kde4-meta_src_unpack?
+
# @FUNCTION: kde4-meta_src_extract
# @DESCRIPTION:
# A function to unpack the source for a split KDE ebuild.
-# Also see KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and KMTARPARAMS.
+# Also see KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and
+# KMTARPARAMS.
kde4-meta_src_extract() {
- local abort tarball tarfile f extractlist
- tarball="${KMNAME}-${PV}.tar.bz2"
- tarfile="${DISTDIR}"/${tarball}
+ if [[ $BUILD_TYPE = live ]]; then
+ local rsync_options subdir kmnamedir targetdir
+ # Export working copy to ${S}
+ einfo "Exporting parts of working copy to ${S}"
+ kde4-meta_create_extractlists
+
+ rsync_options="--group --links --owner --perms --quiet --exclude=.svn/"
+
+ # Copy ${KMNAME} non-recursively (toplevel files)
+ rsync ${rsync_options} "${ESVN_WC_PATH}"/${kmnamedir}* "${S}" \
+ || die "${ESVN}: can't export toplevel files to '${S}'."
+ # Copy cmake directory
+ if [[ -d "${ESVN_WC_PATH}/${kmnamedir}cmake" ]]; then
+ rsync --recursive ${rsync_options} "${ESVN_WC_PATH}/${kmnamedir}cmake" "${S}" \
+ || die "${ESVN}: can't export cmake files to '${S}'."
+ fi
+ # Copy all subdirectories
+ for subdir in $(__list_needed_subdirectories); do
+ 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}'."
+ done
- echo "Unpacking parts of ${tarball} to ${WORKDIR}"
+ if [[ $KMNAME = kdebase-runtime && $PN != kdebase-data ]]; then
+ sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
+ "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
+ fi
+ else
+ local abort tarball tarfile f extractlist
+ case $KMNAME in
+ kdebase-apps)
+ tarball="${KMNAME#-apps}-${PV}.tar.bz2"
+ ;;
+ *)
+ tarball="${KMNAME}-${PV}.tar.bz2"
+ ;;
+ esac
+ tarfile="${DISTDIR}"/${tarball}
- kde4-meta_create_extractlists
+ ebegin "Unpacking parts of ${tarball} to ${WORKDIR}"
- for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
- AUTHORS COPYING INSTALL README NEWS ChangeLog
- do
- extractlist="${extractlist} ${KMNAME}-${PV}/${f}"
- done
- extractlist="${extractlist} $(__list_needed_subdirectories)"
- KMTARPARAMS="${KMTARPARAMS} -j"
+ kde4-meta_create_extractlists
- pushd "${WORKDIR}" > /dev/null
- [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf $tarfile $KMTARPARAMS $extractlist >&2
- tar -xpf $tarfile $KMTARPARAMS $extractlist 2> /dev/null
+ for f in cmake/ CMakeLists.txt ConfigureChecks.cmake config.h.cmake \
+ AUTHORS COPYING INSTALL README NEWS ChangeLog
+ do
+ extractlist="${extractlist} ${KMNAME}-${PV}/${f}"
+ done
+ extractlist="${extractlist} $(__list_needed_subdirectories)"
+ KMTARPARAMS="${KMTARPARAMS} -j"
- # Default $S is based on $P; rename the extracted directory to match $S
- mv ${KMNAME}-${PV} ${P} || die "Died while moving \"${KMNAME}-${PV}\" to \"${P}\""
+ pushd "${WORKDIR}" > /dev/null
+ [[ -n ${KDE4_STRICTER} ]] && echo tar -xpf $tarfile $KMTARPARAMS $extractlist >&2
+ tar -xpf $tarfile $KMTARPARAMS $extractlist 2> /dev/null
- popd > /dev/null
+ # Default $S is based on $P; rename the extracted directory to match $S
+ mv ${KMNAME}-${PV} ${P} || die "Died while moving \"${KMNAME}-${PV}\" to \"${P}\""
- if [[ -n ${KDE4_STRICTER} ]]; then
- for f in $(__list_needed_subdirectories fatal); do
- if [[ ! -e ${S}/${f#*/} ]]; then
- eerror "'${f#*/}' is missing"
- abort=true
- fi
- done
- [[ -n ${abort} ]] && die "There were missing files."
- fi
+ popd > /dev/null
- kde4-base_src_unpack
+ eend $?
+
+ if [[ -n ${KDE4_STRICTER} ]]; then
+ for f in $(__list_needed_subdirectories fatal); do
+ if [[ ! -e ${S}/${f#*/} ]]; then
+ eerror "'${f#*/}' is missing"
+ abort=true
+ fi
+ done
+ [[ -n ${abort} ]] && die "There were missing files."
+ fi
+ kde4-base_src_unpack
+ fi
+ # fix koffice linking
+ if [[ $KMNAME = koffice ]]; then
+ koffice_fix_libraries
+ fi
}
+# @FUNCTION: kde4-meta_create_extractlists
+# @DESCRIPTION:
# Create lists of files and subdirectories to extract.
-# Also see the descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY, KMEXTRACTONLY and KMTARPARAMS.
+# Also see descriptions of KMMODULE, KMNOMODULE, KMEXTRA, KMCOMPILEONLY,
+# KMEXTRACTONLY and KMTARPARAMS.
kde4-meta_create_extractlists() {
debug-print-function ${FUNCNAME} "$@"
@@ -214,54 +281,81 @@ kde4-meta_create_extractlists() {
# In those cases you should care to add the relevant files to KMEXTRACTONLY
case ${KMNAME} in
kdebase)
- KMEXTRACTONLY="${KMEXTRACTONLY}
- apps/config-apps.h.cmake
- apps/ConfigureChecks.cmake"
- ;;
+ KMEXTRACTONLY="${KMEXTRACTONLY}
+ apps/config-apps.h.cmake
+ apps/ConfigureChecks.cmake"
+ ;;
+ kdebase-apps)
+ KMEXTRACTONLY="${KMEXTRACTONLY}
+ config-apps.h.cmake
+ ConfigureChecks.cmake"
+ ;;
kdebase-runtime)
- KMEXTRACTONLY="${KMEXTRACTONLY}
- config-runtime.h.cmake"
- ;;
+ KMEXTRACTONLY="${KMEXTRACTONLY}
+ config-runtime.h.cmake"
+ ;;
kdebase-workspace)
- KMEXTRACTONLY="${KMEXTRACTONLY}
- config-unix.h.cmake
- ConfigureChecks.cmake
- config-workspace.h.cmake
- config-X11.h.cmake
- startkde.cmake"
- ;;
- kdegames)
- if [[ ${PN} != "libkdegames" ]]; then
KMEXTRACTONLY="${KMEXTRACTONLY}
- libkdegames"
- fi
- ;;
+ config-unix.h.cmake
+ ConfigureChecks.cmake
+ config-workspace.h.cmake
+ config-X11.h.cmake
+ startkde.cmake"
+ case ${SLOT} in
+ 4.2)
+ KMEXTRACTONLY="${KMEXTRACTONLY}
+ KDE4WorkspaceConfig.cmake.in"
+ ;;
+ *) : ;;
+ esac
+ ;;
+ kdegames)
+ if [[ ${PN} != "libkdegames" ]]; then
+ KMEXTRACTONLY="${KMEXTRACTONLY}
+ libkdegames"
+ fi
+ ;;
kdepim)
- KMEXTRACTONLY="${KMEXTRACTONLY}
- kleopatra/ConfigureChecks.cmake"
- if has kontact ${IUSE//+} && use kontact; then
- KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
- KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
- fi
- ;;
+ KMEXTRACTONLY="${KMEXTRACTONLY}
+ kleopatra/ConfigureChecks.cmake
+ libkdepim/kdepim_export.h"
+ if has kontact ${IUSE//+} && use kontact; then
+ KMEXTRA="${KMEXTRA} kontact/plugins/${PLUGINNAME:-${PN}}"
+ KMEXTRACTONLY="${KMEXTRACTONLY} kontactinterfaces/"
+ fi
+ ;;
koffice)
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"
- ;;
+ case ${PN} in
+ koffice-libs|koffice-data)
+ ;;
+ *)
+ # add basic extract for all packages
+ KMEXTRACTONLY="${KMEXTRACTONLY}
+ filters/
+ libs/
+ plugins/"
+ if [[ ${PN} != "kplato" ]]; then
+ KMEXTRA="${KMEXTRA} filters/${PN}"
+ fi
+ ;;
+ esac
+ ;;
esac
- # Don't install cmake modules for split ebuilds to avoid collisions.
+ # Don't install cmake modules for split ebuilds, to avoid collisions.
case ${KMNAME} in
kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim)
case ${PN} in
- libkdegames|libkdeedu|marble)
+ libkdegames|libkdeedu|marble|libkworkspace)
KMEXTRA="${KMEXTRA}
cmake/modules/"
;;
-
*)
KMCOMPILEONLY="${KMCOMPILEONLY}
cmake/modules/"
@@ -289,7 +383,7 @@ __list_needed_subdirectories() {
done
# Expand KMMODULE
- if [[ -n ${KMMODULE} ]]; then
+ if [[ -n $KMMODULE ]]; then
kmmodule_expanded="${KMMODULE}"
j=$(dirname ${KMMODULE})
while [[ ${j} != "." ]]; do
@@ -328,51 +422,18 @@ __list_needed_subdirectories() {
echo ${extractlist}
}
-save_library_dependencies() {
- local depsfile="${T}/${PN}:${SLOT}"
-
- echo "Saving library dependendencies in ${depsfile##*/}"
- echo "EXPORT_LIBRARY_DEPENDENCIES(\"${depsfile}\")" >> "${S}/CMakeLists.txt" || \
- die "Failed to save the library dependencies."
-}
-
-install_library_dependencies() {
- local depsfile="${T}/${PN}:${SLOT}"
- echo "Installing library dependendencies as ${depsfile##*/}"
- insinto /var/lib/kde
- doins "${depsfile}" || die "Failed to install library dependencies."
-}
-
-load_library_dependencies() {
- local pn i depsfile
- echo "Injecting library dependendencies from '${KMLOADLIBS}'"
-
- i=0
- for pn in ${KMLOADLIBS} ; do
- ((i++))
- depsfile="/var/lib/kde/${pn}:${SLOT}"
- [[ -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}"
- done
-}
-
-# @FUNCTION: kde4-meta_src_compile
+# @FUNCTION: kde4-meta_src_prepare
# @DESCRIPTION:
-# General function for compiling split KDE4 applications.
-kde4-meta_src_compile() {
+# Meta-package build system configuration handling - commenting out targets, etc..
+kde4-meta_src_prepare() {
debug-print-function ${FUNCNAME} "$@"
- case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
- ;;
- *)
- kde4-base_meta_configure
- ;;
- esac
- kde4-meta_src_make
+ kde4-meta_change_cmakelists
+ kde4-base_src_prepare
}
+
+# FIXME: no comment here?
_change_cmakelists_parent_dirs() {
debug-print-function ${FUNCNAME} "$@"
@@ -390,19 +451,14 @@ _change_cmakelists_parent_dirs() {
done
}
+# FIXME: add description
+# @FUNCTION: kde4-meta_change_cmakelists
+# @DESCRIPTION:
kde4-meta_change_cmakelists() {
debug-print-function ${FUNCNAME} "$@"
pushd "${S}" > /dev/null
- if [[ -n ${KMSAVELIBS} ]] ; then
- save_library_dependencies
- fi
-
- if [[ -n ${KMLOADLIBS} ]] ; then
- load_library_dependencies
- fi
-
comment_all_add_subdirectory ./
# Restore "add_subdirectory( cmake )" in ${S}/CMakeLists.txt
@@ -462,65 +518,47 @@ kde4-meta_change_cmakelists() {
case ${KMNAME} in
kdebase-workspace)
- # COLLISION PROTECT section
- # Only install the startkde script as part of kde-base/kdebase-startkde,
- # instead of with every package.
- if [[ ${PN} != "kdebase-startkde" && -f "${S}"/CMakeLists.txt ]]; then
- case ${PV} in
- *) # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0.
+ # COLLISION PROTECT section
+ # Install the startkde script just once, as a part of kde-base/kdebase-startkde,
+ # not as a part of every package.
+ if [[ ${PN} != "kdebase-startkde" && -f "${S}"/CMakeLists.txt ]]; then
+ # The startkde script moved to kdebase-workspace for KDE4 versions > 3.93.0.
sed -i -e '/startkde/s/^/#DONOTINSTALL /' "${S}"/CMakeLists.txt || \
die "${LINENO}: sed died in the kdebase-startkde collision prevention section"
- ;;
- esac
- fi
- ;;
+ fi
+ # Strip EXPORT feature section from workspace for KDE4 versions > 4.1.82
+ if [[ ${SLOT} == 4.2 ]] || [[ ${PV} == 9999 ]]; then
+ 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 EXPORT section"
+ fi
+ fi
+ ;;
kdebase-runtime)
- # COLLISION PROTECT section
- # Only install the kde4 script as part of kde-base/kdebase-data
- if [[ ${PN} != "kdebase-data" && -f "${S}"/CMakeLists.txt ]]; then
- sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
- "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
- fi
- ;;
+ # COLLISION PROTECT section
+ # Only install the kde4 script as part of kde-base/kdebase-data
+ if [[ ${PN} != "kdebase-data" && -f "${S}"/CMakeLists.txt ]]; then
+ sed -i -e '/^install(PROGRAMS[[:space:]]*[^[:space:]]*\/kde4[[:space:]]/s/^/#DONOTINSTALL /' \
+ "${S}"/CMakeLists.txt || die "Sed to exclude bin/kde4 failed"
+ fi
+ ;;
kdepim)
- case ${PN} in
- kaddressbook|kalarm|kmailcvt|kontact|korganizer|korn)
- sed -i -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
- -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
- _change_cmakelists_parent_dirs kmail
+ case ${PN} in
+ kaddressbook|kalarm|kmailcvt|kontact|korganizer|korn)
+ sed -i -n -e '/qt4_generate_dbus_interface(.*org\.kde\.kmail\.\(kmail\|mailcomposer\)\.xml/p' \
+ -e '/add_custom_target(kmail_xml /,/)/p' "${S}"/kmail/CMakeLists.txt || die "uncommenting xml failed"
+ _change_cmakelists_parent_dirs kmail
+ ;;
+ esac
;;
- esac
- ;;
- kdeutils)
- # This is sort of a hack to avoid patching 16 kdeutils packages with
- # r775410 from upstream trunk which makes blitz optional so superkaramba
- # only gets compiled when it is found. Bug #209324. Remove this no later
- # than 4.1.
- if [[ ${PN} != superkaramba && ${SLOT} == kde-4 ]]; then
- sed -i -e '/find_package(Blitz REQUIRED)/d' "${S}"/CMakeLists.txt \
- || die "${LINENO}: sed to remove dependency on Blitz failed."
- fi
- ;;
- koffice)
- if [[ ${PN} != koffice-libs ]]; then
- sed -i -e '/^INSTALL(FILES.*koffice.desktop/ s/^/#DONOTINSTALL /' \
- doc/CMakeLists.txt || \
- die "${LINENO}: sed died in the koffice.desktop collision prevention section"
- fi
- ;;
esac
popd > /dev/null
}
-# transition function so we will work with soon to come eclasses.
-kde4-meta_src_prepare() {
- kde4-base_src_prepare
-}
-
# @FUNCTION: kde4-meta_src_configure
# @DESCRIPTION:
-# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
+# Currently just calls its equivalent in kde4-base.eclass(5). Use this one in split
# ebuilds.
kde4-meta_src_configure() {
debug-print-function ${FUNCNAME} "$@"
@@ -528,11 +566,11 @@ kde4-meta_src_configure() {
kde4-base_src_configure
}
-# @FUNCTION: kde4-meta_src_make
+# @FUNCTION: kde4-meta_src_compile
# @DESCRIPTION:
-# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
-# ebuilds.
-kde4-meta_src_make() {
+# General function for compiling split KDE4 applications.
+# Overrides kde4-base_src_compile.
+kde4-meta_src_compile() {
debug-print-function ${FUNCNAME} "$@"
kde4-base_src_make
@@ -557,14 +595,20 @@ kde4-meta_src_install() {
kde4-meta_src_make_doc
cmake-utils_src_install
- if [[ -n ${KMSAVELIBS} ]] ; then
+ if [[ -n ${KMSAVELIBS} ]]; then
install_library_dependencies
fi
+
+ # remove unvanted koffice stuff
+ if [[ $KMNAME = koffice && $PN != koffice-data ]]; then
+ rm "$D/$KDEDIR/include/config-openexr.h"
+ rm "$D/$KDEDIR/share/apps/cmake/modules/FindKOfficeLibs.cmake"
+ fi
}
# @FUNCTION: kde4-meta_src_make_doc
# @DESCRIPTION:
-# This function searches under ${S}/${KMMODULE},
+# This function searches in ${S}/${KMMODULE},
# and tries to install "AUTHORS ChangeLog* README* NEWS todo" if these files exist.
kde4-meta_src_make_doc() {
debug-print-function $FUNCNAME "$@"
@@ -592,3 +636,4 @@ kde4-meta_pkg_postinst() {
kde4-meta_pkg_postrm() {
kde4-base_pkg_postrm
}
+