diff options
author | Michał Górny <mgorny@gentoo.org> | 2016-07-02 14:45:35 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2016-07-03 18:08:35 +0200 |
commit | 30acc29edb868d0c68d6152bf29db1a63d685e49 (patch) | |
tree | b228d1c8de76cb184a96a2db49f34a9c869114e6 /kde-apps | |
parent | profiles/desc: Add l10n* flags for KDE4 (diff) | |
download | gentoo-30acc29edb868d0c68d6152bf29db1a63d685e49.tar.gz gentoo-30acc29edb868d0c68d6152bf29db1a63d685e49.tar.bz2 gentoo-30acc29edb868d0c68d6152bf29db1a63d685e49.zip |
kde-apps/kde4-l10n: Migrate to L10N
Diffstat (limited to 'kde-apps')
-rw-r--r-- | kde-apps/kde4-l10n/kde4-l10n-15.12.3-r1.ebuild | 20 | ||||
-rw-r--r-- | kde-apps/kde4-l10n/kde4-l10n-16.04.2.ebuild | 42 |
2 files changed, 29 insertions, 33 deletions
diff --git a/kde-apps/kde4-l10n/kde4-l10n-15.12.3-r1.ebuild b/kde-apps/kde4-l10n/kde4-l10n-15.12.3-r1.ebuild index a49561d26fdb..45a8a0c7a9bb 100644 --- a/kde-apps/kde4-l10n/kde4-l10n-15.12.3-r1.ebuild +++ b/kde-apps/kde4-l10n/kde4-l10n-15.12.3-r1.ebuild @@ -39,13 +39,13 @@ LURI_BASE="mirror://kde/stable/${LV}/src/${KMNAME}" 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}" @@ -53,12 +53,10 @@ 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 @@ -67,9 +65,9 @@ src_unpack() { 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}" @@ -97,7 +95,7 @@ src_prepare() { 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 diff --git a/kde-apps/kde4-l10n/kde4-l10n-16.04.2.ebuild b/kde-apps/kde4-l10n/kde4-l10n-16.04.2.ebuild index 959c6a23890e..b4a2e81e1808 100644 --- a/kde-apps/kde4-l10n/kde4-l10n-16.04.2.ebuild +++ b/kde-apps/kde4-l10n/kde4-l10n-16.04.2.ebuild @@ -34,18 +34,18 @@ MY_LANGS="ar ast bg bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga 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}" @@ -53,12 +53,10 @@ 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 @@ -78,27 +76,27 @@ src_prepare() { 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) @@ -115,9 +113,9 @@ EOF 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}" @@ -131,15 +129,15 @@ EOF -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}" @@ -151,12 +149,12 @@ EOF 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" |