Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1668 - (show annotations) (download)
Wed May 13 12:48:59 2009 UTC (14 years, 11 months ago) by niro
File size: 9444 byte(s)
auto added: ver bump to 3.0.10-r1
1 # $Id$
2
3 PNAME="mozilla-firefox"
4 PVER="3.0.10"
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
34 SDEPEND=">= x11-proto/xineramaproto-1
35 >= x11-proto/compositeproto-0.4
36 >= dev-util/pkgconfig-0.23
37 >= sys-dev/autoconf-4
38 >= sys-dev/automake-3
39 >= sys-apps/sed-4"
40
41 SRCFILE="firefox-${PVER}-source.tar.bz2"
42 SRCDIR="${BUILDDIR}/mozilla"
43
44 sminclude mozilla mtools
45
46 SRC_URI=(
47 ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE}
48 mirror://${PNAME}/${SRCFILE}
49 mirror://${PNAME}/menu/firefox.png
50 mirror://${PNAME}/menu/firefox.desktop
51 mirror://${PNAME}/mozilla-firefox-3.0.6-embed-typeaheadfind.patch
52 mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch
53 mirror://${PNAME}/mozilla-firefox-2.0.0.5-libdeps.patch
54 mirror://${PNAME}/mozilla-firefox-2.0.0.5-asneeded.patch
55 mirror://${PNAME}/mozilla-firefox-2.0.0.5-respect-host-variable.patch
56 mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch
57 mirror://${PNAME}/mozilla-firefox-2.0.0.5-pango-cursor.patch
58 mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.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 # fix linking issues against pango
87 # https://bugzilla.mozilla.org/show_bug.cgi?id=344821
88 mpatch mozilla-firefox-2.0.0.5-libdeps.patch || die
89
90 # use as-needed with newer binutils
91 # https://bugzilla.mozilla.org/show_bug.cgi?id=311236
92 #mpatch mozilla-firefox-2.0.0.5-asneeded.patch || die
93
94 # fixes typeahead and gtk fixes for embeded firefox browsers
95 mpatch mozilla-firefox-3.0.6-embed-typeaheadfind.patch || die
96
97 # fix pkgconfig pathes
98 mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die
99
100 # fix some compile issues on multilib systems
101 #mpatch mozilla-firefox-2.0.0.5-respect-host-variable.patch || die
102 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
103
104 # fix pango-cursor issues
105 #mpatch mozilla-firefox-2.0.0.5-pango-cursor.patch || die
106
107 # enable variable languages via environment vars
108 mpatch mozilla-firefox-2.0.0.9-language.patch || die
109
110 # branding the source with our tags
111 #sed -i "s|0000000000|Magellan Linux|" xpfe/global/build.dtd.in || die
112
113 export WANT_AUTOCONF="2.1"
114 autoconf || die
115 }
116
117 src_compile()
118 {
119 cd ${SRCDIR}
120
121 # setup .mozconfig
122 cp browser/config/mozconfig .mozconfig || die
123
124 # where shall the files go ?
125 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox
126
127 # set optimization level based on CFLAGS
128 if [[ ${ARCH} = x86_64 ]]
129 then
130 # opts may cause segfaults on 64bit arches
131 mozconf_add --enable-optimize=-O1
132 export CFLAGS="${CFLAGS} -fPIC"
133 export CXXFLAGS="${CXXFLAGS} -fPIC"
134 else
135 mozconf_add --enable-optimize=-O2
136 fi
137
138 # enable compat mode for plugins build with gcc2
139 mozconf_add --enable-old-abi-compat-wrappers
140
141 # we don't need the installer
142 mozconf_add --disable-installer
143
144 # issue all warnings demanded by strict ANSI C
145 mozconf_add --disable-pedantic
146
147 # enable crypto support (Personal Security Manager)
148 mozconf_add --enable-crypto
149
150 # want system jpeg, pngm, zlib, nspr and nss
151 mozconf_add --with-system-jpeg
152 # doesn't work atm
153 #mozconf_add --with-system-png
154 mozconf_add --with-system-zlib
155 mozconf_add --with-system-nspr
156 mozconf_add --with-system-nss
157
158 # enable gtk2 as default
159 #mozconf_add --enable-default-toolkit=gtk2
160 # enable cairo-gtk2 as default
161 mozconf_add --enable-default-toolkit=cairo-gtk2
162
163 # no ipv6 support
164 mozconf_add --enable-ipv6
165
166 # want xinerama
167 mozconf_add --enable-xinerama
168
169 # no xprint ?
170 mozconf_add --disable-xprint
171
172 # >= firefox-1.0.7 should use xft + pango, svg with cairo
173 mozconf_add --disable-freetype2
174 mozconf_add --enable-xft
175 mozconf_add --enable-pango
176 mozconf_add --enable-system-cairo
177 mozconf_add --enable-svg
178 mozconf_add --enable-canvas
179
180 # enable all image encoders
181 mozconf_add --enable-image-encoder=all
182
183 # disable debug build && enable stripping
184 mozconf_add --disable-debug
185 mozconf_add --disable-tests
186 mozconf_add --enable-reorder
187 mozconf_add --enable-strip
188 mozconf_add --enable-strip-libs
189
190 if [[ ${ARCH} = i*86 ]]
191 then
192 # optimze build for x86
193 mozconf_add --enable-elf-dynstr-gc
194 fi
195
196 # both needed to build galeon
197 mozconf_add --enable-oji
198 mozconf_add --enable-mathml
199
200 # enable default extensions and typeaheadfind
201 mozconf_add --enable-extensions=default,typeaheadfind
202
203 # gnome support (needs gnome-vfs)
204 mozconf_add --disable-gnomevfs
205 mozconf_add --enable-extension=-gnomevfs
206
207 # resolve multiple --enable-extensions down to one
208 rebuild_extension_list
209
210 # now run configure
211 #ac_cv_visibility_pragma=no mconfigure || die
212 mconfigure || die
213
214 # removes extraneous CFLAGS
215 # to reduce RAM requirements while compiling
216 mozilla_remove_cflags || die
217
218 mmake || die
219 }
220
221 src_install()
222 {
223 cd ${SRCDIR}
224
225 # needed directories
226 minstalldir /etc/env.d || die
227 minstalldir /usr/bin || die
228 minstalldir /usr/$(mlibdir)/mozilla-firefox/icons || die
229 minstalldir /usr/$(mlibdir)/mozilla-firefox/idl || die
230 minstalldir /usr/$(mlibdir)/mozilla-firefox/include || die
231 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
232 minstalldir /usr/$(mlibdir)/pkgconfig || die
233 minstalldir /usr/share/applications || die
234
235 # install binaries
236 cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \
237 ${BINDIR}/usr/$(mlibdir)/mozilla-firefox || die
238
239 # fix permissions
240 mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
241
242 # bins
243 mlink /usr/$(mlibdir)/mozilla-firefox/firefox /usr/bin/firefox || die
244
245 # environment
246 # mozilla-1.7* uses already the env var mozilla_five_home
247 # firefox does not need this, the env var is only to compile
248 # mozilla-based sources
249 echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die
250 echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die
251
252 # vendor information
253 echo 'pref("general.useragent.vendor","Magellan-Linux");' > ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/defaults/pref/vendor.js || die
254
255 # necessary includes and idl files to build against firefox
256 cp -LfR dist/include/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/include || die
257 cp -LfR dist/idl/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/idl || die
258 # symlink to a missing header
259 mlink /usr/$(mlibdir)/mozilla-firefox/include/necko/nsIURI.h \
260 /usr/$(mlibdir)/mozilla-firefox/include/nsIURI.h || die
261 # pkgconfig files
262 # minstallfile build/unix/\*.pc /usr/$(mlibdir)/pkgconfig || die
263
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