commit: ddc14806ff384188f9a1da73c7033570db4e1f93
Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Tue Nov 18 08:40:14 2014 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Tue Nov 18 08:40:14 2014 +0000
URL: http://sources.gentoo.org/gitweb/?p=proj/kde.git;a=commit;h=ddc14806
[eclass] Add KDE Applications support to KDE 4 eclasses.
Handle SRC_URI appropriately, and automatically block the kde-base package with
the same name.
Adjust add_kdebase_dep to transparently handle the new situation - use the new
kde-apps category for all packages except kdelibs (which has no further 4.x
releases).
Todo, handle Plasma 5 and any other packages not part of KDE Applications.
---
eclass/kde4-base.eclass | 14 +++++++++++++-
eclass/kde4-functions.eclass | 16 ++++++++++++----
2 files changed, 25 insertions(+), 5 deletions(-)
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index a75f995..a23ffb9 100644
--- a/eclass/kde4-base.eclass
+++ b/eclass/kde4-base.eclass
@@ -186,7 +186,7 @@ case ${KDEBASE} in
# packages that will never be mirrored. (As they only will ever
be in
# the overlay).
case ${PV} in
- *9999* | 4.?.[6-9]? | 4.??.[6-9]?)
+ *9999* | 4.?.[6-9]? | 4.??.[6-9]? | 14.?.[6-9]? |
14.??.[6-9]?)
RESTRICT+=" mirror"
;;
esac
@@ -329,6 +329,10 @@ kdedepend="
kderdepend=""
+if [[ ${CATEGORY} == kde-apps ]]; then
+ kderdepend+=" !kde-base/${PN}"
+fi
+
# all packages needs oxygen icons for basic iconset
if [[ ${PN} != oxygen-icons ]]; then
kderdepend+=" $(add_kdebase_dep oxygen-icons)"
@@ -454,7 +458,15 @@ _calculate_src_uri() {
4.11.14)
# Part of 4.14 actually, sigh. Not
stable for next release!
SRC_URI="mirror://kde/stable/4.14.3/src/${_kmname_pv}.tar.xz" ;;
+ 14.?.[6-9]? | 14.??.[4-9]?)
+ # Unstable KDE Applications releases
+
SRC_URI="mirror://kde/unstable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
;;
*)
+ if [[ ${CATEGORY} == kde-apps ]]; then
+ # Stable KDE Applications
releases
+
SRC_URI="mirror://kde/stable/applications/${PV}/src/${_kmname}-${PV}.tar.xz"
+ fi
+
# Stable KDE SC releases
SRC_URI="mirror://kde/stable/${PV}/src/${_kmname_pv}.tar.xz" ;;
esac
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index a5af8bd..760e6bd 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -36,7 +36,7 @@ esac
# @DESCRIPTION:
# This gets set to a non-zero value when a package is considered a kde or
# kdevelop ebuild.
-if [[ ${CATEGORY} = kde-base ]]; then
+if [[ ${CATEGORY} = kde-base || ${CATEGORY} = kde-apps ]]; then
debug-print "${ECLASS}: KDEBASE ebuild recognized"
KDEBASE=kde-base
elif [[ ${KMNAME-${PN}} = kdevelop ]]; then
@@ -298,7 +298,11 @@ load_library_dependencies() {
add_kdebase_dep() {
debug-print-function ${FUNCNAME} "$@"
- local ver
+ local ver category=kde-base
+
+ if [[ ${CATEGORY} == kde-apps && ${1} != kdelibs ]] ; then
+ category=kde-apps
+ fi
if [[ -n ${3} ]]; then
ver=${3}
@@ -311,12 +315,16 @@ add_kdebase_dep() {
elif [[ ${PV} == *.9999 ]]; then
ver=$(get_kde_version)
else
- ver=${PV}
+ if [[ ${CATEGORY} == kde-apps && ${category} == kde-base ]];
then
+ ver=4.14.3
+ else
+ ver=${PV}
+ fi
fi
[[ -z ${1} ]] && die "Missing parameter"
- echo " >=kde-base/${1}-${ver}:4[aqua=${2:+,${2}}]"
+ echo " >=${category}/${1}-${ver}:4[aqua=${2:+,${2}}]"
}
# local function to enable specified translations for specified directory