Magellan Linux

Contents of /smage/branches/alx-0_6_0/extras/mozilla-firefox/mozilla-firefox-5.0-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2681 - (show annotations) (download)
Mon Jul 11 16:59:11 2011 UTC (12 years, 11 months ago) by niro
File size: 7110 byte(s)
-removed java runtime dep
1 # $Id$
2
3 PNAME="mozilla-firefox"
4 PVER="5.0"
5 PBUILD="r1"
6
7 PCATEGORIE="net-www"
8
9 DESCRIPTION="Firefox is Mozilla's award-winning next generation web browser."
10 HOMEPAGE="http://www.mozilla.org/products/firefox/"
11
12 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.3
18 >= media-libs/fontconfig-2.8
19 >= media-libs/libjpeg-8
20 >= media-libs/libpng-1.5
21 >= dev-libs/glib2-2.28
22 >= dev-libs/libidl-0.8.14
23 >= app-arch/unzip-6
24 >= x11-libs/pango-1.28
25 >= x11-libs/cairo-1.10
26 >= x11-libs/gtk2+-2.25
27 >= dev-libs/nspr-4.8.6
28 >= dev-libs/nss-3.12.8"
29
30 SDEPEND=">= x11-proto/xineramaproto-1
31 >= x11-proto/compositeproto-0.4
32 >= dev-util/pkgconfig-0.25
33 >= sys-dev/autoconf-5
34 >= sys-dev/automake-4
35 >= sys-apps/sed-4
36 >= app-arch/zip-3"
37
38 SRCFILE="firefox-${PVER}.source.tar.bz2"
39 SRCDIR="${BUILDDIR}/mozilla-release"
40
41 sminclude mozilla mtools
42
43 SRC_URI=(
44 ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE}
45 mirror://${PNAME}/${SRCFILE}
46 mirror://${PNAME}/menu/firefox.png
47 mirror://${PNAME}/menu/firefox.desktop
48 mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch
49 mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch
50 mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.patch
51 mirror://${PNAME}/mozilla-firefox-3.6.3-no-app-updates.patch
52 mirror://${PNAME}/mozilla-firefox-5.0-cache-build.patch
53 )
54
55 UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source | sed 's:[-|.]source::' | lasttarball"
56
57 export MOZ_PHOENIX=1
58
59 # set by configure (plus USE_AUTOCONF=1), but useful for NSPR
60 export MOZILLA_CLIENT=1
61 export BUILD_OPT=1
62 export NO_STATIC_LIB=1
63 export USE_PTHREADS=1
64
65 # now strip optimization from CFLAGS so it doesn't end up in the
66 # compile string
67 export CFLAGS="${CFLAGS/-O*/}"
68 export CXXFLAGS="${CFLAGS}"
69
70 # needed to build without warnings on gcc-3
71 export CXXFLAGS="${CXXFLAGS} -Wno-deprecated"
72
73 src_prepare()
74 {
75 munpack ${SRCFILE} || die
76 cd ${SRCDIR}
77
78 # patches, patches, patches
79
80 # fix pkgconfig pathes
81 mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die
82
83 # fix some compile issues on multilib systems
84 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
85
86 # enable variable languages via environment vars
87 mpatch mozilla-firefox-2.0.0.9-language.patch || die
88
89 # disable auto app updates
90 mpatch mozilla-firefox-3.6.3-no-app-updates.patch || die
91
92 # fixes bug: https://bugzilla.mozilla.org/show_bug.cgi?id=633645
93 mpatch mozilla-firefox-5.0-cache-build.patch || die
94
95 export WANT_AUTOCONF="2.1"
96 autoconf || die
97 }
98
99 src_compile()
100 {
101 cd ${SRCDIR}
102
103 # setup .mozconfig
104 cp browser/config/mozconfig .mozconfig || die
105
106 # where shall the files go ?
107 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox
108
109 # set optimization level based on CFLAGS
110 if [[ ${ARCH} = x86_64 ]]
111 then
112 # opts may cause segfaults on 64bit arches
113 mozconf_add --enable-optimize=-O1
114 export CFLAGS="${CFLAGS} -fPIC"
115 export CXXFLAGS="${CXXFLAGS} -fPIC"
116 else
117 mozconf_add --enable-optimize=-O2
118 fi
119
120 # enable compat mode for plugins build with gcc2
121 mozconf_add --enable-old-abi-compat-wrappers
122
123 # we don't need the installer
124 mozconf_add --disable-installer
125
126 # issue all warnings demanded by strict ANSI C
127 mozconf_add --disable-pedantic
128
129 # enable crypto support (Personal Security Manager)
130 mozconf_add --enable-crypto
131
132 # want system jpeg, pngm, zlib, nspr and nss
133 mozconf_add --with-system-jpeg
134 # doesn't work atm
135 #mozconf_add --with-system-png
136 mozconf_add --with-system-zlib
137 mozconf_add --with-system-nspr
138 mozconf_add --with-system-nss
139
140 # enable cairo-gtk2 as default
141 mozconf_add --enable-default-toolkit=cairo-gtk2
142
143 # libnotify support (disabled atm)
144 mozconf_add --disable-libnotify
145
146 # no ipv6 support
147 mozconf_add --enable-ipv6
148
149 # want xinerama
150 mozconf_add --enable-xinerama
151
152 # no xprint ?
153 mozconf_add --disable-xprint
154
155 # >= firefox-1.0.7 should use xft + pango, svg with cairo
156 mozconf_add --disable-freetype2
157 mozconf_add --enable-xft
158 mozconf_add --enable-pango
159 mozconf_add --enable-system-cairo
160 mozconf_add --enable-svg
161 mozconf_add --enable-canvas
162
163 # enable all image encoders
164 mozconf_add --enable-image-encoder=all
165
166 # disable debug build && enable stripping
167 mozconf_add --disable-debug
168 mozconf_add --disable-tests
169 mozconf_add --enable-reorder
170 mozconf_add --enable-strip
171 mozconf_add --enable-strip-libs
172
173 if [[ ${ARCH} = i*86 ]]
174 then
175 # optimze build for x86
176 mozconf_add --enable-elf-dynstr-gc
177 fi
178
179 # both needed to build galeon
180 mozconf_add --enable-oji
181 mozconf_add --enable-mathml
182
183 # enable storage, places and safe-browsing
184 mozconf_add --enable-storage
185 mozconf_add --enable-places
186 mozconf_add --enable-safe-browsing
187
188 # enable default extensions
189 mozconf_add --enable-extensions=default
190
191 # gnome support (needs gnome-vfs)
192 mozconf_add --disable-gnomevfs
193 mozconf_add --enable-extension=-gnomevfs
194
195 # broken with firefox-3.0.10
196 mozconf_add --disable-mochitest
197 mozconf_add --disable-crashreporter
198
199 # disable libnotify support on alx
200 mozconf_add --disable-libnotify
201 # and no dbus on alx too
202 mozconf_add --disable-dbus
203 # no yasm on alx atm, disable webm video format
204 # and jpeg-turbo needs yasm too
205 mozconf_add --disable-webm
206 mozconf_add --disable-libjpeg-turbo
207 # no libalsa too
208 mozconf_add --disable-ogg
209 mozconf_add --disable-wave
210
211 # resolve multiple --enable-extensions down to one
212 rebuild_extension_list
213
214 # now run configure
215 mconfigure || die
216
217 # removes extraneous CFLAGS
218 # to reduce RAM requirements while compiling
219 mozilla_remove_cflags || die
220
221 mmake || die
222 }
223
224 src_install()
225 {
226 cd ${SRCDIR}
227
228 # install
229 make DESTDIR=${BINDIR} install || die
230
231 # fix permissions
232 mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
233
234 # environment
235 # mozilla-1.7* uses already the env var mozilla_five_home
236 # firefox does not need this, the env var is only to compile
237 # mozilla-based sources
238 minstalldir /etc/env.d || die
239 echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die
240 echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die
241
242 # vendor information
243 msetpref general.useragent.vendor Magellan-Linux || die
244
245 # disable app.update in default config
246 msetpref app.update.auto false || die
247 msetpref app.update.enabled false || die
248 msetpref app.update.autoInstallEnabled false || die
249
250 # menu entries
251 minstallpixmap firefox.png || die
252 minstalldir /usr/share/applications || die
253 minstallfile -s firefox.desktop /usr/share/applications || die
254
255 # now move all plugins to /usr/lib/nsbrowser/plugins
256 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
257 if [[ -d ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins ]]
258 then
259 cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die
260 rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die
261 fi
262 # and symlink them (we need a defined location for the plugins of all browsers)
263 mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die
264 }