Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2819 - (show annotations) (download)
Sat Jul 11 11:13:27 2009 UTC (14 years, 9 months ago) by niro
File size: 9545 byte(s)
auto added: ver bump to 3.0.11-r1
1 # $Id$
2
3 PNAME="mozilla-firefox"
4 PVER="3.0.11"
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 # broken with firefox-3.0.10
208 mozconf_add --disable-mochitest
209 mozconf_add --disable-crashreporter
210
211 # resolve multiple --enable-extensions down to one
212 rebuild_extension_list
213
214 # now run configure
215 #ac_cv_visibility_pragma=no mconfigure || die
216 mconfigure || die
217
218 # removes extraneous CFLAGS
219 # to reduce RAM requirements while compiling
220 mozilla_remove_cflags || die
221
222 mmake || die
223 }
224
225 src_install()
226 {
227 cd ${SRCDIR}
228
229 # needed directories
230 minstalldir /etc/env.d || die
231 minstalldir /usr/bin || die
232 minstalldir /usr/$(mlibdir)/mozilla-firefox/icons || die
233 minstalldir /usr/$(mlibdir)/mozilla-firefox/idl || die
234 minstalldir /usr/$(mlibdir)/mozilla-firefox/include || die
235 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
236 minstalldir /usr/$(mlibdir)/pkgconfig || die
237 minstalldir /usr/share/applications || die
238
239 # install binaries
240 cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \
241 ${BINDIR}/usr/$(mlibdir)/mozilla-firefox || die
242
243 # fix permissions
244 mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
245
246 # bins
247 mlink /usr/$(mlibdir)/mozilla-firefox/firefox /usr/bin/firefox || die
248
249 # environment
250 # mozilla-1.7* uses already the env var mozilla_five_home
251 # firefox does not need this, the env var is only to compile
252 # mozilla-based sources
253 echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die
254 echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die
255
256 # vendor information
257 echo 'pref("general.useragent.vendor","Magellan-Linux");' > ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/defaults/pref/vendor.js || die
258
259 # necessary includes and idl files to build against firefox
260 cp -LfR dist/include/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/include || die
261 cp -LfR dist/idl/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/idl || die
262 # symlink to a missing header
263 mlink /usr/$(mlibdir)/mozilla-firefox/include/necko/nsIURI.h \
264 /usr/$(mlibdir)/mozilla-firefox/include/nsIURI.h || die
265 # pkgconfig files
266 # minstallfile build/unix/\*.pc /usr/$(mlibdir)/pkgconfig || die
267
268
269 # install icons
270 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon16.xpm \
271 /usr/$(mlibdir)/mozilla-firefox/icons || die
272 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon50.xpm \
273 /usr/$(mlibdir)/mozilla-firefox/icons || die
274
275 # menu entries
276 minstallpixmap firefox.png || die
277 minstallfile -s firefox.desktop /usr/share/applications || die
278
279 # now move all plugins to /usr/lib/nsbrowser/plugins
280 # and symlink them (we need a defined location for the plugins of all browsers)
281 cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* \
282 ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die
283 rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die
284 mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die
285 }
286
287 preinstall()
288 {
289 if [[ -n $(magequery -n mozilla) ]]
290 then
291 echo
292 echo "This version of ${PCATEGORIE}/${PNAME} replaces the mozilla development files"
293 echo "and both packages cannot coexist anymore."
294 echo "net-www/mozilla has no official support from mozilla.com"
295 echo "and will not included in future releases of magellan-linux."
296 echo
297 die "Please uninstall net-www/mozilla first!"
298 fi
299 }
300
301 postinstall()
302 {
303 # update environment; needed for REGXPCOM
304 env-rebuild
305 source ${MROOT}/etc/profile
306
307 # firefoxs mozilla_five_home
308 export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-firefox"
309
310 # register firefox
311 echo "Registering Components and Chrome..."
312
313 HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom
314 # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome
315
316 # fix permissions of component registry
317 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
318
319 # fix directory permissions
320 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
321
322 # fix permissions on chrome files
323 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
324 }

Properties

Name Value
svn:keywords Id