Browse Source

trinity-base/tde-i18n: port to modern l10n.eclass

master
Alexander Golubev 5 months ago
parent
commit
f994447b57
1 changed files with 17 additions and 18 deletions
  1. 17
    18
      trinity-base/tde-i18n/tde-i18n-9999.ebuild

+ 17
- 18
trinity-base/tde-i18n/tde-i18n-9999.ebuild View File

@@ -4,7 +4,7 @@
4 4
 EAPI="5"
5 5
 TRINITY_MODULE_NAME="tde-i18n"
6 6
 
7
-inherit trinity-base cmake-utils
7
+inherit trinity-base cmake-utils l10n
8 8
 
9 9
 set-trinityver
10 10
 
@@ -19,7 +19,7 @@ IUSE=""
19 19
 DEPEND=">=trinity-base/tdelibs-${PV}:${SLOT}"
20 20
 RDEPEND="${DEPEND}"
21 21
 
22
-LANGS="af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et
22
+PLOCALES="af ar az be bg bn br bs ca cs csb cy da de el en_GB eo es et
23 23
 eu fa fi fr fy ga gl he hi hr hu is it ja kk km ko lt lv mk mn ms
24 24
 nb nds nl nn pa pl pt pt_BR ro ru rw se sk sl sr sr@Latn ss sv ta te
25 25
 tg th tr uk uz uz@cyrillic vi wa zh_CN zh_TW"
@@ -28,34 +28,33 @@ for X in ${LANGS} ; do
28 28
 	IUSE="${IUSE} linguas_${X}"
29 29
 done
30 30
 
31
-do_foreach_linguas() {
31
+run_phase() {
32 32
 	local lang dir phase;
33
-
34 33
 	phase=$1
35
-
36
-	for lang in ${LINGUAS}; do
37
-		dir="tde-i18n-$lang"
38
-		pushd "$S/$dir"
39
-		CMAKE_USE_DIR="${S}/${dir}"
40
-		BUILD_DIR="${WORKDIR}/${dir}-build"
41
-		trinity-base_${phase}
42
-		popd
43
-	done
34
+	lang=$2
35
+
36
+	dir="tde-i18n-$lang"
37
+	pushd "$S/$dir" || die "No such dir: $dir"
38
+	CMAKE_USE_DIR="${S}/${dir}"
39
+	BUILD_DIR="${WORKDIR}/${dir}-build"
40
+	trinity-base_${phase}
41
+	popd
44 42
 }
45 43
 
46
-src_configure() {
47
-	do_foreach_linguas src_prepare
44
+src_prepare() {
45
+	l10n_find_plocales_changes "${S}" "${PN}-" ""
46
+	l10n_for_each_locale_do run_phase src_prepare
48 47
 }
49 48
 
50 49
 src_configure() {
51 50
 	mycmakeargs=( -DBUILD_ALL=ON )
52
-	do_foreach_linguas src_configure
51
+	l10n_for_each_locale_do run_phase src_configure
53 52
 }
54 53
 
55 54
 src_compile() {
56
-	do_foreach_linguas src_compile
55
+	l10n_for_each_locale_do run_phase src_compile
57 56
 }
58 57
 
59 58
 src_install() {
60
-	do_foreach_linguas src_install
59
+	l10n_for_each_locale_do run_phase src_install
61 60
 }

Loading…
Cancel
Save