Gentoo Archives: gentoo-commits

From: Nirbheek Chauhan <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: mail-client/thunderbird/, www-client/firefox/, www-client/firefox-bin/, eclass/, ...
Date: Tue, 03 Jan 2012 07:24:44
Message-Id: 5b1898fe2b1bdd09258a9d2d8056b28f8f3ee0a0.nirbheek@gentoo
1 commit: 5b1898fe2b1bdd09258a9d2d8056b28f8f3ee0a0
2 Author: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jan 3 07:20:49 2012 +0000
4 Commit: Nirbheek Chauhan <nirbheek <AT> gentoo <DOT> org>
5 CommitDate: Tue Jan 3 07:20:49 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=5b1898fe
7
8 Add mozlinguas.eclass, and port firefox + thunderbird to it
9
10 * Binary ebuilds were ported as well
11 * Will port seamonkey later, since its needs seem to be very specific
12 * After porting, I need to post it to gentoo-dev for comments
13
14 ---
15 eclass/mozlinguas.eclass | 112 ++++++++++++++++++++
16 mail-client/thunderbird-bin/Manifest | 3 +-
17 .../thunderbird-bin/thunderbird-bin-9.0.1.ebuild | 83 ++++-----------
18 mail-client/thunderbird/Manifest | 2 +-
19 mail-client/thunderbird/thunderbird-8.0-r2.ebuild | 91 ++++------------
20 www-client/firefox-bin/Manifest | 3 +-
21 www-client/firefox-bin/firefox-bin-9.0.ebuild | 97 ++++-------------
22 www-client/firefox/Manifest | 2 +-
23 www-client/firefox/firefox-9.0.ebuild | 103 +++++-------------
24 9 files changed, 208 insertions(+), 288 deletions(-)
25
26 diff --git a/eclass/mozlinguas.eclass b/eclass/mozlinguas.eclass
27 new file mode 100644
28 index 0000000..b6ece9b
29 --- /dev/null
30 +++ b/eclass/mozlinguas.eclass
31 @@ -0,0 +1,112 @@
32 +# Copyright 1999-2012 Gentoo Foundation
33 +# Distributed under the terms of the GNU General Public License v2
34 +# $Header: $
35 +
36 +# @ECLASS: mozlinguas.eclass
37 +# @MAINTAINER: mozilla@g.o
38 +# @AUTHOR: Nirbheek Chauhan <nirbheek@g.o>
39 +# @BLURB: Handle language packs for mozilla products
40 +# @DESCRIPTION:
41 +# Sets IUSE according to LANGS (language packs available). Also exports
42 +# src_unpack and src_install for use in ebuilds.
43 +
44 +inherit mozextension
45 +
46 +case "${EAPI:-0}" in
47 + 0|1)
48 + die "EAPI ${EAPI:-0} does not support the '->' SRC_URI operator";;
49 + 2|3|4)
50 + EXPORT_FUNCTIONS src_unpack src_install;;
51 + *)
52 + die "EAPI ${EAPI} is not supported, contact eclass maintainers";;
53 +esac
54 +
55 +# @ECLASS-VARIABLE: LANGS
56 +# @DEFAULT-UNSET
57 +# @DESCRIPTION: Array containing the list of language pack xpis available for
58 +# this release. The list can be updated with scripts/get_langs.sh from the
59 +# mozilla overlay.
60 +: ${LANGS:=""}
61 +
62 +# @ECLASS-VARIABLE: FTP_URI
63 +# @DEFAULT-UNSET
64 +# @DESCRIPTION: The ftp URI prefix for the release tarballs and language packs.
65 +: ${FTP_URI:=""}
66 +
67 +# @ECLASS-VARIABLE: MOZ_PV
68 +# @DESCRIPTION: Ebuild package version converted to equivalent upstream version.
69 +# Defaults to ${PV}, and should be overridden for alphas, betas, and RCs
70 +: ${MOZ_PV:="${PV}"}
71 +
72 +# @ECLASS-VARIABLE: MOZ_PN
73 +# @DESCRIPTION: Ebuild package name converted to equivalent upstream name.
74 +# Defaults to ${PN}, and should be overridden for binary ebuilds.
75 +: ${MOZ_PN:="${PN}"}
76 +
77 +# @ECLASS-VARIABLE: MOZ_P
78 +# @DESCRIPTION: Ebuild package name + version converted to upstream equivalent.
79 +# Defaults to ${MOZ_PN}-${MOZ_PV}
80 +: ${MOZ_P:="${MOZ_PN}-${MOZ_PV}"}
81 +
82 +# Add linguas_* to IUSE according to available language packs
83 +# No language packs for alphas and betas
84 +if ! [[ ${PV} =~ alpha|beta ]]; then
85 + for X in "${LANGS[@]}" ; do
86 + # en and en_US are handled internally
87 + if [[ ${X} = en ]] || [[ ${X} = en-US ]]; then
88 + continue
89 + fi
90 + SRC_URI="${SRC_URI}
91 + linguas_${X/-/_}? ( ${FTP_URI}/${MOZ_PV}/linux-i686/xpi/${X}.xpi -> ${MOZ_P}-${X}.xpi )"
92 + IUSE="${IUSE} linguas_${X/-/_}"
93 + # We used to do some magic if specific/generic locales were missing, but
94 + # we stopped doing that due to bug 325195.
95 + done
96 +fi
97 +
98 +linguas() {
99 + # Generate the list of language packs called "linguas"
100 + # This list is used to unpack and install the xpi language packs
101 + local LINGUA
102 + for LINGUA in ${LINGUAS}; do
103 + if has ${LINGUA} en en_US; then
104 + # For mozilla products, en and en_US are handled internally
105 + continue
106 + # If this language is supported by ${P},
107 + elif has ${LINGUA} "${LANGS[@]//-/_}"; then
108 + # Add the language to linguas, if it isn't already there
109 + has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
110 + continue
111 + # For each short LINGUA that isn't in LANGS,
112 + # We used to add *all* long LANGS to the linguas list,
113 + # but we stopped doing that due to bug 325195.
114 + fi
115 + ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
116 + done
117 +}
118 +
119 +# @FUNCTION: mozlinguas_src_unpack
120 +# @DESCRIPTION:
121 +# Unpack xpi language packs according to the user's LINGUAS settings
122 +mozlinguas_src_unpack() {
123 + local X
124 + linguas
125 + for X in "${linguas[@]}"; do
126 + # FIXME: Add support for unpacking xpis to portage
127 + xpi_unpack "${MOZ_P}-${X}.xpi"
128 + done
129 + if [[ "${linguas[*]}" != "" && "${linguas[*]}" != "en" ]]; then
130 + einfo "Selected language packs (first will be default): ${linguas[*]}"
131 + fi
132 +}
133 +
134 +# @FUNCTION: mozlinguas_src_install
135 +# @DESCRIPTION:
136 +# Install xpi language packs according to the user's LINGUAS settings
137 +mozlinguas_src_install() {
138 + local X
139 + linguas
140 + for X in "${linguas[@]}"; do
141 + xpi_install "${WORKDIR}/${MOZ_P}-${X}"
142 + done
143 +}
144
145 diff --git a/mail-client/thunderbird-bin/Manifest b/mail-client/thunderbird-bin/Manifest
146 index 0acda36..38b0fad 100644
147 --- a/mail-client/thunderbird-bin/Manifest
148 +++ b/mail-client/thunderbird-bin/Manifest
149 @@ -54,6 +54,5 @@ DIST thunderbird-9.0.1-zh-CN.xpi 426798 RMD160 d6cc996f801e93e8c1ebcd15477686e84
150 DIST thunderbird-9.0.1-zh-TW.xpi 427201 RMD160 d3a47ee5b8283839b57bea335ae96a7f478d9122 SHA1 fa5fa533f16cf69be45493e885a7b8cd7521c370 SHA256 34dba557c5821410526bb910770bb8f9b22508a16bdcd4f729fd94dde6815924
151 DIST thunderbird-bin_i686-9.0.1.tar.bz2 18995445 RMD160 46370c2e124fa71671a1374867a0835358313571 SHA1 ea6da4d1b46978cb13367cb66dc64123b0a1201d SHA256 9cc7a222ccf764696308cfe7a043af401cba322ee4f2a1a5897df128f12b9b5a
152 DIST thunderbird-bin_x86_64-9.0.1.tar.bz2 22025281 RMD160 74ad4c1acf68aedb91e0e3be6fba80360a5c2558 SHA1 0e18402491a4c112fec633c6427db4a4b5ef9ec5 SHA256 536ab6fbdad0ff3bde2c9406b718888c3128f8def8d8d8c1f395a44611d849e8
153 -EBUILD thunderbird-bin-9.0.1.ebuild 4203 RMD160 35cb9da9a0d4c9432f3c825bddebbce86f4c5f55 SHA1 4a87293c6236df2adc0e19a90df620a4887c6b4d SHA256 9653a2fa5a0fdf10b3045bec009d1b10a354db9d80e7feb6a74f9e57730c4b5c
154 -MISC ChangeLog 33054 RMD160 1a42087d21f839375f18a0eecd2dd4b54d60fef4 SHA1 3ddadd2e2a3e8646743ccc4b322079db599b48a7 SHA256 6971534275ed68690318210986f93ddd37e9a5e9c45c932d7dc58bce0794a14a
155 +EBUILD thunderbird-bin-9.0.1.ebuild 2865 RMD160 58f0f6859ae0e4f8ae55ce7b6bcd293e1065403f SHA1 eb5d32864222458824aa098b19ef6c73b5dcfc84 SHA256 64454048f39ace6f913f982119fba2e65d854978e93e7c8097c03161c7fb1431
156 MISC metadata.xml 239 RMD160 1ae864a1acabe6bbce1c44a39d0ea55e04ccfaa7 SHA1 2760f4017fb87bfec958b0472cd86151bb3c3ab3 SHA256 7dc1b4cbb0d49bbe877f0978fc8cd278614f95982a4375336dfb5b72e866efd0
157
158 diff --git a/mail-client/thunderbird-bin/thunderbird-bin-9.0.1.ebuild b/mail-client/thunderbird-bin/thunderbird-bin-9.0.1.ebuild
159 index 39a9791..a03d7b2 100644
160 --- a/mail-client/thunderbird-bin/thunderbird-bin-9.0.1.ebuild
161 +++ b/mail-client/thunderbird-bin/thunderbird-bin-9.0.1.ebuild
162 @@ -4,22 +4,27 @@
163
164 EAPI="3"
165
166 -inherit eutils multilib mozextension pax-utils fdo-mime gnome2-utils
167 -
168 # Can be updated using scripts/get_langs.sh from mozilla overlay
169 LANGS=(ar be bg bn-BD br ca cs da de el en en-GB en-US es-AR es-ES et eu fi fr
170 fy-NL ga-IE gd gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl pt-BR pt-PT rm
171 ro ru si sk sl sq sv-SE ta-LK tr uk vi zh-CN zh-TW)
172
173 -MY_PN="${PN/-bin}"
174 -MY_PV="${PV/_beta/b}"
175 -MY_P="${MY_PN}-${MY_PV}"
176 +# Upstream ftp release URI that's used by mozlinguas.eclass
177 +# We don't use the http mirror because it deletes old tarballs.
178 +FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
179 +
180 +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
181 +MOZ_PN="${PN/-bin}"
182 +MOZ_PV="${PV/_beta/b}"
183 +MOZ_PV="${MOZ_PV/_rc/rc}"
184 +MOZ_P="${MOZ_PN}-${MOZ_PV}"
185 +
186 +inherit eutils multilib pax-utils fdo-mime gnome2-utils mozlinguas
187
188 DESCRIPTION="Thunderbird Mail Client"
189 -FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MY_PN}/releases/"
190 -SRC_URI="
191 - amd64? ( ${FTP_URI}/${MY_PV}/linux-x86_64/en-US/${MY_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
192 - x86? ( ${FTP_URI}/${MY_PV}/linux-i686/en-US/${MY_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
193 +SRC_URI="${SRC_URI}
194 + amd64? ( ${FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
195 + x86? ( ${FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
196 HOMEPAGE="http://www.mozilla.com/thunderbird"
197 RESTRICT="strip"
198
199 @@ -28,22 +33,6 @@ SLOT="0"
200 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
201 IUSE="+crashreporter"
202
203 -for X in "${LANGS[@]}" ; do
204 - # en and en_US are handled internally
205 - if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
206 - SRC_URI="${SRC_URI}
207 - linguas_${X/-/_}? ( ${FTP_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P/-bin}-${X}.xpi )"
208 - fi
209 - IUSE="${IUSE} linguas_${X/-/_}"
210 - # Install all the specific locale xpis if there's no generic locale xpi
211 - # Example: there's no pt.xpi, so install all pt-*.xpi
212 - if ! has ${X%%-*} "${LANGS[@]}"; then
213 - SRC_URI="${SRC_URI}
214 - linguas_${X%%-*}? ( ${FTP_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P/-bin}-${X}.xpi )"
215 - IUSE="${IUSE} linguas_${X%%-*}"
216 - fi
217 -done
218 -
219 DEPEND="app-arch/unzip"
220 RDEPEND="x11-libs/libXrender
221 x11-libs/libXt
222 @@ -51,56 +40,24 @@ RDEPEND="x11-libs/libXrender
223 >=x11-libs/gtk+-2.2:2
224 crashreporter? ( net-misc/curl ) "
225
226 -S="${WORKDIR}/${MY_PN}"
227 -
228 -# TODO: Move all the linguas crap to an eclass
229 -linguas() {
230 - # Generate the list of language packs called "linguas"
231 - # This list is used to install the xpi language packs
232 - local LINGUA
233 - for LINGUA in ${LINGUAS}; do
234 - if has ${LINGUA} en en_US; then
235 - # For mozilla products, en and en_US are handled internally
236 - continue
237 - # If this language is supported by ${P},
238 - elif has ${LINGUA} "${LANGS[@]//-/_}"; then
239 - # Add the language to linguas, if it isn't already there
240 - has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
241 - continue
242 - # For each short LINGUA that isn't in LANGS,
243 - # add *all* long LANGS to the linguas list
244 - elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
245 - for LANG in "${LANGS[@]}"; do
246 - if [[ ${LANG} == ${LINGUA}-* ]]; then
247 - has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
248 - continue 2
249 - fi
250 - done
251 - fi
252 - ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
253 - done
254 -}
255 +S="${WORKDIR}/${MOZ_PN}"
256
257 src_unpack() {
258 unpack ${A}
259
260 - linguas
261 - for X in "${linguas[@]}"; do
262 - xpi_unpack "${P/-bin}-${X}.xpi"
263 - done
264 + # Unpack language packs
265 + mozlinguas_src_unpack
266 }
267
268 src_install() {
269 - declare MOZILLA_FIVE_HOME="/opt/${MY_PN}"
270 + declare MOZILLA_FIVE_HOME="/opt/${MOZ_PN}"
271
272 # Install thunderbird in /opt
273 dodir ${MOZILLA_FIVE_HOME%/*}
274 mv "${S}" "${D}"${MOZILLA_FIVE_HOME}
275
276 - linguas
277 - for X in "${linguas[@]}"; do
278 - xpi_install "${WORKDIR}/${P/-bin}-${X}"
279 - done
280 + # Install language packs
281 + mozlinguas_src_install
282
283 # Create /usr/bin/thunderbird-bin
284 dodir /usr/bin/
285
286 diff --git a/mail-client/thunderbird/Manifest b/mail-client/thunderbird/Manifest
287 index 432c859..4b80ce3 100644
288 --- a/mail-client/thunderbird/Manifest
289 +++ b/mail-client/thunderbird/Manifest
290 @@ -56,4 +56,4 @@ DIST thunderbird-8.0-zh-CN.xpi 422519 RMD160 ef881e92de682aa3d807a53a7f536f51e67
291 DIST thunderbird-8.0-zh-TW.xpi 423019 RMD160 3326d286df45aee39ea4dc9303c6e4459b41dba2 SHA1 a81c24ab001eb521a1b4e49da16c8f6914676641 SHA256 a6c78df16a242b1731709fdacae8fcfde630fe10469abfd6a696b46076e9059a
292 DIST thunderbird-8.0.source.tar.bz2 89435206 RMD160 373420ec009a7f28f12a64a0d55e9d959573974e SHA1 18b77e44f1653eb3d59056870f535e3c373d99fd SHA256 f728bd2dbc04e6c3a096d79a9ee320740f53794a28be307da8655c8fd90f77f5
293 DIST thunderbird-9.0-patches-0.1.tar.xz 696 RMD160 986ad69f21f6eddf46b73258b0a2aa8eb85fb9c4 SHA1 62dd6e724e2e3a1b76eaed3d165e2e9f47385f8a SHA256 64028e8ca37e1259ed196dfe6e8a87cd08153047f80639ca36cfd276eaa9aaea
294 -EBUILD thunderbird-8.0-r2.ebuild 9851 RMD160 9c684fca7e96c6eb2a2779b02d7a8bdb7f067c3e SHA1 c257c939d12405addf9324e08639803e1bd121c3 SHA256 c295eb5b0fadeb0dd82433834a673ea09c691b480ff3fc2b1f652ad5d5c3d6f9
295 +EBUILD thunderbird-8.0-r2.ebuild 8371 RMD160 a2a2b269de738ffc94b9c92b4693f8f1744d3d81 SHA1 357ad2e665ec52d5e4a39bda812bc0aa2bf11b58 SHA256 ff38162eec9af0eeb6b42c2df7e5d3d8b41fc849bb2bdc9b3cf8e2d8883e691a
296
297 diff --git a/mail-client/thunderbird/thunderbird-8.0-r2.ebuild b/mail-client/thunderbird/thunderbird-8.0-r2.ebuild
298 index 18d87fd..87333da 100644
299 --- a/mail-client/thunderbird/thunderbird-8.0-r2.ebuild
300 +++ b/mail-client/thunderbird/thunderbird-8.0-r2.ebuild
301 @@ -5,11 +5,22 @@
302 EAPI="3"
303 WANT_AUTOCONF="2.1"
304
305 -inherit flag-o-matic toolchain-funcs mozconfig-3 makeedit multilib mozextension autotools pax-utils python check-reqs nsplugins
306 +# This list can be updated using scripts/get_langs.sh from the mozilla overlay
307 +LANGS=(ar be bg bn-BD br ca cs da de el en en-GB en-US es-AR es-ES et eu fi
308 +fr fy-NL ga-IE gd gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl pt-BR
309 +pt-PT rm ro ru si sk sl sq sv-SE ta-LK tr uk vi zh-CN zh-TW)
310
311 -TB_PV="${PV/_beta/b}"
312 -TB_P="${PN}-${TB_PV}"
313 +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
314 +MOZ_PV="${PV/_beta/b}"
315 +MOZ_P="${PN}-${MOZ_PV}"
316 +
317 +# Enigmail version
318 EMVER="1.3.4"
319 +# Upstream ftp release URI that's used by mozlinguas.eclass
320 +# We don't use the http mirror because it deletes old tarballs.
321 +FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
322 +
323 +inherit flag-o-matic toolchain-funcs mozconfig-3 makeedit multilib autotools pax-utils python check-reqs nsplugins mozlinguas
324
325 DESCRIPTION="Thunderbird Mail Client"
326 HOMEPAGE="http://www.mozilla.com/en-US/thunderbird/"
327 @@ -18,38 +29,16 @@ KEYWORDS="~alpha ~amd64 ~arm ~ppc ~ppc64 ~x86 ~x86-fbsd ~amd64-linux ~x86-linux"
328 SLOT="0"
329 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
330 IUSE="bindist gconf +crashreporter +crypt +ipc +lightning mozdom +webm"
331 +
332 PATCH="${PN}-9.0-patches-0.1"
333 PATCHFF="firefox-${PV}-patches-0.2"
334
335 -FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
336 -SRC_URI="${FTP_URI}/${TB_PV}/source/${TB_P}.source.tar.bz2
337 +SRC_URI="${SRC_URI}
338 + ${FTP_URI}/${MOZ_PV}/source/${MOZ_P}.source.tar.bz2
339 crypt? ( http://www.mozilla-enigmail.org/download/source/enigmail-${EMVER}.tar.gz )
340 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz
341 http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCHFF}.tar.xz"
342
343 -if ! [[ ${PV} =~ alpha|beta ]]; then
344 - # This list can be updated using scripts/get_langs.sh from the mozilla overlay
345 - LANGS=(ar be bg bn-BD br ca cs da de el en en-GB en-US es-AR es-ES et eu fi
346 - fr fy-NL ga-IE gd gl he hu id is it ja ko lt nb-NO nl nn-NO pa-IN pl pt-BR
347 - pt-PT rm ro ru si sk sl sq sv-SE ta-LK tr uk vi zh-CN zh-TW)
348 -
349 - for X in "${LANGS[@]}" ; do
350 - # en and en_US are handled internally
351 - if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
352 - SRC_URI="${SRC_URI}
353 - linguas_${X/-/_}? ( ${FTP_URI}/${TB_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
354 - fi
355 - IUSE="${IUSE} linguas_${X/-/_}"
356 - # Install all the specific locale xpis if there's no generic locale xpi
357 - # Example: there's no pt.xpi, so install all pt-*.xpi
358 - if ! has ${X%%-*} "${LANGS[@]}"; then
359 - SRC_URI="${SRC_URI}
360 - linguas_${X%%-*}? ( ${FTP_URI}/${TB_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
361 - IUSE="${IUSE} linguas_${X%%-*}"
362 - fi
363 - done
364 -fi
365 -
366 RDEPEND=">=sys-devel/binutils-2.16.1
367 >=dev-libs/nss-3.12.10
368 >=dev-libs/nspr-4.8.8
369 @@ -75,34 +64,6 @@ DEPEND="${RDEPEND}"
370
371 S="${WORKDIR}"/comm-release
372
373 -# TODO: Move all the linguas crap to an eclass
374 -linguas() {
375 - # Generate the list of language packs called "linguas"
376 - # This list is used to install the xpi language packs
377 - local LINGUA
378 - for LINGUA in ${LINGUAS}; do
379 - if has ${LINGUA} en en_US; then
380 - # For mozilla products, en and en_US are handled internally
381 - continue
382 - # If this language is supported by ${P},
383 - elif has ${LINGUA} "${LANGS[@]//-/_}"; then
384 - # Add the language to linguas, if it isn't already there
385 - has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
386 - continue
387 - # For each short LINGUA that isn't in LANGS,
388 - # add *all* long LANGS to the linguas list
389 - elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
390 - for LANG in "${LANGS[@]}"; do
391 - if [[ ${LANG} == ${LINGUA}-* ]]; then
392 - has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
393 - continue 2
394 - fi
395 - done
396 - fi
397 - ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
398 - done
399 -}
400 -
401 pkg_setup() {
402 moz_pkgsetup
403
404 @@ -124,12 +85,8 @@ pkg_setup() {
405 src_unpack() {
406 unpack ${A}
407
408 - if ! [[ ${PV} =~ alpha|beta ]]; then
409 - linguas
410 - for X in "${linguas[@]}"; do
411 - xpi_unpack "${P}-${X}.xpi"
412 - done
413 - fi
414 + # Unpack language packs
415 + mozlinguas_src_unpack
416 }
417
418 src_prepare() {
419 @@ -250,6 +207,9 @@ src_install() {
420
421 emake DESTDIR="${D}" install || die "emake install failed"
422
423 + # Install language packs
424 + mozlinguas_src_install
425 +
426 if ! use bindist; then
427 newicon "${S}"/other-licenses/branding/thunderbird/content/icon48.png thunderbird-icon.png
428 domenu "${FILESDIR}"/icon/${PN}.desktop
429 @@ -295,13 +255,6 @@ src_install() {
430 -i "${ED}"/usr/share/applications/${PN}.desktop
431 fi
432
433 - if ! [[ ${PV} =~ alpha|beta ]]; then
434 - linguas
435 - for X in "${linguas[@]}"; do
436 - xpi_install "${WORKDIR}/${P}-${X}"
437 - done
438 - fi
439 -
440 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/thunderbird-bin
441
442 # Enable very specific settings for thunderbird-3
443
444 diff --git a/www-client/firefox-bin/Manifest b/www-client/firefox-bin/Manifest
445 index f6452f4..74b1f3d 100644
446 --- a/www-client/firefox-bin/Manifest
447 +++ b/www-client/firefox-bin/Manifest
448 @@ -85,6 +85,5 @@ DIST firefox-9.0-zh-TW.xpi 247498 RMD160 163fa9dde9caa2e209eff47a1bdfee6cfd807aa
449 DIST firefox-9.0-zu.xpi 238395 RMD160 67afb3fd7bd9006830747a75b5175facf8615f86 SHA1 1b7c947e15d5fb2f75503e1cad9940283edc87d5 SHA256 aedf4ab70c7cf603210e4ece1c21faf0c031f7b488dddc074c3f00e9d9a2feb5
450 DIST firefox-bin_i686-9.0.tar.bz2 16842339 RMD160 190a782228ba276d0862d44ebe5e06f6a4fb8939 SHA1 bd8652a826bfe4f3ec21425967d437582c9c4f85 SHA256 6c7a2bcfb4af5ed94fb3361380036c9cf33624330251c3c4793e26e15c50cb6c
451 DIST firefox-bin_x86_64-9.0.tar.bz2 18632139 RMD160 758976ca43e41d8feab58ade1001cf9a7b86f347 SHA1 bb9674a8fec3bb3d640aa38220a4f2081454b220 SHA256 3dce7000ec01ea101370bbc9c685cc67e5b9bd0395566b887dfe5d09f7c6cd9c
452 -EBUILD firefox-bin-9.0.ebuild 5564 RMD160 64642170e8a74eba6a5a4e58b58cc1c8ea2e9ef2 SHA1 4e691d5d23fe86a54247bab4ddf16e3304b7d041 SHA256 48756b6b55d8cc45ade8d801094c76c43e5b22a45a78188945c73cc750936f68
453 -MISC ChangeLog 51157 RMD160 5d23efa1422a7f3bf9034db6c11a7153e8450587 SHA1 d71eb3ac85978142c83ebe6f1f7083c3246da042 SHA256 7b1179e5fd74761c9d6b355f981271afc5a0d14f1a6152431bc70ecac3fd9f77
454 +EBUILD firefox-bin-9.0.ebuild 3749 RMD160 889bc5056ada1521081454aab3d96a46a1572086 SHA1 ef812f9b07774f668f2a81c84b6502e3c1001b5e SHA256 eeccce7957dbccb06e10c5deacd11d2959028a679bc5cdcb2fc216d685bc44b1
455 MISC metadata.xml 160 RMD160 d5a9f0bf8989621c2bde30facb53bcae00aba709 SHA1 5015c07af2083f20f9552d7fb11afb5ea69af345 SHA256 0cc5126362a12cee42ec1197c528a804cf36859329dd2c6d9225726831d14b8b
456
457 diff --git a/www-client/firefox-bin/firefox-bin-9.0.ebuild b/www-client/firefox-bin/firefox-bin-9.0.ebuild
458 index aa07b02..e7a31aa 100644
459 --- a/www-client/firefox-bin/firefox-bin-9.0.ebuild
460 +++ b/www-client/firefox-bin/firefox-bin-9.0.ebuild
461 @@ -4,8 +4,6 @@
462
463 EAPI="3"
464
465 -inherit eutils mozilla-launcher multilib mozextension pax-utils fdo-mime gnome2-utils
466 -
467 # Can be updated using scripts/get_langs.sh from mozilla overlay
468 LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
469 en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he hi-IN
470 @@ -13,15 +11,22 @@ hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl nn-NO nso or
471 pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta ta-LK te th tr uk vi
472 zh-CN zh-TW zu)
473
474 -MY_PV="${PV/_rc/rc}"
475 -MY_PN="${PN/-bin}"
476 -MY_P="${MY_PN}-${MY_PV}"
477 +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
478 +MOZ_PV="${PV/_beta/b}" # Handle beta for SRC_URI
479 +MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
480 +MOZ_PN="${PN/-bin}"
481 +MOZ_P="${MOZ_PN}-${MOZ_PV}"
482 +
483 +# Upstream ftp release URI that's used by mozlinguas.eclass
484 +# We don't use the http mirror because it deletes old tarballs.
485 +FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
486 +
487 +inherit eutils mozilla-launcher multilib pax-utils fdo-mime gnome2-utils mozlinguas
488
489 DESCRIPTION="Firefox Web Browser"
490 -FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MY_PN}/releases/"
491 -SRC_URI="
492 - amd64? ( ${FTP_URI}/${MY_PV}/linux-x86_64/en-US/${MY_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
493 - x86? ( ${FTP_URI}/${MY_PV}/linux-i686/en-US/${MY_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
494 +SRC_URI="${SRC_URI}
495 + amd64? ( ${FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
496 + x86? ( ${FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
497 HOMEPAGE="http://www.mozilla.com/firefox"
498 RESTRICT="strip mirror"
499
500 @@ -30,22 +35,6 @@ SLOT="0"
501 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
502 IUSE="startup-notification"
503
504 -for X in "${LANGS[@]}" ; do
505 - # en and en_US are handled internally
506 - if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
507 - SRC_URI="${SRC_URI}
508 - linguas_${X/-/_}? ( ${FTP_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P/-bin/}-${X}.xpi )"
509 - fi
510 - IUSE="${IUSE} linguas_${X/-/_}"
511 - # Install all the specific locale xpis if there's no generic locale xpi
512 - # Example: there's no pt.xpi, so install all pt-*.xpi
513 - if ! has ${X%%-*} "${LANGS[@]}"; then
514 - SRC_URI="${SRC_URI}
515 - linguas_${X%%-*}? ( ${FTP_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P/-bin/}-${X}.xpi )"
516 - IUSE="${IUSE} linguas_${X%%-*}"
517 - fi
518 -done
519 -
520 DEPEND="app-arch/unzip"
521 RDEPEND="dev-libs/dbus-glib
522 x11-libs/libXrender
523 @@ -56,51 +45,17 @@ RDEPEND="dev-libs/dbus-glib
524 >=media-libs/alsa-lib-1.0.16
525 "
526
527 -S="${WORKDIR}/${MY_PN}"
528 -
529 -# TODO: Move all the linguas crap to an eclass
530 -linguas() {
531 - # Generate the list of language packs called "linguas"
532 - # This list is used to install the xpi language packs
533 - local LINGUA
534 - for LINGUA in ${LINGUAS}; do
535 - if has ${LINGUA} en en_US; then
536 - # For mozilla products, en and en_US are handled internally
537 - continue
538 - # If this language is supported by ${P},
539 - elif has ${LINGUA} "${LANGS[@]//-/_}"; then
540 - # Add the language to linguas, if it isn't already there
541 - has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
542 - continue
543 - # For each short LINGUA that isn't in LANGS,
544 - # add *all* long LANGS to the linguas list
545 - elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
546 - for LANG in "${LANGS[@]}"; do
547 - if [[ ${LANG} == ${LINGUA}-* ]]; then
548 - has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
549 - continue 2
550 - fi
551 - done
552 - fi
553 - ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
554 - done
555 -}
556 +S="${WORKDIR}/${MOZ_PN}"
557
558 src_unpack() {
559 unpack ${A}
560
561 - linguas
562 - for X in "${linguas[@]}"; do
563 - # FIXME: Add support for unpacking xpis to portage
564 - [[ ${X} != "en" ]] && xpi_unpack "${P/-bin/}-${X}.xpi"
565 - done
566 - if [[ "${linguas[*]}" != "" && "${linguas[*]}" != "en" ]]; then
567 - einfo "Selected language packs (first will be default): ${linguas[*]}"
568 - fi
569 + # Unpack language packs
570 + mozlinguas_src_unpack
571 }
572
573 src_install() {
574 - declare MOZILLA_FIVE_HOME=/opt/${MY_PN}
575 + declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}
576
577 # Install icon and .desktop for menu entry
578 newicon "${S}"/chrome/icons/default/default48.png ${PN}-icon.png
579 @@ -119,18 +74,8 @@ src_install() {
580 insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
581 doins "${FILESDIR}"/${PN}-prefs.js || die
582
583 - linguas
584 - for X in "${linguas[@]}"; do
585 - [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P/-bin/}-${X}"
586 - done
587 -
588 - local LANG=${linguas%% *}
589 - if [[ -n ${LANG} && ${LANG} != "en" ]]; then
590 - elog "Setting default locale to ${LANG}"
591 - echo "pref(\"general.useragent.locale\", \"${LANG}\");" \
592 - >> "${D}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
593 - die "sed failed to change locale"
594 - fi
595 + # Install language packs
596 + mozlinguas_src_install
597
598 # Create /usr/bin/firefox-bin
599 dodir /usr/bin/
600 @@ -139,7 +84,7 @@ src_install() {
601 unset LD_PRELOAD
602 LD_LIBRARY_PATH="/opt/firefox/"
603 GTK_PATH=/usr/lib/gtk-2.0/
604 - exec /opt/${MY_PN}/${MY_PN} "\$@"
605 + exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
606 EOF
607 fperms 0755 /usr/bin/${PN}
608
609
610 diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
611 index 77191fa..374723d 100644
612 --- a/www-client/firefox/Manifest
613 +++ b/www-client/firefox/Manifest
614 @@ -84,4 +84,4 @@ DIST firefox-9.0-zh-CN.xpi 246728 RMD160 96aef0ad9287f41589f59246eba1d2445d18a0c
615 DIST firefox-9.0-zh-TW.xpi 247498 RMD160 163fa9dde9caa2e209eff47a1bdfee6cfd807aaf SHA1 f6c14facb1556002fcfb414533c171c2b9e08582 SHA256 6b50bd60567a46fd7af62160271ab9e0d5a40666c6a812fb9adcd7bce474a936
616 DIST firefox-9.0-zu.xpi 238395 RMD160 67afb3fd7bd9006830747a75b5175facf8615f86 SHA1 1b7c947e15d5fb2f75503e1cad9940283edc87d5 SHA256 aedf4ab70c7cf603210e4ece1c21faf0c031f7b488dddc074c3f00e9d9a2feb5
617 DIST firefox-9.0.source.tar.bz2 74197197 RMD160 4631b103aa80ae2ae22b61453f4e02c89962f1c1 SHA1 f79324ec6205e4c23d51d8ab2e790de1b2541657 SHA256 9e876498da6c2eb2a49b57b461d5b969b11810f6af9eaa858d8e4cb514a9bd05
618 -EBUILD firefox-9.0.ebuild 11336 RMD160 60134fb51ae87ec41548cce8d63130fe93912716 SHA1 5fdb512fdc06b9d885bf8d96ac860215bf6699e2 SHA256 cf8782ddac928c05cefc91a2669268ddd6c2228ce34936d169ac693d34b07608
619 +EBUILD firefox-9.0.ebuild 9841 RMD160 dff3bead4592c4caf08266e07978ecd2af80d2d2 SHA1 bf087b91aaf119dafbc2b9ee40697bd8edc9f73f SHA256 54d7b56e3c4e8d8214ae11546e1fd6640b11f76b8d2179717b96b9c2ca79ea75
620
621 diff --git a/www-client/firefox/firefox-9.0.ebuild b/www-client/firefox/firefox-9.0.ebuild
622 index 966ac30..c401e11 100644
623 --- a/www-client/firefox/firefox-9.0.ebuild
624 +++ b/www-client/firefox/firefox-9.0.ebuild
625 @@ -6,14 +6,27 @@ EAPI="3"
626 VIRTUALX_REQUIRED="pgo"
627 WANT_AUTOCONF="2.1"
628
629 -inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension versionator python virtualx nsplugins
630 -
631 -MAJ_FF_PV="$(get_version_component_range 1-2)" # 3.5, 3.6, 4.0, etc.
632 -FF_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
633 -FF_PV="${FF_PV/_beta/b}" # Handle beta for SRC_URI
634 -FF_PV="${FF_PV/_rc/rc}" # Handle rc for SRC_URI
635 +# This list can be updated with scripts/get_langs.sh from the mozilla overlay
636 +LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
637 +en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he
638 +hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl
639 +nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta ta-LK
640 +te th tr uk vi zh-CN zh-TW zu)
641 +
642 +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
643 +MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
644 +MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
645 +MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
646 +
647 +# Changeset for alpha snapshot
648 CHANGESET="e56ecd8b3a68"
649 +# Patch version
650 PATCH="${PN}-9.0-patches-0.4"
651 +# Upstream ftp release URI that's used by mozlinguas.eclass
652 +# We don't use the http mirror because it deletes old tarballs.
653 +FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
654 +
655 +inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools python virtualx nsplugins mozlinguas
656
657 DESCRIPTION="Firefox Web Browser"
658 HOMEPAGE="http://www.mozilla.com/firefox"
659 @@ -23,9 +36,9 @@ SLOT="0"
660 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
661 IUSE="bindist +crashreporter +ipc pgo system-sqlite +webm"
662
663 -FTP_URI="ftp://ftp.mozilla.org/pub/firefox/releases/"
664 # More URIs appended below...
665 -SRC_URI="http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz"
666 +SRC_URI="${SRC_URI}
667 + http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz"
668
669 ASM_DEPEND=">=dev-lang/yasm-1.1"
670
671 @@ -54,74 +67,20 @@ DEPEND="${RDEPEND}
672 # No source releases for alpha|beta
673 if [[ ${PV} =~ alpha ]]; then
674 SRC_URI="${SRC_URI}
675 - http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${FF_PV}_${CHANGESET}.source.tar.bz2"
676 + http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
677 S="${WORKDIR}/mozilla-central"
678 elif [[ ${PV} =~ beta ]]; then
679 SRC_URI="${SRC_URI}
680 - ${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
681 + ${FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
682 S="${WORKDIR}/mozilla-beta"
683 else
684 SRC_URI="${SRC_URI}
685 - ${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
686 + ${FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
687 S="${WORKDIR}/mozilla-release"
688 fi
689
690 -# No language packs for alphas
691 -if ! [[ ${PV} =~ alpha|beta ]]; then
692 - # This list can be updated with scripts/get_langs.sh from mozilla overlay
693 - LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
694 - en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl gu-IN he
695 - hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl
696 - nn-NO nso or pa-IN pl pt-BR pt-PT rm ro ru si sk sl son sq sr sv-SE ta ta-LK
697 - te th tr uk vi zh-CN zh-TW zu)
698 -
699 - for X in "${LANGS[@]}" ; do
700 - # en and en_US are handled internally
701 - if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
702 - SRC_URI="${SRC_URI}
703 - linguas_${X/-/_}? ( ${FTP_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
704 - fi
705 - IUSE="${IUSE} linguas_${X/-/_}"
706 - # Install all the specific locale xpis if there's no generic locale xpi
707 - # Example: there's no pt.xpi, so install all pt-*.xpi
708 - if ! has ${X%%-*} "${LANGS[@]}"; then
709 - SRC_URI="${SRC_URI}
710 - linguas_${X%%-*}? ( ${FTP_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
711 - IUSE="${IUSE} linguas_${X%%-*}"
712 - fi
713 - done
714 -fi
715 -
716 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
717
718 -# TODO: Move all the linguas crap to an eclass
719 -linguas() {
720 - # Generate the list of language packs called "linguas"
721 - # This list is used to install the xpi language packs
722 - local LINGUA
723 - for LINGUA in ${LINGUAS}; do
724 - if has ${LINGUA} en en_US; then
725 - # For mozilla products, en and en_US are handled internally
726 - continue
727 - # If this language is supported by ${P},
728 - elif has ${LINGUA} "${LANGS[@]//-/_}"; then
729 - # Add the language to linguas, if it isn't already there
730 - has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
731 - continue
732 - # For each short LINGUA that isn't in LANGS,
733 - # add *all* long LANGS to the linguas list
734 - elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
735 - for LANG in "${LANGS[@]}"; do
736 - if [[ ${LANG} == ${LINGUA}-* ]]; then
737 - has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
738 - continue 2
739 - fi
740 - done
741 - fi
742 - ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
743 - done
744 -}
745 -
746 pkg_setup() {
747 moz_pkgsetup
748
749 @@ -133,6 +92,7 @@ pkg_setup() {
750 SESSION_MANAGER \
751 XDG_SESSION_COOKIE \
752 XAUTHORITY
753 + gnome2_environment_reset
754
755 if ! use bindist; then
756 einfo
757 @@ -160,11 +120,8 @@ pkg_setup() {
758 src_unpack() {
759 unpack ${A}
760
761 - linguas
762 - for X in "${linguas[@]}"; do
763 - # FIXME: Add support for unpacking xpis to portage
764 - xpi_unpack "${P}-${X}.xpi"
765 - done
766 + # Unpack language packs
767 + mozlinguas_src_unpack
768 }
769
770 src_prepare() {
771 @@ -296,10 +253,8 @@ src_install() {
772 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
773 emake DESTDIR="${D}" install || die "emake install failed"
774
775 - linguas
776 - for X in "${linguas[@]}"; do
777 - xpi_install "${WORKDIR}/${P}-${X}"
778 - done
779 + # Install language packs
780 + mozlinguas_src_install
781
782 local size sizes icon_path icon name
783 if use bindist; then