1 |
commit: 09d9cf4a9308e973e82ca03982a18e456ed37f60 |
2 |
Author: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Apr 2 04:17:18 2016 +0000 |
4 |
Commit: Devan Franchini <twitch153 <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Apr 2 19:37:00 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=09d9cf4a |
7 |
|
8 |
Adds LINGUAS support to ebuid, bug #561914 |
9 |
|
10 |
Package-Manager: portage-2.2.27 |
11 |
|
12 |
games-emulation/dolphin/dolphin-9999.ebuild | 16 +++++++++++++++- |
13 |
1 file changed, 15 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/games-emulation/dolphin/dolphin-9999.ebuild b/games-emulation/dolphin/dolphin-9999.ebuild |
16 |
index b12563f..981b451 100644 |
17 |
--- a/games-emulation/dolphin/dolphin-9999.ebuild |
18 |
+++ b/games-emulation/dolphin/dolphin-9999.ebuild |
19 |
@@ -4,9 +4,11 @@ |
20 |
|
21 |
EAPI=5 |
22 |
|
23 |
+PLOCALES="ar ca cs de el en es fa fr he hu it ja ko nb nl pl pt_BR pt ru sr sv tr zh_CN zh_TW" |
24 |
+PLOCALE_BACKUP="en" |
25 |
WX_GTK_VER="3.0" |
26 |
|
27 |
-inherit cmake-utils eutils pax-utils toolchain-funcs versionator wxwidgets games |
28 |
+inherit cmake-utils eutils l10n pax-utils toolchain-funcs versionator wxwidgets games |
29 |
|
30 |
if [[ ${PV} == 9999* ]] |
31 |
then |
32 |
@@ -130,6 +132,18 @@ src_prepare() { |
33 |
mv SOIL Externals || die |
34 |
mv gtest Externals || die |
35 |
mv xxhash Externals || die |
36 |
+ |
37 |
+ remove_locale() { |
38 |
+ # Ensure preservation of the backup locale when no valid LINGUA is set |
39 |
+ if [[ "${PLOCALE_BACKUP}" == "${1}" ]] && [[ "${PLOCALE_BACKUP}" == "$(l10n_get_locales)" ]]; then |
40 |
+ return |
41 |
+ else |
42 |
+ rm "Languages/po/${1}.po" || die |
43 |
+ fi |
44 |
+ } |
45 |
+ |
46 |
+ l10n_find_plocales_changes "Languages/po/" "" '.po' |
47 |
+ l10n_for_each_disabled_locale_do remove_locale |
48 |
} |
49 |
|
50 |
src_configure() { |