summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaciej Mrozowski <reavertm@gentoo.org>2010-09-14 12:39:51 +0000
committerMaciej Mrozowski <reavertm@gentoo.org>2010-09-14 12:39:51 +0000
commitcae0a29fc44a0830f3c2cb065224ae9473424c45 (patch)
tree7fbc94d0847c2c46cacdfc30c71c4ff6a42886e9 /eclass/kde4-base.eclass
parentRemoving old versions of xwax to address bug #335787 (diff)
downloadgentoo-2-cae0a29fc44a0830f3c2cb065224ae9473424c45.tar.gz
gentoo-2-cae0a29fc44a0830f3c2cb065224ae9473424c45.tar.bz2
gentoo-2-cae0a29fc44a0830f3c2cb065224ae9473424c45.zip
Rework KDE_HANDBOOK=1 -> KDE_HANDBOOK->'always', 'optional'(USE=handbook), 'never'(default)
Diffstat (limited to 'eclass/kde4-base.eclass')
-rw-r--r--eclass/kde4-base.eclass43
1 files changed, 28 insertions, 15 deletions
diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index abb66212a282..ddc5058953cf 100644
--- a/eclass/kde4-base.eclass
+++ b/eclass/kde4-base.eclass
@@ -1,6 +1,6 @@
# Copyright 1999-2010 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.73 2010/09/13 21:47:37 reavertm Exp $
+# $Header: /var/cvsroot/gentoo-x86/eclass/kde4-base.eclass,v 1.74 2010/09/14 12:39:51 reavertm Exp $
# @ECLASS: kde4-base.eclass
# @MAINTAINER:
@@ -141,15 +141,18 @@ CPPUNIT_REQUIRED="${CPPUNIT_REQUIRED:-never}"
# @DESCRIPTION:
# Is kde required? Possible values are 'always', 'optional' and 'never'.
# This variable must be set before inheriting any eclasses. Defaults to 'always'
-# If set to always or optional, KDE_MINIMAL may be overriden as well.
+# If set to 'always' or 'optional', KDE_MINIMAL may be overriden as well.
# Note that for kde-base packages this variable is fixed to 'always'.
KDE_REQUIRED="${KDE_REQUIRED:-always}"
# @ECLASS-VARIABLE: KDE_HANDBOOK
# @DESCRIPTION:
-# Set to enable handbook in application. It adds +handbook to IUSE, handbook dirs
-# to KMEXTRA and ensures buildtime and runtime dependencies.
-[[ -n ${KDE_HANDBOOK} ]] && IUSE+=" +handbook"
+# Set to enable handbook in application. Possible values are 'always', 'optional'
+# (handbook USE flag) and 'never'.
+# This variable must be set before inheriting any eclasses. Defaults to 'never'.
+# It adds default handbook dirs for kde-base packages to KMEXTRA and in any case it
+# ensures buildtime and runtime dependencies.
+KDE_HANDBOOK="${KDE_HANDBOOK:-never}"
# Setup packages inheriting this eclass
case ${KDEBASE} in
@@ -318,16 +321,26 @@ kdedepend="
"
kderdepend=""
-# Handbook handling - dependencies
-if [[ -n ${KDE_HANDBOOK} ]]; then
- kdedepend+="
- handbook? (
- app-text/docbook-xml-dtd:4.2
- app-text/docbook-xsl-stylesheets
- )
- "
- [[ ${PN} != kdelibs ]] && kderdepend+=" handbook? ( $(add_kdebase_dep khelpcenter) )"
-fi
+kdehandbookdepend="
+ app-text/docbook-xml-dtd:4.2
+ app-text/docbook-xsl-stylesheets
+"
+kdehandbookrdepend="
+ $(add_kdebase_dep kdelibs 'handbook')
+"
+case ${KDE_HANDBOOK} in
+ always)
+ kdedepend+=" ${kdehandbookdepend}"
+ [[ ${PN} != kdelibs ]] && kderdepend+=" ${kdehandbookrdepend}"
+ ;;
+ optional)
+ IUSE+=" +handbook"
+ kdedepend+=" handbook? ( ${kdehandbookdepend} )"
+ [[ ${PN} != kdelibs ]] && kderdepend+=" handbook? ( ${kdehandbookrdepend} )"
+ ;;
+ *) ;;
+esac
+unset kdehandbookdepend kdehandbookrdepend
case ${KDE_REQUIRED} in
always)