public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Michael Palimaka" <kensington@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/kde:apps-scratch commit in: eclass/
Date: Tue, 18 Nov 2014 08:45:48 +0000 (UTC)	[thread overview]
Message-ID: <1416300014.ddc14806ff384188f9a1da73c7033570db4e1f93.kensington@gentoo> (raw)

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


             reply	other threads:[~2014-11-18  8:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-18  8:45 Michael Palimaka [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-11-23 17:29 [gentoo-commits] proj/kde:apps-scratch commit in: eclass/ Michael Palimaka
2014-11-23 17:29 Michael Palimaka
2014-11-17  9:44 Michael Palimaka

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1416300014.ddc14806ff384188f9a1da73c7033570db4e1f93.kensington@gentoo \
    --to=kensington@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox