Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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

Properties

Name Value
svn:keywords Id