/[gentoo-x86]/www-client/mozilla-firefox/mozilla-firefox-3.6.8.ebuild
Gentoo

Contents of /www-client/mozilla-firefox/mozilla-firefox-3.6.8.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations) (download)
Sun Jul 25 19:19:28 2010 UTC (10 years, 4 months ago) by nirbheek
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +1 -1 lines
FILE REMOVED
Remove www-client/mozilla-firefox since it has been pkgmoved to www-client/firefox

1 # Copyright 1999-2010 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
3 # $Header: /var/cvsroot/gentoo-x86/www-client/mozilla-firefox/mozilla-firefox-3.6.8.ebuild,v 1.3 2010/07/25 13:46:39 jer Exp $
4 EAPI="3"
5 WANT_AUTOCONF="2.1"
6
7 inherit flag-o-matic toolchain-funcs eutils mozconfig-3 makeedit multilib pax-utils fdo-mime autotools mozextension java-pkg-opt-2 python
8
9 LANGS="af ar as be bg bn-BD bn-IN ca cs cy da de el en en-GB en-US eo es-AR \
10 es-CL es-ES es-MX et eu fa fi fr fy-NL ga-IE gl gu-IN he hi-IN hr hu id is it \
11 ja ka kk kn ko ku lt lv mk ml mr nb-NO nl nn-NO oc or pa-IN pl pt-BR pt-PT rm \
12 ro ru si sk sl sq sr sv-SE ta ta-LK te th tr uk vi zh-CN zh-TW"
13 NOSHORTLANGS="en-GB es-AR es-CL es-MX pt-BR zh-CN zh-TW"
14
15 MAJ_XUL_PV="1.9.2"
16 MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
17 DESKTOP_PV="3.6"
18 MY_PV="${PV/_rc/rc}" # Handle beta for SRC_URI
19 XUL_PV="${MAJ_XUL_PV}${MAJ_PV/${DESKTOP_PV}/}" # Major + Minor version no.s
20 PATCH="${PN}-3.6-patches-0.6"
21
22 DESCRIPTION="Firefox Web Browser"
23 HOMEPAGE="http://www.mozilla.com/firefox"
24
25 KEYWORDS="~alpha ~amd64 ~arm hppa ~ia64 ppc ~ppc64 ~sparc x86 ~amd64-linux ~ia64-linux ~x86-linux ~sparc-solaris ~x64-solaris ~x86-solaris"
26 SLOT="0"
27 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
28 IUSE="+alsa bindist +ipc java libnotify system-sqlite wifi"
29
30 REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
31 SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2
32 http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"
33
34 for X in ${LANGS} ; do
35 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
36 SRC_URI="${SRC_URI}
37 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
38 fi
39 IUSE="${IUSE} linguas_${X/-/_}"
40 # english is handled internally
41 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
42 if [ "${X}" != "en-US" ]; then
43 SRC_URI="${SRC_URI}
44 linguas_${X%%-*}? ( ${REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
45 fi
46 IUSE="${IUSE} linguas_${X%%-*}"
47 fi
48 done
49
50 RDEPEND="
51 >=sys-devel/binutils-2.16.1
52 >=dev-libs/nss-3.12.4
53 >=dev-libs/nspr-4.8
54 >=app-text/hunspell-1.2
55 system-sqlite? ( >=dev-db/sqlite-3.6.22-r2[fts3,secure-delete] )
56 alsa? ( media-libs/alsa-lib )
57 >=x11-libs/cairo-1.8.8[X]
58 x11-libs/pango[X]
59 wifi? ( net-wireless/wireless-tools )
60 libnotify? ( >=x11-libs/libnotify-0.4 )
61 ~net-libs/xulrunner-${XUL_PV}[ipc=,java=,wifi=,libnotify=,system-sqlite=]"
62
63 DEPEND="${RDEPEND}
64 java? ( >=virtual/jdk-1.4 )
65 =dev-lang/python-2*[threads]
66 dev-util/pkgconfig"
67
68 RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.4 )"
69
70 S="${WORKDIR}/mozilla-1.9.2"
71
72 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
73
74 linguas() {
75 local LANG SLANG
76 for LANG in ${LINGUAS}; do
77 if has ${LANG} en en_US; then
78 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
79 continue
80 elif has ${LANG} ${LANGS//-/_}; then
81 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
82 continue
83 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
84 for X in ${LANGS}; do
85 if [[ "${X}" == "${LANG}-"* ]] && \
86 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
87 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
88 continue 2
89 fi
90 done
91 fi
92 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
93 done
94 }
95
96 pkg_setup() {
97 # Ensure we always build with C locale.
98 export LANG="C"
99 export LC_ALL="C"
100 export LC_MESSAGES="C"
101 export LC_CTYPE="C"
102
103 if ! use bindist ; then
104 einfo
105 elog "You are enabling official branding. You may not redistribute this build"
106 elog "to any users on your network or the internet. Doing so puts yourself into"
107 elog "a legal problem with Mozilla Foundation"
108 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
109 fi
110
111 java-pkg-opt-2_pkg_setup
112
113 python_set_active_version 2
114 }
115
116 src_unpack() {
117 unpack firefox-${MY_PV}.source.tar.bz2 ${PATCH}.tar.bz2
118
119 linguas
120 for X in ${linguas}; do
121 # FIXME: Add support for unpacking xpis to portage
122 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
123 done
124 }
125
126 src_prepare() {
127 # Apply our patches
128 EPATCH_SUFFIX="patch" \
129 EPATCH_FORCE="yes" \
130 EPATCH_EXCLUDE="137-bz460917_att350845_reload_new_plugins-gentoo-update.patch" \
131 epatch "${WORKDIR}"
132
133 epatch "${FILESDIR}"/${PN}-3.0-solaris64.patch
134
135 # The patch excluded above failed, ported patch is applied below
136 epatch "${FILESDIR}/137-bz460917_reload_new_plugins-gentoo-update-3.6.4.patch"
137
138 # ARM fixes, bug 327783
139 epatch "${FILESDIR}/xulrunner-1.9.2-arm-fixes.patch"
140
141 # Enable tracemonkey for amd64 (bug #315997)
142 epatch "${FILESDIR}/801-enable-x86_64-tracemonkey.patch"
143
144 # Allow user to apply additional patches without modifing ebuild
145 epatch_user
146
147 eautoreconf
148
149 cd js/src
150 eautoreconf
151 }
152
153 src_configure() {
154 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
155 MEXTENSIONS="default"
156
157 ####################################
158 #
159 # mozconfig, CFLAGS and CXXFLAGS setup
160 #
161 ####################################
162
163 mozconfig_init
164 mozconfig_config
165
166 # It doesn't compile on alpha without this LDFLAGS
167 use alpha && append-ldflags "-Wl,--no-relax"
168
169 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
170 mozconfig_annotate '' --enable-application=browser
171 mozconfig_annotate '' --disable-mailnews
172 mozconfig_annotate 'broken' --disable-crashreporter
173 mozconfig_annotate '' --enable-image-encoder=all
174 mozconfig_annotate '' --enable-canvas
175 mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
176 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
177 # regardless of java setting.
178 mozconfig_annotate '' --enable-oji --enable-mathml
179 mozconfig_annotate 'places' --enable-storage --enable-places
180 mozconfig_annotate '' --enable-safe-browsing
181
182 # Build mozdevelop permately
183 mozconfig_annotate '' --enable-jsd --enable-xpctools
184
185 # System-wide install specs
186 mozconfig_annotate '' --disable-installer
187 mozconfig_annotate '' --disable-updater
188 mozconfig_annotate '' --disable-strip
189 mozconfig_annotate '' --disable-install-strip
190
191 # Use system libraries
192 mozconfig_annotate '' --enable-system-cairo
193 mozconfig_annotate '' --enable-system-hunspell
194 mozconfig_annotate '' --with-system-nspr --with-nspr-prefix="${EPREFIX}"/usr
195 mozconfig_annotate '' --with-system-nss --with-nss-prefix="${EPREFIX}"/usr
196 mozconfig_annotate '' --x-includes="${EPREFIX}"/usr/include --x-libraries="${EPREFIX}"/usr/$(get_libdir)
197 mozconfig_annotate '' --with-system-bz2
198 mozconfig_annotate '' --with-system-libxul
199 mozconfig_annotate '' --with-libxul-sdk="${EPREFIX}"/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}
200
201 mozconfig_use_enable ipc # +ipc, upstream default
202 mozconfig_use_enable libnotify
203 mozconfig_use_enable java javaxpcom
204 mozconfig_use_enable wifi necko-wifi
205 mozconfig_use_enable alsa ogg
206 mozconfig_use_enable alsa wave
207 mozconfig_use_enable system-sqlite
208 mozconfig_use_enable !bindist official-branding
209
210 # Other ff-specific settings
211 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
212
213 # Finalize and report settings
214 mozconfig_final
215
216 if [[ $(gcc-major-version) -lt 4 ]]; then
217 append-cxxflags -fno-stack-protector
218 fi
219
220 ####################################
221 #
222 # Configure and build
223 #
224 ####################################
225
226 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" PYTHON="$(PYTHON)" econf
227 }
228
229 src_compile() {
230 # Should the build use multiprocessing? Not enabled by default, as it tends to break
231 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
232 emake ${jobs} || die
233 }
234
235 src_install() {
236 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
237
238 emake DESTDIR="${D}" install || die "emake install failed"
239
240 linguas
241 for X in ${linguas}; do
242 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
243 done
244
245 # Install icon and .desktop for menu entry
246 if ! use bindist ; then
247 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
248 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
249 ${PN}-${DESKTOP_PV}.desktop
250 else
251 newicon "${S}"/browser/branding/unofficial/content/icon48.png firefox-icon-unbranded.png
252 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
253 ${PN}-${DESKTOP_PV}.desktop
254 sed -i -e "s:Bon Echo:Namoroka:" \
255 "${ED}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop || die "sed failed!"
256 fi
257
258 # Add StartupNotify=true bug 237317
259 if use startup-notification ; then
260 echo "StartupNotify=true" >> "${ED}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
261 fi
262
263 pax-mark m "${ED}"/${MOZILLA_FIVE_HOME}/firefox
264
265 # Enable very specific settings not inherited from xulrunner
266 cp "${FILESDIR}"/firefox-default-prefs.js \
267 "${ED}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
268 die "failed to cp firefox-default-prefs.js"
269
270 # Plugins dir
271 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
272 || die "failed to symlink"
273
274 # very ugly hack to make firefox not sigbus on sparc
275 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
276 -i "${ED}/${MOZILLA_FIVE_HOME}/application.ini" || \
277 die "sparc sed failed"; }
278 }
279
280 pkg_postinst() {
281 ewarn "All the packages built against ${PN} won't compile,"
282 ewarn "any package that fails to build warrants a bug report."
283 elog
284
285 # Update mimedb for the new .desktop file
286 fdo-mime_desktop_database_update
287 }

  ViewVC Help
Powered by ViewVC 1.1.20