Magellan Linux

Contents of /trunk/extras/mozilla-firefox/mozilla-firefox-3.6.3-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5431 - (show annotations) (download)
Mon Jun 7 18:11:33 2010 UTC (13 years, 11 months ago) by niro
File size: 9141 byte(s)
-re-diffed patches
1 # $Id$
2
3 PNAME="mozilla-firefox"
4 PVER="3.6.3"
5 PBUILD="r1"
6
7 PCATEGORIE="net-www"
8 STATE="unstable"
9
10 DESCRIPTION="Firefox is Mozilla's award-winning next generation web browser."
11 HOMEPAGE="http://www.mozilla.org/products/firefox/"
12
13 DEPEND=">= virtual/java
14 >= x11-libs/libXrender-0.9
15 >= x11-libs/libXcomposite-0.4
16 >= x11-libs/libXt-1
17 >= x11-libs/libXmu-1
18 >= dev-libs/expat-2
19 >= sys-libs/zlib-1.2.3
20 >= media-libs/libmng-1.0.10
21 >= media-libs/fontconfig-2.7
22 >= media-libs/libjpeg-7
23 >= media-libs/libpng-1.2.40
24 >= dev-libs/glib2-2.22
25 >= dev-libs/libidl-0.8.13
26 >= app-arch/zip-3
27 >= app-arch/unzip-5.52
28 >= x11-libs/pango-1.26
29 >= x11-libs/cairo-1.8.8
30 >= x11-libs/gtk2+-2.18
31 >= dev-libs/nspr-4.8.2
32 >= dev-libs/nss-3.12.4"
33
34 SDEPEND=">= x11-proto/xineramaproto-1
35 >= x11-proto/compositeproto-0.4
36 >= dev-util/pkgconfig-0.23
37 >= sys-dev/autoconf-5
38 >= sys-dev/automake-4
39 >= sys-apps/sed-4"
40
41 SRCFILE="firefox-${PVER}.source.tar.bz2"
42 XUL_PVER="1.9.2"
43 SRCDIR="${BUILDDIR}/mozilla-${XUL_PVER}"
44
45 sminclude mozilla mtools
46
47 SRC_URI=(
48 ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE}
49 mirror://${PNAME}/${SRCFILE}
50 mirror://${PNAME}/menu/firefox.png
51 mirror://${PNAME}/menu/firefox.desktop
52 mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch
53 mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch
54 mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.patch
55 mirror://${PNAME}/mozilla-firefox-3.6.3-no-app-updates.patch
56 mirror://${PNAME}/mozilla-firefox-3.6.3-reload-new-plugins.patch
57 mirror://${PNAME}/mozilla-firefox-3.6.3-fixed-default-uris.patch
58 )
59
60 UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source | sed 's:[-|.]source::' | lasttarball"
61
62 export MOZ_PHOENIX=1
63
64 # set by configure (plus USE_AUTOCONF=1), but useful for NSPR
65 export MOZILLA_CLIENT=1
66 export BUILD_OPT=1
67 export NO_STATIC_LIB=1
68 export USE_PTHREADS=1
69
70 # now strip optimization from CFLAGS so it doesn't end up in the
71 # compile string
72 export CFLAGS="${CFLAGS/-O*/}"
73 export CXXFLAGS="${CFLAGS}"
74
75 # needed to build without warnings on gcc-3
76 export CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
77
78 src_prepare()
79 {
80 munpack ${SRCFILE} || die
81 cd ${SRCDIR}
82
83 # patches, patches, patches
84
85 # fix pkgconfig pathes
86 mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die
87
88 # fix some compile issues on multilib systems
89 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
90
91 # enable variable languages via environment vars
92 mpatch mozilla-firefox-2.0.0.9-language.patch || die
93
94 # disable auto app updates
95 mpatch mozilla-firefox-3.6.3-no-app-updates.patch || die
96
97 # auto reload newly installed plugins
98 mpatch mozilla-firefox-3.6.3-reload-new-plugins.patch || die
99
100 # fix broken default uris
101 mpatch mozilla-firefox-3.6.3-fixed-default-uris.patch || die
102
103 export WANT_AUTOCONF="2.1"
104 autoconf || die
105 }
106
107 src_compile()
108 {
109 cd ${SRCDIR}
110
111 # setup .mozconfig
112 cp browser/config/mozconfig .mozconfig || die
113
114 # where shall the files go ?
115 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox
116
117 # set optimization level based on CFLAGS
118 if [[ ${ARCH} = x86_64 ]]
119 then
120 # opts may cause segfaults on 64bit arches
121 mozconf_add --enable-optimize=-O1
122 export CFLAGS="${CFLAGS} -fPIC"
123 export CXXFLAGS="${CXXFLAGS} -fPIC"
124 else
125 mozconf_add --enable-optimize=-O2
126 fi
127
128 # enable compat mode for plugins build with gcc2
129 mozconf_add --enable-old-abi-compat-wrappers
130
131 # we don't need the installer
132 mozconf_add --disable-installer
133
134 # issue all warnings demanded by strict ANSI C
135 mozconf_add --disable-pedantic
136
137 # enable crypto support (Personal Security Manager)
138 mozconf_add --enable-crypto
139
140 # want system jpeg, pngm, zlib, nspr and nss
141 mozconf_add --with-system-jpeg
142 # doesn't work atm
143 #mozconf_add --with-system-png
144 mozconf_add --with-system-zlib
145 mozconf_add --with-system-nspr
146 mozconf_add --with-system-nss
147
148 # enable cairo-gtk2 as default
149 mozconf_add --enable-default-toolkit=cairo-gtk2
150
151 # no ipv6 support
152 mozconf_add --enable-ipv6
153
154 # want xinerama
155 mozconf_add --enable-xinerama
156
157 # no xprint ?
158 mozconf_add --disable-xprint
159
160 # >= firefox-1.0.7 should use xft + pango, svg with cairo
161 mozconf_add --disable-freetype2
162 mozconf_add --enable-xft
163 mozconf_add --enable-pango
164 mozconf_add --enable-system-cairo
165 mozconf_add --enable-svg
166 mozconf_add --enable-canvas
167
168 # enable all image encoders
169 mozconf_add --enable-image-encoder=all
170
171 # disable debug build && enable stripping
172 mozconf_add --disable-debug
173 mozconf_add --disable-tests
174 mozconf_add --enable-reorder
175 mozconf_add --enable-strip
176 mozconf_add --enable-strip-libs
177
178 if [[ ${ARCH} = i*86 ]]
179 then
180 # optimze build for x86
181 mozconf_add --enable-elf-dynstr-gc
182 fi
183
184 # both needed to build galeon
185 mozconf_add --enable-oji
186 mozconf_add --enable-mathml
187
188 # enable storage, places and safe-browsing
189 mozconf_add --enable-storage
190 mozconf_add --enable-places
191 mozconf_add --enable-safe-browsing
192
193 # enable default extensions
194 mozconf_add --enable-extensions=default
195
196 # gnome support (needs gnome-vfs)
197 mozconf_add --disable-gnomevfs
198 mozconf_add --enable-extension=-gnomevfs
199
200 # broken with firefox-3.0.10
201 mozconf_add --disable-mochitest
202 mozconf_add --disable-crashreporter
203
204 # resolve multiple --enable-extensions down to one
205 rebuild_extension_list
206
207 # now run configure
208 mconfigure || die
209
210 # removes extraneous CFLAGS
211 # to reduce RAM requirements while compiling
212 mozilla_remove_cflags || die
213
214 mmake || die
215 }
216
217 src_install()
218 {
219 cd ${SRCDIR}
220
221 # needed directories
222 minstalldir /etc/env.d || die
223 minstalldir /usr/bin || die
224 minstalldir /usr/$(mlibdir)/mozilla-firefox/icons || die
225 minstalldir /usr/$(mlibdir)/mozilla-firefox/idl || die
226 minstalldir /usr/$(mlibdir)/mozilla-firefox/include || die
227 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
228 minstalldir /usr/$(mlibdir)/pkgconfig || die
229 minstalldir /usr/share/applications || die
230
231 # install binaries
232 cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \
233 ${BINDIR}/usr/$(mlibdir)/mozilla-firefox || die
234
235 # fix permissions
236 mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
237
238 # bins
239 mlink /usr/$(mlibdir)/mozilla-firefox/firefox /usr/bin/firefox || die
240
241 # environment
242 # mozilla-1.7* uses already the env var mozilla_five_home
243 # firefox does not need this, the env var is only to compile
244 # mozilla-based sources
245 echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die
246 echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die
247
248 # vendor information
249 msetpref general.useragent.vendor Magellan-Linux || die
250
251 # disable app.update in default config
252 msetpref app.update.auto false || die
253 msetpref app.update.enabled false || die
254 msetpref app.update.autoInstallEnabled false || die
255
256 # necessary includes and idl files to build against firefox
257 cp -LfR dist/include/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/include || die
258 cp -LfR dist/idl/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/idl || die
259 # symlink to a missing header
260 mlink /usr/$(mlibdir)/mozilla-firefox/include/necko/nsIURI.h \
261 /usr/$(mlibdir)/mozilla-firefox/include/nsIURI.h || die
262 # pkgconfig files
263 # minstallfile build/unix/\*.pc /usr/$(mlibdir)/pkgconfig || die
264
265 # install icons
266 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon16.xpm \
267 /usr/$(mlibdir)/mozilla-firefox/icons || die
268 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon50.xpm \
269 /usr/$(mlibdir)/mozilla-firefox/icons || die
270
271 # menu entries
272 minstallpixmap firefox.png || die
273 minstallfile -s firefox.desktop /usr/share/applications || die
274
275 # now move all plugins to /usr/lib/nsbrowser/plugins
276 # and symlink them (we need a defined location for the plugins of all browsers)
277 cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* \
278 ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die
279 rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die
280 mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die
281 }
282
283 preinstall()
284 {
285 if [[ -n $(magequery -n mozilla) ]]
286 then
287 echo
288 echo "This version of ${PCATEGORIE}/${PNAME} replaces the mozilla development files"
289 echo "and both packages cannot coexist anymore."
290 echo "net-www/mozilla has no official support from mozilla.com"
291 echo "and will not included in future releases of magellan-linux."
292 echo
293 die "Please uninstall net-www/mozilla first!"
294 fi
295 }
296
297 postinstall()
298 {
299 # update environment; needed for REGXPCOM
300 env-rebuild
301 source ${MROOT}/etc/profile
302
303 # firefoxs mozilla_five_home
304 export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-firefox"
305
306 # register firefox
307 echo "Registering Components and Chrome..."
308
309 HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom
310 # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome
311
312 # fix permissions of component registry
313 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
314
315 # fix directory permissions
316 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
317
318 # fix permissions on chrome files
319 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
320 }

Properties

Name Value
svn:keywords Id