Magellan Linux

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

Parent Directory Parent Directory | Revision Log Revision Log


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