Hallo,
as the LINGUAS Variable will be deprecated in the Future, i have the
vdr-plugin-2.eclass adapted to L10N handling.
Please review and comment...

<snipp>

Signed-off-by: Joerg Bornkessel <[email protected]> (2018/01/21)
--- vdr-plugin-2.eclass.orig    2017-02-28 20:50:50.000000000 +0100
+++ vdr-plugin-2.eclass 2018-01-21 19:06:12.000000000 +0100
@@ -284,26 +284,26 @@
    pofile_dir=( ${po_dir} ${po_subdir[*]} )
 }

-vdr_linguas_support() {
-#  Patching Makefile for linguas support.
-#  Only locales, enabled through the LINGUAS (make.conf) variable will be
+vdr_l10n_support() {
+#  Patching Makefile for L10N support.
+#  Only locales, enabled through the L10N (make.conf) variable will be
 #  compiled and installed.

-   einfo "Patching for Linguas support"
+   einfo "Patching for L10n support"
    einfo "available Languages for ${P} are:"

    vdr_detect_po_dir

    for f in ${pofile_dir[*]}; do
-       PLUGIN_LINGUAS=$( ls ${f}/po --ignore="*.pot" | sed -e
"s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
-       einfo "LINGUAS=\"${PLUGIN_LINGUAS}\""
+       PLUGIN_L10N=$( ls ${f}/po --ignore="*.pot" | sed -e "s:.po::g" |
cut -d_ -f1 | tr \\\012 ' ' )
+       einfo "L10N=\"${PLUGIN_L10N}\""

        sed -i ${f}/Makefile \
-           -e 's:\$(wildcard[[:space:]]*\$(PODIR)/\*.po):\$(foreach
dir,\$(LINGUAS),\$(wildcard \$(PODIR)\/\$(dir)\*.po)):' \
-           || die "sed failed for Linguas"
+           -e 's:\$(wildcard[[:space:]]*\$(PODIR)/\*.po):\$(foreach
dir,\$(L10N),\$(wildcard \$(PODIR)\/\$(dir)\*.po)):' \
+           || die "sed failed for L10N"
    done

-   strip-linguas ${PLUGIN_LINGUAS} en
+   strip-linguas ${PLUGIN_L10N} en
 }

 vdr_i18n() {
@@ -439,10 +439,10 @@
    while [ "$1" ]; do
        case "$1" in
        all)
-           vdr-plugin-2_src_util unpack add_local_patch patchmakefile
linguas_patch i18n
+           vdr-plugin-2_src_util unpack add_local_patch patchmakefile
l10n_patch i18n
            ;;
        prepare)
-           vdr-plugin-2_src_util add_local_patch patchmakefile
linguas_patch i18n
+           vdr-plugin-2_src_util add_local_patch patchmakefile
l10n_patch i18n
            ;;
        unpack)
            unpacker_src_unpack
@@ -462,8 +462,8 @@
        i18n)
            vdr_i18n
            ;;
-       linguas_patch)
-           vdr_linguas_support
+       l10n_patch)
+           vdr_l10n_support
            ;;
        esac

@@ -581,10 +581,10 @@
        einfo "Installing locales"
        cd "${TMP_LOCALE_DIR}" || die "could not change to TMP_LOCALE_DIR"

-       local linguas
-       for linguas in ${LINGUAS[*]}; do
+       local l10n
+       for l10n in ${L10N[*]}; do
        insinto "${LOCDIR}"
-       cp -r --parents ${linguas}* ${D}/${LOCDIR}
+       cp -r --parents ${l10n}* ${D}/${LOCDIR}
        done
    fi

</snapp>

Regards

Joerg

-- 
Joerg Bornkessel <[email protected]>
GnuPG Key: 0x93EB5F4DAA5832A1
Fingerprint: 0E0A A1EE 1DF4 41D7 A3F5  21C2 93EB 5F4D AA58 32A1
--- vdr-plugin-2.eclass.orig	2017-02-28 20:50:50.000000000 +0100
+++ vdr-plugin-2.eclass	2018-01-21 19:06:12.000000000 +0100
@@ -284,26 +284,26 @@
 	pofile_dir=( ${po_dir} ${po_subdir[*]} )
 }
 
-vdr_linguas_support() {
-#	Patching Makefile for linguas support.
-#	Only locales, enabled through the LINGUAS (make.conf) variable will be
+vdr_l10n_support() {
+#	Patching Makefile for L10N support.
+#	Only locales, enabled through the L10N (make.conf) variable will be
 #	compiled and installed.
 
-	einfo "Patching for Linguas support"
+	einfo "Patching for L10n support"
 	einfo "available Languages for ${P} are:"
 
 	vdr_detect_po_dir
 
 	for f in ${pofile_dir[*]}; do
-		PLUGIN_LINGUAS=$( ls ${f}/po --ignore="*.pot" | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
-		einfo "LINGUAS=\"${PLUGIN_LINGUAS}\""
+		PLUGIN_L10N=$( ls ${f}/po --ignore="*.pot" | sed -e "s:.po::g" | cut -d_ -f1 | tr \\\012 ' ' )
+		einfo "L10N=\"${PLUGIN_L10N}\""
 
 		sed -i ${f}/Makefile \
-			-e 's:\$(wildcard[[:space:]]*\$(PODIR)/\*.po):\$(foreach dir,\$(LINGUAS),\$(wildcard \$(PODIR)\/\$(dir)\*.po)):' \
-			|| die "sed failed for Linguas"
+			-e 's:\$(wildcard[[:space:]]*\$(PODIR)/\*.po):\$(foreach dir,\$(L10N),\$(wildcard \$(PODIR)\/\$(dir)\*.po)):' \
+			|| die "sed failed for L10N"
 	done
 
-	strip-linguas ${PLUGIN_LINGUAS} en
+	strip-linguas ${PLUGIN_L10N} en
 }
 
 vdr_i18n() {
@@ -439,10 +439,10 @@
 	while [ "$1" ]; do
 		case "$1" in
 		all)
-			vdr-plugin-2_src_util unpack add_local_patch patchmakefile linguas_patch i18n
+			vdr-plugin-2_src_util unpack add_local_patch patchmakefile l10n_patch i18n
 			;;
 		prepare)
-			vdr-plugin-2_src_util add_local_patch patchmakefile linguas_patch i18n
+			vdr-plugin-2_src_util add_local_patch patchmakefile l10n_patch i18n
 			;;
 		unpack)
 			unpacker_src_unpack
@@ -462,8 +462,8 @@
 		i18n)
 			vdr_i18n
 			;;
-		linguas_patch)
-			vdr_linguas_support
+		l10n_patch)
+			vdr_l10n_support
 			;;
 		esac
 
@@ -581,10 +581,10 @@
 		einfo "Installing locales"
 		cd "${TMP_LOCALE_DIR}" || die "could not change to TMP_LOCALE_DIR"
 
-		local linguas
-		for linguas in ${LINGUAS[*]}; do
+		local l10n
+		for l10n in ${L10N[*]}; do
 		insinto "${LOCDIR}"
-		cp -r --parents ${linguas}* ${D}/${LOCDIR}
+		cp -r --parents ${l10n}* ${D}/${LOCDIR}
 		done
 	fi
 

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to