Magellan Linux

Contents of /trunk/extras/firefox/firefox-17.0.1-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 15570 - (show annotations) (download)
Fri Jan 4 16:02:10 2013 UTC (11 years, 5 months ago) by niro
File size: 9220 byte(s)
-fixed SRC_URIs
1 # $Id$
2
3 PNAME="firefox"
4 PVER="17.0.1"
5 PBUILD="r1"
6
7 SPLIT_PACKAGES="firefox firefox-sdk"
8
9 PCAT="net-www"
10 HOMEPAGE="http://www.mozilla.org/products/firefox/"
11
12 FIREFOX_DEPEND=">= x11-libs/libXrender-0.9
13 >= x11-libs/libXcomposite-0.4
14 >= x11-libs/libXt-1
15 >= x11-libs/libXmu-1
16 >= dev-libs/expat-2
17 >= sys-libs/zlib-1.2
18 >= sys-apps/dbus-1.6
19 >= dev-libs/dbus-glib-0.100
20 >= media-libs/fontconfig-2.10
21 >= media-libs/libjpeg-8
22 >= media-libs/libpng-1.5
23 >= media-libs/alsa-lib-1.0.26
24 >= media-libs/libogg-1.3
25 >= dev-libs/glib2-2.34
26 >= dev-libs/libidl-0.8.14
27 >= app-arch/unzip-6
28 >= x11-libs/pango-1.32
29 >= x11-libs/cairo-1.12
30 >= x11-libs/gtk2+-2.24
31 >= x11-libs/libnotify-0.7
32 >= dev-libs/nspr-4.9
33 >= dev-libs/nss-3.14
34 >= media-fonts/corefonts-2
35 >= app-text/hunspell-1.3
36 >= dev-db/sqlite-3.7
37 >= dev-libs/libffi-3
38 >= x11-libs/startup-notification-0.12
39 >= x11-libs/pixman-0.28"
40
41 SDEPEND="${FIREFOX_DEPEND}
42 >= x11-proto/xineramaproto-1
43 >= x11-proto/compositeproto-0.4
44 >= dev-util/pkgconfig-0.25
45 >= sys-dev/autoconf-5
46 >= sys-dev/automake-4
47 >= virtual/sed
48 >= app-arch/zip-3
49 >= dev-lang/yasm-1.2"
50
51 SRCFILE="firefox-${PVER}.source.tar.bz2"
52 SRCDIR="${BUILDDIR}/mozilla-release"
53
54 sminclude mozilla mtools cleanutils
55
56 SRC_URI=(
57 ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME}/releases/${PVER}/source/${SRCFILE}
58 mirror://mozilla-firefox/${SRCFILE}
59 mirror://mozilla-firefox/menu/firefox.png
60 mirror://mozilla-firefox/menu/firefox.desktop
61 mirror://mozilla-firefox/mozilla-firefox-3.0.6-pkgconfig.patch
62 mirror://mozilla-firefox/mozilla-firefox-2.0.0.5-rpath-3.patch
63 mirror://mozilla-firefox/mozilla-firefox-2.0.0.9-language.patch
64 )
65
66 UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME}/releases/latest/source | sed 's:[-|.]source::' | lasttarball"
67
68 split_info_firefox()
69 {
70 DESCRIPTION="Firefox is Mozilla's award-winning next generation web browser."
71 DEPEND="${FIREFOX_DEPEND}"
72 PROVIDE="virtual/webbrowser"
73 }
74
75 split_info_firefox-sdk()
76 {
77 DESCRIPTION="Firefox SDK to build plugins and programs."
78 DEPEND="== net-www/firefox-${PVER}"
79 }
80
81 export MOZ_PHOENIX=1
82
83 # set by configure (plus USE_AUTOCONF=1), but useful for NSPR
84 export MOZILLA_CLIENT=1
85 export BUILD_OPT=1
86 export NO_STATIC_LIB=1
87 export USE_PTHREADS=1
88
89 # now strip optimization from CFLAGS so it doesn't end up in the
90 # compile string
91 export CFLAGS="${CFLAGS/-O*/}"
92 export CXXFLAGS="${CFLAGS}"
93
94 # needed to build without warnings on gcc-3
95 export CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
96
97 src_prepare()
98 {
99 munpack ${SRCFILE} || die
100 cd ${SRCDIR}
101
102 # patches, patches, patches
103
104 # fix pkgconfig pathes
105 mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die
106
107 # fix some compile issues on multilib systems
108 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
109
110 # enable variable languages via environment vars
111 mpatch mozilla-firefox-2.0.0.9-language.patch || die
112
113 # fix newer curl-headers
114 sed -i '/#include <curl\/types.h>/d' \
115 toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \
116 toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \
117 config/system-headers \
118 js/src/config/system-headers || die
119
120 # don't exit with error when some libs are missing which we have in system
121 sed -i '/^MOZ_PKG_FATAL_WARNINGS/s@= 1@= 0@' browser/installer/Makefile.in || die
122
123 # don't error out when there's no files to be removed
124 sed -i 's@\(xargs rm\)$@\1 -f@' toolkit/mozapps/installer/packager.mk || die
125
126 mautoreconf || die
127 }
128
129 src_compile()
130 {
131 cd ${SRCDIR}
132
133 # setup .mozconfig
134 cp browser/config/mozconfig .mozconfig || die
135
136 # where shall the files go ?
137 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/firefox
138
139 # set optimization level based on CFLAGS
140 if [[ ${ARCH} = x86_64 ]]
141 then
142 # opts may cause segfaults on 64bit arches
143 mozconf_add --enable-optimize=-O1
144 export CFLAGS="${CFLAGS} -fPIC"
145 export CXXFLAGS="${CXXFLAGS} -fPIC"
146 else
147 mozconf_add --enable-optimize=-O2
148 fi
149
150 # enable compat mode for plugins build with gcc2
151 mozconf_add --enable-old-abi-compat-wrappers
152
153 # we don't need the installer
154 mozconf_add --disable-installer
155
156 # issue all warnings demanded by strict ANSI C
157 mozconf_add --disable-pedantic
158
159 # enable crypto support (Personal Security Manager)
160 mozconf_add --enable-crypto
161
162 # want system jpeg, pngm, zlib, nspr and nss
163 #mozconf_add --with-system-jpeg # prefer libjpeg-turbo
164 # doesn't work atm
165 #mozconf_add --with-system-png
166 mozconf_add --with-system-zlib
167 mozconf_add --with-system-nspr
168 mozconf_add --with-system-nss
169 mozconf_add --with-system-bz2
170 mozconf_add --enable-system-hunspell
171 mozconf_add --enable-system-sqlite
172 mozconf_add --enable-system-ffi
173 mozconf_add --enable-system-pixman
174
175 # enable cairo-gtk2 as default
176 mozconf_add --enable-default-toolkit=cairo-gtk2
177
178 # libnotify support (disabled atm)
179 mozconf_add --disable-libnotify
180
181 # ipv6 support
182 mozconf_add --enable-ipv6
183
184 # want xinerama
185 mozconf_add --enable-xinerama
186
187 # no xprint ?
188 mozconf_add --disable-xprint
189
190 # >= firefox-1.0.7 should use xft + pango, svg with cairo
191 mozconf_add --disable-freetype2
192 mozconf_add --enable-xft
193 mozconf_add --enable-pango
194 mozconf_add --enable-system-cairo
195 mozconf_add --enable-svg
196 mozconf_add --enable-canvas
197
198 # enable all image encoders
199 mozconf_add --enable-image-encoder=all
200
201 # disable debug build && enable stripping
202 mozconf_add --disable-debug
203 mozconf_add --disable-tests
204 mozconf_add --enable-reorder
205 mozconf_add --enable-strip
206 mozconf_add --enable-strip-libs
207
208 if [[ ${ARCH} = i*86 ]]
209 then
210 # optimze build for x86
211 mozconf_add --enable-elf-dynstr-gc
212 fi
213
214 # both needed to build galeon
215 mozconf_add --enable-oji
216 mozconf_add --enable-mathml
217
218 # enable storage, places and safe-browsing
219 mozconf_add --enable-storage
220 mozconf_add --enable-places
221 mozconf_add --enable-safe-browsing
222
223 # enable default extensions
224 mozconf_add --enable-extensions=default
225
226 # gnome support (needs gnome-vfs)
227 mozconf_add --disable-gnomevfs
228 mozconf_add --enable-extension=-gnomevfs
229
230 # broken with firefox-3.0.10
231 mozconf_add --disable-mochitest
232 mozconf_add --disable-crashreporter
233
234 # enable libnotify
235 mozconf_add --enable-libnotify
236 # enable gio
237 mozconf_add --enable-gio
238 # enable startup-notification
239 mozconf_add --enable-startup-notification
240 # enable dbus
241 mozconf_add --enable-dbus
242 # enable webm and libjpeg-turbo format
243 # both needs yasm
244 mozconf_add --enable-webm
245 mozconf_add --enable-libjpeg-turbo
246 # enable libalsa and ogg
247 mozconf_add --enable-ogg
248 mozconf_add --enable-wave
249
250 # resolve multiple --enable-extensions down to one
251 rebuild_extension_list
252
253 # now run configure
254 mconfigure || die
255
256 # removes extraneous CFLAGS
257 # to reduce RAM requirements while compiling
258 mozilla_remove_cflags || die
259
260 mmake || die
261 }
262
263 src_install_firefox()
264 {
265 cd ${SRCDIR}
266
267 # install
268 make DESTDIR=${BINDIR} install || die
269
270 # fix permissions
271 mchown -R root:root /usr/$(mlibdir)/firefox || die
272
273 # vendor information
274 msetpref general.useragent.vendor Magellan-Linux || die
275
276 # disable app.update in default config
277 msetpref app.update.auto false || die
278 msetpref app.update.enabled false || die
279 msetpref app.update.autoInstallEnabled false || die
280
281 # use system-colors
282 msetpref browser.display.use_system_colors true || die
283 # disable default-browser check
284 msetpref browser.shell.checkDefaultBrowser false || die
285
286 # menu entries
287 minstallpixmap firefox.png || die
288 minstalldir /usr/share/applications || die
289 minstallfile -s firefox.desktop /usr/share/applications || die
290
291 # now move all plugins to /usr/lib/nsbrowser/plugins
292 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
293 if [[ -d ${BINDIR}/usr/$(mlibdir)/firefox/plugins ]]
294 then
295 mcopy -a ${BINDIR}/usr/$(mlibdir)/firefox/plugins/\* /usr/$(mlibdir)/nsbrowser/plugins || die
296 mdelete -r /usr/$(mlibdir)/firefox/plugins || die
297 fi
298 # and symlink them (we need a defined location for the plugins of all browsers)
299 mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/firefox/plugins || die
300
301 # fix missing binary
302 #https://bugzilla.mozilla.org/show_bug.cgi?id=658850
303 mlink firefox /usr/$(mlibdir)/firefox/firefox-bin || die
304
305 # remove sdk files
306 mdelete -r /usr/include || die
307 mdelete -r /usr/$(mlibdir)/firefox/idl || die
308 mdelete -r /usr/$(mlibdir)/firefox/include || die
309 mdelete -r /usr/$(mlibdir)/firefox/lib || die
310 mdelete -r /usr/$(mlibdir)/firefox/sdk || die
311 }
312
313 src_install_firefox-sdk()
314 {
315 cd ${SRCDIR}
316
317 make DESTDIR=${BINDIR} install || die
318 mchown -R root:root /usr/$(mlibdir)/firefox || die
319
320 # environment
321 # mozilla-1.7* uses already the env var mozilla_five_home
322 # firefox does not need this, the env var is only to compile
323 # mozilla-based sources
324 minstalldir /etc/env.d || die
325 MCONFIG="/etc/env.d/90firefox-sdk"
326 mclearconfig || die
327 maddconfig "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/firefox" || die
328 maddconfig "LDPATH=/usr/$(mlibdir)/firefox" || die
329
330 # keep only sdk files
331 zapmost ${BINDIR} \
332 etc/env.d \
333 usr/include \
334 usr/$(mlibdir)/firefox/idl \
335 usr/$(mlibdir)/firefox/include \
336 usr/$(mlibdir)/firefox/lib \
337 usr/$(mlibdir)/firefox/sdk \
338 || die
339 }
340
341 preinstall_firefox()
342 {
343 # remove old 90mozilla-firefox env-file
344 if [[ -f ${MROOT}/etc/env.d/90mozilla-firefox ]]
345 then
346 rm ${MROOT}/etc/env.d/90mozilla-firefox
347 env-rebuild
348 fi
349 }