SRC_URI=""
for MY_LANG in ${LEGACY_LANGS} ; do
- IUSE="${IUSE} linguas_${MY_LANG}"
- SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${LURI_BASE}/${KMNAME}-${MY_LANG}-${LV}.tar.xz )"
+ IUSE="${IUSE} l10n_${MY_LANG/[@_]/-}"
+ SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${LURI_BASE}/${KMNAME}-${MY_LANG}-${LV}.tar.xz )"
done
for MY_LANG in ${MY_LANGS} ; do
- IUSE="${IUSE} linguas_${MY_LANG}"
- SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${URI_BASE}/${KMNAME}-${MY_LANG}-${PV}.tar.xz )"
+ IUSE="${IUSE} l10n_${MY_LANG/[@_]/-}"
+ SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${URI_BASE}/${KMNAME}-${MY_LANG}-${PV}.tar.xz )"
done
S="${WORKDIR}"
src_unpack() {
if [[ -z ${A} ]]; then
elog
- elog "You either have the LINGUAS variable unset, or it only"
- elog "contains languages not supported by ${P}."
- elog "You won't have any additional language support."
+ elog "None of the requested L10N are supported by ${P}."
elog
elog "${P} supports these language codes:"
- elog "${MY_LANGS}"
+ elog "${MY_LANGS//[@_]/-}"
elog
fi
src_prepare() {
local LNG DIR LDIR SDIR
- # add all linguas to cmake
+ # add all l10n to cmake
if [[ -n ${A} ]]; then
- for LNG in ${LINGUAS}; do
+ for LNG in ${MY_LANGS} ; do
DIR="${KMNAME}-${LNG}-${PV}"
LDIR="${KMNAME}-${LNG}-${LV}"
SDIR="${S}/${DIR}/4/${LNG}"
einfo " messages..."
for path in $(grep -v "^#" "${REMOVE_MSGS}") ; do
rm -f "${SDIR}"/messages/${path}
- # Quirk for LINGUAS=sr variants
+ # Quirk for L10N=sr variants
if [[ ${LNG} = "sr" ]] ; then
rm -f "${SDIR}"/${LNG}\@*/messages/${path} || die
fi
gl he hi hr hu ia id is it ja kk km ko lt lv mr nb nds nl nn pa pl pt pt_BR ro
ru sk sl sr sv tr ug uk wa zh_CN zh_TW"
-IUSE="+minimal test $(printf 'linguas_%s ' ${MY_LANGS})"
+IUSE="+minimal test $(printf 'l10n_%s ' ${MY_LANGS//[@_]/-})"
URI_BASE="${SRC_URI/-${PV}.tar.xz/}"
LURI_BASE="mirror://kde/stable/${LV}/src/${KMNAME}"
SRC_URI=""
for MY_LANG in ${LEGACY_LANGS} ; do
- SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${LURI_BASE}/${KMNAME}-${MY_LANG}-${LV}.tar.xz )"
+ SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${LURI_BASE}/${KMNAME}-${MY_LANG}-${LV}.tar.xz )"
done
for MY_LANG in ${MY_LANGS} ; do
- SRC_URI="${SRC_URI} linguas_${MY_LANG}? ( ${URI_BASE}/${KMNAME}-${MY_LANG}-${PV}.tar.xz )"
+ SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${URI_BASE}/${KMNAME}-${MY_LANG}-${PV}.tar.xz )"
done
S="${WORKDIR}"
pkg_setup() {
if [[ -z ${A} ]]; then
elog
- elog "You either have the LINGUAS variable unset, or it only"
- elog "contains languages not supported by ${P}."
- elog "You won't have any additional language support."
+ elog "None of the requested L10N are supported by ${P}."
elog
elog "${P} supports these language codes:"
- elog "${MY_LANGS}"
+ elog "${MY_LANGS//[@_]/-}"
elog
fi
[[ -n ${A} ]] && kde4-base_pkg_setup
default
[[ -n ${A} ]] || return
- # LINGUAS=sr variants are subdirs within sr/ ...
+ # L10N=sr variants are subdirs within sr/ ...
if use minimal && [[ -d "${KMNAME}-sr-${PV}" ]] ; then
for variant in "${KMNAME}"-sr-${PV}/4/sr/sr@*; do
mkdir -p "${KMNAME}-${variant##*/}-${PV}/4" ||
- die "Failed to create LINGUAS=${variant##*/} subdir"
+ die "Failed to create L10N=${variant##*/} subdir"
mv ${variant} "${KMNAME}-${variant##*/}-${PV}/4/${variant##*/}" ||
- die "Failed to move LINGUAS=${variant##*/}"
+ die "Failed to move L10N=${variant##*/}"
cp -f "${KMNAME}-sr-${PV}"/CMakeLists.txt "${KMNAME}-${variant##*/}-${PV}" ||
- die "Failed to prepare LINGUAS=${variant##*/} subdir"
+ die "Failed to prepare L10N=${variant##*/} subdir"
echo "add_subdirectory(${variant##*/})" > "${KMNAME}-${variant##*/}-${PV}"/4/CMakeLists.txt ||
- die "Failed to prepare LINGUAS=${variant##*/} subdir"
+ die "Failed to prepare L10N=${variant##*/} subdir"
cp -f "${KMNAME}-sr-${PV}"/4/sr/CMakeLists.txt "${KMNAME}-${variant##*/}-${PV}"/4/${variant##*/} ||
- die "Failed to prepare LINGUAS=${variant##*/} subdir"
+ die "Failed to prepare L10N=${variant##*/} subdir"
sed -e "/^macro.*sr/d" \
-e "s/sr/${variant##*/}/" \
-i "${KMNAME}-${variant##*/}-${PV}"/4/${variant##*/}/CMakeLists.txt ||
- die "Failed to prepare LINGUAS=${variant##*/} subdir"
+ die "Failed to prepare L10N=${variant##*/} subdir"
done
fi
- # add all linguas to cmake
+ # add all l10n to cmake
cat <<-EOF > CMakeLists.txt || die
project(kde4-l10n)
cmake_minimum_required(VERSION 2.8.12)
einfo "Directories..."
while read path; do
- if use test ; then # build a report w/ LINGUAS="*" to submit @upstream
+ if use test ; then # build a report w/ L10N="*" to submit @upstream
local lngs
- for lng in ${LINGUAS}; do
+ for lng in ${MY_LANGS}; do
SDIR="${S}/${KMNAME}-${lng}-${PV}/4/${lng}"
if [[ -d "${SDIR}"/${path%\ *}/${path#*\ } ]] ; then
lngs+=" ${lng}"
-i ./*/4/*/${path%\ *}/CMakeLists.txt || \
die "Failed to comment out ${path}"
else
- einfo "F: ${path}" # run with LINGUAS="*" to cut down list
+ einfo "F: ${path}" # run with L10N="*" to cut down list
fi
done < <(grep -ve "^$\|^\s*\#" "${REMOVE_DIRS}")
einfo
einfo "Messages..."
while read path; do
- if use test ; then # build a report w/ LINGUAS="*" to submit @upstream
+ if use test ; then # build a report w/ L10N="*" to submit @upstream
local lngs
- for lng in ${LINGUAS}; do
+ for lng in ${MY_LANGS}; do
SDIR="${S}/${KMNAME}-${lng}-${PV}/4/${lng}"
if [[ -e "${SDIR}"/messages/${path} ]] ; then
lngs+=" ${lng}"
if ls -U ./*/4/*/messages/${path} > /dev/null 2>&1; then
rm ./*/4/*/messages/${path} || die "Failed to remove ${path}"
else
- einfo "F: ${path}" # run with LINGUAS="*" to cut down list
+ einfo "F: ${path}" # run with L10N="*" to cut down list
fi
done < <(grep -ve "^$\|^\s*\#" "${REMOVE_MSGS}")
else
local LNG LDIR
- for LNG in ${LINGUAS}; do
+ for LNG in ${LEGACY_LANGS}; do
LDIR="${KMNAME}-${LNG}-${LV}"
if [[ -d "${KMNAME}-${LNG}-${PV}" && -d "${LDIR}" ]] ; then
einfo "${LNG}: Adding legacy localisation"