summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorMichael Palimaka <kensington@gentoo.org>2014-07-17 22:59:07 +1000
committerMichael Palimaka <kensington@gentoo.org>2014-07-17 22:59:07 +1000
commit8b044a866ca48bcfc3a6cd673a9f866c50e5e9d9 (patch)
treefb6fb4dabff1746c9a0b39acc9c4e9a3ef104298 /eclass
parentab2afee00214d94f3daec65425e5f62ef8deeda3 (diff)
downloadkde-8b044a866ca48bcfc3a6cd673a9f866c50e5e9d9.tar.gz
kde-8b044a866ca48bcfc3a6cd673a9f866c50e5e9d9.tar.bz2
kde-8b044a866ca48bcfc3a6cd673a9f866c50e5e9d9.zip
[eclass] Add logic to handle missing handbooks when the default is en_US instead of the usual en.
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde4-functions.eclass8
1 files changed, 8 insertions, 0 deletions
diff --git a/eclass/kde4-functions.eclass b/eclass/kde4-functions.eclass
index 0a72e597b6c..a5af8bd8fc3 100644
--- a/eclass/kde4-functions.eclass
+++ b/eclass/kde4-functions.eclass
@@ -216,6 +216,14 @@ enable_selected_doc_linguas() {
# Disable subdirectories recursively
comment_all_add_subdirectory "${handbookdir}"
+
+ # In certain packages, the default handbook is en_US instead of the usual en. Since there is no en_US 'translation',
+ # it makes no sense to add to KDE_LINGUAS which causes this type of handbook to not be installed.
+ if [[ -d "${handbookdir}/en_US" && ! -d "${handbookdir}/en" ]]; then
+ mv "${handbookdir}/en_US" "${handbookdir}/en" || die
+ sed -e "s/en_US/en/" -i "${handbookdir}/CMakeLists.txt"
+ fi
+
# Add requested translations
local lingua
for lingua in en ${KDE_LINGUAS}; do