diff options
| author | Alexey Shvetsov <alexxy@gentoo.org> | 2014-11-16 13:26:50 +0300 |
|---|---|---|
| committer | Alexey Shvetsov <alexxy@gentoo.org> | 2014-11-16 13:26:50 +0300 |
| commit | ff16e62967f4afebe715141599170941c24f706f (patch) | |
| tree | 7d6ffc07e00c3c353ab679a6ba4f78d3f9ee959e /eclass/kde4-functions.eclass | |
| parent | 36ba4356a2754976770ced57f341b7f860ed0e50 (diff) | |
| download | kde-ff16e62967f4afebe715141599170941c24f706f.tar.gz kde-ff16e62967f4afebe715141599170941c24f706f.tar.bz2 kde-ff16e62967f4afebe715141599170941c24f706f.zip | |
[eclass] Sync kde4-functions with tree
Diffstat (limited to 'eclass/kde4-functions.eclass')
| -rw-r--r-- | eclass/kde4-functions.eclass | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass index a8d3550f886..a5af8bd8fc3 100644 --- a/eclass/kde4-functions.eclass +++ b/eclass/kde4-functions.eclass @@ -2,6 +2,8 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ +inherit versionator + # @ECLASS: kde4-functions.eclass # @MAINTAINER: # kde@gentoo.org @@ -13,14 +15,12 @@ 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} in +case ${EAPI:-0} in 4|5) : ;; - *) die "EAPI=${EAPI:-0} is not supported" ;; + *) die "EAPI=${EAPI} is not supported" ;; esac # @ECLASS-VARIABLE: KDE_OVERRIDE_MINIMAL @@ -37,13 +37,13 @@ esac # This gets set to a non-zero value when a package is considered a kde or # kdevelop ebuild. if [[ ${CATEGORY} = kde-base ]]; 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,6 +121,21 @@ 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: |
