summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
authorAndreas Sturmlechner <asturm@gentoo.org>2017-12-31 21:23:47 +0100
committerAndreas Sturmlechner <asturm@gentoo.org>2017-12-31 21:23:47 +0100
commit661e1ffe79b209b435ad344e1535d91aa60bb4ba (patch)
tree8b15e79e0a3bb91fa0c6eb730d1d021544767f96 /eclass
parentb6c5de0dea874159dafe62f437740f7ca3ea6b13 (diff)
downloadkde-661e1ffe79b209b435ad344e1535d91aa60bb4ba.tar.gz
kde-661e1ffe79b209b435ad344e1535d91aa60bb4ba.tar.bz2
kde-661e1ffe79b209b435ad344e1535d91aa60bb4ba.zip
kde5.eclass: Add KDE_PO_DIRS
Diffstat (limited to 'eclass')
-rw-r--r--eclass/kde5.eclass19
1 files changed, 12 insertions, 7 deletions
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass
index 826e0abf10c..adce61555e2 100644
--- a/eclass/kde5.eclass
+++ b/eclass/kde5.eclass
@@ -95,6 +95,11 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_
# Specifies the location of the KDE handbook if not the default.
: ${KDE_DOC_DIR:=doc}
+# @ECLASS-VARIABLE: KDE_PO_DIRS
+# @DESCRIPTION:
+# Specifies the possible locations of KDE l10n files if not the default.
+: ${KDE_PO_DIRS:="po poqm"}
+
# @ECLASS-VARIABLE: KDE_QTHELP
# @DESCRIPTION:
# If set to "false", do nothing.
@@ -523,18 +528,18 @@ kde5_src_prepare() {
# drop translations when nls is not wanted
if in_iuse nls && ! use nls ; then
- if [[ -d po ]] ; then
- rm -r po || die
- fi
- if [[ -d poqm ]] ; then
- rm -r poqm || die
- fi
+ local po
+ for po in ${KDE_PO_DIRS}; do
+ if [[ -d ${po} ]] ; then
+ rm -r ${po} || die
+ fi
+ done
fi
# enable only the requested translations when required
if [[ -v LINGUAS ]] ; then
local po
- for po in po poqm; do
+ for po in ${KDE_PO_DIRS}; do
if [[ -d ${po} ]] ; then
pushd ${po} > /dev/null || die
local lang