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