kde5.eclass: Fix doc install if LINGUAS is undefined
authorAndreas Sturmlechner <andreas.sturmlechner@gmail.com>
Wed, 3 Aug 2016 13:04:27 +0000 (15:04 +0200)
committerMichael Palimaka <kensington@gentoo.org>
Wed, 31 Aug 2016 14:23:26 +0000 (00:23 +1000)
eclass/kde5.eclass

index 887a84bd9f6914ab8d7034bf7a7cf7c2cba9be9a..c1dd3b5d6815d795b632de777394df8104032180 100644 (file)
@@ -455,6 +455,7 @@ EOF
        # when required
        if [[ -d po && -v LINGUAS ]] ; then
                pushd po > /dev/null || die
+               local lang
                for lang in *; do
                        if [[ -d ${lang} ]] && ! has ${lang} ${LINGUAS} ; then
                                rm -r ${lang} || die
@@ -470,9 +471,10 @@ EOF
                popd > /dev/null || die
        fi
 
-       if [[ ${KDE_BUILD_TYPE} = release ]] ; then
-               if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && ${CATEGORY} != kde-apps ]] ; then
+       if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then
+               if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} && -v LINGUAS ]] ; then
                        pushd ${KDE_DOC_DIR} > /dev/null || die
+                       local lang
                        for lang in *; do
                                if ! has ${lang} ${LINGUAS} ; then
                                        cmake_comment_add_subdirectory ${lang}