summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-04-22 14:21:27 +0200
committerAndreas Sturmlechner <asturm@gentoo.org>2017-04-22 16:32:05 +0200
commit9be84b1fe572d963019a2f9701826a4e7ab184a6 (patch)
tree45012a539a0d743265c0a9d4d819439b40df79ea /eclass/kde5.eclass
parentkde-apps/kdepim-runtime: Drop 17.04.0 (r0) (diff)
downloadgentoo-9be84b1fe572d963019a2f9701826a4e7ab184a6.tar.gz
gentoo-9be84b1fe572d963019a2f9701826a4e7ab184a6.tar.bz2
gentoo-9be84b1fe572d963019a2f9701826a4e7ab184a6.zip
kde5.eclass: Add poqm directory handling
Upstream directory for Qt-only translations. - Check for and remove poqm directory if USE=-nls - Filter LINGUAS in poqm as well
Diffstat (limited to 'eclass/kde5.eclass')
-rw-r--r--eclass/kde5.eclass48
1 files changed, 29 insertions, 19 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index e071a82b5d0e..38b0fcda905c 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -540,29 +540,39 @@ kde5_src_prepare() {
fi
# drop translations when nls is not wanted
- if [[ -d po ]] && in_iuse nls && ! use nls ; then
- rm -r po || die
+ if in_iuse nls && ! use nls ; then
+ if [[ -d po ]] ; then
+ rm -r po || die
+ fi
+ if [[ -d poqm ]] ; then
+ rm -r poqm || die
+ 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