summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorJohannes Huber <johu@gentoo.org>2015-02-10 20:41:56 +0000
committerJohannes Huber <johu@gentoo.org>2015-02-10 20:41:56 +0000
commit9b0ecc9ada6bd8ef1180ebc5e96adc01d7196525 (patch)
treeac95907b802b12d3128d3e486b67fc155754a034 /eclass
parentRemove opencl-libdir once again. (diff)
downloadgentoo-2-9b0ecc9ada6bd8ef1180ebc5e96adc01d7196525.tar.gz
gentoo-2-9b0ecc9ada6bd8ef1180ebc5e96adc01d7196525.tar.bz2
gentoo-2-9b0ecc9ada6bd8ef1180ebc5e96adc01d7196525.zip
Support for kde-apps category, remove function moved to cmake-utils. Some minor improvements.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog6
-rw-r--r--eclass/kde4-functions.eclass77
2 files changed, 56 insertions, 27 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index f31be51c8069..dd0a66aa7442 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for eclass directory
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1528 2015/02/10 18:14:23 grknight Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v 1.1529 2015/02/10 20:41:56 johu Exp $
+
+ 10 Feb 2015; Johannes Huber <johu@gentoo.org> kde4-functions.eclass:
+ Support for kde-apps category, remove function moved to cmake-utils. Some
+ minor improvements.
10 Feb 2015; Brian Evans <grknight@gentoo.org> mysql-multilib.eclass:
Always build NDB with mysql-cluster for libndbclient
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 2c60e58539e3..e4405222e6eb 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -1,8 +1,6 @@
-# Copyright 1999-2014 Gentoo Foundation
+# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.71 2014/07/17 13:02:11 kensington Exp $
-
-inherit versionator
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v 1.72 2015/02/10 20:41:56 johu Exp $
# @ECLASS: kde4-functions.eclass
# @MAINTAINER:
@@ -15,12 +13,14 @@ inherit versionator
if [[ -z ${_KDE4_FUNCTIONS_ECLASS} ]]; then
_KDE4_FUNCTIONS_ECLASS=1
+inherit versionator
+
# @ECLASS-VARIABLE: EAPI
# @DESCRIPTION:
# Currently kde4 eclasses support EAPI 4 and 5.
-case ${EAPI:-0} in
+case ${EAPI} in
4|5) : ;;
- *) die "EAPI=${EAPI} is not supported" ;;
+ *) die "EAPI=${EAPI:-0} is not supported" ;;
esac
# @ECLASS-VARIABLE: KDE_OVERRIDE_MINIMAL
@@ -36,14 +36,15 @@ 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
- debug-print "${ECLASS}: KDEVELOP ebuild recognized"
KDEBASE=kdevelop
fi
+debug-print "${ECLASS}: ${KDEBASE} ebuild recognized"
+
# determine the build type
if [[ ${PV} = *9999* ]]; then
KDE_BUILD_TYPE="live"
@@ -121,21 +122,6 @@ buildsycoca() {
done
}
-# @FUNCTION: comment_add_subdirectory
-# @USAGE: subdirectory
-# @DESCRIPTION:
-# Comment out an add_subdirectory call in CMakeLists.txt in the current directory
-comment_add_subdirectory() {
- if [[ -z ${1} ]]; then
- die "comment_add_subdirectory must be passed the directory name to comment"
- fi
-
- if [[ -a "CMakeLists.txt" ]]; then
- sed -e "/add_subdirectory[[:space:]]*([[:space:]]*${1}[[:space:]]*)/s/^/#DONOTCOMPILE /" \
- -i CMakeLists.txt || die "failed to comment add_subdirectory(${1})"
- fi
-}
-
# @FUNCTION: comment_all_add_subdirectory
# @USAGE: [list of directory names]
# @DESCRIPTION:
@@ -286,16 +272,16 @@ load_library_dependencies() {
eend $?
}
-# @FUNCTION: add_kdebase_dep
+# @FUNCTION: add_kdeapps_dep
# @DESCRIPTION:
-# Create proper dependency for kde-base/ dependencies.
+# Create proper dependency for kde-apps/ dependencies.
# This takes 1 to 3 arguments. The first being the package name, the optional
# second is additional USE flags to append, and the optional third is the
# version to use instead of the automatic version (use sparingly).
# The output of this should be added directly to DEPEND/RDEPEND, and may be
# wrapped in a USE conditional (but not an || conditional without an extra set
# of parentheses).
-add_kdebase_dep() {
+add_kdeapps_dep() {
debug-print-function ${FUNCNAME} "$@"
local ver
@@ -316,6 +302,45 @@ add_kdebase_dep() {
[[ -z ${1} ]] && die "Missing parameter"
+ #FIXME
+ # Drop aqua= from kf5 packages
+ echo " >=kde-apps/${1}-${ver}:4[aqua=${2:+,${2}}]"
+}
+
+# @FUNCTION: add_kdebase_dep
+# @DESCRIPTION:
+# Create proper dependency for kde-base/ dependencies.
+# This takes 1 to 3 arguments. The first being the package name, the optional
+# second is additional USE flags to append, and the optional third is the
+# version to use instead of the automatic version (use sparingly).
+# The output of this should be added directly to DEPEND/RDEPEND, and may be
+# wrapped in a USE conditional (but not an || conditional without an extra set
+# of parentheses).
+add_kdebase_dep() {
+ debug-print-function ${FUNCNAME} "$@"
+
+ local ver
+
+ if [[ -n ${3} ]]; then
+ ver=${3}
+ elif [[ -n ${KDE_OVERRIDE_MINIMAL} ]]; then
+ ver=${KDE_OVERRIDE_MINIMAL}
+ elif [[ ${KDEBASE} != kde-base ]]; then
+ ver=${KDE_MINIMAL}
+ # if building live version depend on the final release since there will
+ # not be any more major development. this solves dep errors as not all
+ # packages have kde-base live versions now
+
+ # depend on the last sane released version where the normal >=${PV} dep
+ # is not possible
+ elif [[ ${CATEGORY} == kde-apps || ${PV} > 4.14.3 || ${PV} == *9999 ]]; then
+ ver=4.14.3
+ else
+ ver=${PV}
+ fi
+
+ [[ -z ${1} ]] && die "Missing parameter"
+
echo " >=kde-base/${1}-${ver}:4[aqua=${2:+,${2}}]"
}