x11-misc/kronometer: Fix USE=-handbook and USE=handbook
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Sun, 19 Jun 2016 14:55:10 +0000 (16:55 +0200)
committerMichael Palimaka <kensington@gentoo.org>
Sun, 19 Jun 2016 14:59:34 +0000 (00:59 +1000)
Gentoo-bug: 586220

Package-Manager: portage-2.2.28

x11-misc/kronometer/kronometer-2.1.0.ebuild

index ec61f4d0bc1e4c0733140e419bdbec47e300d4fe..0a34912d9767ed27db711807422d91bde9ee9c97 100644 (file)
@@ -30,3 +30,20 @@ DEPEND="
        $(add_qt_dep qtwidgets)
 "
 RDEPEND="${DEPEND}"
+
+src_prepare() {
+       kde5_src_prepare
+
+       local docdir=doc-translations
+       if use_if_iuse handbook && [[ -d ${docdir} ]] ; then
+               pushd ${docdir} > /dev/null || die
+               for lang in *; do
+                       if ! has ${lang/_${PN}/} ${LINGUAS} ; then
+                               cmake_comment_add_subdirectory "${lang}/${PN}"
+                       fi
+               done
+               popd > /dev/null || die
+       else
+               cmake_comment_add_subdirectory ${docdir}
+       fi
+}