1 |
commit: 539a80042ba35bc8f79f7434a261ad987404795e |
2 |
Author: Andreas Sturmlechner <andreas.sturmlechner <AT> gmail <DOT> com> |
3 |
AuthorDate: Thu Jul 7 20:43:33 2016 +0000 |
4 |
Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Jul 8 17:29:34 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/kde.git/commit/?id=539a8004 |
7 |
|
8 |
kde-apps/kde4-l10n: Make USE=minimal a no-op |
9 |
|
10 |
Package-Manager: portage-2.2.28 |
11 |
|
12 |
kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild | 140 ++++++++++------------------ |
13 |
1 file changed, 48 insertions(+), 92 deletions(-) |
14 |
|
15 |
diff --git a/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild b/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild |
16 |
index 29ff762..57b27d6 100644 |
17 |
--- a/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild |
18 |
+++ b/kde-apps/kde4-l10n/kde4-l10n-16.04.3.ebuild |
19 |
@@ -17,33 +17,24 @@ DEPEND=" |
20 |
sys-devel/gettext |
21 |
" |
22 |
RDEPEND=" |
23 |
- !minimal? ( !kde-apps/kde-l10n ) |
24 |
- minimal? ( >=kde-apps/kde-l10n-${PV} ) |
25 |
+ >=kde-apps/kde-l10n-${PV} |
26 |
" |
27 |
|
28 |
REMOVE_DIRS="${FILESDIR}/${PN}-16.04.1-remove-dirs" |
29 |
REMOVE_MSGS="${FILESDIR}/${PN}-16.03.91-remove-messages" |
30 |
|
31 |
-LV="4.14.3" |
32 |
-LEGACY_LANGS="ar bg bs ca ca@valencia cs da de el en_GB es et eu fa fi fr ga gl |
33 |
-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 |
34 |
-sk sl sr sv tr ug uk wa zh_CN zh_TW" |
35 |
- |
36 |
# /usr/portage/distfiles $ ls -1 kde-l10n-*-${PV}.* |sed -e 's:-${PV}.tar.xz::' -e 's:kde-l10n-::' |tr '\n' ' ' |
37 |
MY_LANGS="ar ast bg bs ca ca@valencia cs da de el en_GB eo es et eu fa fi fr ga |
38 |
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 |
39 |
ru sk sl sr sv tr ug uk wa zh_CN zh_TW" |
40 |
|
41 |
+# TODO: Drop no-op +minimal in 16.08.x - necessary kde5.eclass change happened after KF-5.23/Plasma-5.6.5 |
42 |
IUSE="+minimal test $(printf 'l10n_%s ' ${MY_LANGS//[@_]/-})" |
43 |
|
44 |
URI_BASE="${SRC_URI/-${PV}.tar.xz/}" |
45 |
LURI_BASE="mirror://kde/stable/${LV}/src/${KMNAME}" |
46 |
SRC_URI="" |
47 |
|
48 |
-for MY_LANG in ${LEGACY_LANGS} ; do |
49 |
- SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${LURI_BASE}/${KMNAME}-${MY_LANG}-${LV}.tar.xz )" |
50 |
-done |
51 |
- |
52 |
for MY_LANG in ${MY_LANGS} ; do |
53 |
SRC_URI="${SRC_URI} l10n_${MY_LANG/[@_]/-}? ( ${URI_BASE}/${KMNAME}-${MY_LANG}-${PV}.tar.xz )" |
54 |
done |
55 |
@@ -64,10 +55,8 @@ pkg_setup() { |
56 |
|
57 |
src_unpack() { |
58 |
for my_tar in ${A}; do |
59 |
- [[ ${my_tar} = *${PV}* ]] && local subdir="/4" |
60 |
- use minimal && [[ ${my_tar} = *${LV}* ]] && continue |
61 |
tar -xpf "${DISTDIR}/${my_tar}" --xz \ |
62 |
- "${my_tar/.tar.xz/}/CMakeLists.txt" "${my_tar/.tar.xz/}${subdir}" 2> /dev/null || |
63 |
+ "${my_tar/.tar.xz/}/CMakeLists.txt" "${my_tar/.tar.xz/}/4" 2> /dev/null || |
64 |
elog "${my_tar}: tar extract command failed at least partially - continuing" |
65 |
done |
66 |
} |
67 |
@@ -77,7 +66,7 @@ src_prepare() { |
68 |
[[ -n ${A} ]] || return |
69 |
|
70 |
# L10N=sr variants are subdirs within sr/ ... |
71 |
- if use minimal && [[ -d "${KMNAME}-sr-${PV}" ]] ; then |
72 |
+ if [[ -d "${KMNAME}-sr-${PV}" ]] ; then |
73 |
for variant in "${KMNAME}"-sr-${PV}/4/sr/sr@*; do |
74 |
mkdir -p "${KMNAME}-${variant##*/}-${PV}/4" || |
75 |
die "Failed to create L10N=${variant##*/} subdir" |
76 |
@@ -107,83 +96,50 @@ EOF |
77 |
find -maxdepth 2 -type f -name CMakeLists.txt -exec \ |
78 |
sed -i -e "/add_subdirectory(5)/ s/^/#DONT/" {} + || die |
79 |
|
80 |
- if use minimal; then |
81 |
- einfo "Removing file collisions with Plasma 5 and Applications" |
82 |
- use test && einfo "Tests enabled: Listing LINGUAS causing file collisions" |
83 |
- |
84 |
- einfo "Directories..." |
85 |
- while read path; do |
86 |
- if use test ; then # build a report w/ L10N="*" to submit @upstream |
87 |
- local lngs |
88 |
- for lng in ${MY_LANGS}; do |
89 |
- SDIR="${S}/${KMNAME}-${lng}-${PV}/4/${lng}" |
90 |
- if [[ -d "${SDIR}"/${path%\ *}/${path#*\ } ]] ; then |
91 |
- lngs+=" ${lng}" |
92 |
- fi |
93 |
- done |
94 |
- [[ -n "${lngs}" ]] && einfo "${path%\ *}/${path#*\ }${lngs}" |
95 |
- unset lngs |
96 |
- fi |
97 |
- if ls -U ./*/4/*/${path%\ *}/${path#*\ } > /dev/null 2>&1; then |
98 |
- sed -e "\:add_subdirectory(\s*${path#*\ }\s*): s:^:#:" \ |
99 |
- -i ./*/4/*/${path%\ *}/CMakeLists.txt || \ |
100 |
- die "Failed to comment out ${path}" |
101 |
- else |
102 |
- einfo "F: ${path}" # run with L10N="*" to cut down list |
103 |
- fi |
104 |
- done < <(grep -ve "^$\|^\s*\#" "${REMOVE_DIRS}") |
105 |
- einfo |
106 |
- einfo "Messages..." |
107 |
- while read path; do |
108 |
- if use test ; then # build a report w/ L10N="*" to submit @upstream |
109 |
- local lngs |
110 |
- for lng in ${MY_LANGS}; do |
111 |
- SDIR="${S}/${KMNAME}-${lng}-${PV}/4/${lng}" |
112 |
- if [[ -e "${SDIR}"/messages/${path} ]] ; then |
113 |
- lngs+=" ${lng}" |
114 |
- fi |
115 |
- done |
116 |
- [[ -n "${lngs}" ]] && einfo "${path}${lngs}" |
117 |
- unset lngs |
118 |
- fi |
119 |
- if ls -U ./*/4/*/messages/${path} > /dev/null 2>&1; then |
120 |
- rm ./*/4/*/messages/${path} || die "Failed to remove ${path}" |
121 |
- else |
122 |
- einfo "F: ${path}" # run with L10N="*" to cut down list |
123 |
- fi |
124 |
- done < <(grep -ve "^$\|^\s*\#" "${REMOVE_MSGS}") |
125 |
- else |
126 |
- local LNG LDIR |
127 |
- for LNG in ${LEGACY_LANGS}; do |
128 |
- LDIR="${KMNAME}-${LNG}-${LV}" |
129 |
- if [[ -d "${KMNAME}-${LNG}-${PV}" && -d "${LDIR}" ]] ; then |
130 |
- einfo "${LNG}: Adding legacy localisation" |
131 |
- local dest_path |
132 |
- # Step through directories alphabetically first |
133 |
- for path in $(ls -R "${LDIR}" | grep ":$" | sed -e 's/:$//') ; do |
134 |
- dest_path="${path/${LV}/${PV}/4/${LNG}}" |
135 |
- if [[ ! -d "${dest_path}" ]] ; then |
136 |
- einfo " $(basename ${dest_path}) subdirectory"\ |
137 |
- "added to $(basename $(dirname ${dest_path}))" |
138 |
- mkdir "${dest_path}" || die "Failed creating ${dest_path}" |
139 |
- echo "add_subdirectory($(basename ${dest_path}))" >> \ |
140 |
- $(dirname "${dest_path}")/CMakeLists.txt |
141 |
- fi |
142 |
- done |
143 |
- einfo " merging legacy localisation..." |
144 |
- for path in $(find "${LDIR}" -type f) ; do |
145 |
- dest_path="${path/${LV}/${PV}/4/${LNG}}" |
146 |
- cp -rn "${path}" "${dest_path}" || die "Failed copying ${path}" |
147 |
- done |
148 |
- # Disable kdepim |
149 |
- for path in kdepim kdepimlibs kdepim-runtime ; do |
150 |
- find "${S}/${KMNAME}-${LNG}-${PV}/4/${LNG}" -name CMakeLists.txt -type f -exec \ |
151 |
- sed -i -e "s:^ *add_subdirectory( *${path} *):# no ${path}:g" {} + |
152 |
- done |
153 |
- rm -rf "${LDIR}" |
154 |
- fi |
155 |
- done |
156 |
- fi |
157 |
+ einfo "Removing file collisions with Plasma 5 and Applications" |
158 |
+ use test && einfo "Tests enabled: Listing LINGUAS causing file collisions" |
159 |
+ |
160 |
+ einfo "Directories..." |
161 |
+ while read path; do |
162 |
+ if use test ; then # build a report w/ L10N="*" to submit @upstream |
163 |
+ local lngs |
164 |
+ for lng in ${MY_LANGS}; do |
165 |
+ SDIR="${S}/${KMNAME}-${lng}-${PV}/4/${lng}" |
166 |
+ if [[ -d "${SDIR}"/${path%\ *}/${path#*\ } ]] ; then |
167 |
+ lngs+=" ${lng}" |
168 |
+ fi |
169 |
+ done |
170 |
+ [[ -n "${lngs}" ]] && einfo "${path%\ *}/${path#*\ }${lngs}" |
171 |
+ unset lngs |
172 |
+ fi |
173 |
+ if ls -U ./*/4/*/${path%\ *}/${path#*\ } > /dev/null 2>&1; then |
174 |
+ sed -e "\:add_subdirectory(\s*${path#*\ }\s*): s:^:#:" \ |
175 |
+ -i ./*/4/*/${path%\ *}/CMakeLists.txt || \ |
176 |
+ die "Failed to comment out ${path}" |
177 |
+ else |
178 |
+ einfo "F: ${path}" # run with L10N="*" to cut down list |
179 |
+ fi |
180 |
+ done < <(grep -ve "^$\|^\s*\#" "${REMOVE_DIRS}") |
181 |
+ einfo |
182 |
+ einfo "Messages..." |
183 |
+ while read path; do |
184 |
+ if use test ; then # build a report w/ L10N="*" to submit @upstream |
185 |
+ local lngs |
186 |
+ for lng in ${MY_LANGS}; do |
187 |
+ SDIR="${S}/${KMNAME}-${lng}-${PV}/4/${lng}" |
188 |
+ if [[ -e "${SDIR}"/messages/${path} ]] ; then |
189 |
+ lngs+=" ${lng}" |
190 |
+ fi |
191 |
+ done |
192 |
+ [[ -n "${lngs}" ]] && einfo "${path}${lngs}" |
193 |
+ unset lngs |
194 |
+ fi |
195 |
+ if ls -U ./*/4/*/messages/${path} > /dev/null 2>&1; then |
196 |
+ rm ./*/4/*/messages/${path} || die "Failed to remove ${path}" |
197 |
+ else |
198 |
+ einfo "F: ${path}" # run with L10N="*" to cut down list |
199 |
+ fi |
200 |
+ done < <(grep -ve "^$\|^\s*\#" "${REMOVE_MSGS}") |
201 |
} |
202 |
|
203 |
src_configure() { |