diff options
| author | Andreas Sturmlechner <andreas.sturmlechner@gmail.com> | 2015-11-22 16:15:16 +0100 |
|---|---|---|
| committer | Andreas Sturmlechner <andreas.sturmlechner@gmail.com> | 2015-11-22 16:53:47 +0100 |
| commit | 5fe4b852ed90c8fc137386b5e0c8d3dff47f212e (patch) | |
| tree | 8aeb909702ae03bf0d3ebc0843b15ba3f5743ce7 | |
| parent | 980ead6232ec8628419169f23ce59df3eb042075 (diff) | |
| download | kde-5fe4b852ed90c8fc137386b5e0c8d3dff47f212e.tar.gz kde-5fe4b852ed90c8fc137386b5e0c8d3dff47f212e.tar.bz2 kde-5fe4b852ed90c8fc137386b5e0c8d3dff47f212e.zip | |
kde5.eclass: Extend KDE_TEST=forceoptional functionality, simplify
If KDE_TEST=forceoptional, it makes sense to disable test subdirs also
outside KDE categories. No change for misc ebuilds using kde5.eclass.
| -rw-r--r-- | eclass/kde5.eclass | 35 |
1 files changed, 16 insertions, 19 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index 4253da96e61..ae5f39492ef 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -455,6 +455,10 @@ kde5_src_prepare() { # only enable handbook when required if ! use_if_iuse handbook ; then comment_add_subdirectory ${KDE_DOC_DIR} + + if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then + punt_bogus_dep KF5 DocTools + fi fi # enable only the requested translations @@ -488,21 +492,11 @@ kde5_src_prepare() { rm -rf po fi - # in frameworks, tests = manual tests so never - # build them + # in frameworks, tests = manual tests so never build them if [[ ${CATEGORY} = kde-frameworks ]]; then comment_add_subdirectory tests fi - if [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then - # only build unit tests when required - if ! use_if_iuse test ; then - comment_add_subdirectory autotests - comment_add_subdirectory test - comment_add_subdirectory tests - fi - fi - case ${KDE_PUNT_BOGUS_DEPS} in false) ;; *) @@ -515,15 +509,18 @@ kde5_src_prepare() { ;; esac - if [[ ${KDE_HANDBOOK} = forceoptional ]] ; then - if ! use_if_iuse handbook ; then - punt_bogus_dep KF5 DocTools - fi - fi - - if [[ ${KDE_TEST} = forceoptional ]] ; then - if ! use_if_iuse test ; then + # only build unit tests when required + if ! use_if_iuse test ; then + if [[ ${KDE_TEST} = forceoptional ]] ; then punt_bogus_dep Qt5 Test + # if forceoptional, also cover non-kde categories + comment_add_subdirectory autotests + comment_add_subdirectory test + comment_add_subdirectory tests + elif [[ ${CATEGORY} = kde-frameworks || ${CATEGORY} = kde-plasma || ${CATEGORY} = kde-apps ]] ; then + comment_add_subdirectory autotests + comment_add_subdirectory test + comment_add_subdirectory tests fi fi |
