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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.9 - (show annotations) (download)
Sat Jan 2 23:36:09 2010 UTC (10 years, 10 months ago) by anarchy
Branch: MAIN
CVS Tags: HEAD
Changes since 1.8: +1 -1 lines
FILE REMOVED
remove stale ebuilds
(Portage version: 2.1.7.16/cvs/Linux x86_64)

1 # Copyright 1999-2009 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.5.5.ebuild,v 1.8 2009/12/14 01:54:38 mr_bones_ 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
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 mn 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.1.5"
16 MAJ_XUL_PV="1.9.1"
17 MAJ_PV="${PV/_*/}" # Without the _rc and _beta stuff
18 DESKTOP_PV="3.5"
19 MY_PV="${PV/_beta/b}" # Handle betas for SRC_URI
20 MY_PV="${PV/_/}" # Handle rcs for SRC_URI
21 PATCH="${PN}-3.5.5-patches-0.1"
22
23 DESCRIPTION="Firefox Web Browser"
24 HOMEPAGE="http://www.mozilla.com/firefox"
25
26 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
27 SLOT="0"
28 LICENSE="|| ( MPL-1.1 GPL-2 LGPL-2.1 )"
29 IUSE="+alsa bindist java mozdevelop restrict-javascript -sqlite iceweasel" # qt-experimental
30
31 REL_URI="http://releases.mozilla.org/pub/mozilla.org/firefox/releases"
32 SRC_URI="${REL_URI}/${MY_PV}/source/firefox-${MY_PV}.source.tar.bz2
33 http://dev.gentoo.org/~anarchy/dist/${PATCH}.tar.bz2"
34
35 for X in ${LANGS} ; do
36 if [ "${X}" != "en" ] && [ "${X}" != "en-US" ]; then
37 SRC_URI="${SRC_URI}
38 linguas_${X/-/_}? ( ${REL_URI}/${MY_PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
39 fi
40 IUSE="${IUSE} linguas_${X/-/_}"
41 # english is handled internally
42 if [ "${#X}" == 5 ] && ! has ${X} ${NOSHORTLANGS}; then
43 if [ "${X}" != "en-US" ]; then
44 SRC_URI="${SRC_URI}
45 linguas_${X%%-*}? ( ${REL_URI}/${PV}/linux-i686/xpi/${X}.xpi -> ${P}-${X}.xpi )"
46 fi
47 IUSE="${IUSE} linguas_${X%%-*}"
48 fi
49 done
50
51 # Not working.
52 # qt-experimental? (
53 # x11-libs/qt-gui
54 # x11-libs/qt-core )
55 # =net-libs/xulrunner-${XUL_PV}*[java=,qt-experimental=]
56
57 RDEPEND="
58 >=sys-devel/binutils-2.16.1
59 >=dev-libs/nss-3.12.2
60 >=dev-libs/nspr-4.7.3
61 >=app-text/hunspell-1.2
62 sqlite? ( >=dev-db/sqlite-3.6.20-r1[fts3] )
63 alsa? ( media-libs/alsa-lib )
64 ~net-libs/xulrunner-${XUL_PV}[java=,sqlite=]
65 >=x11-libs/cairo-1.8.8[X]
66 x11-libs/pango[X]"
67
68 DEPEND="${RDEPEND}
69 dev-util/pkgconfig"
70
71 PDEPEND="restrict-javascript? ( >=www-plugins/noscript-1.9.6.6 )"
72
73 S="${WORKDIR}/mozilla-1.9.1"
74
75 linguas() {
76 local LANG SLANG
77 for LANG in ${LINGUAS}; do
78 if has ${LANG} en en_US; then
79 has en ${linguas} || linguas="${linguas:+"${linguas} "}en"
80 continue
81 elif has ${LANG} ${LANGS//-/_}; then
82 has ${LANG//_/-} ${linguas} || linguas="${linguas:+"${linguas} "}${LANG//_/-}"
83 continue
84 elif [[ " ${LANGS} " == *" ${LANG}-"* ]]; then
85 for X in ${LANGS}; do
86 if [[ "${X}" == "${LANG}-"* ]] && \
87 [[ " ${NOSHORTLANGS} " != *" ${X} "* ]]; then
88 has ${X} ${linguas} || linguas="${linguas:+"${linguas} "}${X}"
89 continue 2
90 fi
91 done
92 fi
93 ewarn "Sorry, but ${PN} does not support the ${LANG} LINGUA"
94 done
95 }
96
97 pkg_setup() {
98 if ! use bindist ; then
99 elog "You are enabling official branding. You may not redistribute this build"
100 elog "to any users on your network or the internet. Doing so puts yourself into"
101 elog "a legal problem with Mozilla Foundation"
102 elog "You can disable it by emerging ${PN} _with_ the bindist USE-flag"
103 fi
104
105 if use iceweasel ; then
106 elog "You have enabled iceweasel useflag which does nothing in current ebuild."
107 elog "Please 'emerge -C mozilla-firefox; emerge icecat' if you wish to have same support"
108 elog "as you currently had with iceweasel useflag."
109 eerror "Please 'emerge -C mozilla-firefox; emerge icecat' to have a same support"
110 fi
111 }
112
113 src_unpack() {
114 unpack ${A}
115
116 linguas
117 for X in ${linguas}; do
118 # FIXME: Add support for unpacking xpis to portage
119 [[ ${X} != "en" ]] && xpi_unpack "${P}-${X}.xpi"
120 done
121 if [[ ${linguas} != "" && ${linguas} != "en" ]]; then
122 einfo "Selected language packs (first will be default): ${linguas}"
123 fi
124 }
125
126 src_prepare() {
127 # Apply our patches
128 EPATCH_SUFFIX="patch" \
129 EPATCH_FORCE="yes" \
130 epatch "${WORKDIR}"
131
132 eautoreconf
133
134 cd js/src
135 eautoreconf
136
137 # We need to re-patch this because autoreconf overwrites it
138 cd "${S}"
139 epatch "${FILESDIR}/000_flex-configure-LANG.patch"
140 }
141
142 src_configure() {
143 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
144 MEXTENSIONS="default"
145
146 ####################################
147 #
148 # mozconfig, CFLAGS and CXXFLAGS setup
149 #
150 ####################################
151
152 mozconfig_init
153 mozconfig_config
154
155 # It doesn't compile on alpha without this LDFLAGS
156 use alpha && append-ldflags "-Wl,--no-relax"
157
158 mozconfig_annotate '' --enable-extensions="${MEXTENSIONS}"
159 mozconfig_annotate '' --enable-application=browser
160 mozconfig_annotate 'gtk' --enable-default-toolkit=cairo-gtk2
161 mozconfig_annotate '' --disable-mailnews
162 mozconfig_annotate 'broken' --disable-crashreporter
163 mozconfig_annotate '' --enable-image-encoder=all
164 mozconfig_annotate '' --enable-canvas
165 # Bug 60668: Galeon doesn't build without oji enabled, so enable it
166 # regardless of java setting.
167 mozconfig_annotate '' --enable-oji --enable-mathml
168 mozconfig_annotate 'places' --enable-storage --enable-places
169 mozconfig_annotate '' --enable-safe-browsing
170
171 # System-wide install specs
172 mozconfig_annotate '' --disable-installer
173 mozconfig_annotate '' --disable-updater
174 mozconfig_annotate '' --disable-strip
175 mozconfig_annotate '' --disable-install-strip
176
177 # Use system libraries
178 mozconfig_annotate '' --enable-system-cairo
179 mozconfig_annotate '' --enable-system-hunspell
180 mozconfig_annotate '' --with-system-nspr
181 mozconfig_annotate '' --with-system-nss
182 mozconfig_annotate '' --enable-system-lcms
183 mozconfig_annotate '' --with-system-bz2
184 mozconfig_annotate '' --with-system-libxul
185 mozconfig_annotate '' --with-libxul-sdk=/usr/$(get_libdir)/xulrunner-devel-${MAJ_XUL_PV}
186
187 # Enable/Disable based on useflag
188 mozconfig_use_enable sqlite system-sqlite
189 mozconfig_use_enable mozdevelop jsd
190 mozconfig_use_enable mozdevelop xpctools
191 mozconfig_use_enable alsa ogg
192 mozconfig_use_enable alsa wave
193
194 if ! use bindist ; then
195 mozconfig_annotate '' --enable-official-branding
196 fi
197
198 # Finalize and report settings
199 mozconfig_final
200
201 if [[ $(gcc-major-version) -lt 4 ]]; then
202 append-cxxflags -fno-stack-protector
203 fi
204
205 ####################################
206 #
207 # Configure and build
208 #
209 ####################################
210
211 CC="$(tc-getCC)" CXX="$(tc-getCXX)" LD="$(tc-getLD)" econf
212 }
213
214 src_compile() {
215 # Should the build use multiprocessing? Not enabled by default, as it tends to break
216 [ "${WANT_MP}" = "true" ] && jobs=${MAKEOPTS} || jobs="-j1"
217 emake ${jobs} || die
218 }
219
220 src_install() {
221 MOZILLA_FIVE_HOME="/usr/$(get_libdir)/${PN}"
222
223 emake DESTDIR="${D}" install || die "emake install failed"
224
225 linguas
226 for X in ${linguas}; do
227 [[ ${X} != "en" ]] && xpi_install "${WORKDIR}"/"${P}-${X}"
228 done
229
230 # Install icon and .desktop for menu entry
231 if ! use bindist ; then
232 newicon "${S}"/other-licenses/branding/firefox/content/icon48.png firefox-icon.png
233 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5.desktop \
234 ${PN}-${DESKTOP_PV}.desktop
235 else
236 newicon "${S}"/browser/base/branding/icon48.png firefox-icon-unbranded.png
237 newmenu "${FILESDIR}"/icon/mozilla-firefox-1.5-unbranded.desktop \
238 ${PN}-${DESKTOP_PV}.desktop
239 sed -i -e "s:Bon Echo:Shiretoko:" \
240 "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop || die "sed failed!"
241 fi
242
243 # Add StartupNotify=true bug 237317
244 if use startup-notification ; then
245 echo "StartupNotify=true" >> "${D}"/usr/share/applications/${PN}-${DESKTOP_PV}.desktop
246 fi
247
248 pax-mark m "${D}"/${MOZILLA_FIVE_HOME}/firefox
249
250 # Enable very specific settings not inherited from xulrunner
251 cp "${FILESDIR}"/firefox-default-prefs.js \
252 "${D}/${MOZILLA_FIVE_HOME}/defaults/preferences/all-gentoo.js" || \
253 die "failed to cp xulrunner-default-prefs.js"
254
255 # Plugins dir
256 dosym ../nsbrowser/plugins "${MOZILLA_FIVE_HOME}"/plugins \
257 || die "failed to symlink"
258
259 # very ugly hack to make firefox not sigbus on sparc
260 if use sparc ; then
261 sed -i \
262 -e 's/Firefox/FirefoxGentoo/g' \
263 "${D}/${MOZILLA_FIVE_HOME}/application.ini" \
264 || die "sparc sed failed"
265 fi
266 }
267
268 pkg_postinst() {
269 ewarn "All the packages built against ${PN} won't compile,"
270 ewarn "any package that fails to build warrants a bug report."
271 elog
272
273 # Update mimedb for the new .desktop file
274 fdo-mime_desktop_database_update
275 }

  ViewVC Help
Powered by ViewVC 1.1.20