Gentoo Archives: gentoo-commits

From: "Raul Porcel (armin76)" <armin76@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in www-client/mozilla-firefox-bin: ChangeLog mozilla-firefox-bin-3.1_alpha1.ebuild
Date: Fri, 01 Aug 2008 20:16:48
Message-Id: E1KP13N-0001Vw-5f@stork.gentoo.org
1 armin76 08/08/01 20:16:45
2
3 Modified: ChangeLog
4 Added: mozilla-firefox-bin-3.1_alpha1.ebuild
5 Log:
6 Add alpha1
7 (Portage version: 2.2_rc5/cvs/Linux 2.6.25-gentoo-r7 i686)
8
9 Revision Changes Path
10 1.154 www-client/mozilla-firefox-bin/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox-bin/ChangeLog?rev=1.154&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox-bin/ChangeLog?rev=1.154&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox-bin/ChangeLog?r1=1.153&r2=1.154
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox-bin/ChangeLog,v
19 retrieving revision 1.153
20 retrieving revision 1.154
21 diff -u -r1.153 -r1.154
22 --- ChangeLog 18 Jul 2008 17:12:30 -0000 1.153
23 +++ ChangeLog 1 Aug 2008 20:16:44 -0000 1.154
24 @@ -1,6 +1,12 @@
25 # ChangeLog for www-client/mozilla-firefox-bin
26 # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
27 -# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox-bin/ChangeLog,v 1.153 2008/07/18 17:12:30 armin76 Exp $
28 +# $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox-bin/ChangeLog,v 1.154 2008/08/01 20:16:44 armin76 Exp $
29 +
30 +*mozilla-firefox-bin-3.1_alpha1 (01 Aug 2008)
31 +
32 + 01 Aug 2008; Raúl Porcel <armin76@g.o>
33 + +mozilla-firefox-bin-3.1_alpha1.ebuild:
34 + Add alpha1
35
36 *mozilla-firefox-bin-3.0.1-r1 (18 Jul 2008)
37
38
39
40
41 1.1 www-client/mozilla-firefox-bin/mozilla-firefox-bin-3.1_alpha1.ebuild
42
43 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox-bin/mozilla-firefox-bin-3.1_alpha1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/www-client/mozilla-firefox-bin/mozilla-firefox-bin-3.1_alpha1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: mozilla-firefox-bin-3.1_alpha1.ebuild
47 ===================================================================
48 # Copyright 1999-2008 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox-bin/mozilla-firefox-bin-3.1_alpha1.ebuild,v 1.1 2008/08/01 20:16:44 armin76 Exp $
51
52 inherit eutils mozilla-launcher multilib mozextension
53
54 #LANGS="af ar be ca cs da de el en-GB en-US es-AR es-ES eu fi fr fy-NL ga-IE gu-IN he hu id it ja ka ko ku lt mk mn nb-NO nl nn-NO pa-IN pl pt-BR pt-PT ro ru si sk sl sq sr sv-SE tr uk zh-CN zh-TW"
55 #NOSHORTLANGS="en-GB es-AR pt-BR zh-CN"
56
57 MY_PN="shiretoko"
58 MY_PV="${PV##3.1_}"
59 MY_P="${MY_PN}-${MY_PV}"
60
61 DESCRIPTION="Firefox Web Browser"
62 SRC_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/shiretoko/${MY_PV}/linux-i686/en-US/${MY_P}.tar.bz2"
63 HOMEPAGE="http://www.mozilla.com/firefox"
64 RESTRICT="strip"
65
66 KEYWORDS="-* ~amd64 ~x86"
67 SLOT="0"
68 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
69 IUSE="restrict-javascript"
70
71 for X in ${LANGS} ; do
72 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
73 SRC_URI="${SRC_URI}
74 linguas_${X/-/_}? ( http://dev.gentoo.org/~armin76/dist/${P/-bin}-xpi/${P/-bin/}-${X}.xpi )"
75 fi
76 IUSE="${IUSE} linguas_${X/-/_}"
77 # english is handled internally
78 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
79 if [ "${X}" != "en-US" ]; then
80 SRC_URI="${SRC_URI}
81 linguas_${X%%-*}? ( http://dev.gentoo.org/~armin76/dist/${P/-bin}-xpi/${P/-bin/}-${X}.xpi )"
82 fi
83 IUSE="${IUSE} linguas_${X%%-*}"
84 fi
85 done
86
87 DEPEND="app-arch/unzip"
88 RDEPEND="x11-libs/libXrender
89 x11-libs/libXt
90 x11-libs/libXmu
91 x86? (
92 >=x11-libs/gtk+-2.2
93 )
94 amd64? (
95 >=app-emulation/emul-linux-x86-baselibs-1.0
96 >=app-emulation/emul-linux-x86-gtklibs-1.0
97 app-emulation/emul-linux-x86-compat
98 )"
99
100 PDEPEND="restrict-javascript? ( x11-plugins/noscript )"
101
102 S="${WORKDIR}/firefox"
103
104 pkg_setup() {
105 # This is a binary x86 package => ABI=x86
106 # Please keep this in future versions
107 # Danny van Dyk <kugelfang@g.o> 2005/03/26
108 has_multilib_profile && ABI="x86"
109 }
110
111 linguas() {
112 local LANG SLANG
113 for LANG in ${LINGUAS}; do
114 if has ${LANG} en en_US; then
115 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
116 continue
117 elif has ${LANG} ${LANGS//-/_}; then
118 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
119 continue
120 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
121 for X in ${LANGS}; do
122 if [[ "${X}" == "${LANG}-"* ]] && \
123 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
124 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
125 continue 2
126 fi
127 done
128 fi
129 ewarn "Sorry, but mozilla-firefox does not support the ${LANG} LINGUA"
130 done
131 }
132
133 src_unpack() {
134 unpack ${MY_P}.tar.bz2
135
136 linguas
137 for X in ${linguas}; do
138 [[ ${X} != "en" ]] && xpi_unpack "${P/-bin/}-${X}.xpi"
139 done
140 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
141 einfo "Selected language packs (first will be default): ${linguas}"
142 fi
143 }
144
145 src_install() {
146 declare MOZILLA_FIVE_HOME=/opt/firefox
147
148 # Install firefox in /opt
149 dodir ${MOZILLA_FIVE_HOME%/*}
150 mv "${S}" "${D}"${MOZILLA_FIVE_HOME}
151
152 linguas
153 for X in ${linguas}; do
154 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P/-bin/}-${X}"
155 done
156
157 local LANG=${linguas%% *}
158 if [[ -n ${LANG} && ${LANG} != "en" ]]; then
159 elog "Setting default locale to ${LANG}"
160 dosed -e "s:general.useragent.locale\", \"en-US\":general.useragent.locale\", \"${LANG}\":" \
161 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox.js \
162 "${MOZILLA_FIVE_HOME}"/defaults/pref/firefox-l10n.js || \
163 die "sed failed to change locale"
164 fi
165
166 # Create /usr/bin/firefox-bin
167 dodir /usr/bin/
168 cat <<EOF >"${D}"/usr/bin/firefox-bin
169 #!/bin/sh
170 unset LD_PRELOAD
171 exec /opt/firefox/firefox "\$@"
172 EOF
173 fperms 0755 /usr/bin/firefox-bin
174
175 # Install icon and .desktop for menu entry
176 doicon "${FILESDIR}"/icon/${PN}-icon.png
177 domenu "${FILESDIR}"/icon/${PN}.desktop
178
179 # revdep-rebuild entry
180 insinto /etc/revdep-rebuild
181 doins "${FILESDIR}"/10firefox-bin
182
183 # install ldpath env.d
184 doenvd "${FILESDIR}"/71firefox-bin
185
186 rm -rf "${D}"${MOZILLA_FIVE_HOME}/plugins
187 dosym /usr/"$(get_libdir)"/nsbrowser/plugins ${MOZILLA_FIVE_HOME}/plugins
188 }
189
190 pkg_preinst() {
191 declare MOZILLA_FIVE_HOME=/opt/firefox
192
193 # Remove entire installed instance to prevent all kinds of
194 # problems... see bug 44772 for example
195 rm -rf "${ROOT}"${MOZILLA_FIVE_HOME}
196 }
197
198 pkg_postinst() {
199 use amd64 && einfo "NB: You just installed a 32-bit firefox"
200 update_mozilla_launcher_symlinks
201 }
202
203 pkg_postrm() {
204 update_mozilla_launcher_symlinks
205 }