Contents of /smage/branches/branch_0.9.0/mozilla-firefox-gtk1/mozilla-firefox-gtk1-2.0.0.16-r2.smage2
Parent Directory | Revision Log
Revision 4 -
(show annotations)
(download)
Sun Jan 11 00:50:17 2009 UTC (15 years, 4 months ago) by niro
File size: 10365 byte(s)
Sun Jan 11 00:50:17 2009 UTC (15 years, 4 months ago) by niro
File size: 10365 byte(s)
"copied"
1 | # $Header: /alx-cvs/smage-eglibc/mozilla-firefox-gtk1/mozilla-firefox-gtk1-2.0.0.16-r1.smage2,v 1.3 2008/08/27 14:46:17 niro Exp $ |
2 | |
3 | PNAME="mozilla-firefox-gtk1" |
4 | PVER="2.0.0.16" |
5 | PBUILD="r2" |
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=">= x11-libs/libXrender-0.9 |
14 | >= x11-libs/libXt-1 |
15 | >= x11-libs/libXmu-1 |
16 | >= media-libs/libjpeg-6b |
17 | >= media-libs/libpng-1.2.24 |
18 | >= dev-libs/expat-2 |
19 | >= sys-libs/zlib-1.2.3 |
20 | >= media-libs/fontconfig-2.5 |
21 | >= dev-libs/glib1-1.2 |
22 | == dev-libs/libidl-glib1-0.6.3 |
23 | >= x11-libs/gtk1+-1.2" |
24 | # >= app-arch/zip-2.3 |
25 | |
26 | SDEPEND=">= dev-util/pkgconfig-0.23 |
27 | >= sys-dev/autoconf-4 |
28 | >= sys-dev/automake-3" |
29 | # >= sys-apps/sed-4" |
30 | |
31 | SRCFILE="firefox-${PVER}-source.tar.bz2" |
32 | SRCDIR="${BUILDDIR}/mozilla" |
33 | |
34 | sminclude mozilla mtools alx |
35 | |
36 | SRC_URI=( |
37 | ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/${PVER}/source/${SRCFILE} |
38 | mirror://${PNAME/-gtk1/}/${SRCFILE} |
39 | mirror://${PNAME/-gtk1/}/menu/firefox.png |
40 | mirror://${PNAME/-gtk1/}/menu/firefox.desktop |
41 | mirror://${PNAME/-gtk1/}/mozilla-firefox-1.5.0-embed-typeaheadfind.patch |
42 | mirror://${PNAME/-gtk1/}/mozilla-firefox-1.5.0.11-pkgconfig.patch |
43 | mirror://${PNAME/-gtk1/}/mozilla-firefox-2.0.0.5-libdeps.patch |
44 | mirror://${PNAME/-gtk1/}/mozilla-firefox-2.0.0.5-asneeded.patch |
45 | mirror://${PNAME/-gtk1/}/mozilla-firefox-2.0.0.5-respect-host-variable.patch |
46 | mirror://${PNAME/-gtk1/}/mozilla-firefox-2.0.0.5-rpath-3.patch |
47 | mirror://${PNAME/-gtk1/}/mozilla-firefox-2.0.0.5-pango-cursor.patch |
48 | mirror://${PNAME/-gtk1/}/mozilla-firefox-2.0.0.9-language.patch |
49 | ) |
50 | |
51 | #export MOZ_PHOENIX=1 |
52 | |
53 | # set by configure (plus USE_AUTOCONF=1), but useful for NSPR |
54 | #export MOZILLA_CLIENT=1 |
55 | #export BUILD_OPT=1 |
56 | #export NO_STATIC_LIB=1 |
57 | #export USE_PTHREADS=1 |
58 | |
59 | # now strip optimization from CFLAGS so it doesn't end up in the |
60 | # compile string |
61 | export CFLAGS="${CFLAGS/-O*/}" |
62 | export CXXFLAGS="${CFLAGS}" |
63 | |
64 | # needed to build without warnings on gcc-3 |
65 | export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" |
66 | |
67 | src_prepare() |
68 | { |
69 | munpack ${SRCFILE} || die |
70 | cd ${SRCDIR} |
71 | |
72 | # patches, patches, patches |
73 | |
74 | # fix linking issues against pango |
75 | # https://bugzilla.mozilla.org/show_bug.cgi?id=344821 |
76 | mpatch mozilla-firefox-2.0.0.5-libdeps.patch || die |
77 | |
78 | # use as-needed with newer binutils |
79 | # https://bugzilla.mozilla.org/show_bug.cgi?id=311236 |
80 | mpatch mozilla-firefox-2.0.0.5-asneeded.patch || die |
81 | |
82 | # fixes typeahead and gtk fixes for embeded firefox browsers |
83 | mpatch mozilla-firefox-1.5.0-embed-typeaheadfind.patch || die |
84 | |
85 | # fix pkgconfig pathes |
86 | mpatch mozilla-firefox-1.5.0.11-pkgconfig.patch || die |
87 | |
88 | # fix some compile issues on multilib systems |
89 | mpatch mozilla-firefox-2.0.0.5-respect-host-variable.patch || die |
90 | mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die |
91 | |
92 | # fix pango-cursor issues |
93 | mpatch mozilla-firefox-2.0.0.5-pango-cursor.patch || die |
94 | |
95 | # enable variable languages via environment vars |
96 | mpatch mozilla-firefox-2.0.0.9-language.patch || die |
97 | |
98 | # branding the source with our tags |
99 | sed -i "s|0000000000|Magellan Linux|" xpfe/global/build.dtd.in || die |
100 | |
101 | export WANT_AUTOCONF="2.1" |
102 | autoconf || die |
103 | } |
104 | |
105 | src_compile() |
106 | { |
107 | cd ${SRCDIR} |
108 | |
109 | # setup .mozconfig |
110 | cp browser/config/mozconfig .mozconfig || die |
111 | |
112 | # where shall the files go ? |
113 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox |
114 | |
115 | # set optimization level based on CFLAGS |
116 | if [[ ${ARCH} = x86_64 ]] |
117 | then |
118 | # opts may cause segfaults on 64bit arches |
119 | # mozconf_add --enable-optimize=-O1 |
120 | export CFLAGS="${CFLAGS} -fPIC" |
121 | export CXXFLAGS="${CXXFLAGS} -fPIC" |
122 | # else |
123 | # mozconf_add --enable-optimize=-O2 |
124 | fi |
125 | |
126 | # optimize for size |
127 | mozconf_add --enable-optimize=-Os |
128 | |
129 | # enable compat mode for plugins build with gcc2 |
130 | mozconf_add --enable-old-abi-compat-wrappers |
131 | |
132 | # we don't need the installer |
133 | mozconf_add --disable-installer |
134 | |
135 | # issue all warnings demanded by strict ANSI C |
136 | mozconf_add --disable-pedantic |
137 | |
138 | # enable crypto support (Personal Security Manager) |
139 | mozconf_add --enable-crypto |
140 | |
141 | # want system jpeg, pngm, zlib |
142 | mozconf_add --with-system-jpeg |
143 | mozconf_add --with-system-png |
144 | mozconf_add --with-system-zlib |
145 | # but not nspr and nss |
146 | mozconf_add --without-system-nspr |
147 | mozconf_add --without-system-nss |
148 | |
149 | # enable gtk1 as default |
150 | mozconf_add --enable-default-toolkit=gtk |
151 | |
152 | # no ipv6 support |
153 | mozconf_add --disable-ipv6 |
154 | |
155 | # no xinerama |
156 | mozconf_add --disable-xinerama |
157 | |
158 | # no xprint ? |
159 | mozconf_add --disable-xprint |
160 | |
161 | # no freetype2 xft pango cairo and co |
162 | mozconf_add --disable-freetype2 |
163 | mozconf_add --disable-xft |
164 | mozconf_add --disable-pango |
165 | |
166 | # build minimal set of image decoders |
167 | mozconf_add --enable-image-decoders=png,gif,jpeg |
168 | |
169 | # build minimal set of protocol handlers |
170 | # mozconf_add --enable-necko-protocols=http,file,res,jar |
171 | mozconf_add --enable-necko-protocols=http |
172 | |
173 | # enable minimal profile support |
174 | mozconf_add --disable-profilesharing |
175 | mozconf_add --disable-profilelocking |
176 | mozconf_add --enable-single-profile |
177 | |
178 | # disable features and skip various build steps |
179 | mozconf_add --disable-accessibility |
180 | mozconf_add --disable-composer |
181 | mozconf_add --enable-plaintext-editor-only |
182 | mozconf_add --disable-mailnews |
183 | mozconf_add --disable-ldap |
184 | mozconf_add --disable-postscript |
185 | mozconf_add --disable-mathml |
186 | mozconf_add --disable-oji |
187 | mozconf_add --disable-jsd |
188 | mozconf_add --disable-jsloader |
189 | mozconf_add --disable-xpinstall |
190 | mozconf_add --disable-xpfe-components |
191 | mozconf_add --disable-necko-disk-cache |
192 | mozconf_add --disable-updater |
193 | mozconf_add --disable-xul |
194 | mozconf_add --disable-inspector-apis |
195 | mozconf_add --disable-plugins |
196 | |
197 | # configure necko to allocate smaller network buffers |
198 | mozconf_add --enable-necko-small-buffers |
199 | |
200 | # disable debug logging and tests |
201 | mozconf_add --disable-logging |
202 | mozconf_add --disable-tests |
203 | |
204 | # disable debug build && enable stripping |
205 | mozconf_add --disable-debug |
206 | mozconf_add --disable-tests |
207 | mozconf_add --enable-reorder |
208 | mozconf_add --enable-strip |
209 | mozconf_add --enable-strip-libs |
210 | |
211 | if [[ ${ARCH} = i*86 ]] |
212 | then |
213 | # optimze build for x86 |
214 | mozconf_add --enable-elf-dynstr-gc |
215 | fi |
216 | |
217 | # both needed to build galeon |
218 | # mozconf_add --enable-oji |
219 | # mozconf_add --enable-mathml |
220 | |
221 | # enable default extensions and typeaheadfind |
222 | #mozconf_add --enable-extensions=default,typeaheadfind |
223 | mozconf_add --enable-extensions=default |
224 | |
225 | # all these extensions needs xul |
226 | mozconf_add --enable-extensions=-inspector |
227 | mozconf_add --enable-extensions=-venkman |
228 | mozconf_add --enable-extensions=-irc |
229 | mozconf_add --enable-extensions=-tasks |
230 | |
231 | # gnome support (needs gnome-vfs) |
232 | mozconf_add --disable-gnomevfs |
233 | mozconf_add --enable-extensions=-gnomevfs |
234 | |
235 | # resolve multiple --enable-extensions down to one |
236 | rebuild_extension_list |
237 | |
238 | # now run configure |
239 | #ac_cv_visibility_pragma=no mconfigure || die |
240 | mconfigure || die |
241 | |
242 | # removes extraneous CFLAGS |
243 | # to reduce RAM requirements while compiling |
244 | mozilla_remove_cflags || die |
245 | |
246 | mmake || die |
247 | } |
248 | |
249 | src_install() |
250 | { |
251 | cd ${SRCDIR} |
252 | |
253 | # needed directories |
254 | minstalldir /etc/env.d || die |
255 | minstalldir /usr/bin || die |
256 | minstalldir /usr/$(mlibdir)/mozilla-firefox/icons || die |
257 | minstalldir /usr/$(mlibdir)/mozilla-firefox/idl || die |
258 | minstalldir /usr/$(mlibdir)/mozilla-firefox/include || die |
259 | minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die |
260 | minstalldir /usr/$(mlibdir)/pkgconfig || die |
261 | minstalldir /usr/share/applications || die |
262 | |
263 | # install binaries |
264 | cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \ |
265 | ${BINDIR}/usr/$(mlibdir)/mozilla-firefox || die |
266 | |
267 | # fix permissions |
268 | mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die |
269 | |
270 | # bins |
271 | mlink /usr/$(mlibdir)/mozilla-firefox/firefox /usr/bin/firefox || die |
272 | |
273 | # environment |
274 | # mozilla-1.7* uses already the env var mozilla_five_home |
275 | # firefox does not need this, the env var is only to compile |
276 | # mozilla-based sources |
277 | echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die |
278 | echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die |
279 | |
280 | # not on alx |
281 | # # necessary includes and idl files to build against firefox |
282 | # cp -LfR dist/include/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/include || die |
283 | # cp -LfR dist/idl/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/idl || die |
284 | # # symlink to a missing header |
285 | # mlink /usr/$(mlibdir)/mozilla-firefox/include/necko/nsIURI.h \ |
286 | # /usr/$(mlibdir)/mozilla-firefox/include/nsIURI.h || die |
287 | # # pkgconfig files |
288 | # minstallfile build/unix/\*.pc /usr/$(mlibdir)/pkgconfig || die |
289 | |
290 | # install icons |
291 | minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon16.xpm \ |
292 | /usr/$(mlibdir)/mozilla-firefox/icons || die |
293 | minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon50.xpm \ |
294 | /usr/$(mlibdir)/mozilla-firefox/icons || die |
295 | |
296 | # menu entries |
297 | minstallpixmap firefox.png || die |
298 | minstallfile -s firefox.desktop /usr/share/applications || die |
299 | |
300 | # now move all plugins to /usr/lib/nsbrowser/plugins |
301 | # and symlink them (we need a defined location for the plugins of all browsers) |
302 | cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* \ |
303 | ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die |
304 | rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die |
305 | mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die |
306 | } |
307 | |
308 | preinstall() |
309 | { |
310 | if [[ -n $(magequery -n mozilla) ]] |
311 | then |
312 | echo |
313 | echo "This version of ${PCATEGORIE}/${PNAME} replaces the mozilla development files" |
314 | echo "and both packages cannot coexist anymore." |
315 | echo "net-www/mozilla has no official support from mozilla.com" |
316 | echo "and will not included in future releases of magellan-linux." |
317 | echo |
318 | die "Please uninstall net-www/mozilla first!" |
319 | fi |
320 | } |
321 | |
322 | postinstall() |
323 | { |
324 | # update environment; needed for REGXPCOM |
325 | env-rebuild |
326 | source ${MROOT}/etc/profile |
327 | |
328 | # firefoxs mozilla_five_home |
329 | export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-firefox" |
330 | |
331 | # register firefox |
332 | echo "Registering Components and Chrome..." |
333 | |
334 | HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom |
335 | # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome |
336 | |
337 | # fix permissions of component registry |
338 | chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat |
339 | |
340 | # fix directory permissions |
341 | find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || : |
342 | |
343 | # fix permissions on chrome files |
344 | find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || : |
345 | } |
Properties
Name | Value |
---|---|
svn:keywords | Id |