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