johu        15/02/10 20:41:56

  Modified:             ChangeLog kde4-functions.eclass
  Log:
  Support for kde-apps category, remove function moved to cmake-utils. Some 
minor improvements.

Revision  Changes    Path
1.1529               eclass/ChangeLog

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1529&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?rev=1.1529&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/ChangeLog?r1=1.1528&r2=1.1529

Index: ChangeLog
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/ChangeLog,v
retrieving revision 1.1528
retrieving revision 1.1529
diff -u -r1.1528 -r1.1529
--- ChangeLog   10 Feb 2015 18:14:23 -0000      1.1528
+++ ChangeLog   10 Feb 2015 20:41:56 -0000      1.1529
@@ -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 <[email protected]> kde4-functions.eclass:
+  Support for kde-apps category, remove function moved to cmake-utils. Some
+  minor improvements.
 
   10 Feb 2015; Brian Evans <[email protected]> mysql-multilib.eclass:
   Always build NDB with mysql-cluster for libndbclient



1.72                 eclass/kde4-functions.eclass

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kde4-functions.eclass?rev=1.72&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kde4-functions.eclass?rev=1.72&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/eclass/kde4-functions.eclass?r1=1.71&r2=1.72

Index: kde4-functions.eclass
===================================================================
RCS file: /var/cvsroot/gentoo-x86/eclass/kde4-functions.eclass,v
retrieving revision 1.71
retrieving revision 1.72
diff -u -r1.71 -r1.72
--- kde4-functions.eclass       17 Jul 2014 13:02:11 -0000      1.71
+++ kde4-functions.eclass       10 Feb 2015 20:41:56 -0000      1.72
@@ -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 @@
 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 @@
 # @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 @@
        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 @@
        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 @@
 
        [[ -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}}]"
 }
 




Reply via email to