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

Contents of /www-client/mozilla-firefox/mozilla-firefox-3.6-r1.ebuild

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.2 - (show annotations) (download)
Fri Feb 12 20:51:53 2010 UTC (10 years, 9 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +1 -1 lines
FILE REMOVED
Fix system sqlite, ensure we use secure-delete of sqlite
(Portage version: 2.1.7.17/cvs/Linux x86_64)

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-r1.ebuild,v 1.1 2010/01/29 15:01:08 anarchy Exp $
4 EAPI="2"
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
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 ja
11 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 ro
12 ru si sk sl sq sr sv-SE ta-LK ta 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 XUL_PV="1.9.2"
16 MAJ_XUL_PV="1.9.2"
17 MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
18 DESKTOP_PV="3.6"
19 MY_PV="${PV/_rc/rc}" # Handle beta for SRC_URI
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"
26 SLOT="0"
27 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
28 IUSE="+alsa bindist java libnotify 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 >=dev-db/sqlite-3.6.20-r1[fts3]
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}[java=,wifi=,libnotify=]"
62
63 DEPEND="${RDEPEND}
64 java? ( >=virtual/jdk-1.4 )
65 dev-util/pkgconfig"
66
67 RDEPEND="${RDEPEND} java? ( >=virtual/jre-1.4 )"
68
69 S="${WORKDIR}/mozilla-1.9.2"
70
71 QA_PRESTRIPPED="usr/$(get_libdir)/${PN}/firefox"
72
73 linguas() {
74 local LANG SLANG
75 for LANG in ${LINGUAS}; do
76 if has ${LANG} en en_US; then
77 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
78 continue
79 elif has ${LANG} ${LANGS//-/_}; then
80 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
81 continue
82 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
83 for X in ${LANGS}; do
84 if [[ "${X}" == "${LANG}-"* ]] && \
85 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
86 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
87 continue 2
88 fi
89 done
90 fi
91 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
92 done
93 }
94
95 pkg_setup() {
96 if ! use bindist ; then
97 einfo
98 elog "You are enabling official branding. You may not redistribute this build"
99 elog "to any users on your network or the internet. Doing so puts yourself into"
100 elog "a legal problem with Mozilla Foundation"
101 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
102 fi
103
104 java-pkg-opt-2_pkg_setup
105 }
106
107 src_unpack() {
108 unpack firefox-${MY_PV}.source.tar.bz2 ${PATCH}.tar.bz2
109
110 linguas
111 for X in ${linguas}; do
112 # FIXME: Add support for unpacking xpis to portage
113 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
114 done
115 }
116
117 src_prepare() {
118 # Apply our patches
119 EPATCH_SUFFIX="patch" \
120 EPATCH_FORCE="yes" \
121 epatch "${WORKDIR}"
122
123 # Fix media build failure
124 epatch "${FILESDIR}/xulrunner-1.9.2-noalsa-fixup.patch"
125
126 eautoreconf
127
128 cd js/src
129 eautoreconf
130
131 # We need to re-patch this because autoreconf overwrites it
132 epatch "${FILESDIR}/000_flex-configure-LANG.patch"
133 }
134
135 src_configure() {
136 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
137 MEXTENSIONS="default"
138
139 ####################################
140 #
141 # mozconfig, CFLAGS and CXXFLAGS setup
142 #
143 ####################################
144
145 mozconfig_init
146 mozconfig_config
147
148 # It doesn't compile on alpha without this LDFLAGS
149 use alpha && append-ldflags "-Wl,--no-relax"
150
151 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
152 mozconfig_annotate '' --enable-application=browser
153 mozconfig_annotate '' --disable-mailnews
154 mozconfig_annotate 'broken' --disable-crashreporter
155 mozconfig_annotate '' --enable-image-encoder=all
156 mozconfig_annotate '' --enable-canvas
157 mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
158 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
159 # regardless of java setting.
160 mozconfig_annotate '' --enable-oji --enable-mathml
161 mozconfig_annotate 'places' --enable-storage --enable-places
162 mozconfig_annotate '' --enable-safe-browsing
163
164 # Build mozdevelop permately
165 mozconfig_annotate '' --enable-jsd --enable-xpctools
166
167 # System-wide install specs
168 mozconfig_annotate '' --disable-installer
169 mozconfig_annotate '' --disable-updater
170 mozconfig_annotate '' --disable-strip
171 mozconfig_annotate '' --disable-install-strip
172
173 # Use system libraries
174 mozconfig_annotate '' --enable-system-cairo
175 mozconfig_annotate '' --enable-system-hunspell
176 mozconfig_annotate '' --with-system-nspr
177 mozconfig_annotate '' --with-system-nss
178 mozconfig_annotate '' --enable-system-lcms
179 mozconfig_annotate '' --with-system-bz2
180 mozconfig_annotate '' --with-system-libxul
181 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}
182
183 mozconfig_use_enable libnotify
184 mozconfig_use_enable java javaxpcom
185 mozconfig_use_enable wifi necko-wifi
186 mozconfig_use_enable alsa ogg
187 mozconfig_use_enable alsa wave
188
189 # Other ff-specific settings
190 mozconfig_annotate '' --with-default-mozilla-five-home=${MOZILLA_FIVE_HOME}
191
192 # Enable/Disable audio in firefox
193 mozconfig_use_enable alsa ogg
194 mozconfig_use_enable alsa wave
195
196 if ! use bindist ; then
197 mozconfig_annotate '' --enable-official-branding
198 fi
199
200 # Finalize and report settings
201 mozconfig_final
202
203 if [[ $(gcc-major-version) -lt 4 ]]; then
204 append-cxxflags -fno-stack-protector
205 fi
206
207 ####################################
208 #
209 # Configure and build
210 #
211 ####################################
212
213 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
214 }
215
216 src_compile() {
217 # Should the build use multiprocessing? Not enabled by default, as it tends to break
218 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
219 emake ${jobs} || die
220 }
221
222 src_install() {
223 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
224
225 emake DESTDIR="${D}" install || die "emake install failed"
226
227 linguas
228 for X in ${linguas}; do
229 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
230 done
231
232 # Install icon and .desktop for menu entry
233 if ! use bindist ; then
234 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
235 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
236 ${PN}-${DESKTOP_PV}.desktop
237 else
238 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
239 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
240 ${PN}-${DESKTOP_PV}.desktop
241 sed -i -e "s:Bon Echo:Shiretoko:" \
242 "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop || die "sed failed!"
243 fi
244
245 # Add StartupNotify=true bug 237317
246 if use startup-notification ; then
247 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
248 fi
249
250 pax-mark m "${D}"/${MOZILLA_FIVE_HOME}/firefox
251
252 # Enable very specific settings not inherited from xulrunner
253 cp "${FILESDIR}"/firefox-default-prefs.js \
254 "${D}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
255 die "failed to cp firefox-default-prefs.js"
256
257 # Plugins dir
258 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
259 || die "failed to symlink"
260
261 # very ugly hack to make firefox not sigbus on sparc
262 use sparc && { sed -e 's/Firefox/FirefoxGentoo/g' \
263 -i "${D}/${MOZILLA_FIVE_HOME}/application.ini" || \
264 die "sparc sed failed"; }
265 }
266
267 pkg_postinst() {
268 ewarn "All the packages built against ${PN} won't compile,"
269 ewarn "any package that fails to build warrants a bug report."
270 elog
271
272 # Update mimedb for the new .desktop file
273 fdo-mime_desktop_database_update
274 }

  ViewVC Help
Powered by ViewVC 1.1.20