summaryrefslogtreecommitdiff
path: root/eclass
diff options
context:
space:
mode:
Diffstat (limited to 'eclass')
-rw-r--r--eclass/ChangeLog3
-rw-r--r--eclass/cairo-dock.eclass19
2 files changed, 18 insertions, 4 deletions
diff --git a/eclass/ChangeLog b/eclass/ChangeLog
index d9ec826..45f4584 100644
--- a/eclass/ChangeLog
+++ b/eclass/ChangeLog
@@ -2,6 +2,9 @@
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
# $Header$
+ 24 May 2012; Dustin Polke <DuPol@gmx.de> cairo-dock.eclass:
+ Make localization support visible via linuas_ USE flags.
+
23 May 2012; Dustin Polke <DuPol@gmx.de> cairo-dock.eclass:
- Adapt to new upstream versioning scheme (only 3 digits now).
- Drop unneeded variables.
diff --git a/eclass/cairo-dock.eclass b/eclass/cairo-dock.eclass
index 17c6b40..f1acae0 100644
--- a/eclass/cairo-dock.eclass
+++ b/eclass/cairo-dock.eclass
@@ -60,6 +60,16 @@ SRC_URI="http://launchpad.net/cairo-dock-${CD_TYPE}/${CD_PV_MAJ_MIN}/${PV}/+down
S="${WORKDIR}"/${CD_P}
+# @ECLASS-VARIABLE: CD_LANGS
+# @DESCRIPTION:
+# Languages supported for localization. linguas_ will be added to IUSE.
+if [[ ! -z ${CD_LANGS} ]]; then
+ for _lang in ${CD_LANGS}; do
+ IUSE+=" linguas_${_lang}"
+ done
+ unset _lang
+fi
+
# @FUNCTION: cairo-dock_src_unpack
# @DESCRIPTION:
# For cairo-dock, run default_src_unpack.
@@ -69,7 +79,7 @@ S="${WORKDIR}"/${CD_P}
cairo-dock_src_unpack() {
if [ "${CD_TYPE}" == "plug-ins" ]; then
local target targets=( "${CDP_P}/cmake_modules" )
- [ "${PN}" == "cd-plugins-core" ] && \
+ [ ! -z "${CD_LANGS}" ] && \
targets+=( "${CDP_P}/po" )
for target in ${CD_PLUGINS[@]}; do
targets+=( "${CDP_P}/${target}" )
@@ -119,15 +129,16 @@ cairo-dock_src_prepare() {
fi
# localization
- if [ "${CD_TYPE}" == "core" -o "${PN}" == "cd-plugins-core" ]; then
+ if [[ ! -z ${CD_LANGS} ]]; then
if [[ -z ${LINGUAS} ]]; then
einfo "Installing localization for all languages"
else
strip-linguas -i po
einfo "Installing localization for the following languages: ${LINGUAS:=en}"
- for lang in ${LINGUAS}; do
- echo "\"${S}\"/po/${lang}.po" >> po/gentoo_linguas || die
+ for _lang in ${LINGUAS}; do
+ echo "\"${S}\"/po/${_lang}.po" >> po/gentoo_linguas || die
done
+ unset _lang
sed -e "s/^\(file (\)GLOB \(PO_FILES\).*$/\1STRINGS gentoo_linguas \2)/" \
-i po/CMakeLists.txt || die
fi