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