1 |
commit: 6643fcde974dbbba16ee34ebaaeff64b24e8b7eb |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Sat Sep 24 23:06:03 2016 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Sun Sep 25 17:44:40 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6643fcde |
7 |
|
8 |
app-office/calligra-l10n: Add CALLIGRA_FEATURES, EAPI 6 |
9 |
|
10 |
This enables e.g. krita to block calligra-l10n[calligra_features_krita] |
11 |
for avoiding file collisions. Mostly copied from existing *-l10n ebuilds. |
12 |
|
13 |
Gentoo-bug: 594772 |
14 |
|
15 |
Package-Manager: portage-2.3.0 |
16 |
|
17 |
.../calligra-l10n/calligra-l10n-2.9.11-r1.ebuild | 107 +++++++++++++++++++++ |
18 |
1 file changed, 107 insertions(+) |
19 |
|
20 |
diff --git a/app-office/calligra-l10n/calligra-l10n-2.9.11-r1.ebuild b/app-office/calligra-l10n/calligra-l10n-2.9.11-r1.ebuild |
21 |
new file mode 100644 |
22 |
index 00000000..5a17708 |
23 |
--- /dev/null |
24 |
+++ b/app-office/calligra-l10n/calligra-l10n-2.9.11-r1.ebuild |
25 |
@@ -0,0 +1,107 @@ |
26 |
+# Copyright 1999-2016 Gentoo Foundation |
27 |
+# Distributed under the terms of the GNU General Public License v2 |
28 |
+# $Id$ |
29 |
+ |
30 |
+EAPI=6 |
31 |
+ |
32 |
+inherit kde4-base |
33 |
+ |
34 |
+DESCRIPTION="Calligra localization package" |
35 |
+HOMEPAGE="https://www.kde.org/" |
36 |
+LICENSE="GPL-2" |
37 |
+SLOT="4" |
38 |
+ |
39 |
+KEYWORDS="~amd64 ~arm ~x86" |
40 |
+IUSE="doc" |
41 |
+ |
42 |
+DEPEND="sys-devel/gettext" |
43 |
+RDEPEND="!app-office/koffice-l10n" |
44 |
+ |
45 |
+CAL_FTS="braindump flow karbon kexi krita plan sheets stage words" |
46 |
+for cal_ft in ${CAL_FTS}; do |
47 |
+ IUSE+=" calligra_features_${cal_ft}" |
48 |
+done |
49 |
+unset cal_ft |
50 |
+ |
51 |
+MY_LANGS="bs ca ca@valencia cs da de el en_GB es et fi fr gl hu it ja kk nb nl |
52 |
+pl pt pt_BR ru sk sv tr uk zh_CN zh_TW" |
53 |
+ |
54 |
+case ${PV} in |
55 |
+ 2.[456789].[789]?) |
56 |
+ # beta or rc releases |
57 |
+ URI_BASE="mirror://kde/unstable/${PN/-l10n/}-${PV}/${PN}" ;; |
58 |
+ 2.[456789].?|2.[456789].??) |
59 |
+ # stable releases |
60 |
+ URI_BASE="mirror://kde/stable/${PN/-l10n/}-${PV}/${PN}" ;; |
61 |
+ *) |
62 |
+ SRC_URI="" ;; |
63 |
+esac |
64 |
+ |
65 |
+SRC_URI="" |
66 |
+ |
67 |
+for MY_LANG in ${MY_LANGS} ; do |
68 |
+ IUSE="${IUSE} l10n_${MY_LANG/[@_]/-}" |
69 |
+ SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${URI_BASE}/${PN}-${MY_LANG}-${PV}.tar.xz )" |
70 |
+done |
71 |
+unset MY_LANG |
72 |
+ |
73 |
+S="${WORKDIR}" |
74 |
+ |
75 |
+pkg_setup() { |
76 |
+ if [[ -z ${A} ]]; then |
77 |
+ elog |
78 |
+ elog "None of the requested L10N are supported by ${P}." |
79 |
+ elog |
80 |
+ elog "${P} supports these language codes:" |
81 |
+ elog "${MY_LANGS//[@_]/-}" |
82 |
+ elog |
83 |
+ fi |
84 |
+} |
85 |
+ |
86 |
+src_unpack() { |
87 |
+ [[ -n ${A} ]] && unpack ${A} |
88 |
+} |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ cat <<-EOF > CMakeLists.txt || die |
92 |
+project(${PN}) |
93 |
+$(printf "add_subdirectory( %s )\n" \ |
94 |
+ `find . -mindepth 1 -maxdepth 1 -type d | sed -e "s:^\./::"`) |
95 |
+EOF |
96 |
+ |
97 |
+ local cal_ft |
98 |
+ for cal_ft in ${CAL_FTS}; do |
99 |
+ if ! use calligra_features_${cal_ft} ; then |
100 |
+ if ls -U ./*/messages/calligra/${cal_ft}*po > /dev/null 2>&1; then |
101 |
+ rm ./*/messages/calligra/${cal_ft}*po || \ |
102 |
+ die "Failed to remove ${cal_ft} messages" |
103 |
+ fi |
104 |
+ if ls -U ./*/docs/calligra/${cal_ft} > /dev/null 2>&1; then |
105 |
+ sed -e "\:add_subdirectory(\s*${cal_ft}\s*): s:^:#:" \ |
106 |
+ -i ./*/docs/calligra/CMakeLists.txt || \ |
107 |
+ die "Failed to comment out ${cal_ft} docs" |
108 |
+ fi |
109 |
+ fi |
110 |
+ done |
111 |
+ |
112 |
+ kde4-base_src_prepare |
113 |
+} |
114 |
+ |
115 |
+src_configure() { |
116 |
+ local mycmakeargs=( |
117 |
+ -DBUILD_DATA=ON |
118 |
+ -DBUILD_DOC=$(usex doc) |
119 |
+ -DBUILD_MESSAGES=ON |
120 |
+ ) |
121 |
+ [[ -n ${A} ]] && kde4-base_src_configure |
122 |
+} |
123 |
+ |
124 |
+src_compile() { |
125 |
+ [[ -n ${A} ]] && kde4-base_src_compile |
126 |
+} |
127 |
+ |
128 |
+src_test() { :; } |
129 |
+ |
130 |
+src_install() { |
131 |
+ [[ -n ${A} ]] && kde4-base_src_install |
132 |
+} |