1 |
commit: 661e1ffe79b209b435ad344e1535d91aa60bb4ba |
2 |
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sun Dec 31 20:23:47 2017 +0000 |
4 |
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Dec 31 20:23:47 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=661e1ffe |
7 |
|
8 |
kde5.eclass: Add KDE_PO_DIRS |
9 |
|
10 |
eclass/kde5.eclass | 19 ++++++++++++------- |
11 |
1 file changed, 12 insertions(+), 7 deletions(-) |
12 |
|
13 |
diff --git a/eclass/kde5.eclass b/eclass/kde5.eclass |
14 |
index 826e0abf10..adce61555e 100644 |
15 |
--- a/eclass/kde5.eclass |
16 |
+++ b/eclass/kde5.eclass |
17 |
@@ -95,6 +95,11 @@ EXPORT_FUNCTIONS pkg_setup pkg_nofetch src_unpack src_prepare src_configure src_ |
18 |
# Specifies the location of the KDE handbook if not the default. |
19 |
: ${KDE_DOC_DIR:=doc} |
20 |
|
21 |
+# @ECLASS-VARIABLE: KDE_PO_DIRS |
22 |
+# @DESCRIPTION: |
23 |
+# Specifies the possible locations of KDE l10n files if not the default. |
24 |
+: ${KDE_PO_DIRS:="po poqm"} |
25 |
+ |
26 |
# @ECLASS-VARIABLE: KDE_QTHELP |
27 |
# @DESCRIPTION: |
28 |
# If set to "false", do nothing. |
29 |
@@ -523,18 +528,18 @@ kde5_src_prepare() { |
30 |
|
31 |
# drop translations when nls is not wanted |
32 |
if in_iuse nls && ! use nls ; then |
33 |
- if [[ -d po ]] ; then |
34 |
- rm -r po || die |
35 |
- fi |
36 |
- if [[ -d poqm ]] ; then |
37 |
- rm -r poqm || die |
38 |
- fi |
39 |
+ local po |
40 |
+ for po in ${KDE_PO_DIRS}; do |
41 |
+ if [[ -d ${po} ]] ; then |
42 |
+ rm -r ${po} || die |
43 |
+ fi |
44 |
+ done |
45 |
fi |
46 |
|
47 |
# enable only the requested translations when required |
48 |
if [[ -v LINGUAS ]] ; then |
49 |
local po |
50 |
- for po in po poqm; do |
51 |
+ for po in ${KDE_PO_DIRS}; do |
52 |
if [[ -d ${po} ]] ; then |
53 |
pushd ${po} > /dev/null || die |
54 |
local lang |