summaryrefslogtreecommitdiff
path: root/eclass
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
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')
-rw-r--r--eclass/kde4-base.eclass777
-rw-r--r--eclass/kde4-functions.eclass671
-rw-r--r--eclass/kde4-meta.eclass471
3 files changed, 865 insertions, 1054 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index 4d9cbcadbb53..439ee242ba8a 100644
--- a/eclass/kde4-base.eclass
+++ b/eclass/kde4-base.eclass
@@ -1,87 +1,58 @@
# Copyright 2007-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.21 2009/01/06 10:55:41 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.22 2009/01/12 17:25:59 scarabeus Exp $
# @ECLASS: kde4-base.eclass
# @MAINTAINER:
# kde@gentoo.org
# @BLURB: This eclass provides functions for kde 4.X ebuilds
# @DESCRIPTION:
-# The kde4-base.eclass provides support for building KDE4 monolithic ebuilds
+# The kde4-base.eclass provides support for building KDE4 based ebuilds
# and KDE4 applications.
#
-# NOTE: This eclass uses the SLOT dependencies from EAPI="1" or compatible,
-# and use deps from EAPI="2", hence you must define EAPI="2" in the ebuild,
-# before inheriting any eclasses.
+# NOTE: KDE 4 ebuilds by default define EAPI="2", this can be redefined but
+# eclass will fail with version older than 2.
-inherit base cmake-utils eutils kde4-functions multilib
+inherit base cmake-utils eutils multilib kde4-functions
-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
-
-# Set the qt dependencies
-kde4-base_set_qt_dependencies() {
- local qt qtcore qtgui qt3support qtdepend qtopengldepend
+get_build_type
+if [[ $BUILD_TYPE = live ]]; then
+ inherit subversion
+fi
- # use dependencies
- case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
+EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
- qt="["
- case "${OPENGL_REQUIRED}" in
- always)
- qt="${qt}opengl,"
- ;;
- optional)
- qt="${qt}opengl?,"
- ;;
- esac
- qt="${qt}accessibility,dbus,gif,jpeg,png,qt3support,ssl,zlib]"
- qtcore="[qt3support,ssl]"
- qtgui="[accessibility,dbus]"
- qt3support="[accessibility]"
- ;;
- esac
+# @FUNCTION: kde4-base_set_qt_dependencies
+# @DESCRIPTION:
+# Set qt dependencies. And use opengl based on OPENGL_REQUIRED variable.
+kde4-base_set_qt_dependencies() {
+ local qtdepend qtopengldepend
- # split qt
qtdepend="
- x11-libs/qt-core:4${qtcore}
- x11-libs/qt-gui:4${qtgui}
- x11-libs/qt-qt3support:4${qt3support}
+ x11-libs/qt-core:4[qt3support,ssl]
+ x11-libs/qt-gui:4[accessibility,dbus]
+ x11-libs/qt-qt3support:4[accessibility]
x11-libs/qt-script:4
+ x11-libs/qt-sql:4[qt3support]
x11-libs/qt-svg:4
- x11-libs/qt-test:4"
+ x11-libs/qt-test:4
+ x11-libs/qt-webkit:4"
qtopengldepend="x11-libs/qt-opengl:4"
- # allow monolithic qt for PV < 4.1
- case "${PV}" in
- scm|9999*|4.1*|4.0.9*|4.0.8*) : ;;
- *)
- qtdepend="|| ( ( ${qtdepend} ) >=x11-libs/qt-4.3.3:4${qt} )"
- qtopengldepend="|| ( ${qtopengldepend} >=x11-libs/qt-4.3.3:4 )"
- ;;
- esac
-
# opengl dependencies
- case "${OPENGL_REQUIRED}" in
+ case ${OPENGL_REQUIRED} in
always)
- qtdepend="${qtdepend}
- ${qtopengldepend}"
- ;;
+ qtdepend="${qtdepend}
+ ${qtopengldepend}"
+ ;;
optional)
- IUSE="${IUSE} opengl"
- qtdepend="${qtdepend}
- opengl? ( ${qtopengldepend} )"
- ;;
+ IUSE="${IUSE} opengl"
+ qtdepend="${qtdepend}
+ opengl? ( ${qtopengldepend} )"
+ ;;
*)
- OPENGL_REQUIRED="never"
- ;;
+ OPENGL_REQUIRED="never"
+ ;;
esac
COMMONDEPEND="${COMMONDEPEND} ${qtdepend} !x11-libs/qt-phonon"
@@ -89,29 +60,25 @@ kde4-base_set_qt_dependencies() {
kde4-base_set_qt_dependencies
# Set the cmake dependencies
-case "${PV}" in
- 9999*)
- CMAKEDEPEND=">=dev-util/cmake-2.6"
- ;;
- *)
- CMAKEDEPEND=">=dev-util/cmake-2.4.7-r1"
- ;;
-esac
+# Quite a few packages fail with cmake-2.4 even for KDE 4.1, so we just require 2.6.2
+CMAKEDEPEND=">=dev-util/cmake-2.6.2"
# Set the common dependencies
DEPEND="${DEPEND} ${COMMONDEPEND} ${CMAKEDEPEND}
dev-util/pkgconfig
- kde-base/automoc
x11-libs/libXt
x11-proto/xf86vidmodeproto"
RDEPEND="${RDEPEND} ${COMMONDEPEND}"
-# Add the kdeprefix use flag
-case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
- IUSE="${IUSE} kdeprefix"
- ;;
-esac
+if [[ $BUILD_TYPE = live ]]; then
+ # Disable tests for live ebuilds
+ RESTRICT="${RESTRICT} test"
+ # Live ebuilds in kde-base default to kdeprefix by default
+ IUSE="${IUSE} +kdeprefix"
+else
+ # All other ebuild types default to -kdeprefix as before
+ IUSE="${IUSE} kdeprefix"
+fi
# @ECLASS-VARIABLE: OPENGL_REQUIRED
# @DESCRIPTION:
@@ -125,131 +92,148 @@ OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}"
-case "${CPPUNIT_REQUIRED}" in
+case ${CPPUNIT_REQUIRED} in
always)
- DEPEND="${DEPEND} dev-util/cppunit"
- ;;
+ DEPEND="${DEPEND} dev-util/cppunit"
+ ;;
optional)
- IUSE="${IUSE} test"
- DEPEND="${DEPEND}
- test? ( dev-util/cppunit )"
- ;;
+ IUSE="${IUSE} test"
+ DEPEND="${DEPEND}
+ test? ( dev-util/cppunit )"
+ ;;
*)
- CPPUNIT_REQUIRED="never"
- ;;
+ CPPUNIT_REQUIRED="never"
+ ;;
esac
# @ECLASS-VARIABLE: NEED_KDE
# @DESCRIPTION:
# This variable sets the version of KDE4 which will be used by the eclass.
-# This variable must be set by the ebuild, for all categories except for "kde-base".
# For kde-base packages, if it is not set by the ebuild,
-# it's assumed that the required KDE4 version is the latest, non-live, available.
+# it's assumed that the required KDE4 version is the latest available.
+# For non kde-base packages, it is also set to the latest by default.
+#
+# For more precise adjustments or for specifying particular kde version,
+# KDE_MINIMAL variable can be used.
#
# @CODE
# Acceptable values are:
# - latest - Use latest version in the portage tree
-# Default for kde-base ebuilds. Banned for ebuilds not part of kde or koffice.
-# - svn - Use svn release (live ebuilds)
-# - :SLOT - Use any version in the SLOT specified in the NEED_KDE value.
-# - VERSION_NUMBER - Use the minimum KDE4 version specified in the NEED_KDE value.
-# - VERSION_NUMBER:SLOT - Use the minimum KDE4 version and the SLOT specified in the NEED_KDE value.
+# Default for kde-base ebuilds.
+# - live - Use live release (live ebuilds)
# - none - Let the ebuild handle SLOT, kde dependencies, KDEDIR, ...
+# - 4.2, 4.1, kde-4 - respective slots for kde versions
# @CODE
-#
-# Note: There is no default NEED_KDE for ebuilds not in kde-base or part of
-# koffice, so you must set it explicitly in the ebuild, in all other cases.
-if [[ -z ${NEED_KDE} ]]; then
- if [[ -n ${KDEBASE} ]]; then
- NEED_KDE="latest"
- else
- die "kde4-base.eclass inherited but NEED_KDE not defined - broken ebuild"
- fi
-fi
+# Note: default NEED_KDE is latest
+NEED_KDE="${NEED_KDE:=latest}"
export NEED_KDE
+# @ECLASS-VARIABLE: KDE_MINIMAL
+# @DESCRIPTION:
+# This wariable is used when NEED_KDE="latest" is set, to specify the
+# required KDE minimal version for which apps will work.
+# @CODE
+# KDE_MINIMAL="-4.1"
+# @CODE
+# Note: default minimal version is kde-4.1, which means that the apps will work
+# with any KDE version >=${KDE_MINIMAL}
+KDE_MINIMAL="${KDE_MINIMAL:=4.1}"
+export KDE_MINIMAL
+
+# FIXME: the code section, explanation of live. The last sentence needs other
+# formulation too.
+#
+# @ECLASS-VARIABLE: KDE_WANTED
+# @DESCRIPTION:
+# When NEED_KDE=latest is inherited, KDE_WANTED serves to indicate the prefered kde
+# version. It's value is looked for before any other. Useful when having more
+# +kdeprefix installs: you can choose which kde version, if present, to link
+# against.
+#
+# @CODE
+# Acceptable values are:
+# stable = whatever is main tree (now 4.1)
+# testing = whatever is in testing on main tree
+# snapshot = whatever is released under snapshots (4.2 at present)
+# live = live svn ebuilds, also default value, do not be scared it goes in this
+#
+# order: live->snapshot->testing->stable, when searching for kde. This way we
+# allow users to use just kde4snapshots and use software from the tree.
+KDE_WANTED="${KDE_WANTED:=live}"
+export KDE_WANTED
+
case ${NEED_KDE} in
latest)
- # Should only be used by 'kde-base'-ebuilds
- if [[ "${KDEBASE}" == "kde-base" ]]; then
+ if [[ $KDEBASE = kde-base ]]; then
case ${PV} in
+ 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*)
+ _kdedir="4.2"
+ _pv="-${PV}:4.2"
+ _pvn="-${PV}"
+ ;;
4.1*| 4.0.9* | 4.0.8*)
_kdedir="4.1"
- _pv="-${PV}:4.1" ;;
+ _pv="-${PV}:4.1"
+ _pvn="-${PV}"
+ ;;
4.0*)
_kdedir="4.0"
- _pv="-${PV}:kde-4" ;;
+ _pv="-${PV}:kde-4"
+ _pvn="-${PV}"
+ ;;
3.9*)
_kdedir="3.9"
- _pv="-${PV}:kde-4" ;;
+ _pv="-${PV}:kde-4"
+ _pvn="-${PV}"
+ ;;
+ 9999*)
+ _kdedir="live"
+ _pv="-${PV}:live"
+ _pvn="-${PV}"
+ ;;
*)
die "NEED_KDE=latest not supported for PV=${PV}" ;;
- esac
+ esac
_operator=">="
else
- case ${PV} in
- 4.1 | 4.0.9* | 4.0.8*) _kdedir="4.1" ;;
- 4.0*) _kdedir="4.0" ;;
- 3.9*) _kdedir="3.9" ;;
- *) die "NEED_KDE=latest not supported for PV=${PV}" ;;
- esac
+ # this creates dependency on any version of kde4
+ _operator=">="
+ _pv="-${KDE_MINIMAL}"
+ _pvn=${_pv}
fi
;;
- # NEED_KDE=":${SLOT}"
- :kde-svn)
- _kdedir="svn"
- _pv="-${NEED_KDE}"
- export NEED_KDE="svn"
- ;;
- :4.1)
- _kdedir="4.1"
- _pv="${NEED_KDE}"
- ;;
- :kde-4)
- _kdedir="4.0"
- _pv="${NEED_KDE}"
- ;;
-
- # NEED_KDE="${PV}:${SLOT}"
- *:kde-svn)
- _kdedir="svn"
- _operator=">="
- _pv="-${NEED_KDE}"
- export NEED_KDE="svn"
- ;;
- *:4.1)
- _kdedir="4.1"
+ # NEED_KDE="${PV}"
+ scm|svn|live|9999*)
+ _kdedir="live"
_operator=">="
- _pv="-${NEED_KDE}"
+ _pv="-${NEED_KDE}:live"
+ _pvn="-${NEED_KDE}"
+ export NEED_KDE="live"
;;
- *:kde-4)
- _kdedir="4.0"
+ 4.2 | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*)
+ _kdedir="4.2"
+ _pv="-${NEED_KDE}:4.2"
+ _pvn="-${NEED_KDE}"
_operator=">="
- _pv="-${NEED_KDE}"
- ;;
-
- # NEED_KDE="${PV}"
- scm|svn|9999*)
- _kdedir="svn"
- _operator=">="
- _pv="-${NEED_KDE}:kde-svn"
- export NEED_KDE="svn"
;;
4.1 | 4.0.9* | 4.0.8*)
_kdedir="4.1"
- _operator=">="
_pv="-${NEED_KDE}:4.1"
+ _pvn="-${NEED_KDE}"
+ _operator=">="
;;
4.0* | 4)
_kdedir="4.0"
_operator=">="
_pv="-${NEED_KDE}:kde-4"
+ _pvn="-${NEED_KDE}"
;;
3.9*)
_kdedir="3.9"
_operator=">="
_pv="-${NEED_KDE}:kde-4"
+ _pvn="-${NEED_KDE}"
;;
# The ebuild handles dependencies, KDEDIR, SLOT.
@@ -265,103 +249,161 @@ esac
if [[ ${NEED_KDE} != none ]]; then
#Set the SLOT
- if [[ -n ${KDEBASE} ]]; then
- if [[ ${NEED_KDE} = svn ]]; then
- SLOT="kde-svn"
+ if [[ -n $KDEBASE ]]; then
+ if [[ $NEED_KDE = live ]]; then
+ SLOT="live"
else
- case ${PV} in
- 4.1* | 4.0.9* | 4.0.8*) SLOT="4.1" ;;
- *) SLOT="kde-4" ;;
- esac
+ case ${KMNAME} in
+ koffice)
+ case ${PV} in
+ 9999*) SLOT="live" ;;
+ *) SLOT="2" ;;
+ esac
+ ;;
+ kdevelop)
+ case ${PV} in
+ 9999*) SLOT="live" ;;
+ 4.0*|3.9*) SLOT="4" ;;
+ esac
+ ;;
+ kdevplatform)
+ case ${PV} in
+ 9999*) SLOT="live" ;;
+ 1.0*|0.9*) SLOT="1" ;;
+ esac
+ ;;
+ *)
+ case ${PV} in
+ 9999*) SLOT="live" ;;
+ 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;;
+ 4.1* | 4.0.9* | 4.0.8*) SLOT="4.1" ;;
+ *) SLOT="4.1" ;;
+ esac
+ ;;
+ esac
fi
fi
- # Block install of other SLOTS unless kdeprefix
- case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
- for KDE_SLOT in ${KDE_SLOTS[@]}; do
- # block non kdeprefix ${PN} on other slots
- if [[ ${SLOT} != ${KDE_SLOT} ]]; then
- DEPEND="${DEPEND}
- !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )"
- RDEPEND="${RDEPEND}
- !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )"
- fi
- done
- ;;
- esac
+ # Block installation of other SLOTS unless kdeprefix
+ for KDE_SLOT in ${KDE_SLOTS[@]}; do
+ # block non kdeprefix ${PN} on other slots
+ # we do this only if we do not depend on any version of kde
+ if [[ ${SLOT} != ${KDE_SLOT} ]]; then
+ DEPEND="${DEPEND}
+ !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )"
+ RDEPEND="${RDEPEND}
+ !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )"
+ fi
+ done
# Adding kdelibs, kdepimlibs and kdebase-data deps to all other packages.
# We only need to add the dependencies if ${PN} is not "kdelibs" or "kdepimlibs"
- if [[ ${PN} != "kdelibs" ]]; then
- case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
- DEPEND="${DEPEND} ${_operator}kde-base/kdelibs${_pv}[kdeprefix=]"
- RDEPEND="${RDEPEND} ${_operator}kde-base/kdelibs${_pv}[kdeprefix=]"
- ;;
- *)
- DEPEND="${DEPEND} ${_operator}kde-base/kdelibs${_pv}"
- RDEPEND="${RDEPEND} ${_operator}kde-base/kdelibs${_pv}"
- ;;
- esac
- if [[ ${PN} != "kdepimlibs" ]]; then
- case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
- DEPEND="${DEPEND} ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix=]"
- RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix=]"
- ;;
- *)
- DEPEND="${DEPEND} ${_operator}kde-base/kdepimlibs${_pv}"
- RDEPEND="${RDEPEND} ${_operator}kde-base/kdepimlibs${_pv}"
- esac
- if [[ ${PN} != "kdebase-data" ]]; then
- case "${EAPI}" in
- 2)
- RDEPEND="${RDEPEND} ${_operator}kde-base/kdebase-data${_pv}[kdeprefix=]"
- ;;
- *)
- RDEPEND="${RDEPEND} ${_operator}kde-base/kdebase-data${_pv}"
- ;;
- esac
+ if [[ $PN != kdelibs ]]; then
+ DEPEND="${DEPEND}
+ kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
+ !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )"
+ RDEPEND="${RDEPEND}
+ kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
+ !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )"
+ if [[ $PN != kdepimlibs ]]; then
+ DEPEND="${DEPEND}
+ kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
+ !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
+ RDEPEND="${RDEPEND}
+ kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pv}[kdeprefix] )
+ !kdeprefix? ( ${_operator}kde-base/kdepimlibs${_pvn}[-kdeprefix] )"
+ if [[ $PN != kdebase-data ]]; then
+ RDEPEND="${RDEPEND}
+ kdeprefix? ( ${_operator}kde-base/kdebase-data${_pv}[kdeprefix] )
+ !kdeprefix? ( ${_operator}kde-base/kdebase-data${_pvn}[-kdeprefix] )"
fi
fi
fi
-
- unset _operator _pv
+ unset _operator _pv _pvn
fi
# Fetch section - If the ebuild's category is not 'kde-base' and if it is not a
# koffice ebuild, the URI should be set in the ebuild itself
-if [[ -n ${KDEBASE} ]]; then
- if [[ -n ${KMNAME} ]]; then
- _kmname=${KMNAME}
- else
- _kmname=${PN}
- fi
- _kmname_pv="${_kmname}-${PV}"
- if [[ ${NEED_KDE} != "svn" ]]; then
- case ${KDEBASE} in
- kde-base)
- case ${PV} in
- 4.0.9* | 4.0.8*)
- SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
- *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2";;
+case ${SLOT} in
+ live)
+ ESVN_MIRROR=${ESVN_MIRROR:=svn://anonsvn.kde.org/home/kde}
+ # Split ebuild, or extragear stuff
+ if [[ -n $KMNAME ]]; then
+ ESVN_PROJECT="${KMNAME}"
+ if [[ -z ${KMNOMODULE} && -z ${KMMODULE} ]]; then
+ KMMODULE="${PN}/"
+ fi
+ # Split kde-base/ ebuilds: (they reside in trunk/KDE)
+ case ${KMNAME} in
+ kdebase-*)
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/kdebase/${KMNAME#kdebase-}/"
+ ;;
+ kdereview)
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
+ ;;
+ kde*)
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${KMNAME}"
+ ;;
+ extragear*|playground*)
+ case ${PN} in
+ *-plasma)
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
+ ESVN_PROJECT="${KMNAME}/${KMMODULE}"
+ ;;
+ *)
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
+ ;;
+ esac
+ ;;
+ koffice)
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
+ ;;
+ *)
+ # Extragear material
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}/"
+ ;;
esac
- ;;
- koffice)
- SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2"
- ;;
- esac
- fi
- unset _kmname _kmname_pv
-fi
+ else
+ # kdelibs, kdepimlibs
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${PN}"
+ ESVN_PROJECT="${PN}"
+ fi
+ # limit syncing to 1 hour.
+ ESVN_UP_FREQ=${ESVN_UP_FREQ:-1}
+ ;;
+ *)
+ if [[ -n $KDEBASE ]]; then
+ if [[ -n ${KMNAME} ]]; then
+ _kmname=${KMNAME}
+ else
+ _kmname=${PN}
+ fi
+ _kmname_pv="${_kmname}-${PV}"
+ if [[ $NEED_KDE != live ]]; then
+ case ${KDEBASE} in
+ kde-base)
+ case ${PV} in
+ 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6* | 4.0.9* | 4.0.8*)
+ SRC_URI="mirror://kde/unstable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
+ *) SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.bz2" ;;
+ esac
+ ;;
+ koffice)
+ SRC_URI="mirror://kde/unstable/${_kmname_pv}/src/${_kmname_pv}.tar.bz2"
+ ;;
+ esac
+ fi
+ unset _kmname _kmname_pv
+ fi
+ ;;
+esac
debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SRC_URI is ${SRC_URI}"
# @ECLASS-VARIABLE: PREFIX
# @DESCRIPTION:
# Set the installation PREFIX. All kde-base ebuilds go into the KDE4 installation directory.
-# Applications installed by the other ebuilds go into /usr/ by default, this value
+# Applications installed by the other ebuilds go into ${KDEDIR} by default, this value
# can be superseded by defining PREFIX before inheriting kde4-base.
# This value is set on pkg_setup
PREFIX=""
@@ -380,114 +422,37 @@ kde4-base_pkg_setup() {
# Don't set KDEHOME during compile, it will cause access violations
unset KDEHOME
- if [[ ${NEED_KDE} != none ]]; then
+ # Search for best suitable kde installation for misc kde package.
+ # Computation based on NEED_KDE and KDE_MINIMAL
+ get_latest_kdedir
+ if [[ $NEED_KDE != none ]]; then
# Set PREFIX
- case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
- if use kdeprefix; then
- KDEDIR="/usr/kde/${_kdedir}"
- KDEDIRS="/usr:/usr/local:${KDEDIR}"
- else
- KDEDIR="/usr"
- KDEDIRS="/usr:/usr/local"
- fi
- ;;
- *)
- KDEDIR="/usr"
- KDEDIRS="/usr:/usr/local"
- ;;
- esac
+ if use kdeprefix; then
+ KDEDIR="/usr/kde/${_kdedir}"
+ KDEDIRS="/usr/local/:/usr:${KDEDIR}"
+ else
+ KDEDIR="/usr"
+ KDEDIRS="/usr/local/:/usr"
+ fi
fi
-
# Set the prefix based on KDEDIR
# Make it a consequence of kdeprefix
- PREFIX=${KDEDIR}
+ PREFIX=$KDEDIR
unset _kdedir
- case "${EAPI}" in
- 2 | 2_pre3 | 2_pre2 | 2_pre1)
- [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK[@]} ]] && \
- die "built_with_use illegal in this EAPI!"
- ;;
- *)
- # Make KDE4_BUILT_WITH_USE_CHECK an array if it isn't already
- local line kde4_built_with_use_check=()
- if [[ -n ${KDE4_BUILT_WITH_USE_CHECK[@]} && $(declare -p KDE4_BUILT_WITH_USE_CHECK) != 'declare -a '* ]]; then
- while read line; do
- [[ -z ${line} ]] && continue
- kde4_built_with_use_check+=("${line}")
- done <<< "${KDE4_BUILT_WITH_USE_CHECK}"
- KDE4_BUILT_WITH_USE_CHECK=("${kde4_built_with_use_check[@]}")
- fi
-
- # KDE4 applications require qt4 compiled with USE="accessibility dbus gif jpeg png qt3support ssl zlib".
- if has_version '<x11-libs/qt-4.4_alpha:4'; then
- QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} accessibility dbus gif jpeg png qt3support ssl zlib"
- else
- KDE4_BUILT_WITH_USE_CHECK=("${KDE4_BUILT_WITH_USE_CHECK[@]}"
- "x11-libs/qt-core qt3support ssl"
- "x11-libs/qt-gui accessibility dbus"
- "x11-libs/qt-qt3support accessibility")
- fi
-
- if has opengl ${IUSE//+} && use opengl || [[ ${OPENGL_REQUIRED} == always ]]; then
- if has_version '<x11-libs/qt-4.4.0_alpha:4'; then
- QT4_BUILT_WITH_USE_CHECK="${QT4_BUILT_WITH_USE_CHECK} opengl"
- fi
- fi
- kde4-functions_check_use
- ;;
- esac
-}
+ # check if qt has correct deps
+ [[ -n ${QT4_BUILT_WITH_USE_CHECK} || -n ${KDE4_BUILT_WITH_USE_CHECK[@]} ]] && \
+ die "built_with_use illegal in this EAPI!"
-# @FUNCTION: kde4-base_apply_patches
-# @DESCRIPTION:
-# This function applies patches.
-#
-# If the directory ${WORKDIR}/patches/ exists, we apply all patches in that
-# directory, provided they follow this format:
-# @CODE
-# - Monolithic ebuilds, (from kde-base)
-# - $CATEGORY=kde-base:
-# Apply ${CHILD_EBUILD_NAME}-${SLOT}-*{diff,patch}
-# - $CATEGORY=!kde-base:
-# Apply ${CHILD_EBUILD_NAME}-${PV}-*{diff,patch}
-# - Split ebuilds:
-# - $CATEGORY=kde-base:
-# Apply ${PN}-${SLOT}-*{diff,patch}
-# - $CATEGORY!=kde-base:
-# Apply ${PN}-${PV}-*{diff,patch}
-# @CODE
-#
-# If ${PATCHES} is non-zero all patches in it get applied. If there is more
-# than one patch please make ${PATCHES} an array for proper quoting.
-kde4-base_apply_patches() {
- local _patchdir _packages _p _f
- _patchdir="${WORKDIR}/patches/"
- if [[ -d "${_patchdir}" ]]; then
- if is-parent-package ${CATEGORY}/${PN} ; then
- _packages="$(get-child-packages ${CATEGORY}/${PN})"
- _packages="${_packages//${CATEGORY}\//} ${PN}"
- else
- _packages="${PN}"
- fi
- if [[ $(declare -p PATCHES) != 'declare -a '* ]]; then
- die "PATCHES needs to be an array!"
- fi
- for _p in ${_packages}; do
- for _f in "${_patchdir}"/${_p}-${PV}-*{diff,patch}; do
- [[ -e ${_f} ]] && PATCHES+=("${_f}")
- done
- if [[ -n "${KDEBASE}" ]]; then
- for _f in "${_patchdir}"/${_p}-${SLOT}-*{diff,patch}; do
- [[ -e ${_f} ]] && PATCHES+=("${_f}")
- done
- fi
- done
+ if [[ $BUILD_TYPE = live && -z $I_KNOW_WHAT_I_AM_DOING ]]; then
+ echo
+ elog "WARNING! This is an experimental live ebuild of ${KMNAME:-${PN}}"
+ elog "Use it at your own risk."
+ elog "Do _NOT_ file bugs at bugs.gentoo.org because of this ebuild!"
+ echo
fi
- [[ -n ${PATCHES[@]} ]] && base_src_unpack autopatch
}
# @FUNCTION: kde4-base_src_unpack
@@ -495,66 +460,79 @@ kde4-base_apply_patches() {
# This function unpacks the source tarballs for KDE4 applications.
#
# If no argument is passed to this function, then standard src_unpack is
-# executed. Otherwise options are passed to base_src_unpack.
-#
-# In addition it calls kde4-base_apply_patches when no arguments are passed to
-# this function.
-#
-# It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and
-# enable_selected_linguas() in kde4-functions.eclass(5) for further details.
+# executed. Otherwise, options are passed to base_src_unpack.
kde4-base_src_unpack() {
debug-print-function $FUNCNAME "$@"
- [[ -z "${KDE_S}" ]] && KDE_S="${S}"
-
- if [[ -z $* ]]; then
- # Unpack first and deal with KDE patches after examing possible patch sets.
- # To be picked up, patches need to conform to the guidelines stated before.
- # Monolithic ebuilds will use the split ebuild patches.
- [[ -d "${KDE_S}" ]] || unpack ${A}
- base_src_unpack $*
+ if [[ $BUILD_TYPE = live ]]; then
+ local cleandir
+ cleandir="${ESVN_STORE_DIR}/KDE"
+ if [[ -d "${cleandir}" ]]; then
+ ewarn "'${cleandir}' has been found. Moving contents to new location."
+ addwrite "${ESVN_STORE_DIR}"
+ # Split kdebase
+ local module
+ if pushd "${cleandir}"/kdebase/kdebase > /dev/null; then
+ for module in `find . -maxdepth 1 -type d -name [a-z0-9]\*`; do
+ module="${module#./}"
+ mkdir -p "${ESVN_STORE_DIR}/kdebase-${module}" && mv -f "${module}" "${ESVN_STORE_DIR}/kdebase-${module}" || \
+ die "Failed to move to '${ESVN_STORE_DIR}/kdebase-${module}'."
+ done
+ popd > /dev/null
+ rm -fr "${cleandir}/kdebase" || \
+ die "Failed to remove ${cleandir}/kdebase. You need to remove it manually."
+ fi
+ # Move the rest
+ local pkg
+ for pkg in "${cleandir}"/*; do
+ mv -f "${pkg}" "${ESVN_STORE_DIR}"/ || eerror "failed to move ${pkg}"
+ done
+ rmdir "${cleandir}" || die "Could not move obsolete KDE store dir. Please move '${cleandir}' contents to appropriate location (possibly ${ESVN_STORE_DIR}) and manually remove '${cleandir}' in order to continue."
+ fi
+ subversion_src_unpack
else
- # Call base_src_unpack, which unpacks and patches
- # step by step transparently as defined in the ebuild.
- base_src_unpack $*
+ [[ -z $KDE_S ]] && KDE_S="${S}"
+ if [[ -z $* ]]; then
+ # Unpack first and deal with KDE patches after examing possible patch sets.
+ # To be picked up, patches need to conform to the guidelines stated before.
+ # Monolithic ebuilds will use the split ebuild patches.
+ [[ -d "${KDE_S}" ]] || unpack ${A}
+ fi
+ # Updated cmake dir
+ if [[ -d "${WORKDIR}/cmake" && -d "${KDE_S}/cmake" ]]; then
+ ebegin "Updating cmake/ directory..."
+ rm -rf "${KDE_S}/cmake" || die "Unable to remove old cmake/ directory"
+ ln -s "${WORKDIR}/cmake" "${KDE_S}/cmake" || die "Unable to symlink the new cmake/ directory"
+ eend 0
+ fi
fi
+}
- # Updated cmake dir
- if [[ -d "${WORKDIR}/cmake" ]] && [[ -d "${KDE_S}/cmake" ]]; then
- ebegin "Updating cmake/ directory..."
- rm -rf "${KDE_S}/cmake" || die "Unable to remove old cmake/ directory"
- ln -s "${WORKDIR}/cmake" "${KDE_S}/cmake" || die "Unable to symlink the new cmake/ directory"
- eend 0
- fi
+# @FUNCTION: kde4-base_src_compile
+# @DESCRIPTION:
+# General pre-configure and pre-compile function for KDE4 applications.
+# It also handles translations if KDE_LINGUAS is defined. See KDE_LINGUAS and
+# enable_selected_linguas() in kde4-functions.eclass(5) for further details.
+kde4-base_src_prepare() {
+ debug-print-function ${FUNCNAME} "$@"
# Only enable selected languages, used for KDE extragear apps.
- if [[ -n ${KDE_LINGUAS} ]]; then
+ if [[ -n $KDE_LINGUAS ]]; then
enable_selected_linguas
fi
-}
-
-# transition function so we will be compatible with soon to come eclasses
-kde4-base_src_prepare() {
+ # Autopatch
base_src_prepare
-}
-# @FUNCTION: kde4-base_src_compile
-# @DESCRIPTION:
-# General function for compiling KDE4 applications.
-kde4-base_src_compile() {
- debug-print-function ${FUNCNAME} "$@"
- case "${EAPI}" in
- 2)
- ;;
- *)
- kde4-base_src_configure
- ;;
- esac
- if [[ -d ${WORKDIR}/${PN}_build ]]; then
- pushd "${WORKDIR}"/${PN}_build > /dev/null
+ # Save library dependencies
+ if [[ -n $KMSAVELIBS ]] ; then
+ save_library_dependencies
+ fi
+
+ # Inject library dependencies
+ if [[ -n $KMLOADLIBS ]] ; then
+ load_library_dependencies
fi
- [ -e [Mm]akefile ] && kde4-base_src_make
}
# @FUNCTION: kde4-base_src_configure
@@ -563,23 +541,25 @@ kde4-base_src_compile() {
kde4-base_src_configure() {
debug-print-function ${FUNCNAME} "$@"
- # Final flag handling
- if has kdeenablefinal ${IUSE//+} && use kdeenablefinal; then
- echo "Activating enable-final flag"
- mycmakeargs="${mycmakeargs} -DKDE4_ENABLE_FINAL=ON"
+ # We prefer KDE's own Debugfull mode over the standard Debug
+ if has debug ${IUSE//+} && use debug ; then
+ ebegin "Enabling debug flag"
+ mycmakeargs="${mycmakeargs} -DCMAKE_BUILD_TYPE=Debugfull"
+ eend $?
fi
# Enable generation of HTML handbook
if has htmlhandbook ${IUSE//+} && use htmlhandbook; then
- echo "Enabling building of HTML handbook"
+ ebegin "Enabling building of HTML handbook"
mycmakeargs="${mycmakeargs} -DKDE4_ENABLE_HTMLHANDBOOK=ON"
+ eend $?
fi
# Build tests in src_test only, where we override this value
mycmakeargs="${mycmakeargs} -DKDE4_BUILD_TESTS=OFF"
# Set distribution name
- [[ ${PN} == "kdelibs" ]] && mycmakeargs="${mycmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
+ [[ $PN = kdelibs ]] && mycmakeargs="${mycmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
# runpath linking
mycmakeargs="${mycmakeargs} -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
@@ -588,7 +568,7 @@ kde4-base_src_configure() {
mycmakeargs="${mycmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}"
# If prefix is /usr, sysconf needs to be /etc, not /usr/etc
- [[ "${PREFIX}" == "/usr" ]] && mycmakeargs="${mycmakeargs} -DSYSCONF_INSTALL_DIR=/etc"
+ use kdeprefix || mycmakeargs="${mycmakeargs} -DSYSCONF_INSTALL_DIR=/etc"
# Set environment
QTEST_COLORED=1
@@ -597,7 +577,33 @@ kde4-base_src_configure() {
# hardcode path to *.cmake KDE files
PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${KDEDIR}/$(get_libdir)/pkgconfig"
- [ -e CMakeLists.txt ] && cmake-utils_src_configureout
+ # additonal arguments for KOFFICE
+ if [[ $KMNAME = koffice ]]; then
+ case ${PN} in
+ koffice-data) : ;;
+ *)
+ mycmakeargs="${mycmakeargs}
+ -DWITH_OpenEXR=ON
+ $(cmake-utils_use_with crypt QCA2)
+ $(cmake-utils_use_with opengl OpenGL)"
+ if use crypt; then
+ mycmakeargs="${mycmakeargs}
+ -DQCA2_LIBRARIES=/usr/$(get_libdir)/qca2/libqca.so.2"
+ fi
+ ;;
+ esac
+ fi
+
+ [ -e CMakeLists.txt ] && cmake-utils_src_configure
+}
+
+# @FUNCTION: kde4-base_src_compile
+# @DESCRIPTION:
+# General function for compiling KDE4 applications.
+kde4-base_src_compile() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ kde4-base_src_make
}
# @FUNCTION: kde4-base_src_make
@@ -607,7 +613,10 @@ kde4-base_src_configure() {
kde4-base_src_make() {
debug-print-function ${FUNCNAME} "$@"
- cmake-utils_src_make "$@"
+ if [[ -d "$WORKDIR/${PN}_build" ]]; then
+ pushd "${WORKDIR}"/${PN}_build > /dev/null
+ fi
+ [ -e [Mm]akefile ] && cmake-utils_src_make "$@"
}
# @FUNCTION: kde4-base_src_test
@@ -629,8 +638,12 @@ kde4-base_src_test() {
kde4-base_src_install() {
debug-print-function ${FUNCNAME} "$@"
+ if [[ -n $KMSAVELIBS ]] ; then
+ install_library_dependencies
+ fi
+
kde4-base_src_make_doc
- if [[ -d ${WORKDIR}/${PN}_build ]]; then
+ if [[ -d "$WORKDIR/${PN}_build" ]]; then
pushd "${WORKDIR}"/${PN}_build > /dev/null
fi
[ -e [Mm]akefile ] && cmake-utils_src_install
@@ -647,7 +660,7 @@ kde4-base_src_make_doc() {
[[ -s $doc ]] && dodoc ${doc}
done
- if [[ -z ${KMNAME} ]]; then
+ if [[ -z $KMNAME ]]; then
for doc in {apps,runtime,workspace,.}/*/{AUTHORS,README*}; do
if [[ -s $doc ]]; then
local doc_complete=${doc}
@@ -657,7 +670,7 @@ kde4-base_src_make_doc() {
done
fi
- if [[ -n ${KDEBASE} && -d "${D}"/usr/share/doc/${PF} ]]; then
+ if [[ -n ${KDEBASE} && -d "${D}/usr/share/doc/${PF}" ]]; then
# work around bug #97196
dodir /usr/share/doc/kde && \
mv "${D}"/usr/share/doc/${PF} "${D}"/usr/share/doc/kde/ || \
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 6498d6e76804..a97dc703f2d6 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -1,386 +1,49 @@
# Copyright 1999-2008 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.9 2008/10/07 01:41:36 jmbsvicetto Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.10 2009/01/12 17:25:59 scarabeus Exp $
# @ECLASS: kde4-functions.eclass
# @MAINTAINER:
# kde@gentoo.org
-# @BLURB: Common ebuild functions for monolithic and split KDE 4 packages
+# @BLURB: Common ebuild functions for KDE 4 packages
# @DESCRIPTION:
# This eclass contains all functions shared by the different eclasses,
-# for KDE 4 monolithic and split ebuilds.
-#
-# 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.
+# for KDE 4 ebuilds.
+
+# @ECLASS-VARIABLE: EAPI
+# @DESCRIPTION:
+# By default kde eclass wants eapi 2 which might be redefinable.
+case ${EAPI} in
+ 2) : ;;
+ *) die "No way! EAPI older than 2 is not supported." ;;
+esac
# @ECLASS-VARIABLE: KDEBASE
# @DESCRIPTION:
# This gets set to a non-zero value when a package is considered a kde or
# koffice ebuild.
-if [[ "${CATEGORY}" == "kde-base" ]]; then
+if [[ $CATEGORY = kde-base ]]; then
debug-print "${ECLASS}: KDEBASE ebuild recognized"
- KDEBASE="kde-base"
+ KDEBASE=kde-base
fi
# is this a koffice ebuild?
-if [[ "${KMNAME}" == "koffice" || "${PN}" == "koffice" ]]; then
+if [[ $KMNAME = koffice || $PN = koffice ]]; then
debug-print "${ECLASS}: KOFFICE ebuild recognized"
- KDEBASE="koffice"
+ KDEBASE=koffice
fi
# @ECLASS-VARIABLE: KDE_SLOTS
# @DESCRIPTION:
-# The slots used by all KDE versions after 4.0 - this doesn't include kde-3.5 and the
-# live-ebuilds that use the following var.
-KDE_SLOTS=( "kde-4" "4.1" )
+# The slots used by all KDE versions later than 4.0. The live-ebuilds use
+# KDE_LIVE_SLOTS instead.
+KDE_SLOTS=( kde-4 4.1 4.2 )
# @ECLASS-VARIABLE: KDE_LIVE_SLOTS
# @DESCRIPTION:
# The slots used by all KDE live versions.
-KDE_LIVE_SLOTS=( "kde-svn" )
-
-# @ECLASS-VARIABLE: KDE_DERIVATION_MAP
-# @DESCRIPTION:
-# Map of the monolithic->split ebuild derivation.
-# Used to build dependencies describing the relationships between them:
-# Monolithic ebuilds block their split counterparts in the same slot, and vice versa.
-#
-# Also see get-parent-package(), get-child-packages(), is-parent-package()
-KDE_DERIVATION_MAP='
-app-office/koffice app-office/karbon
-app-office/koffice app-office/kchart
-app-office/koffice app-office/kexi
-app-office/koffice app-office/kformula
-app-office/koffice app-office/kivio
-app-office/koffice app-office/koffice-data
-app-office/koffice app-office/koffice-libs
-app-office/koffice app-office/koshell
-app-office/koffice app-office/kplato
-app-office/koffice app-office/kpresenter
-app-office/koffice app-office/krita
-app-office/koffice app-office/kspread
-app-office/koffice app-office/kugar
-app-office/koffice app-office/kword
-kde-base/kdeaccessibility kde-base/kdeaccessibility-colorschemes
-kde-base/kdeaccessibility kde-base/kdeaccessibility-iconthemes
-kde-base/kdeaccessibility kde-base/kmag
-kde-base/kdeaccessibility kde-base/kmousetool
-kde-base/kdeaccessibility kde-base/kmouth
-kde-base/kdeaccessibility kde-base/kttsd
-kde-base/kdeadmin kde-base/kcron
-kde-base/kdeadmin kde-base/kdat
-kde-base/kdeadmin kde-base/knetworkconf
-kde-base/kdeadmin kde-base/kpackage
-kde-base/kdeadmin kde-base/ksystemlog
-kde-base/kdeadmin kde-base/ksysv
-kde-base/kdeadmin kde-base/kuser
-kde-base/kdeadmin kde-base/lilo-config
-kde-base/kdeadmin kde-base/secpolicy
-kde-base/kdeartwork kde-base/kdeartwork-colorschemes
-kde-base/kdeartwork kde-base/kdeartwork-emoticons
-kde-base/kdeartwork kde-base/kdeartwork-icewm-themes
-kde-base/kdeartwork kde-base/kdeartwork-iconthemes
-kde-base/kdeartwork kde-base/kdeartwork-kscreensaver
-kde-base/kdeartwork kde-base/kdeartwork-kworldclock
-kde-base/kdeartwork kde-base/kdeartwork-sounds
-kde-base/kdeartwork kde-base/kdeartwork-styles
-kde-base/kdeartwork kde-base/kdeartwork-wallpapers
-kde-base/kdebase kde-base/dolphin
-kde-base/kdebase kde-base/drkonqi
-kde-base/kdebase kde-base/kappfinder
-kde-base/kdebase kde-base/kcheckpass
-kde-base/kdebase kde-base/kcminit
-kde-base/kdebase kde-base/kcmshell
-kde-base/kdebase kde-base/kcontrol
-kde-base/kdebase kde-base/kde-menu
-kde-base/kdebase kde-base/kde-menu-icons
-kde-base/kdebase kde-base/kde-wallpapers
-kde-base/kdebase kde-base/kdebase-cursors
-kde-base/kdebase kde-base/kdebase-data
-kde-base/kdebase kde-base/kdebase-kioslaves
-kde-base/kdebase kde-base/kdebase-startkde
-kde-base/kdebase kde-base/kdebugdialog
-kde-base/kdebase kde-base/kdepasswd
-kde-base/kdebase kde-base/kdesu
-kde-base/kdebase kde-base/kdialog
-kde-base/kdebase kde-base/kdm
-kde-base/kdebase kde-base/keditbookmarks
-kde-base/kdebase kde-base/kfile
-kde-base/kdebase kde-base/kfind
-kde-base/kdebase kde-base/khelpcenter
-kde-base/kdebase kde-base/khotkeys
-kde-base/kdebase kde-base/kiconfinder
-kde-base/kdebase kde-base/kinfocenter
-kde-base/kdebase kde-base/kioclient
-kde-base/kdebase kde-base/klipper
-kde-base/kdebase kde-base/kmenuedit
-kde-base/kdebase kde-base/kmimetypefinder
-kde-base/kdebase kde-base/knetattach
-kde-base/kdebase kde-base/knewstuff
-kde-base/kdebase kde-base/knotify
-kde-base/kdebase kde-base/konqueror
-kde-base/kdebase kde-base/konsole
-kde-base/kdebase kde-base/kpasswdserver
-kde-base/kdebase kde-base/kquitapp
-kde-base/kdebase kde-base/kreadconfig
-kde-base/kdebase kde-base/krunner
-kde-base/kdebase kde-base/kscreensaver
-kde-base/kdebase kde-base/ksmserver
-kde-base/kdebase kde-base/ksplash
-kde-base/kdebase kde-base/kstart
-kde-base/kdebase kde-base/kstartupconfig
-kde-base/kdebase kde-base/kstyles
-kde-base/kdebase kde-base/ksysguard
-kde-base/kdebase kde-base/ksystraycmd
-kde-base/kdebase kde-base/ktimezoned
-kde-base/kdebase kde-base/ktip
-kde-base/kdebase kde-base/ktraderclient
-kde-base/kdebase kde-base/kuiserver
-kde-base/kdebase kde-base/kurifilter-plugins
-kde-base/kdebase kde-base/kwin
-kde-base/kdebase kde-base/kwrite
-kde-base/kdebase kde-base/libkonq
-kde-base/kdebase kde-base/libkworkspace
-kde-base/kdebase kde-base/libplasma
-kde-base/kdebase kde-base/libtaskmanager
-kde-base/kdebase kde-base/nepomuk
-kde-base/kdebase kde-base/nsplugins
-kde-base/kdebase kde-base/phonon
-kde-base/kdebase kde-base/phonon-xine
-kde-base/kdebase kde-base/plasma
-kde-base/kdebase kde-base/plasma-apps
-kde-base/kdebase kde-base/plasma-workspace
-kde-base/kdebase kde-base/renamedlg-plugins
-kde-base/kdebase kde-base/solid
-kde-base/kdebase kde-base/solid-hardware
-kde-base/kdebase kde-base/soliduiserver
-kde-base/kdebase kde-base/systemsettings
-kde-base/kdebindings kde-base/kalyptus
-kde-base/kdebindings kde-base/kdejava
-kde-base/kdebindings kde-base/kimono
-kde-base/kdebindings kde-base/kjsembed
-kde-base/kdebindings kde-base/korundum
-kde-base/kdebindings kde-base/krossjava
-kde-base/kdebindings kde-base/krosspython
-kde-base/kdebindings kde-base/krossruby
-kde-base/kdebindings kde-base/pykde4
-kde-base/kdebindings kde-base/qtjava
-kde-base/kdebindings kde-base/qtruby
-kde-base/kdebindings kde-base/qtsharp
-kde-base/kdebindings kde-base/qyoto
-kde-base/kdebindings kde-base/smoke
-kde-base/kdebindings kde-base/xparts
-kde-base/kdeedu kde-base/blinken
-kde-base/kdeedu kde-base/kalgebra
-kde-base/kdeedu kde-base/kalzium
-kde-base/kdeedu kde-base/kanagram
-kde-base/kdeedu kde-base/kbruch
-kde-base/kdeedu kde-base/kgeography
-kde-base/kdeedu kde-base/khangman
-kde-base/kdeedu kde-base/kig
-kde-base/kdeedu kde-base/kiten
-kde-base/kdeedu kde-base/klettres
-kde-base/kdeedu kde-base/kmplot
-kde-base/kdeedu kde-base/kpercentage
-kde-base/kdeedu kde-base/kstars
-kde-base/kdeedu kde-base/ktouch
-kde-base/kdeedu kde-base/kturtle
-kde-base/kdeedu kde-base/kwordquiz
-kde-base/kdeedu kde-base/libkdeedu
-kde-base/kdeedu kde-base/marble
-kde-base/kdeedu kde-base/parley
-kde-base/kdeedu kde-base/step
-kde-base/kdegames kde-base/bovo
-kde-base/kdegames kde-base/katomic
-kde-base/kdegames kde-base/kbattleship
-kde-base/kdegames kde-base/kblackbox
-kde-base/kdegames kde-base/kblocks
-kde-base/kdegames kde-base/kbounce
-kde-base/kdegames kde-base/kbreakout
-kde-base/kdegames kde-base/kdiamond
-kde-base/kdegames kde-base/kfourinline
-kde-base/kdegames kde-base/kgoldrunner
-kde-base/kdegames kde-base/kiriki
-kde-base/kdegames kde-base/kjumpingcube
-kde-base/kdegames kde-base/klines
-kde-base/kdegames kde-base/kmahjongg
-kde-base/kdegames kde-base/kmines
-kde-base/kdegames kde-base/knetwalk
-kde-base/kdegames kde-base/kolf
-kde-base/kdegames kde-base/kollision
-kde-base/kdegames kde-base/konquest
-kde-base/kdegames kde-base/kpat
-kde-base/kdegames kde-base/kreversi
-kde-base/kdegames kde-base/ksame
-kde-base/kdegames kde-base/kshisen
-kde-base/kdegames kde-base/ksirk
-kde-base/kdegames kde-base/kspaceduel
-kde-base/kdegames kde-base/ksquares
-kde-base/kdegames kde-base/ksudoku
-kde-base/kdegames kde-base/ktuberling
-kde-base/kdegames kde-base/kubrick
-kde-base/kdegames kde-base/libkdegames
-kde-base/kdegames kde-base/libkmahjongg
-kde-base/kdegames kde-base/lskat
-kde-base/kdegraphics kde-base/gwenview
-kde-base/kdegraphics kde-base/kamera
-kde-base/kdegraphics kde-base/kcolorchooser
-kde-base/kdegraphics kde-base/kdegraphics-strigi-analyzer
-kde-base/kdegraphics kde-base/kgamma
-kde-base/kdegraphics kde-base/kghostview
-kde-base/kdegraphics kde-base/kolourpaint
-kde-base/kdegraphics kde-base/kruler
-kde-base/kdegraphics kde-base/ksaneplugin
-kde-base/kdegraphics kde-base/ksnapshot
-kde-base/kdegraphics kde-base/libkdcraw
-kde-base/kdegraphics kde-base/libkexiv2
-kde-base/kdegraphics kde-base/libkipi
-kde-base/kdegraphics kde-base/libksane
-kde-base/kdegraphics kde-base/libkscan
-kde-base/kdegraphics kde-base/okular
-kde-base/kdegraphics kde-base/svgpart
-kde-base/kdemultimedia kde-base/dragonplayer
-kde-base/kdemultimedia kde-base/juk
-kde-base/kdemultimedia kde-base/kdemultimedia-kioslaves
-kde-base/kdemultimedia kde-base/kdemultimedia-strigi-analyzer
-kde-base/kdemultimedia kde-base/kmix
-kde-base/kdemultimedia kde-base/kscd
-kde-base/kdemultimedia kde-base/libkcddb
-kde-base/kdemultimedia kde-base/libkcompactdisc
-kde-base/kdenetwork kde-base/kdenetwork-filesharing
-kde-base/kdenetwork kde-base/kdnssd
-kde-base/kdenetwork kde-base/kget
-kde-base/kdenetwork kde-base/knewsticker
-kde-base/kdenetwork kde-base/kopete
-kde-base/kdenetwork kde-base/kppp
-kde-base/kdenetwork kde-base/krdc
-kde-base/kdenetwork kde-base/krfb
-kde-base/kdepim kde-base/akonadi
-kde-base/kdepim kde-base/akregator
-kde-base/kdepim kde-base/certmanager
-kde-base/kdepim kde-base/kabc2mutt
-kde-base/kdepim kde-base/kabcclient
-kde-base/kdepim kde-base/kaddressbook
-kde-base/kdepim kde-base/kalarm
-kde-base/kdepim kde-base/kdemaildir
-kde-base/kdepim kde-base/kdepim-icons
-kde-base/kdepim kde-base/kdepim-kioslaves
-kde-base/kdepim kde-base/kdepim-kresources
-kde-base/kdepim kde-base/kdepim-strigi-analyzer
-kde-base/kdepim kde-base/kdepim-wizards
-kde-base/kdepim kde-base/kfeed
-kde-base/kdepim kde-base/kitchensync
-kde-base/kdepim kde-base/kjots
-kde-base/kdepim kde-base/kleopatra
-kde-base/kdepim kde-base/kmail
-kde-base/kdepim kde-base/kmailcvt
-kde-base/kdepim kde-base/kmobiletools
-kde-base/kdepim kde-base/knode
-kde-base/kdepim kde-base/knotes
-kde-base/kdepim kde-base/kode
-kde-base/kdepim kde-base/konsolekalendar
-kde-base/kdepim kde-base/kontact
-kde-base/kdepim kde-base/kontact-specialdates
-kde-base/kdepim kde-base/kontactinterfaces
-kde-base/kdepim kde-base/korganizer
-kde-base/kdepim kde-base/korn
-kde-base/kdepim kde-base/kpilot
-kde-base/kdepim kde-base/ktimetracker
-kde-base/kdepim kde-base/ktnef
-kde-base/kdepim kde-base/libkdepim
-kde-base/kdepim kde-base/libkholidays
-kde-base/kdepim kde-base/libkleo
-kde-base/kdepim kde-base/libkpgp
-kde-base/kdepim kde-base/libksieve
-kde-base/kdepim kde-base/mailtransport
-kde-base/kdepim kde-base/mimelib
-kde-base/kdepim kde-base/networkstatus
-kde-base/kdesdk kde-base/cervisia
-kde-base/kdesdk kde-base/kapptemplate
-kde-base/kdesdk kde-base/kate
-kde-base/kdesdk kde-base/kbabel
-kde-base/kdesdk kde-base/kbugbuster
-kde-base/kdesdk kde-base/kcachegrind
-kde-base/kdesdk kde-base/kdeaccounts-plugin
-kde-base/kdesdk kde-base/kdesdk-kioslaves
-kde-base/kdesdk kde-base/kdesdk-misc
-kde-base/kdesdk kde-base/kdesdk-scripts
-kde-base/kdesdk kde-base/kdesdk-strigi-analyzer
-kde-base/kdesdk kde-base/kmtrace
-kde-base/kdesdk kde-base/kompare
-kde-base/kdesdk kde-base/kspy
-kde-base/kdesdk kde-base/kstartperf
-kde-base/kdesdk kde-base/kuiviewer
-kde-base/kdesdk kde-base/lokalize
-kde-base/kdesdk kde-base/poxml
-kde-base/kdesdk kde-base/strigi-analyzer
-kde-base/kdesdk kde-base/umbrello
-kde-base/kdetoys kde-base/amor
-kde-base/kdetoys kde-base/kteatime
-kde-base/kdetoys kde-base/ktux
-kde-base/kdetoys kde-base/kweather
-kde-base/kdetoys kde-base/kworldclock
-kde-base/kdeutils kde-base/ark
-kde-base/kdeutils kde-base/kcalc
-kde-base/kdeutils kde-base/kcharselect
-kde-base/kdeutils kde-base/kdessh
-kde-base/kdeutils kde-base/kdf
-kde-base/kdeutils kde-base/kfloppy
-kde-base/kdeutils kde-base/kgpg
-kde-base/kdeutils kde-base/kmilo
-kde-base/kdeutils kde-base/kregexpeditor
-kde-base/kdeutils kde-base/ktimer
-kde-base/kdeutils kde-base/kwallet
-kde-base/kdeutils kde-base/okteta
-kde-base/kdeutils kde-base/superkaramba
-kde-base/kdeutils kde-base/sweeper
-kde-base/kdewebdev kde-base/kfilereplace
-kde-base/kdewebdev kde-base/kimagemapeditor
-kde-base/kdewebdev kde-base/klinkstatus
-kde-base/kdewebdev kde-base/kommander
-kde-base/kdewebdev kde-base/kxsldbg
-kde-base/kdewebdev kde-base/quanta
-'
-
-# @FUNCTION: get-parent-package
-# @USAGE: <split ebuild>
-# @DESCRIPTION:
-# Echoes the name of the monolithic package that a given split ebuild was derived from.
-get-parent-package() {
- local parent child
- while read parent child; do
- if [[ "${child}" == "$1" ]]; then
- echo ${parent}
- return 0
- fi
- done <<< "$KDE_DERIVATION_MAP"
- die "Package $target not found in KDE_DERIVATION_MAP, please report bug"
-}
-
-# @FUNCTION: get-child-packages
-# @USAGE: <monolithic ebuild>
-# @DESCRIPTION:
-# Echoes the names of all (split) ebuilds derived from a given monolithic ebuild.
-get-child-packages() {
- local parent child
- while read parent child; do
- [[ "${parent}" == "$1" ]] && echo -n "${child} "
- done <<< "$KDE_DERIVATION_MAP"
-}
-
-# @FUNCTION: is-parent-package
-# @USAGE: <$CATEGORY/$PN>
-# @DESCRIPTION:
-# Returns zero exit-status if the given package is a parent (monolithic) ebuild.
-# Returns non-zero exit-status if it's not.
-is-parent-package() {
- local parent child
- while read parent child; do
- [[ "${parent}" == "$1" ]] && return 0
- done <<< "$KDE_DERIVATION_MAP"
- return 1
-}
+KDE_LIVE_SLOTS=( live )
# @FUNCTION: buildsycoca
# @DESCRIPTION:
@@ -391,7 +54,7 @@ is-parent-package() {
buildsycoca() {
debug-print-function ${FUNCNAME} "$@"
- if [[ -x ${KDEDIR}/bin/kbuildsycoca4 && -z "${ROOT%%/}" ]]; then
+ if [[ -z ${ROOT%%/} && -x ${KDEDIR}/bin/kbuildsycoca4 ]]; then
# Make sure tha cache file exists, or kbuildsycoca4 will fail
touch "${KDEDIR}/share/kde4/services/ksycoca4"
@@ -411,8 +74,8 @@ buildsycoca() {
# @FUNCTION: comment_all_add_subdirectory
# @USAGE: [list of directory names]
# @DESCRIPTION:
-# recursively comment all add_subdirectory instructions in listed directories
-# except the ones in cmake/.
+# Recursively comment all add_subdirectory instructions in listed directories,
+# except those in cmake/.
comment_all_add_subdirectory() {
find "$@" -name CMakeLists.txt -print0 | grep -vFzZ "./cmake" | \
xargs -0 sed -i -e '/add_subdirectory/s/^/#DONOTCOMPILE /' -e '/ADD_SUBDIRECTORY/s/^/#DONOTCOMPILE /' || \
@@ -421,10 +84,10 @@ comment_all_add_subdirectory() {
# @ECLASS-VARIABLE: KDE_LINGUAS
# @DESCRIPTION:
-# This is a whitespace-separated list of translations that this ebuild supports.
-# These translations automatically get added to IUSE. Therefore ebuilds must set
-# this variable before inheriting any eclasses. To only enable selected
-# translations ebuilds must call enable_selected_linguas(). kde4-base.eclass does
+# This is a whitespace-separated list of translations this ebuild supports.
+# These translations are automatically added to IUSE. Therefore ebuilds must set
+# this variable before inheriting any eclasses. To enable only selected
+# translations, ebuilds must call enable_selected_linguas(). kde4-base.eclass does
# this for you.
#
# Example: KDE_LINGUAS="en_GB de nl"
@@ -434,125 +97,215 @@ done
# @FUNCTION: enable_selected_linguas
# @DESCRIPTION:
-# Enable translations based on LINGUAS settings and what translations are
-# supported (see KDE_LINGUAS). By default translations are found in "${S}"/po
+# Enable translations based on LINGUAS settings and translations supported by
+# the package (see KDE_LINGUAS). By default, translations are found in "${S}"/po
# but this default can be overridden by defining KDE_LINGUAS_DIR.
enable_selected_linguas() {
- local lingua
+ local lingua sr_mess wp
+ # inform user about kde-l10n for full translation.
+ if ! has_version kde-base/kde-l10n; then
+ echo
+ elog "For fully translated application you should also emerge"
+ elog "kde-base/kde-l10n package which ships translated kde core"
+ elog "strings."
+ echo
+ fi
+
+ # ebuild overridable linguas directory definition
+ KDE_LINGUAS_DIR=${KDE_LINGUAS_DIR:=${S}/po}
+ cd "$KDE_LINGUAS_DIR" || die "wrong linguas dir specified"
+
+ # fix all various crazy sr@Latn variations
+ # this part is only ease for ebuilds, so there wont be any die when this
+ # fail at any point
+ sr_mess="sr@latn sr@latin sr@Latin"
+ for wp in ${sr_mess}; do
+ [[ -e "$wp.po" ]] && mv "$wp.po" "sr@Latn.po"
+ if [[ -d "$wp" ]]; then
+ # move dir and fix cmakelists
+ mv "$wp" "sr@Latn"
+ sed -i \
+ -e "s:$wp:sr@Latin:g" \
+ CMakeLists.txt
+ fi
+ done
for lingua in ${KDE_LINGUAS}; do
- if [ -e "${S}"/po/"${lingua}".po ]; then
- mv "${S}"/po/"${lingua}".po "${S}"/po/"${lingua}".po.old
+ if [[ -e "$lingua.po" ]]; then
+ mv "$lingua.po" "$lingua.po.old"
fi
done
- comment_all_add_subdirectory "${KDE_LINGUAS_DIR:-${S}/po}"
+ comment_all_add_subdirectory "${KDE_LINGUAS_DIR}"
for lingua in ${LINGUAS}; do
- if [ -d "${S}"/po/"${lingua}" ]; then
+ ebegin "Enabling LANGUAGE: ${lingua}"
+ if [[ -d "$lingua" ]]; then
sed -e "/add_subdirectory([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
-e "/ADD_SUBDIRECTORY([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
- -i "${KDE_LINGUAS_DIR:-${S}/po}"/CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed."
+ -i CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed."
fi
- if [ -e "${S}"/po/"${lingua}".po.old ]; then
- mv "${S}"/po/"${lingua}".po.old "${S}"/po/"${lingua}".po
+ if [[ -e "$lingua.po.old" ]]; then
+ mv "$lingua.po.old" "$lingua.po"
fi
+ eend $?
done
}
-# @ECLASS-VARIABLE: QT4_BUILT_WITH_USE_CHECK
+# @FUNCTION: koffice_fix_libraries
# @DESCRIPTION:
-# A list of USE flags that x11-libs/qt:4 needs to be built with.
-#
-# This list is automatically appended to KDE4_BUILT_WITH_USE_CHECK,
-# so don't call qt4_pkg_setup manually.
-
-# @ECLASS-VARIABLE: KDE4_BUILT_WITH_USE_CHECK
+# replace the weird koffice lib search with hardcoded one, so it
+# actually builds and works.
+koffice_fix_libraries() {
+ local LIB_ARRAY R_QT_kostore R_BAS_kostore R_BAS_koodf R_KROSS_kokross R_QT_komain
+ local R_CMS_pigmentcms R_BAS_pigmentcms R_BAS_koresources R_BAS_flake R_BAS_koguiutils
+ local R_BAS_kopageapp R_BAS_kotext R_BAS_kowmf libname R
+ case ${PN} in
+ koffice-data|koffice-libs)
+ ;;
+ *)
+ ### basic array
+ LIB_ARRAY="kostore koodf kokross komain pigmentcms koresources flake koguiutils kopageapp kotext kowmf"
+ ### dep array
+ R_QT_kostore="\"/usr/$(get_libdir)/qt4/libQtCore.so\"
+ \"/usr/$(get_libdir)/qt4/libQtXml.so\"
+ \"${KDEDIR}/$(get_libdir)/libkdecore.so\""
+ R_BAS_kostore="libkostore ${R_QT_kostore}"
+ R_BAS_koodf="libkoodf ${R_BAS_kostore}"
+ R_KROSS_kokross="
+ \"${KDEDIR}/$(get_libdir)/libkrossui.so\"
+ \"${KDEDIR}/$(get_libdir)/libkrosscore.so\""
+ R_BAS_kokross="libkokross ${R_BAS_koodf} ${R_KROSS_kokross}"
+ R_QT_komain="\"/usr/$(get_libdir)/qt4/libQtGui.so\""
+ R_BAS_komain="libkomain ${R_BAS_koodf} ${R_QT_komain}"
+ R_CMS_pigmentcms="\"/usr/$(get_libdir)/liblcms.so\""
+ R_BAS_pigmentcms="libpigmentcms ${R_BAS_komain} ${R_CMS_pigmentcms}"
+ R_BAS_koresources="libkoresources ${R_BAS_pigmentcms}"
+ R_BAS_flake="libflake ${R_BAS_pigmentcms}"
+ R_BAS_koguiutils="libkoguiutils libkoresources libflake ${R_BAS_pigmentcms}"
+ R_BAS_kopageapp="libkopageapp ${R_BAS_koguitls}"
+ R_BAS_kotext="libkotext libkoresources libflake ${R_BAS_pigmentcms}"
+ ### additional unmentioned stuff
+ R_BAS_kowmf="libkowmf"
+ for libname in ${LIB_ARRAY}; do
+ ebegin "Fixing library ${libname} with hardcoded path"
+ for libpath in $(eval "echo \$R_BAS_${libname}"); do
+ if [[ "${libpath}" != "\"/usr/"* ]]; then
+ R="${R} \"${KDEDIR}/$(get_libdir)/${libpath}.so\""
+ else
+ R="${R} ${libpath}"
+ fi
+ done
+ find "${S}" -name CMakeLists.txt -print| xargs -i \
+ sed -i \
+ -e "s: ${libname} : ${R} :g" \
+ -e "s: ${libname}): ${R}):g" \
+ -e "s:(${libname} :(${R} :g" \
+ -e "s:(${libname}):(${R}):g" \
+ -e "s: ${libname}$: ${R}:g" \
+ {} || die "Fixing library names failed."
+ eend $?
+ done
+ ;;
+ esac
+}
+# @FUNCTION: get_build_type
# @DESCRIPTION:
-# The contents of $KDE4_BUILT_WITH_USE_CHECK gets fed to built_with_use
-# (eutils.eclass), line per line.
-#
-# Example:
-# @CODE
-# pkg_setup() {
-# KDE4_BUILT_WITH_USE_CHECK="--missing true sys-apps/dbus X"
-# use alsa && KDE4_BUILT_WITH_USE_CHECK="${KDE4_BUILT_WITH_USE_CHECK}
-# --missing true media-libs/alsa-lib midi"
-# kde4-base_pkg_setup
-# }
-# @CODE
-
-# run built_with_use on each flag and print appropriate error messages if any
-# flags are missing
-_kde4-functions_built_with_use() {
- local missing opt pkg flag flags
-
- if [[ ${1} = "--missing" ]]; then
- missing="${1} ${2}" && shift 2
- fi
- if [[ ${1:0:1} = "-" ]]; then
- opt=${1} && shift
+# Determine whether we are using live ebuild or tbzs.
+get_build_type() {
+ if [[ $SLOT = live || $PV = 9999* ]]; then
+ BUILD_TYPE="live"
+ else
+ BUILD_TYPE="release"
fi
+ export BUILD_TYPE
+}
- pkg=${1} && shift
-
- for flag in "${@}"; do
- flags="${flags} ${flag}"
- if ! built_with_use ${missing} ${opt} ${pkg} ${flag}; then
- flags="${flags}*"
- else
- [[ ${opt} = "-o" ]] && return 0
- fi
- done
- if [[ "${flags# }" = "${@}" ]]; then
- return 0
- fi
- if [[ ${opt} = "-o" ]]; then
- eerror "This package requires '${pkg}' to be built with any of the following USE flags: '$*'."
- else
- eerror "This package requires '${pkg}' to be built with the following USE flags: '${flags# }'."
+# @FUNCTION: get_latest_kdedir
+# @DESCRIPTION:
+# We set up KDEDIR according to the latest KDE version installed; installing our
+# package for all available installs is just insane.
+# We can check for kdelibs because it is the most basic package; no KDE package
+# working without it. This might be changed in future.
+get_latest_kdedir() {
+ if [[ $NEED_KDE = latest && $KDEBASE != kde-base ]]; then
+ case ${KDE_WANTED} in
+ # note this will need to be updated as stable moves and so on
+ live)
+ _versions="9999 4.1.69 4.1.0"
+ ;;
+ snapshot)
+ _versions="4.1.69 4.1.0 9999"
+ ;;
+ testing)
+ _versions="4.1.0 4.1.69 9999"
+ ;;
+ stable)
+ _versions="4.1.0 4.1.69 9999"
+ ;;
+ *) die "KDE_WANTED=${KDE_WANTED} not supported here." ;;
+ esac
+ # check if exists and fallback as we go
+ for X in ${_versions}; do
+ if has_version ">=kde-base/kdelibs-${X}"; then
+ # figure out which X we are in and set it into _kdedir
+ case ${X} in
+ # also keep track here same for kde_wanted
+ 9999)
+ _kdedir="live"
+ break
+ ;;
+ 4.1.69)
+ _kdedir="4.2"
+ break
+ ;;
+ 4.1.0)
+ _kdedir="4.1"
+ break
+ ;;
+ esac
+ fi
+ done
fi
- return 1
}
-# @FUNCTION: kde4-functions_check_use
+# Functions handling KMLOADLIBS and KMSAVELIBS
+
+# @FUNCTION: save_library_dependencies
# @DESCRIPTION:
-# Check if the Qt4 libraries are built with the USE flags listed in
-# $QT4_BUILT_WITH_USE_CHECK.
-#
-# Check if a list of packages are built with certain USE flags, as listed in
-# $KDE4_BUILT_WITH_USE_CHECK.
-#
-# If any of the required USE flags are missing, an eerror will be printed for
-# each package with missing USE flags.
-kde4-functions_check_use() {
- # I like to keep flags sorted
- QT4_BUILT_WITH_USE_CHECK=$(echo "${QT4_BUILT_WITH_USE_CHECK}" | \
- tr '[:space:]' '\n' | sort | uniq | xargs)
+# Add exporting CMake dependencies for current package
+save_library_dependencies() {
+ local depsfile="${T}/${PN}:${SLOT}"
- local line missing
- if [[ -n ${KDE4_BUILT_WITH_USE_CHECK[@]} && $(declare -p KDE4_BUILT_WITH_USE_CHECK) = 'declare -a '* ]]; then
- KDE4_BUILT_WITH_USE_CHECK=("x11-libs/qt:4 ${QT4_BUILT_WITH_USE_CHECK}"
- "${KDE4_BUILT_WITH_USE_CHECK[@]}")
+ ebegin "Saving library dependendencies in ${depsfile##*/}"
+ echo "EXPORT_LIBRARY_DEPENDENCIES(\"${depsfile}\")" >> "${S}/CMakeLists.txt" || \
+ die "Failed to save the library dependencies."
+ eend $?
+}
- for line in "${KDE4_BUILT_WITH_USE_CHECK[@]}"; do
- [[ -z ${line} ]] && continue
- if ! _kde4-functions_built_with_use ${line}; then
- missing=true
- fi
- done
- else
- KDE4_BUILT_WITH_USE_CHECK="x11-libs/qt:4 ${QT4_BUILT_WITH_USE_CHECK}
- ${KDE4_BUILT_WITH_USE_CHECK}"
+# @FUNCTION: install_library_dependencies
+# @DESCRIPTION:
+# Install generated CMake library dependencies to /var/lib/kde
+install_library_dependencies() {
+ local depsfile="$T/$PN:$SLOT"
+ ebegin "Installing library dependendencies as ${depsfile##*/}"
+ insinto /var/lib/kde
+ doins "${depsfile}" || die "Failed to install library dependencies."
+ eend $?
+}
- while read line; do
- [[ -z ${line} ]] && continue
- if ! _kde4-functions_built_with_use ${line}; then
- missing=true
- fi
- done <<< "${KDE4_BUILT_WITH_USE_CHECK}"
- fi
- if [[ -n ${missing} ]]; then
- echo
- eerror "Flags marked with an * are missing."
- die "Missing USE flags found"
- fi
+# @FUNCTION: load_library_dependencies
+# @DESCRIPTION:
+# Inject specified library dependencies in current package
+load_library_dependencies() {
+ local pn i depsfile
+ ebegin "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
+ eend $?
}
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
}
+