Annotation of /trunk/extras/mozilla-firefox/mozilla-firefox-3.5-r4.smage2
Parent Directory | Revision Log
Revision 2868 -
(hide annotations)
(download)
Sun Jul 12 17:41:01 2009 UTC (15 years, 2 months ago) by niro
File size: 9319 byte(s)
Sun Jul 12 17:41:01 2009 UTC (15 years, 2 months ago) by niro
File size: 9319 byte(s)
-fixed msetpref(): our default config should be overwrite all other configs -> added prefix 01- to ensure that
1 | niro | 2868 | # $Id$ |
2 | |||
3 | PNAME="mozilla-firefox" | ||
4 | PVER="3.5" | ||
5 | PBUILD="r4" | ||
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.8.0 | ||
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 | XUL_PVER="1.9.1" | ||
43 | SRCDIR="${BUILDDIR}/mozilla-${XUL_PVER}" | ||
44 | |||
45 | sminclude mozilla mtools | ||
46 | |||
47 | SRC_URI=( | ||
48 | ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE} | ||
49 | mirror://${PNAME}/${SRCFILE} | ||
50 | mirror://${PNAME}/menu/firefox.png | ||
51 | mirror://${PNAME}/menu/firefox.desktop | ||
52 | mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch | ||
53 | mirror://${PNAME}/mozilla-firefox-3.5-asneeded.patch | ||
54 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch | ||
55 | mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.patch | ||
56 | mirror://${PNAME}/mozilla-firefox-3.5-no-app-updates.patch | ||
57 | mirror://${PNAME}/mozilla-firefox-3.5-reload-new-plugins.patch | ||
58 | mirror://${PNAME}/mozilla-firefox-3.5-fixed-default-uris.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 | # use as-needed with newer binutils | ||
87 | # https://bugzilla.mozilla.org/show_bug.cgi?id=311236 | ||
88 | mpatch mozilla-firefox-3.5-asneeded.patch || die | ||
89 | |||
90 | # fix pkgconfig pathes | ||
91 | mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die | ||
92 | |||
93 | # fix some compile issues on multilib systems | ||
94 | mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die | ||
95 | |||
96 | # enable variable languages via environment vars | ||
97 | mpatch mozilla-firefox-2.0.0.9-language.patch || die | ||
98 | |||
99 | # disable auto app updates | ||
100 | mpatch mozilla-firefox-3.5-no-app-updates.patch || die | ||
101 | |||
102 | # auto reload newly installed plugins | ||
103 | mpatch mozilla-firefox-3.5-reload-new-plugins.patch || die | ||
104 | |||
105 | # fix broken default uris | ||
106 | mpatch mozilla-firefox-3.5-fixed-default-uris.patch || die | ||
107 | |||
108 | export WANT_AUTOCONF="2.1" | ||
109 | autoconf || die | ||
110 | } | ||
111 | |||
112 | src_compile() | ||
113 | { | ||
114 | cd ${SRCDIR} | ||
115 | |||
116 | # setup .mozconfig | ||
117 | cp browser/config/mozconfig .mozconfig || die | ||
118 | |||
119 | # where shall the files go ? | ||
120 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox | ||
121 | |||
122 | # set optimization level based on CFLAGS | ||
123 | if [[ ${ARCH} = x86_64 ]] | ||
124 | then | ||
125 | # opts may cause segfaults on 64bit arches | ||
126 | mozconf_add --enable-optimize=-O1 | ||
127 | export CFLAGS="${CFLAGS} -fPIC" | ||
128 | export CXXFLAGS="${CXXFLAGS} -fPIC" | ||
129 | else | ||
130 | mozconf_add --enable-optimize=-O2 | ||
131 | fi | ||
132 | |||
133 | # enable compat mode for plugins build with gcc2 | ||
134 | mozconf_add --enable-old-abi-compat-wrappers | ||
135 | |||
136 | # we don't need the installer | ||
137 | mozconf_add --disable-installer | ||
138 | |||
139 | # issue all warnings demanded by strict ANSI C | ||
140 | mozconf_add --disable-pedantic | ||
141 | |||
142 | # enable crypto support (Personal Security Manager) | ||
143 | mozconf_add --enable-crypto | ||
144 | |||
145 | # want system jpeg, pngm, zlib, nspr and nss | ||
146 | mozconf_add --with-system-jpeg | ||
147 | # doesn't work atm | ||
148 | #mozconf_add --with-system-png | ||
149 | mozconf_add --with-system-zlib | ||
150 | mozconf_add --with-system-nspr | ||
151 | mozconf_add --with-system-nss | ||
152 | |||
153 | # enable cairo-gtk2 as default | ||
154 | mozconf_add --enable-default-toolkit=cairo-gtk2 | ||
155 | |||
156 | # no ipv6 support | ||
157 | mozconf_add --enable-ipv6 | ||
158 | |||
159 | # want xinerama | ||
160 | mozconf_add --enable-xinerama | ||
161 | |||
162 | # no xprint ? | ||
163 | mozconf_add --disable-xprint | ||
164 | |||
165 | # >= firefox-1.0.7 should use xft + pango, svg with cairo | ||
166 | mozconf_add --disable-freetype2 | ||
167 | mozconf_add --enable-xft | ||
168 | mozconf_add --enable-pango | ||
169 | mozconf_add --enable-system-cairo | ||
170 | mozconf_add --enable-svg | ||
171 | mozconf_add --enable-canvas | ||
172 | |||
173 | # enable all image encoders | ||
174 | mozconf_add --enable-image-encoder=all | ||
175 | |||
176 | # disable debug build && enable stripping | ||
177 | mozconf_add --disable-debug | ||
178 | mozconf_add --disable-tests | ||
179 | mozconf_add --enable-reorder | ||
180 | mozconf_add --enable-strip | ||
181 | mozconf_add --enable-strip-libs | ||
182 | |||
183 | if [[ ${ARCH} = i*86 ]] | ||
184 | then | ||
185 | # optimze build for x86 | ||
186 | mozconf_add --enable-elf-dynstr-gc | ||
187 | fi | ||
188 | |||
189 | # both needed to build galeon | ||
190 | mozconf_add --enable-oji | ||
191 | mozconf_add --enable-mathml | ||
192 | |||
193 | # enable storage, places and safe-browsing | ||
194 | mozconf_add --enable-storage | ||
195 | mozconf_add --enable-places | ||
196 | mozconf_add --enable-safe-browsing | ||
197 | |||
198 | # enable default extensions | ||
199 | mozconf_add --enable-extensions=default | ||
200 | |||
201 | # gnome support (needs gnome-vfs) | ||
202 | mozconf_add --disable-gnomevfs | ||
203 | mozconf_add --enable-extension=-gnomevfs | ||
204 | |||
205 | # broken with firefox-3.0.10 | ||
206 | mozconf_add --disable-mochitest | ||
207 | mozconf_add --disable-crashreporter | ||
208 | |||
209 | # resolve multiple --enable-extensions down to one | ||
210 | rebuild_extension_list | ||
211 | |||
212 | # now run configure | ||
213 | mconfigure || die | ||
214 | |||
215 | # removes extraneous CFLAGS | ||
216 | # to reduce RAM requirements while compiling | ||
217 | mozilla_remove_cflags || die | ||
218 | |||
219 | mmake || die | ||
220 | } | ||
221 | |||
222 | src_install() | ||
223 | { | ||
224 | cd ${SRCDIR} | ||
225 | |||
226 | # needed directories | ||
227 | minstalldir /etc/env.d || die | ||
228 | minstalldir /usr/bin || die | ||
229 | minstalldir /usr/$(mlibdir)/mozilla-firefox/icons || die | ||
230 | minstalldir /usr/$(mlibdir)/mozilla-firefox/idl || die | ||
231 | minstalldir /usr/$(mlibdir)/mozilla-firefox/include || die | ||
232 | minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die | ||
233 | minstalldir /usr/$(mlibdir)/pkgconfig || die | ||
234 | minstalldir /usr/share/applications || die | ||
235 | |||
236 | # install binaries | ||
237 | cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \ | ||
238 | ${BINDIR}/usr/$(mlibdir)/mozilla-firefox || die | ||
239 | |||
240 | # fix permissions | ||
241 | mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die | ||
242 | |||
243 | # bins | ||
244 | mlink /usr/$(mlibdir)/mozilla-firefox/firefox /usr/bin/firefox || die | ||
245 | |||
246 | # environment | ||
247 | # mozilla-1.7* uses already the env var mozilla_five_home | ||
248 | # firefox does not need this, the env var is only to compile | ||
249 | # mozilla-based sources | ||
250 | echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die | ||
251 | echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die | ||
252 | |||
253 | # vendor information | ||
254 | msetpref general.useragent.vendor Magellan-Linux || die | ||
255 | |||
256 | # disable app.update in default config | ||
257 | msetpref app.update.auto false || die | ||
258 | msetpref app.update.enabled false || die | ||
259 | msetpref app.update.autoInstallEnabled false || die | ||
260 | |||
261 | # necessary includes and idl files to build against firefox | ||
262 | cp -LfR dist/include/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/include || die | ||
263 | cp -LfR dist/idl/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/idl || die | ||
264 | # symlink to a missing header | ||
265 | mlink /usr/$(mlibdir)/mozilla-firefox/include/necko/nsIURI.h \ | ||
266 | /usr/$(mlibdir)/mozilla-firefox/include/nsIURI.h || die | ||
267 | # pkgconfig files | ||
268 | # minstallfile build/unix/\*.pc /usr/$(mlibdir)/pkgconfig || die | ||
269 | |||
270 | # install icons | ||
271 | minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon16.xpm \ | ||
272 | /usr/$(mlibdir)/mozilla-firefox/icons || die | ||
273 | minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon50.xpm \ | ||
274 | /usr/$(mlibdir)/mozilla-firefox/icons || die | ||
275 | |||
276 | # menu entries | ||
277 | minstallpixmap firefox.png || die | ||
278 | minstallfile -s firefox.desktop /usr/share/applications || die | ||
279 | |||
280 | # now move all plugins to /usr/lib/nsbrowser/plugins | ||
281 | # and symlink them (we need a defined location for the plugins of all browsers) | ||
282 | cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* \ | ||
283 | ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die | ||
284 | rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die | ||
285 | mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die | ||
286 | } | ||
287 | |||
288 | preinstall() | ||
289 | { | ||
290 | if [[ -n $(magequery -n mozilla) ]] | ||
291 | then | ||
292 | echo | ||
293 | echo "This version of ${PCATEGORIE}/${PNAME} replaces the mozilla development files" | ||
294 | echo "and both packages cannot coexist anymore." | ||
295 | echo "net-www/mozilla has no official support from mozilla.com" | ||
296 | echo "and will not included in future releases of magellan-linux." | ||
297 | echo | ||
298 | die "Please uninstall net-www/mozilla first!" | ||
299 | fi | ||
300 | } | ||
301 | |||
302 | postinstall() | ||
303 | { | ||
304 | # update environment; needed for REGXPCOM | ||
305 | env-rebuild | ||
306 | source ${MROOT}/etc/profile | ||
307 | |||
308 | # firefoxs mozilla_five_home | ||
309 | export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-firefox" | ||
310 | |||
311 | # register firefox | ||
312 | echo "Registering Components and Chrome..." | ||
313 | |||
314 | HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom | ||
315 | # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome | ||
316 | |||
317 | # fix permissions of component registry | ||
318 | chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat | ||
319 | |||
320 | # fix directory permissions | ||
321 | find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || : | ||
322 | |||
323 | # fix permissions on chrome files | ||
324 | find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || : | ||
325 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |