commit:     efd6e1cf1dfaacb2bdab06131f56ea09f103182e
Author:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 18 18:02:11 2024 +0000
Commit:     Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Fri Nov 15 21:02:39 2024 +0000
URL:        https://gitweb.gentoo.org/proj/kde.git/commit/?id=efd6e1cf

ecm.eclass: Switch ECM_PO_DIRS to being an array

Zero current use in ::kde or ::gentoo and highly unlikely anywhere else,
so I think we can get away with it.

Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>

 eclass/ecm.eclass | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)

diff --git a/eclass/ecm.eclass b/eclass/ecm.eclass
index 44b09ba8ed..3abf9e88a3 100644
--- a/eclass/ecm.eclass
+++ b/eclass/ecm.eclass
@@ -104,11 +104,17 @@ fi
 : "${ECM_HANDBOOK_DIR:=doc}"
 
 # @ECLASS_VARIABLE: ECM_PO_DIRS
+# @PRE_INHERIT
 # @DESCRIPTION:
 # Specifies directories of l10n files relative to ${S} to be processed by
 # KF${_KFSLOT}I18n (ki18n_install). If IUSE nls exists and is disabled then
 # disable build of these directories in CMakeLists.txt.
-: "${ECM_PO_DIRS:="po poqm"}"
+if [[ ${ECM_PO_DIRS} ]]; then
+       [[ ${ECM_PO_DIRS@a} == *a* ]] ||
+               die "ECM_PO_DIRS must be an array"
+else
+       ECM_PO_DIRS=( po poqm )
+fi
 
 # @ECLASS_VARIABLE: ECM_QTHELP
 # @DEFAULT_UNSET
@@ -338,7 +344,7 @@ _ecm_strip_handbook_translations() {
        fi
 
        local lang po
-       for po in ${ECM_PO_DIRS}; do
+       for po in ${ECM_PO_DIRS[*]}; do
                if [[ -d ${po} ]] ; then
                        pushd ${po} > /dev/null || die
                        for lang in *; do

Reply via email to