commit:     4aa1f9272910de4b8ed53317aa6c1d6e7fd3335e
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 22 12:38:56 2017 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 22 12:38:56 2017 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=4aa1f927

kde5.eclass: Filter LINGUAS in poqm as well

 eclass/kde5.eclass | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 5e9a731b59..38b0fcda90 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -549,25 +549,30 @@ kde5_src_prepare() {
                fi
        fi
 
-       # enable only the requested translations
-       # 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
-                               if [[ -e CMakeLists.txt ]] ; then
-                                       cmake_comment_add_subdirectory ${lang}
-                                       sed -e 
"/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" -i CMakeLists.txt || 
die
-                               fi
-                       elif [[ -f ${lang} ]] && ! has ${lang/.po/} ${LINGUAS} 
; then
-                               if [[ ${lang} != CMakeLists.txt && ${lang} != 
${PN}.pot ]] ; then
-                                       rm ${lang} || die
+       # enable only the requested translations when required
+       if [[ -v LINGUAS ]] ; then
+               local po
+               for po in po poqm; do
+               if [[ -d ${po} ]] ; then
+                       pushd ${po} > /dev/null || die
+                       local lang
+                       for lang in *; do
+                               if [[ -d ${lang} ]] && ! has ${lang} ${LINGUAS} 
; then
+                                       rm -r ${lang} || die
+                                       if [[ -e CMakeLists.txt ]] ; then
+                                               cmake_comment_add_subdirectory 
${lang}
+                                               sed -e 
"/add_subdirectory([[:space:]]*${lang}\/.*[[:space:]]*)/d" \
+                                                       -i CMakeLists.txt || die
+                                       fi
+                               elif [[ -f ${lang} ]] && ! has ${lang/.po/} 
${LINGUAS} ; then
+                                       if [[ ${lang} != CMakeLists.txt && 
${lang} != ${PN}.pot ]] ; then
+                                               rm ${lang} || die
+                                       fi
                                fi
-                       fi
+                       done
+                       popd > /dev/null || die
+               fi
                done
-               popd > /dev/null || die
        fi
 
        if [[ ${KDE_BUILD_TYPE} = release && ${CATEGORY} != kde-apps ]] ; then

Reply via email to