commit:     81cb1f69c7df360f7bd6a636caca1ae59ba9c820
Author:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  4 18:52:29 2015 +0000
Commit:     Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Wed Nov  4 18:56:08 2015 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=81cb1f69

kde5.eclass: introduce forceoptional value for KDE_TEST

 eclass/kde5.eclass | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 4ddcea7..aad8416 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -93,6 +93,8 @@ fi
 # @DESCRIPTION:
 # If set to "false", do nothing.
 # For any other value, add test to IUSE and add a dependency on 
dev-qt/qttest:5.
+# If set to "forceoptional", remove a Qt5Test dependency from the root
+# CMakeLists.txt in addition to the above.
 if [[ ${CATEGORY} = kde-frameworks ]]; then
        : ${KDE_TEST:=true}
 else
@@ -415,6 +417,11 @@ kde5_pkg_nofetch() {
        eerror "This is not a bug. Please do not file bugs or contact upstream 
about this."
        eerror ""
        eerror "Please consult the upstream release schedule to see when this "
+       if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then
+               if ! use_if_iuse handbook ; then
+                       punt_bogus_dep KF5 DocTools
+               fi
+       fi
        eerror "package is scheduled to be released:"
        eerror "https://techbase.kde.org/Schedules";
 }
@@ -519,6 +526,12 @@ kde5_src_prepare() {
                fi
        fi
 
+       if [[ ${KDE_TEST} = forceoptional ]] ; then
+               if ! use_if_iuse test ; then
+                       punt_bogus_dep Qt5 Test
+               fi
+       fi
+
        cmake-utils_src_prepare
 }
 

Reply via email to