commit:     2832c1a7551437600fb7bf0b1216060f25f3bc0e
Author:     Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com>
AuthorDate: Mon Aug 22 19:41:26 2016 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Aug 24 13:33:04 2016 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=2832c1a7

kde4-base.eclass: Introduce WEBKIT_REQUIRED

webkit flag is on by default to build as upstream intended.

 eclass/kde4-base.eclass | 32 ++++++++++++++++++++++++++++++--
 1 file changed, 30 insertions(+), 2 deletions(-)

diff --git a/eclass/kde4-base.eclass b/eclass/kde4-base.eclass
index 47158c0..a629bcd 100644
--- a/eclass/kde4-base.eclass
+++ b/eclass/kde4-base.eclass
@@ -131,6 +131,12 @@ OPENGL_REQUIRED="${OPENGL_REQUIRED:-never}"
 # This variable must be set before inheriting any eclasses. Defaults to 
'never'.
 MULTIMEDIA_REQUIRED="${MULTIMEDIA_REQUIRED:-never}"
 
+# @ECLASS-VARIABLE: WEBKIT_REQUIRED
+# @DESCRIPTION:
+# Is qtwebkit required? Possible values are 'always', 'optional' and 'never'.
+# This variable must be set before inheriting any eclasses. Defaults to 
'never'.
+WEBKIT_REQUIRED="${WEBKIT_REQUIRED:-never}"
+
 # @ECLASS-VARIABLE: CPPUNIT_REQUIRED
 # @DESCRIPTION:
 # Is cppunit required for tests? Possible values are 'always', 'optional' and 
'never'.
@@ -266,6 +272,22 @@ case ${MULTIMEDIA_REQUIRED} in
 esac
 unset qtmultimediadepend
 
+# WebKit dependencies
+qtwebkitdepend="
+       >=dev-qt/qtwebkit-${QT_MINIMAL}:4
+"
+case ${WEBKIT_REQUIRED} in
+       always)
+               COMMONDEPEND+=" ${qtwebkitdepend}"
+               ;;
+       optional)
+               IUSE+=" +webkit"
+               COMMONDEPEND+=" webkit? ( ${qtwebkitdepend} )"
+               ;;
+       *) ;;
+esac
+unset qtwebkitdepend
+
 # CppUnit dependencies
 cppuintdepend="
        dev-util/cppunit
@@ -295,11 +317,17 @@ kdecommondepend="
        >=dev-qt/qtsql-${QT_MINIMAL}:4[qt3support]
        >=dev-qt/qtsvg-${QT_MINIMAL}:4
        >=dev-qt/qttest-${QT_MINIMAL}:4
-       >=dev-qt/qtwebkit-${QT_MINIMAL}:4
 "
 
 if [[ ${PN} != kdelibs ]]; then
-       kdecommondepend+=" $(add_kdebase_dep kdelibs)"
+       local _kdelibsuse
+       case ${WEBKIT_REQUIRED} in
+               always) _kdelibsuse="webkit" ;;
+               optional) _kdelibsuse="webkit?" ;;
+               *) ;;
+       esac
+       kdecommondepend+=" || ( $(add_kdebase_dep kdelibs "${_kdelibsuse}" 
4.14.22) <kde-base/kdelibs-4.14.22 )"
+       unset _kdelibsuse
        if [[ ${KDEBASE} = kdevelop ]]; then
                if [[ ${PN} != kdevplatform ]]; then
                        # @ECLASS-VARIABLE: KDEVPLATFORM_REQUIRED

Reply via email to