summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Chvatal <scarabeus@gentoo.org>2009-04-13 00:02:45 +0000
committerTomas Chvatal <scarabeus@gentoo.org>2009-04-13 00:02:45 +0000
commit14672ad826d195c5d1f969c9a303d6fc2f14de2d (patch)
tree0bc9f3245990376feb98d0d886294b438b14a249
parentUpdate mask for kde4. Block for change older than 4.2.2 due to eclass update ... (diff)
downloadgentoo-2-14672ad826d195c5d1f969c9a303d6fc2f14de2d.tar.gz
gentoo-2-14672ad826d195c5d1f969c9a303d6fc2f14de2d.tar.bz2
gentoo-2-14672ad826d195c5d1f969c9a303d6fc2f14de2d.zip
Update kde4 eclasses
Add back support for doc handling (now via doc useflag) Force kdeprefix only for kde-base things (others are going unprefixed to /usr) -> Note for this: if user find that some application is pulling [-kdeprefix] kde uninstall/install of that app should help. Rewritten slot handling with simpler code. Added detection and alert system for finding what aplication break sth for /usr/share/config and /usr/share/kde4 and screw up perms. Left for next time: "Support for stable live (live packages from stable branch [shiny huh]). :]"
-rw-r--r--eclass/kde4-base.eclass639
-rw-r--r--eclass/kde4-functions.eclass153
-rw-r--r--eclass/kde4-meta.eclass122
3 files changed, 399 insertions, 515 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index c2b2171690ab..d10ecd2dcbdf 100644
--- a/eclass/kde4-base.eclass
+++ b/eclass/kde4-base.eclass
@@ -1,6 +1,6 @@
# Copyright 2007-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.33 2009/03/26 21:55:09 jmbsvicetto Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.34 2009/04/13 00:02:45 scarabeus Exp $
# @ECLASS: kde4-base.eclass
# @MAINTAINER:
@@ -22,102 +22,6 @@ fi
EXPORT_FUNCTIONS pkg_setup src_unpack src_prepare src_configure src_compile src_test src_install pkg_postinst pkg_postrm
-# @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
-
- qtdepend="
- 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
- "
- qtwebkitdepend="
- x11-libs/qt-webkit:4
- "
- qtopengldepend="
- x11-libs/qt-opengl:4
- "
-
- case ${WEBKIT_REQUIRED} in
- always)
- qtdepend="${qtdepend}
- ${qtwebkitdepend}"
- ;;
- optional)
- IUSE="${IUSE} webkit"
- qtdepend="${qtdepend}
- webkit? ( ${qtwebkitdepend} )
- "
- ;;
- *) WEBKIT_REQUIRED="never" ;;
- esac
- # opengl dependencies
- case ${OPENGL_REQUIRED} in
- always)
- qtdepend="${qtdepend}
- ${qtopengldepend}
- "
- ;;
- optional)
- IUSE="${IUSE} opengl"
- qtdepend="${qtdepend}
- opengl? ( ${qtopengldepend} )
- "
- ;;
- *) OPENGL_REQUIRED="never" ;;
- esac
-
- COMMONDEPEND="${COMMONDEPEND} ${qtdepend}"
-}
-
-if [[ ${NEED_KDE} != "none" ]] ; then
- # Qt
- kde4-base_set_qt_dependencies
-
- # X11 libs
- COMMONDEPEND="${COMMONDEPEND}
- x11-libs/libXext
- x11-libs/libXt
- x11-libs/libXxf86vm
- "
-
- # localization deps
- # DISABLED UNTIL PMS decide correct approach :(
- if [[ -n ${KDE_LINGUAS} ]]; then
- LNG_DEP=""
- for _lng in ${KDE_LINGUAS}; do
- # there must be or due to issue if lingua is not present in kde-l10n so
- # it wont die but pick kde-l10n as-is.
- LNG_DEP="${LNG_DEP}
- || ( kde-base/kde-l10n[linguas_${_lng},kdeprefix=] kde-base/kde-l10n[kdeprefix=] )"
- done
- fi
-
- # Set common dependencies for all ebuilds that inherit this eclass
- DEPEND="${DEPEND} ${COMMONDEPEND}
- >=dev-util/cmake-2.6.2
- dev-util/pkgconfig
- >=sys-apps/sandbox-1.3.2
- "
- RDEPEND="${RDEPEND} ${COMMONDEPEND}"
-fi # NEED_KDE != NONE block
-
-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:
# Is qt-opengl required? Possible values are 'always', 'optional' and 'never'.
@@ -136,242 +40,223 @@ WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}"
# This variable must be set before inheriting any eclasses. Defaults to 'never'.
CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}"
-case ${CPPUNIT_REQUIRED} in
+# @ECLASS-VARIABLE: KDE_REQUIRED
+# @DESCRIPTION:
+# Is kde required? Possible values are 'always', 'optional' and 'never'.
+# This variable must be set before inheriting any eclasses. Defaults to 'always'
+# If set to always or optional, KDE_MINIMAL may be overriden as well.
+# Note that for kde-base packages this variable is fixed to 'always'.
+KDE_REQUIRED="${KDE_REQUIRED:-always}"
+
+# Verify KDE_MINIMAL (display QA notice in pkg_setup, still we need to fix it here)
+if [[ -n ${KDE_MINIMAL} ]]; then
+ for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
+ [[ ${KDE_MINIMAL} = ${slot} ]] && KDE_MINIMAL_VALID=1 && break
+ done
+ [[ -z ${KDE_MINIMAL_VALID} ]] && unset KDE_MINIMAL
+else
+ KDE_MINIMAL_VALID=1
+fi
+
+# @ECLASS-VARIABLE: KDE_MINIMAL
+# @DESCRIPTION:
+# This wariable is used when KDE_REQUIRED is set, to specify required KDE minimal
+# version for apps to work. Currently defaults to 4.2
+# One may override this variable to raise version requirements.
+# For possible values look at KDE_SLOTS and KDE_LIVE_SLOTS variables.
+# Note that for kde-base packages is fixed to ${SLOT}.
+KDE_MINIMAL="${KDE_MINIMAL:-4.2}"
+
+# Fallback behaviour (for now)
+# TODO Remove when tree is clean
+if [[ -n ${NEED_KDE} ]]; then
+ case ${NEED_KDE} in
+ none)
+ KDE_REQUIRED="never"
+ ;;
+ *)
+ KDE_REQUIRED="always"
+ KDE_MINIMAL="${NEED_KDE}"
+ ;;
+ esac
+fi
+
+# OpenGL dependencies
+qtopengldepend="
+ x11-libs/qt-opengl:4
+"
+case ${OPENGL_REQUIRED} in
always)
- DEPEND="${DEPEND}
- dev-util/cppunit
+ COMMONDEPEND="${COMMONDEPEND} ${qtopengldepend}"
+ ;;
+ optional)
+ IUSE="${IUSE} opengl"
+ COMMONDEPEND="${COMMONDEPEND}
+ opengl? ( ${qtopengldepend} )
+ "
+ ;;
+ *) ;;
+esac
+unset qtopengldepend
+
+# WebKit dependencies
+qtwebkitdepend="
+ x11-libs/qt-webkit:4
+"
+case ${WEBKIT_REQUIRED} in
+ always)
+ COMMONDEPEND="${COMMONDEPEND} ${qtwebkitdepend}"
+ ;;
+ optional)
+ IUSE="${IUSE} webkit"
+ COMMONDEPEND="${COMMONDEPEND}
+ webkit? ( ${qtwebkitdepend} )
"
;;
+ *) ;;
+esac
+unset qtwebkitdepend
+
+# CppUnit dependencies
+cppuintdepend="
+ dev-util/cppunit
+"
+case ${CPPUNIT_REQUIRED} in
+ always)
+ DEPEND="${DEPEND} ${cppuintdepend}"
+ ;;
optional)
IUSE="${IUSE} test"
DEPEND="${DEPEND}
- test? ( dev-util/cppunit )
+ test? ( ${cppuintdepend} )
"
;;
- *)
- CPPUNIT_REQUIRED="never"
- ;;
+ *) ;;
esac
+unset cppuintdepend
-# @ECLASS-VARIABLE: NEED_KDE
-# @DESCRIPTION:
-# This variable sets the version of KDE4 which will be used by the eclass.
-# For kde-base packages, if it is not set by the ebuild,
-# 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.
-# - 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: default NEED_KDE is latest
-NEED_KDE="${NEED_KDE:=latest}"
-export NEED_KDE
+# DEPRECATED block
+if [[ ${NEED_KDE} != "none" ]]; then
+ # localization deps
+ # DISABLED UNTIL PMS decide correct approach :(
+ if [[ -n ${KDE_LINGUAS} ]]; then
+ LNG_DEP=""
+ for _lng in ${KDE_LINGUAS}; do
+ # there must be or due to issue if lingua is not present in kde-l10n so
+ # it wont die but pick kde-l10n as-is.
+ LNG_DEP="${LNG_DEP}
+ || (
+ kde-base/kde-l10n[linguas_${_lng},kdeprefix=]
+ kde-base/kde-l10n[kdeprefix=]
+ )
+ "
+ done
+ fi
+fi # NEED_KDE != NONE block
-# @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.2}"
-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)
- if [[ $KDEBASE = kde-base ]]; then
- case ${PV} in
- 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
- _kdedir="4.3"
- _pv="-${PV}:4.3"
- _pvn="-${PV}"
- ;;
- 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"
- _pvn="-${PV}"
- ;;
- 4.0*)
- _kdedir="4.0"
- _pv="-${PV}:kde-4"
- _pvn="-${PV}"
- ;;
- 3.9*)
- _kdedir="3.9"
- _pv="-${PV}:kde-4"
- _pvn="-${PV}"
- ;;
- 9999*)
- _kdedir="live"
- _pv="-${PV}:live"
- _pvn="-${PV}"
- ;;
- *)
- die "NEED_KDE=latest not supported for PV=${PV}" ;;
- esac
- _operator=">="
+# Setup packages inheriting this eclass
+case ${KDEBASE} in
+
+ kde-base)
+ 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
- # this creates dependency on any version of kde4
- _operator=">="
- _pv="-${KDE_MINIMAL}"
- _pvn=${_pv}
+ # All other ebuild types default to -kdeprefix as before
+ IUSE="${IUSE} kdeprefix"
fi
+ # Determine SLOT from PV
+ case ${PV} in
+ 4.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
+ 4.2* | 4.1.9* | 4.1.8* | 4.1.7* | 4.1.6*) SLOT="4.2" ;;
+ *9999*) SLOT="live" ;;
+ *) die "Unsupported ${PV}" ;;
+ esac
+ _kdedir="${SLOT}"
+ _pv="-${PV}:${SLOT}"
+ _pvn="-${PV}"
+
+ # Block installation of other SLOTS unless kdeprefix
+ for slot in ${KDE_SLOTS[@]}; do
+ # Block non kdeprefix ${PN} on other slots
+ if [[ ${SLOT} != ${slot} ]]; then
+ RDEPEND="${RDEPEND}
+ !kdeprefix? ( !kde-base/${PN}:${slot}[-kdeprefix] )
+ "
+ fi
+ done
;;
- # NEED_KDE="${PV}"
- scm|svn|live|9999*)
- _kdedir="live"
- _operator=">="
- _pv="-${NEED_KDE}:live"
- _pvn="-${NEED_KDE}"
- export NEED_KDE="live"
- ;;
- 4.3 | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*)
- _kdedir="4.3"
- _pv="-${NEED_KDE}:4.3"
- _pvn="-${NEED_KDE}"
- _operator=">="
- ;;
- 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=">="
- ;;
- 4.1 | 4.0.9* | 4.0.8*)
- _kdedir="4.1"
- _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.
- none)
- :
+ koffice)
+ SLOT="2"
+ _pv="-${KDE_MINIMAL}"
+ _pvn="${_pv}"
;;
*)
- die "NEED_KDE=${NEED_KDE} currently not supported."
+ _pv="-${KDE_MINIMAL}"
+ _pvn="${_pv}"
;;
-esac
-
-if [[ ${NEED_KDE} != none ]]; then
- #Set the SLOT
- if [[ -n ${KDEBASE} ]]; then
- if [[ ${NEED_KDE} = live ]]; then
- SLOT="live"
- else
- 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.3* | 4.2.9* | 4.2.8* | 4.2.7* | 4.2.6*) SLOT="4.3" ;;
- 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 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
- RDEPEND="${RDEPEND}
- !kdeprefix? ( !kde-base/${PN}:${KDE_SLOT}[-kdeprefix] )
- "
- fi
- done
+esac
- # Adding kdelibs and kdebase-data deps to all other packages.
- if [[ ${PN} != kdelibs ]]; then
- DEPEND="${DEPEND}
- kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
- !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )
+# KDE dependencies
+kdecommondepend="
+ dev-lang/perl
+ x11-libs/libXext
+ x11-libs/libXt
+ x11-libs/libXxf86vm
+ 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
+"
+if [[ ${PN} != kdelibs ]]; then
+ if [[ ${KDEBASE} = kde-base ]]; then
+ kdecommondepend="${kdecommondepend}
+ kdeprefix? ( >=kde-base/kdelibs${_pv}[kdeprefix] )
+ !kdeprefix? ( >=kde-base/kdelibs${_pvn}[-kdeprefix] )
"
- RDEPEND="${RDEPEND}
- kdeprefix? ( ${_operator}kde-base/kdelibs${_pv}[kdeprefix] )
- !kdeprefix? ( ${_operator}kde-base/kdelibs${_pvn}[-kdeprefix] )
+ else
+ kdecommondepend="${kdecommondepend}
+ >=kde-base/kdelibs${_pv}
"
- if [[ ${PN} != kdepimlibs && ${PN} != kdebase-data ]]; then
- RDEPEND="${RDEPEND}
- kdeprefix? ( ${_operator}kde-base/kdebase-data${_pv}[kdeprefix] )
- !kdeprefix? ( ${_operator}kde-base/kdebase-data${_pvn}[-kdeprefix] )
- "
- fi
fi
- unset _operator _pv _pvn
fi
+unset _pv _pvn
+kdedepend="
+ >=dev-util/cmake-2.6.2
+ dev-util/pkgconfig
+ >=sys-apps/sandbox-1.3.2
+"
+case ${KDE_REQUIRED} in
+ always)
+ COMMONDEPEND="${COMMONDEPEND} ${kdecommondepend}"
+ DEPEND="${DEPEND} ${kdedepend}"
+ ;;
+ optional)
+ IUSE="${IUSE} kde"
+ COMMONDEPEND="${COMMONDEPEND}
+ kde? ( ${kdecommondepend} )"
+ DEPEND="${DEPEND}
+ kde? ( ${kdedepend} )"
+ ;;
+ *) ;;
+esac
+unset kdecommondepend kdedepend
+
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: COMMONDEPEND is ${COMMONDEPEND}"
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: DEPEND (only) is ${DEPEND}"
+debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: RDEPEND (only) is ${RDEPEND}"
+
+# Accumulate dependencies set by this eclass
+DEPEND="${DEPEND} ${COMMONDEPEND}"
+RDEPEND="${RDEPEND} ${COMMONDEPEND}"
# 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
@@ -382,7 +267,7 @@ case ${BUILD_TYPE} in
# Split ebuild, or extragear stuff
if [[ -n ${KMNAME} ]]; then
ESVN_PROJECT="${KMNAME}"
- if [[ -z ${KMNOMODULE} && -z ${KMMODULE} ]]; then
+ if [[ -z ${KMNOMODULE} ]] && [[ -z ${KMMODULE} ]]; then
KMMODULE="${PN}"
fi
# Split kde-base/ ebuilds: (they reside in trunk/KDE)
@@ -393,11 +278,18 @@ case ${BUILD_TYPE} in
kdereview)
ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
;;
+ kdesupport)
+ ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
+ ESVN_PROJECT="${PN}"
+ ;;
kde*)
ESVN_REPO_URI="${ESVN_MIRROR}/trunk/KDE/${KMNAME}"
;;
extragear*|playground*)
+ # Unpack them in toplevel dir, so that they won't conflict with kde4-meta
+ # build packages from same svn location.
ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}/${KMMODULE}"
+ ESVN_PROJECT="${PN}"
;;
koffice)
ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
@@ -421,7 +313,7 @@ case ${BUILD_TYPE} in
kdebase-apps)
_kmname="kdebase" ;;
*)
- _kmname=${KMNAME} ;;
+ _kmname="${KMNAME}" ;;
esac
else
_kmname=${PN}
@@ -452,49 +344,57 @@ 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 ${KDEDIR} by default, this value
-# can be superseded by defining PREFIX before inheriting kde4-base.
-# This value is set on pkg_setup
-PREFIX=""
-
-debug-print "${LINENO} ${ECLASS} ${FUNCNAME}: SLOT ${SLOT} - NEED_KDE ${NEED_KDE}"
+# Set the installation PREFIX for non kde-base applications. It defaults to /usr.
+# kde-base packages go into KDE4 installation directory (KDEDIR) by default.
+# No matter the PREFIX, package will be built agains KDE installed in KDEDIR.
# @FUNCTION: kde4-base_pkg_setup
# @DESCRIPTION:
-# Adds flags needed by all of KDE 4 to $QT4_BUILT_WITH_USE_CHECK. Uses
-# kde4-functions_check_use from kde4-functions.eclass to print appropriate
-# errors and die if any required flags listed in $QT4_BUILT_WITH_USE_CHECK or
-# $KDE4_BUILT_WITH_USE_CHECK are missing.
+# Do the basic kdeprefix KDEDIR settings and determine with which kde should
+# optional applications link
kde4-base_pkg_setup() {
debug-print-function ${FUNCNAME} "$@"
- # Don't set KDEHOME during compile, it will cause access violations
- unset KDEHOME
+ # QA ebuilds
+ case ${NEED_KDE} in
+ none) ewarn "QA Notice: using deprecated NEED_KDE variable, use KDE_REQUIRED=\"never\" or KDE_REQUIRED=\"optional\" instead. You may want to override KDE_MINIMAL as well (default is KDE_MINIMAL=\"${KDE_MINIMAL}\")." ;;
+ *) [[ -n ${NEED_KDE} ]] && ewarn "QA Notice: using deprecated NEED_KDE variable, use KDE_MINIMAL instead (default is KDE_MINIMAL=\"${KDE_MINIMAL}\")." ;;
+ esac
+ [[ -z ${KDE_MINIMAL_VALID} ]] && ewarn "QA Notice: ignoring invalid KDE_MINIMAL (defaulting to ${KDE_MINIMAL})."
- # Search for best suitable kde installation for misc kde package.
- # Computation based on NEED_KDE and KDE_MINIMAL
- [[ ${KDEBASE} != kde-base ]] && [[ ${NEED_KDE} = latest || ${NEED_KDE} = none ]] && get_latest_kdedir
+ # Don't set KDEHOME during compilation, it will cause access violations
+ unset KDEHOME
- # Set PREFIX
- if use kdeprefix; then
- KDEDIR="/usr/kde/${_kdedir}"
- KDEDIRS="/usr/local/:/usr:${KDEDIR}"
+ if [[ ${KDEBASE} = kde-base ]]; then
+ if use kdeprefix; then
+ KDEDIR="/usr/kde/${_kdedir}"
+ else
+ KDEDIR="/usr"
+ fi
+ PREFIX="${PREFIX:-${KDEDIR}}"
else
- KDEDIR="/usr"
- KDEDIRS="/usr/local/:/usr"
+ # Determine KDEDIR by loooking for the closest match with KDE_MINIMAL
+ KDEDIR=
+ local kde_minimal_met
+ for slot in ${KDE_SLOTS[@]} ${KDE_LIVE_SLOTS[@]}; do
+ [[ -z ${kde_minimal_met} ]] && [[ ${slot} = ${KDE_MINIMAL} ]] && kde_minimal_met=1
+ if [[ -n ${kde_minimal_met} ]] && has_version "kde-base/kdelibs:${slot}"; then
+ if has_version "kde-base/kdelibs:${slot}[kdeprefix]"; then
+ KDEDIR="/usr/kde/${slot}"
+ else
+ KDEDIR="/usr"
+ fi
+ break;
+ fi
+ done
+ [[ -z KDEDIR ]] && die "Failed to determine KDEDIR!"
+ PREFIX="${PREFIX:-/usr}"
fi
- # Set the prefix based on KDEDIR
- # Make it a consequence of kdeprefix
- PREFIX=${KDEDIR}
+ # Not needed anymore
unset _kdedir
- # 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!"
-
- if [[ ${BUILD_TYPE} = live && -z ${I_KNOW_WHAT_I_AM_DOING} ]]; then
+ 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."
@@ -554,27 +454,14 @@ kde4-base_src_configure() {
append-cppflags -DQT_NO_DEBUG
fi
- # Enable generation of HTML handbook
- if has htmlhandbook ${IUSE//+} && use htmlhandbook; then
- 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"
+ local cmakeargs="-DKDE4_BUILD_TESTS=OFF"
# Set distribution name
- [[ ${PN} = kdelibs ]] && mycmakeargs="${mycmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
-
- # runpath linking
- mycmakeargs="${mycmakeargs} -DKDE4_USE_ALWAYS_FULL_RPATH=ON"
+ [[ ${PN} = kdelibs ]] && cmakeargs="${cmakeargs} -DKDE_DISTRIBUTION_TEXT=Gentoo"
# Here we set the install prefix
- mycmakeargs="${mycmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}"
-
- # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
- use kdeprefix || mycmakeargs="${mycmakeargs} -DSYSCONF_INSTALL_DIR=/etc"
+ cmakeargs="${cmakeargs} -DCMAKE_INSTALL_PREFIX=${PREFIX}"
# Set environment
QTEST_COLORED=1
@@ -583,20 +470,28 @@ kde4-base_src_configure() {
# Hardcode path to *.pc KDE files
export PKG_CONFIG_PATH="${PKG_CONFIG_PATH:+${PKG_CONFIG_PATH}:}${KDEDIR}/$(get_libdir)/pkgconfig"
- # Override some environment variables
- PATH="${KDEDIR}/bin:${PATH}"
- LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
-
- # Set cmake prefixes to allow buildsystem to localize valid KDE installation when more are present
- if use kdeprefix; then
- mycmakeargs="${mycmakeargs}
- -DCMAKE_SYSTEM_INCLUDE_PATH=${KDEDIR}/include
- -DCMAKE_SYSTEM_LIBRARY_PATH=${KDEDIR}/$(get_libdir)
- -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}
- -DCMAKE_SYSTEM_PROGRAM_PATH=${KDEDIR}/bin"
+ # Shadow existing /usr installations
+ unset KDEDIRS
+
+ # Override some environment variables - only when kdeprefix is different,
+ # to not break ccache/distcc
+ if [[ ${KDEDIR} != /usr ]]; then
+ PATH="${KDEDIR}/bin:${PATH}"
+ LDPATH="${KDEDIR}/$(get_libdir):${LDPATH}"
fi
- [ -e CMakeLists.txt ] && cmake-utils_src_configure
+ if has kdeprefix ${IUSE//+} && use kdeprefix; then
+ # Set cmake prefixes to allow buildsystem to localize valid KDE installation
+ # when more are present
+ cmakeargs="${cmakeargs} -DCMAKE_SYSTEM_PREFIX_PATH=${KDEDIR}"
+ else
+ # If prefix is /usr, sysconf needs to be /etc, not /usr/etc
+ cmakeargs="${cmakeargs} -DSYSCONF_INSTALL_DIR=/etc"
+ fi
+
+ mycmakeargs="${cmakeargs} ${mycmakeargs}"
+
+ cmake-utils_src_configure
}
# @FUNCTION: kde4-base_src_compile
@@ -657,11 +552,11 @@ 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/ || \
- die "Failed to move docs to kde/ failed."
+ dodir /usr/share/doc/KDE4 && \
+ mv "${D}/usr/share/doc/${PF}" "${D}"/usr/share/doc/KDE4/ || \
+ die "Failed to move docs to KDE4/."
fi
}
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 528b57fb5614..79083950b4fd 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.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-functions.eclass,v 1.14 2009/03/09 19:41:26 scarabeus Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.15 2009/04/13 00:02:45 scarabeus Exp $
# @ECLASS: kde4-functions.eclass
# @MAINTAINER:
@@ -24,40 +24,40 @@ esac
# 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
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
fi
# @ECLASS-VARIABLE: KDE_SLOTS
# @DESCRIPTION:
-# 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 4.3 )
+# The slots used by all KDE versions later than 4.0. The live KDE releases use
+# KDE_LIVE_SLOTS instead. Values should be ordered.
+KDE_SLOTS=( "kde-4" "4.1" "4.2" "4.3" )
# @ECLASS-VARIABLE: KDE_LIVE_SLOTS
# @DESCRIPTION:
-# The slots used by all KDE live versions.
-KDE_LIVE_SLOTS=( live )
+# The slots used by KDE live versions. Values should be ordered.
+KDE_LIVE_SLOTS=( "live" )
# @FUNCTION: buildsycoca
# @DESCRIPTION:
# Function to rebuild the KDE System Configuration Cache.
# All KDE ebuilds should run this in pkg_postinst and pkg_postrm.
-#
-# Note that kde4-base.eclass already does this.
buildsycoca() {
debug-print-function ${FUNCNAME} "$@"
-
+
if [[ -z ${ROOT%%/} && -x ${KDEDIR}/bin/kbuildsycoca4 ]]; then
- # Make sure tha cache file exists, or kbuildsycoca4 will fail
+ # Make sure tha cache file exists, writable by root and readable by
+ # others. Otherwise kbuildsycoca4 will fail.
touch "${KDEDIR}/share/kde4/services/ksycoca4"
+ chmod 644 "${KDEDIR}/share/kde4/services/ksycoca4"
# We have to unset DISPLAY and DBUS_SESSION_BUS_ADDRESS, the ones
# in the user's environment (through su [without '-']) may cause
@@ -65,11 +65,25 @@ buildsycoca() {
ebegin "Running kbuildsycoca4 to build global database"
# This is needed because we support multiple kde versions installed together.
- XDG_DATA_DIRS="/usr/share:${KDEDIR}/share:/usr/local/share" \
+ # Lookup in order - local, KDEDIR, /usr, do not duplicate entries btw.
+ local KDEDIRS="/usr/share"
+ [[ ${KDEDIR} != "/usr" ]] && KDEDIRS="${KDEDIR}/share:${KDEDIRS}"
+ XDG_DATA_DIRS="/usr/local/share:${KDEDIRS}" \
DISPLAY="" DBUS_SESSION_BUS_ADDRESS="" \
${KDEDIR}/bin/kbuildsycoca4 --global --noincremental &> /dev/null
eend $?
fi
+
+ # fix permission for some directories
+ for x in share/config share/kde4; do
+ if [[ $(stat --format=%a /usr/${x}) != 755 || $(stat --format=%a ${KDEDIR}/${x}) != 755 ]]; then
+ ewarn "Package ${PN} is breaking ${KDEDIR}/${x} permissions."
+ ewarn "Please report this issue to gentoo bugzilla."
+ einfo "Permissions will get adjusted automatically now."
+ find /usr/${x} -type d -print0 | xargs -0 chmod 755
+ [[ ${KDEDIR} = /usr ]] || find ${KDEDIR}/${x} -type d -print0 | xargs -0 chmod 755
+ fi
+ done
}
# @FUNCTION: comment_all_add_subdirectory
@@ -105,39 +119,39 @@ enable_selected_linguas() {
local lingua sr_mess wp
# ebuild overridable linguas directory definition
- KDE_LINGUAS_DIR=${KDE_LINGUAS_DIR:=${S}/po}
- cd "$KDE_LINGUAS_DIR" || die "wrong linguas dir specified"
+ 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
+ [[ -e "${wp}.po" ]] && mv "${wp}.po" "sr@Latn.po"
+ if [[ -d "${wp}" ]]; then
# move dir and fix cmakelists
- mv "$wp" "sr@Latn"
+ mv "${wp}" "sr@Latn"
sed -i \
- -e "s:$wp:sr@Latin:g" \
+ -e "s:${wp}:sr@Latin:g" \
CMakeLists.txt
fi
done
for lingua in ${KDE_LINGUAS}; do
- if [[ -e "$lingua.po" ]]; then
- mv "$lingua.po" "$lingua.po.old"
+ if [[ -e "${lingua}.po" ]]; then
+ mv "${lingua}.po" "${lingua}.po.old"
fi
done
comment_all_add_subdirectory "${KDE_LINGUAS_DIR}"
for lingua in ${LINGUAS}; do
ebegin "Enabling LANGUAGE: ${lingua}"
- if [[ -d "$lingua" ]]; then
+ if [[ -d "${lingua}" ]]; then
sed -e "/add_subdirectory([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
-e "/ADD_SUBDIRECTORY([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
-i CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed."
fi
- if [[ -e "$lingua.po.old" ]]; then
- mv "$lingua.po.old" "$lingua.po"
+ if [[ -e "${lingua}.po.old" ]]; then
+ mv "${lingua}.po.old" "${lingua}.po"
fi
eend $?
done
@@ -147,7 +161,7 @@ enable_selected_linguas() {
# @DESCRIPTION:
# Determine whether we are using live ebuild or tbzs.
get_build_type() {
- if [[ $SLOT = live || $PV = 9999* ]]; then
+ if [[ ${SLOT} = live || ${PV} = 9999* ]]; then
BUILD_TYPE="live"
else
BUILD_TYPE="release"
@@ -155,65 +169,13 @@ get_build_type() {
export BUILD_TYPE
}
-# @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() {
- case ${KDE_WANTED} in
- # note this will need to be updated as stable moves and so on
- live)
- _versions="9999 4.2.61 4.2.0 4.1.0"
- ;;
- snapshot)
- _versions="4.2.61 4.2.0 4.1.0 9999"
- ;;
- testing)
- _versions="4.2.0 4.1.0 4.2.61 9999"
- ;;
- stable)
- _versions="4.2.0 4.1.0 4.1.61 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.3.0 | 4.2.61)
- _kdedir="4.3"
- break
- ;;
- 4.2.0 | 4.1.61)
- _kdedir="4.2"
- break
- ;;
- 4.1.0)
- _kdedir="4.1"
- break
- ;;
- esac
- fi
- done
-
- debug-print-function ${FUNCNAME} "$@" "KDE_WANTED=${KDE_WANTED} -> _kdedir=${_kdedir}"
-}
-
# @FUNCTION: migrate_store_dir
# @DESCRIPTION:
-# Migrate the remnants of ${ESVN_STORE_DIR}/KDE/ to ${ESVN_STORE_DIR}/.
-# Perform experimental split of kdebase to kdebase-apps.
+# Universal store dir migration
+# * performs split of kdebase to kdebase-apps when needed
+# * moves playground/extragear kde4-base-style to toplevel dir
migrate_store_dir() {
- local cleandir
- cleandir="${ESVN_STORE_DIR}/KDE"
+ local cleandir="${ESVN_STORE_DIR}/KDE"
if [[ -d "${cleandir}" ]]; then
ewarn "'${cleandir}' has been found. Moving contents to new location."
addwrite "${ESVN_STORE_DIR}"
@@ -232,10 +194,28 @@ migrate_store_dir() {
# Move the rest
local pkg
for pkg in "${cleandir}"/*; do
- mv -f "${pkg}" "${ESVN_STORE_DIR}"/ || eerror "failed to move ${pkg}"
+ 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
+
+ if ! hasq kde4-meta ${INHERITED}; then
+ case ${KMNAME} in
+ extragear*|playground*)
+ local svnlocalpath="${ESVN_STORE_DIR}"/"${KMNAME}"/"${PN}"
+ if [[ -d "${svnlocalpath}" ]]; then
+ local destdir="${ESVN_STORE_DIR}"/"${ESVN_PROJECT}"/"`basename "${ESVN_REPO_URI}"`"
+ ewarn "'${svnlocalpath}' has been found."
+ ewarn "Moving contents to new location: ${destdir}"
+ addwrite "${ESVN_STORE_DIR}"
+ mkdir -p "${ESVN_STORE_DIR}"/"${ESVN_PROJECT}" && mv -f "${svnlocalpath}" "${destdir}" \
+ || die "Failed to move to '${svnlocalpath}'"
+ # Try cleaning empty directories
+ rmdir "`dirname "${svnlocalpath}"`" 2> /dev/null
+ fi
+ ;;
+ esac
+ fi
}
# Functions handling KMLOADLIBS and KMSAVELIBS
@@ -246,7 +226,7 @@ migrate_store_dir() {
save_library_dependencies() {
local depsfile="${T}/${PN}:${SLOT}"
- ebegin "Saving library dependendencies in ${depsfile##*/}"
+ ebegin "Saving library dependencies in ${depsfile##*/}"
echo "EXPORT_LIBRARY_DEPENDENCIES(\"${depsfile}\")" >> "${S}/CMakeLists.txt" || \
die "Failed to save the library dependencies."
eend $?
@@ -256,8 +236,9 @@ save_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##*/}"
+ local depsfile="${T}/${PN}:${SLOT}"
+
+ ebegin "Installing library dependencies as ${depsfile##*/}"
insinto /var/lib/kde
doins "${depsfile}" || die "Failed to install library dependencies."
eend $?
@@ -268,7 +249,7 @@ install_library_dependencies() {
# Inject specified library dependencies in current package
load_library_dependencies() {
local pn i depsfile
- ebegin "Injecting library dependendencies from '${KMLOADLIBS}'"
+ ebegin "Injecting library dependencies from '${KMLOADLIBS}'"
i=0
for pn in ${KMLOADLIBS} ; do
diff --git a/eclass/kde4-meta.eclass b/eclass/kde4-meta.eclass
index 631a28a5c4ed..e3248c5b1b85 100644
--- a/eclass/kde4-meta.eclass
+++ b/eclass/kde4-meta.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2009 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.16 2009/03/15 15:27:13 alexxy Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-meta.eclass,v 1.17 2009/04/13 00:02:45 scarabeus Exp $
#
# @ECLASS: kde4-meta.eclass
# @MAINTAINER:
@@ -31,6 +31,13 @@ case ${KDEBASE} in
;;
esac
+# Add khelpcenter dependency when installing
+if [[ ${PN} != khelpcenter ]] && has doc ${IUSE//+} && use doc; then
+ RDEPEND="${RDEPEND}
+ >=kde-base/khelpcenter-${PV}:${SLOT}[kdeprefix=]
+ "
+fi
+
# Add dependencies that all packages in a certain module share.
case ${KMNAME} in
kdebase|kdebase-apps|kdebase-workspace|kdebase-runtime|kdegraphic)
@@ -79,52 +86,30 @@ case ${KMNAME} in
;;
koffice)
[[ ${PN} != koffice-data ]] && IUSE="debug"
- case ${PV} in
- 9999*)
- DEPEND="${DEPEND}
- !app-office/${PN}:2
- "
- ;;
- 1.9*|2*)
- DEPEND="${DEPEND}
- !app-office/${PN}:live
- "
- ;;
- esac
- DEPEND="${DEPEND}
- !app-office/${PN}:0
- !app-office/koffice:0
- !app-office/koffice-meta:0
+ RDEPEND="${RDEPEND}
+ !kdeprefix? (
+ !app-office/${PN}:0
+ !app-office/koffice:0
+ !app-office/koffice-meta:0
+ )
"
- case ${PN} in
- koffice-data)
- DEPEND="${DEPEND}
- media-libs/lcms
- "
- RDEPEND="${RDEPEND}
- media-libs/lcms
- "
- ;;
- *)
- COMMON_DEPEND="
- dev-cpp/eigen:2
- media-gfx/imagemagick[openexr?]
- media-libs/fontconfig
- media-libs/freetype:2
- "
- DEPEND="${DEPEND} ${COMMON_DEPEND}"
- RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
- unset COMMON_DEPEND
- if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
- DEPEND="${DEPEND}
- >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]
- "
- RDEPEND="${RDEPEND}
- >=app-office/koffice-libs-${PV}:${SLOT}[kdeprefix=]
- "
- fi
- ;;
- esac
+ COMMON_DEPEND="
+ dev-cpp/eigen:2
+ media-gfx/imagemagick[openexr?]
+ media-libs/fontconfig
+ media-libs/freetype:2
+ "
+ DEPEND="${DEPEND} ${COMMON_DEPEND}"
+ RDEPEND="${RDEPEND} ${COMMON_DEPEND}"
+ unset COMMON_DEPEND
+ if [[ ${PN} != koffice-libs && ${PN} != koffice-data ]]; then
+ DEPEND="${DEPEND}
+ >=app-office/koffice-libs-${PV}:${SLOT}
+ "
+ RDEPEND="${RDEPEND}
+ >=app-office/koffice-libs-${PV}:${SLOT}
+ "
+ fi
;;
esac
@@ -137,10 +122,10 @@ case ${BUILD_TYPE} in
case ${KMNAME} in
extragear*|playground*)
ESVN_REPO_URI="${ESVN_MIRROR}/trunk/${KMNAME}"
+ ESVN_PROJECT="${KMNAME}"
;;
esac
;;
- *) ;;
esac
# @ECLASS-VARIABLE: KMNAME
@@ -345,7 +330,8 @@ kde4-meta_src_extract() {
kde4-meta_create_extractlists() {
debug-print-function ${FUNCNAME} "$@"
- if has htmlhandbook ${IUSE//+} && use htmlhandbook; then
+ # TODO change to KMEXTRA for more strict check
+ if has doc ${IUSE//+} && use doc && [[ -n ${KMMODULE} ]]; then
# We use the basename of $KMMODULE because $KMMODULE can contain
# the path to the module subdirectory.
KMEXTRA_NONFATAL="${KMEXTRA_NONFATAL} doc/${KMMODULE##*/}"
@@ -417,7 +403,7 @@ kde4-meta_create_extractlists() {
case ${KMNAME} in
kdebase-runtime|kdebase-workspace|kdeedu|kdegames|kdegraphics|kdepim)
case ${PN} in
- libkdegames|libkdeedu|marble|libkworkspace)
+ libkdegames|libkdeedu|libkworkspace)
KMEXTRA="${KMEXTRA}
cmake/modules/"
;;
@@ -609,6 +595,14 @@ kde4-meta_change_cmakelists() {
;;
esac
;;
+ kdewebdev)
+ # Disable hardcoded kdepimlibs check
+ sed -e 's/find_package(KdepimLibs REQUIRED)/macro_optional_find_package(KdepimLibs)/' \
+ -e 's/find_package(LibXml2 REQUIRED)/macro_optional_find_package(LibXml2 REQUIRED)/' \
+ -e 's/find_package(LibXslt REQUIRED)/macro_optional_find_package(LibXslt REQUIRED)/' \
+ -e 's/find_package(Boost REQUIRED)/macro_optional_find_package(Boost REQUIRED)/' \
+ -i CMakeLists.txt || die "failed to disable hardcoded checks"
+ ;;
koffice)
# prevent collisions
if [[ ${PN} != koffice-data ]]; then
@@ -631,6 +625,19 @@ kde4-meta_change_cmakelists() {
kde4-meta_src_configure() {
debug-print-function ${FUNCNAME} "$@"
+ # Set some cmake default values here (usually workarounds for automagic deps)
+ case ${KMNAME} in
+ kdewebdev)
+ mycmakeargs="
+ -DWITH_KdepimLibs=OFF
+ -DWITH_LibXml2=OFF
+ -DWITH_LibXslt=OFF
+ -DWITH_Boost=OFF
+ -DWITH_LibTidy=OFF
+ ${mycmakeargs}"
+ ;;
+ esac
+
kde4-base_src_configure
}
@@ -660,12 +667,7 @@ kde4-meta_src_test() {
kde4-meta_src_install() {
debug-print-function $FUNCNAME "$@"
- kde4-meta_src_make_doc
- cmake-utils_src_install
-
- if [[ -n ${KMSAVELIBS} ]]; then
- install_library_dependencies
- fi
+ kde4-base_src_install
}
# @FUNCTION: kde4-meta_src_make_doc
@@ -685,11 +687,17 @@ kde4-meta_src_make_doc() {
# @FUNCTION: kde4-meta_pkg_postinst
# @DESCRIPTION:
-# Currently just calls its equivalent in kde4-base.eclass(5). Use this in split
-# ebuilds.
+# Display information about application handbook and invoke kbuildsycoca4.
kde4-meta_pkg_postinst() {
debug-print-function ${FUNCNAME} "$@"
+ if has doc ${IUSE//+} && ! use doc; then
+ echo
+ einfo "Application handbook for ${PN} has not been installed."
+ einfo "To install handbook, reemerge =${CATEGORY}/${P} with 'doc' USE flag."
+ echo
+ fi
+
kde4-base_pkg_postinst
}