diff options
| author | Johannes Huber <johu@gentoo.org> | 2016-03-26 18:56:55 +0100 |
|---|---|---|
| committer | Johannes Huber <johu@gentoo.org> | 2016-03-26 18:58:27 +0100 |
| commit | 548b6e14ccefcd3f6fd83a0843948bd48c9bb04e (patch) | |
| tree | c748f8265ee9aa30932d1386476f78a3aa3d2794 | |
| parent | 9eaf81cc829b3bc6efe40e674868fa9345600dda (diff) | |
| download | kde-548b6e14ccefcd3f6fd83a0843948bd48c9bb04e.tar.gz kde-548b6e14ccefcd3f6fd83a0843948bd48c9bb04e.tar.bz2 kde-548b6e14ccefcd3f6fd83a0843948bd48c9bb04e.zip | |
kde5.eclass: Improve translation handling
Do not remove unconditionally po file for non release versions.
| -rw-r--r-- | eclass/kde5.eclass | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass index b1a3cfc3784..d5b7f854cbe 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 |
