Gentoo Archives: gentoo-commits

From: "Nirbheek Chauhan (nirbheek)" <nirbheek@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/firefox-bin: ChangeLog firefox-bin-10.0.ebuild
Date: Sat, 04 Feb 2012 18:35:39
Message-Id: 20120204183530.B9E5F2004C@flycatcher.gentoo.org
1 nirbheek 12/02/04 18:35:30
2
3 Modified: ChangeLog firefox-bin-10.0.ebuild
4 Log:
5 Port to the new mozlinguas.eclass
6
7 (Portage version: 2.2.0_alpha84/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.83 www-client/firefox-bin/ChangeLog
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/ChangeLog?rev=1.83&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/ChangeLog?rev=1.83&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/ChangeLog?r1=1.82&r2=1.83
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox-bin/ChangeLog,v
19 retrieving revision 1.82
20 retrieving revision 1.83
21 diff -u -r1.82 -r1.83
22 --- ChangeLog 31 Jan 2012 18:09:40 -0000 1.82
23 +++ ChangeLog 4 Feb 2012 18:35:30 -0000 1.83
24 @@ -1,6 +1,9 @@
25 # ChangeLog for www-client/firefox-bin
26 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/ChangeLog,v 1.82 2012/01/31 18:09:40 jdhore Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/ChangeLog,v 1.83 2012/02/04 18:35:30 nirbheek Exp $
29 +
30 + 04 Feb 2012; Nirbheek Chauhan <nirbheek@g.o> firefox-bin-10.0.ebuild:
31 + Port to the new mozlinguas.eclass
32
33 *firefox-bin-10.0 (31 Jan 2012)
34
35
36
37
38 1.2 www-client/firefox-bin/firefox-bin-10.0.ebuild
39
40 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-10.0.ebuild?rev=1.2&view=markup
41 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-10.0.ebuild?rev=1.2&content-type=text/plain
42 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/www-client/firefox-bin/firefox-bin-10.0.ebuild?r1=1.1&r2=1.2
43
44 Index: firefox-bin-10.0.ebuild
45 ===================================================================
46 RCS file: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-10.0.ebuild,v
47 retrieving revision 1.1
48 retrieving revision 1.2
49 diff -u -r1.1 -r1.2
50 --- firefox-bin-10.0.ebuild 31 Jan 2012 18:09:40 -0000 1.1
51 +++ firefox-bin-10.0.ebuild 4 Feb 2012 18:35:30 -0000 1.2
52 @@ -1,27 +1,33 @@
53 # Copyright 1999-2012 Gentoo Foundation
54 # Distributed under the terms of the GNU General Public License v2
55 -# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-10.0.ebuild,v 1.1 2012/01/31 18:09:40 jdhore Exp $
56 +# $Header: /var/cvsroot/gentoo-x86/www-client/firefox-bin/firefox-bin-10.0.ebuild,v 1.2 2012/02/04 18:35:30 nirbheek Exp $
57
58 EAPI="3"
59
60 -inherit eutils multilib mozextension pax-utils fdo-mime gnome2-utils nsplugins
61 -
62 # Can be updated using scripts/get_langs.sh from mozilla overlay
63 -LANGS=(af ak ar ast be bg bn-BD bn-IN br bs ca cs cy da de el en en-GB en-US
64 -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
65 -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
66 -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
67 -zh-CN zh-TW zu)
68 -
69 -MY_PV="${PV/_rc/rc}"
70 -MY_PN="${PN/-bin}"
71 -MY_P="${MY_PN}-${MY_PV}"
72 +MOZ_LANGS=(af ak ar as ast be bg bn-BD bn-IN br bs ca cs csb cy da de el en
73 +en-GB en-US en-ZA eo es-AR es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gd gl
74 +gu-IN he hi-IN hr hu hy-AM id is it ja kk kn ko ku lg lt lv mai mk ml mr nb-NO
75 +nl 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
76 +te th tr uk vi zh-CN zh-TW zu)
77 +
78 +# Convert the ebuild version to the upstream mozilla version, used by mozlinguas
79 +MOZ_PV="${PV/_beta/b}" # Handle beta for SRC_URI
80 +MOZ_PV="${MOZ_PV/_rc/rc}" # Handle rc for SRC_URI
81 +MOZ_PN="${PN/-bin}"
82 +MOZ_P="${MOZ_PN}-${MOZ_PV}"
83 +
84 +# Upstream ftp release URI that's used by mozlinguas.eclass
85 +# We don't use the http mirror because it deletes old tarballs.
86 +MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases/"
87 +
88 +inherit eutils multilib pax-utils fdo-mime gnome2-utils mozlinguas
89
90 DESCRIPTION="Firefox Web Browser"
91 -FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MY_PN}/releases"
92 -SRC_URI="
93 - amd64? ( ${FTP_URI}/${MY_PV}/linux-x86_64/en-US/${MY_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
94 - x86? ( ${FTP_URI}/${MY_PV}/linux-i686/en-US/${MY_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
95 +MOZ_FTP_URI="ftp://ftp.mozilla.org/pub/mozilla.org/${MOZ_PN}/releases"
96 +SRC_URI="${SRC_URI}
97 + amd64? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-x86_64/en-US/${MOZ_P}.tar.bz2 -> ${PN}_x86_64-${PV}.tar.bz2 )
98 + x86? ( ${MOZ_FTP_URI}/${MOZ_PV}/linux-i686/en-US/${MOZ_P}.tar.bz2 -> ${PN}_i686-${PV}.tar.bz2 )"
99 HOMEPAGE="http://www.mozilla.com/firefox"
100 RESTRICT="strip mirror"
101
102 @@ -30,22 +36,6 @@
103 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
104 IUSE="startup-notification"
105
106 -for X in "${LANGS[@]}" ; do
107 - # en and en_US are handled internally
108 - if [[ ${X} != en ]] && [[ ${X} != en-US ]]; then
109 - SRC_URI="${SRC_URI}
110 - linguas_${X/-/_}? ( ${FTP_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P/-bin/}-${X}.xpi )"
111 - fi
112 - IUSE="${IUSE} linguas_${X/-/_}"
113 - # Install all the specific locale xpis if there's no generic locale xpi
114 - # Example: there's no pt.xpi, so install all pt-*.xpi
115 - if ! has ${X%%-*} "${LANGS[@]}"; then
116 - SRC_URI="${SRC_URI}
117 - linguas_${X%%-*}? ( ${FTP_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P/-bin/}-${X}.xpi )"
118 - IUSE="${IUSE} linguas_${X%%-*}"
119 - fi
120 -done
121 -
122 DEPEND="app-arch/unzip"
123 RDEPEND="dev-libs/dbus-glib
124 x11-libs/libXrender
125 @@ -56,51 +46,17 @@
126 >=media-libs/alsa-lib-1.0.16
127 "
128
129 -S="${WORKDIR}/${MY_PN}"
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 +S="${WORKDIR}/${MOZ_PN}"
159
160 src_unpack() {
161 unpack ${A}
162
163 - linguas
164 - for X in "${linguas[@]}"; do
165 - # FIXME: Add support for unpacking xpis to portage
166 - [[ ${X} != "en" ]] && xpi_unpack "${P/-bin/}-${X}.xpi"
167 - done
168 - if [[ "${linguas[*]}" != "" && "${linguas[*]}" != "en" ]]; then
169 - einfo "Selected language packs (first will be default): ${linguas[*]}"
170 - fi
171 + # Unpack language packs
172 + mozlinguas_src_unpack
173 }
174
175 src_install() {
176 - declare MOZILLA_FIVE_HOME=/opt/${MY_PN}
177 + declare MOZILLA_FIVE_HOME=/opt/${MOZ_PN}
178
179 # Install icon and .desktop for menu entry
180 newicon "${S}"/chrome/icons/default/default48.png ${PN}-icon.png
181 @@ -119,10 +75,8 @@
182 insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
183 doins "${FILESDIR}"/${PN}-prefs.js || die
184
185 - linguas
186 - for X in "${linguas[@]}"; do
187 - [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P/-bin/}-${X}"
188 - done
189 + # Install language packs
190 + mozlinguas_src_install
191
192 local LANG=${linguas%% *}
193 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
194 @@ -139,7 +93,7 @@
195 unset LD_PRELOAD
196 LD_LIBRARY_PATH="/opt/firefox/"
197 GTK_PATH=/usr/lib/gtk-2.0/
198 - exec /opt/${MY_PN}/${MY_PN} "\$@"
199 + exec /opt/${MOZ_PN}/${MOZ_PN} "\$@"
200 EOF
201 fperms 0755 /usr/bin/${PN}