commit: c27feb9ce5bdc9b1a1cdd06d8cafac218fddbcb1
Author: Johannes Huber <johu <AT> gentoo <DOT> org>
AuthorDate: Sat Mar 26 17:56:55 2016 +0000
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
CommitDate: Sat Apr 2 14:59:21 2016 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c27feb9c
kde5.eclass: Improve translation handling
Do not remove unconditionally po file for non release versions.
eclass/kde5.eclass | 34 ++++++++++++++++------------------
1 file changed, 16 insertions(+), 18 deletions(-)
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 47ced09..db331cb 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -387,24 +387,24 @@ kde5_src_prepare() {
# enable only the requested translations
# when required
- if [[ ${KDE_BUILD_TYPE} = release ]] ; then
- if [[ -d po ]] ; then
- pushd po > /dev/null || die
- 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}
- fi
- elif ! has ${lang/.po/} ${LINGUAS} ; then
- if [[ ${lang} != CMakeLists.txt ]] ;
then
- rm ${lang} || die
- fi
+ if [[ -d po ]] ; then
+ pushd po > /dev/null || die
+ 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}
fi
- done
- popd > /dev/null || die
- fi
+ elif ! has ${lang/.po/} ${LINGUAS} ; then
+ if [[ ${lang} != CMakeLists.txt ]] ; then
+ rm ${lang} || die
+ fi
+ fi
+ done
+ popd > /dev/null || die
+ fi
+ if [[ ${KDE_BUILD_TYPE} = release ]] ; then
if [[ ${KDE_HANDBOOK} != false && -d ${KDE_DOC_DIR} &&
${CATEGORY} != kde-apps ]] ; then
pushd ${KDE_DOC_DIR} > /dev/null || die
for lang in *; do
@@ -414,8 +414,6 @@ kde5_src_prepare() {
done
popd > /dev/null || die
fi
- else
- rm -rf po
fi
# in frameworks, tests = manual tests so never build them