Skip to content

Commit

Permalink
kde5.eclass: Add KDE_PO_DIRS
Browse files Browse the repository at this point in the history
  • Loading branch information
a17r committed Jan 13, 2018
1 parent b9addb0 commit 03b3cd4
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions eclass/kde5.eclass
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright 1999-2017 Gentoo Foundation
# Copyright 1999-2018 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2

# @ECLASS: kde5.eclass
Expand Down Expand Up @@ -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.
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 03b3cd4

Please sign in to comment.