Gentoo Archives: gentoo-commits

From: Jory Pratt <anarchy@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] proj/mozilla:master commit in: www-client/firefox/
Date: Wed, 04 Jan 2012 20:28:09
Message-Id: b0de246d2f63aa869fef71227bcfd782afc1b4f4.anarchy@gentoo
1 commit: b0de246d2f63aa869fef71227bcfd782afc1b4f4
2 Author: Jory A. Pratt <anarchy <AT> gentoo <DOT> org>
3 AuthorDate: Wed Jan 4 20:27:42 2012 +0000
4 Commit: Jory Pratt <anarchy <AT> gentoo <DOT> org>
5 CommitDate: Wed Jan 4 20:27:42 2012 +0000
6 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/mozilla.git;a=commit;h=b0de246d
7
8 sync with tree
9
10 ---
11 www-client/firefox/Manifest | 2 +-
12 www-client/firefox/firefox-9.0.ebuild | 105 +++++++++++++++++++++++---------
13 2 files changed, 76 insertions(+), 31 deletions(-)
14
15 diff --git a/www-client/firefox/Manifest b/www-client/firefox/Manifest
16 index ccee73e..9f045aa 100644
17 --- a/www-client/firefox/Manifest
18 +++ b/www-client/firefox/Manifest
19 @@ -84,4 +84,4 @@ DIST firefox-9.0-zh-CN.xpi 246728 RMD160 96aef0ad9287f41589f59246eba1d2445d18a0c
20 DIST firefox-9.0-zh-TW.xpi 247498 RMD160 163fa9dde9caa2e209eff47a1bdfee6cfd807aaf SHA1 f6c14facb1556002fcfb414533c171c2b9e08582 SHA256 6b50bd60567a46fd7af62160271ab9e0d5a40666c6a812fb9adcd7bce474a936
21 DIST firefox-9.0-zu.xpi 238395 RMD160 67afb3fd7bd9006830747a75b5175facf8615f86 SHA1 1b7c947e15d5fb2f75503e1cad9940283edc87d5 SHA256 aedf4ab70c7cf603210e4ece1c21faf0c031f7b488dddc074c3f00e9d9a2feb5
22 DIST firefox-9.0.source.tar.bz2 74197197 RMD160 4631b103aa80ae2ae22b61453f4e02c89962f1c1 SHA1 f79324ec6205e4c23d51d8ab2e790de1b2541657 SHA256 9e876498da6c2eb2a49b57b461d5b969b11810f6af9eaa858d8e4cb514a9bd05
23 -EBUILD firefox-9.0.ebuild 9841 RMD160 19e3eb83c56845bb7973bb821b018b8d091b6259 SHA1 9556856bbe4e4307430df4ef37ff1c2843a2eafb SHA256 5816d6fe2877afee020e48a22b2fa26803fd2db0fb442b3780445748aeb98949
24 +EBUILD firefox-9.0.ebuild 11344 RMD160 5d399eba2f2567bcdd240018ccbadb965cc96c13 SHA1 1bc2179f9f65204136ca797b3dc59b9e53b443f9 SHA256 4ebfd1706839a535a5d398f01d22c79d9f78a725850fe7367c5064a69d69329e
25
26 diff --git a/www-client/firefox/firefox-9.0.ebuild b/www-client/firefox/firefox-9.0.ebuild
27 index f379e30..1f676cd 100644
28 --- a/www-client/firefox/firefox-9.0.ebuild
29 +++ b/www-client/firefox/firefox-9.0.ebuild
30 @@ -1,44 +1,31 @@
31 # Copyright 1999-2011 Gentoo Foundation
32 # Distributed under the terms of the GNU General Public License v2
33 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-6.0.ebuild,v 1.2 2011/08/23 19:35:58 polynomial-c Exp $
34 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox/firefox-9.0.ebuild,v 1.3 2011/12/26 11:13:31 armin76 Exp $
35
36 EAPI="3"
37 VIRTUALX_REQUIRED="pgo"
38 WANT_AUTOCONF="2.1"
39
40 -# This list can be updated with scripts/get_langs.sh from the mozilla overlay
41 -LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
42 -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
43 -hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl
44 -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
45 -te th tr uk vi zh-CN zh-TW zu)
46 +inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools mozextension versionator python virtualx nsplugins
47
48 -# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
49 -MOZ_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
50 -MOZ_PV="${MOZ_PV/_beta/b}" # Handle beta for SRC_URI
51 -MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
52 -
53 -# Changeset for alpha snapshot
54 +MAJ_FF_PV="$(get_version_component_range 1-2)" # 3.5, 3.6, 4.0, etc.
55 +FF_PV="${PV/_alpha/a}" # Handle alpha for SRC_URI
56 +FF_PV="${FF_PV/_beta/b}" # Handle beta for SRC_URI
57 +FF_PV="${FF_PV/_rc/rc}" # Handle rc for SRC_URI
58 CHANGESET="e56ecd8b3a68"
59 -# Patch version
60 PATCH="${PN}-9.0-patches-0.5"
61 -# Upstream ftp release URI that's used by mozlinguas.eclass
62 -# We don't use the http mirror because it deletes old tarballs.
63 -FTP_URI="ftp://ftp.mozilla.org/pub/${PN}/releases/"
64 -
65 -inherit check-reqs flag-o-matic toolchain-funcs eutils gnome2-utils mozconfig-3 multilib pax-utils fdo-mime autotools python virtualx nsplugins mozlinguas
66
67 DESCRIPTION="Firefox Web Browser"
68 HOMEPAGE="http://www.mozilla.com/firefox"
69
70 -KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux"
71 +KEYWORDS="~alpha ~amd64 ~arm ~ia64 ~ppc ~x86 ~amd64-linux ~x86-linux"
72 SLOT="0"
73 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
74 IUSE="bindist +crashreporter +ipc pgo system-sqlite +webm"
75
76 +FTP_URI="ftp://ftp.mozilla.org/pub/firefox/releases/"
77 # More URIs appended below...
78 -SRC_URI="${SRC_URI}
79 - http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz"
80 +SRC_URI="http://dev.gentoo.org/~anarchy/mozilla/patchsets/${PATCH}.tar.xz"
81
82 ASM_DEPEND=">=dev-lang/yasm-1.1"
83
84 @@ -67,20 +54,74 @@ DEPEND="${RDEPEND}
85 # No source releases for alpha|beta
86 if [[ ${PV} =~ alpha ]]; then
87 SRC_URI="${SRC_URI}
88 - http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${MOZ_PV}_${CHANGESET}.source.tar.bz2"
89 + http://dev.gentoo.org/~anarchy/mozilla/firefox/firefox-${FF_PV}_${CHANGESET}.source.tar.bz2"
90 S="${WORKDIR}/mozilla-central"
91 elif [[ ${PV} =~ beta ]]; then
92 SRC_URI="${SRC_URI}
93 - ${FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
94 + ${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
95 S="${WORKDIR}/mozilla-beta"
96 else
97 SRC_URI="${SRC_URI}
98 - ${FTP_URI}/${MOZ_PV}/source/firefox-${MOZ_PV}.source.tar.bz2"
99 + ${FTP_URI}/${FF_PV}/source/firefox-${FF_PV}.source.tar.bz2"
100 S="${WORKDIR}/mozilla-release"
101 fi
102
103 +# No language packs for alphas
104 +if ! [[ ${PV} =~ alpha|beta ]]; then
105 + # This list can be updated with scripts/get_langs.sh from mozilla overlay
106 + LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
107 + 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
108 + hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO nl
109 + 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
110 + te th tr uk vi zh-CN zh-TW zu)
111 +
112 + for X in "${LANGS[@]}" ; do
113 + # en and en_US are handled internally
114 + if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
115 + SRC_URI="${SRC_URI}
116 + linguas_${X/-/_}? ( ${FTP_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
117 + fi
118 + IUSE="${IUSE} linguas_${X/-/_}"
119 + # Install all the specific locale xpis if there's no generic locale xpi
120 + # Example: there's no pt.xpi, so install all pt-*.xpi
121 + if ! has ${X%%-*} "${LANGS[@]}"; then
122 + SRC_URI="${SRC_URI}
123 + linguas_${X%%-*}? ( ${FTP_URI}/${FF_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
124 + IUSE="${IUSE} linguas_${X%%-*}"
125 + fi
126 + done
127 +fi
128 +
129 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
130
131 +# TODO: Move all the linguas crap to an eclass
132 +linguas() {
133 + # Generate the list of language packs called "linguas"
134 + # This list is used to install the xpi language packs
135 + local LINGUA
136 + for LINGUA in ${LINGUAS}; do
137 + if has ${LINGUA} en en_US; then
138 + # For mozilla products, en and en_US are handled internally
139 + continue
140 + # If this language is supported by ${P},
141 + elif has ${LINGUA} "${LANGS[@]//-/_}"; then
142 + # Add the language to linguas, if it isn't already there
143 + has ${LINGUA//_/-} "${linguas[@]}" || linguas+=(${LINGUA//_/-})
144 + continue
145 + # For each short LINGUA that isn't in LANGS,
146 + # add *all* long LANGS to the linguas list
147 + elif ! has ${LINGUA%%-*} "${LANGS[@]}"; then
148 + for LANG in "${LANGS[@]}"; do
149 + if [[ ${LANG} == ${LINGUA}-* ]]; then
150 + has ${LANG} "${linguas[@]}" || linguas+=(${LANG})
151 + continue 2
152 + fi
153 + done
154 + fi
155 + ewarn "Sorry, but ${P} does not support the ${LINGUA} locale"
156 + done
157 +}
158 +
159 pkg_setup() {
160 moz_pkgsetup
161
162 @@ -92,7 +133,6 @@ pkg_setup() {
163 SESSION_MANAGER \
164 XDG_SESSION_COOKIE \
165 XAUTHORITY
166 - gnome2_environment_reset
167
168 if ! use bindist; then
169 einfo
170 @@ -120,8 +160,11 @@ pkg_setup() {
171 src_unpack() {
172 unpack ${A}
173
174 - # Unpack language packs
175 - mozlinguas_src_unpack
176 + linguas
177 + for X in "${linguas[@]}"; do
178 + # FIXME: Add support for unpacking xpis to portage
179 + xpi_unpack "${P}-${X}.xpi"
180 + done
181 }
182
183 src_prepare() {
184 @@ -253,8 +296,10 @@ src_install() {
185 MOZ_MAKE_FLAGS="${MAKEOPTS}" \
186 emake DESTDIR="${D}" install || die "emake install failed"
187
188 - # Install language packs
189 - mozlinguas_src_install
190 + linguas
191 + for X in "${linguas[@]}"; do
192 + xpi_install "${WORKDIR}/${P}-${X}"
193 + done
194
195 local size sizes icon_path icon name
196 if use bindist; then