summaryrefslogtreecommitdiff
path: root/eclass/kde4-functions.eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass/kde4-functions.eclass')
-rw-r--r--eclass/kde4-functions.eclass13
1 files changed, 11 insertions, 2 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 2407877ef21..bfbce2b74eb 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -462,13 +462,22 @@ done
# but this default can be overridden by defining KDE_LINGUAS_DIR.
enable_selected_linguas() {
local lingua
- comment_all_add_subdirectory "${KDE_LINGUAS_DIR:-${S}/po}"
+
for lingua in ${KDE_LINGUAS}; do
- if use linguas_${lingua}; then
+ if [ -e "${S}"/po/"${lingua}".po ]; then
+ mv "${S}"/po/"${lingua}".po "${S}"/po/"${lingua}".po.old
+ fi
+ done
+ comment_all_add_subdirectory "${KDE_LINGUAS_DIR:-${S}/po}"
+ for lingua in ${LINGUAS}; do
+ if [ -d "${S}"/po/"${lingua}" ]; then
sed -e "/add_subdirectory([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
-e "/ADD_SUBDIRECTORY([[:space:]]*${lingua}[[:space:]]*)[[:space:]]*$/ s/^#DONOTCOMPILE //" \
-i "${KDE_LINGUAS_DIR:-${S}/po}"/CMakeLists.txt || die "Sed to uncomment linguas_${lingua} failed."
fi
+ if [ -e "${S}"/po/"${lingua}".po.old ]; then
+ mv "${S}"/po/"${lingua}".po.old "${S}"/po/"${lingua}".po
+ fi
done
}