commit: 548b6e14ccefcd3f6fd83a0843948bd48c9bb04e Author: Johannes Huber <johu <AT> gentoo <DOT> org> AuthorDate: Sat Mar 26 17:56:55 2016 +0000 Commit: Johannes Huber <johu <AT> gentoo <DOT> org> CommitDate: Sat Mar 26 17:58:27 2016 +0000 URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=548b6e14
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 b1a3cfc..d5b7f85 100644 --- a/eclass/kde5.eclass +++ b/eclass/kde5.eclass @@ -461,24 +461,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 @@ -488,8 +488,6 @@ kde5_src_prepare() { done popd > /dev/null || die fi - else - rm -rf po fi # in frameworks, tests = manual tests so never build them