Magellan Linux

Contents of /trunk/extras/mozilla-firefox/mozilla-firefox-2.0.0.16-r1.smage2

Parent Directory Parent Directory | Revision Log Revision Log


Revision 2 - (show annotations) (download)
Fri Oct 10 13:29:42 2008 UTC (15 years, 7 months ago) by niro
File size: 9229 byte(s)
import repo
1 # $Header: /magellan-cvs/smage/mozilla-firefox/mozilla-firefox-2.0.0.16-r1.smage2,v 1.1 2008/07/31 16:00:15 niro Exp $
2
3 PNAME="mozilla-firefox"
4 PVER="2.0.0.16"
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 >= media-libs/libjpeg-6b
19 >= media-libs/libpng-1.2
20 >= dev-libs/expat-2
21 >= sys-libs/zlib-1.2.3
22 >= media-libs/libmng-1.0.10
23 >= media-libs/fontconfig-2.5
24 >= media-libs/libjpeg-6b
25 >= media-libs/libpng-1.2.24
26 >= dev-libs/glib2-2.16
27 >= dev-libs/libidl-0.8.10
28 >= app-arch/zip-2.3
29 >= app-arch/unzip-5.52
30 >= x11-libs/pango-1.20
31 >= x11-libs/cairo-1.4
32 >= x11-libs/gtk2+-2.12
33 >= dev-libs/nspr-4.7
34 >= dev-libs/nss-3.11.9"
35
36 SDEPEND=">= x11-proto/xineramaproto-1
37 >= x11-proto/compositeproto-0.4
38 >= dev-util/pkgconfig-0.23
39 >= sys-dev/autoconf-4
40 >= sys-dev/automake-3
41 >= sys-apps/sed-4"
42
43 SRCFILE="firefox-${PVER}-source.tar.bz2"
44 SRCDIR="${BUILDDIR}/mozilla"
45
46 sminclude mozilla mtools
47
48 SRC_URI=(
49 ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE}
50 mirror://${PNAME}/${SRCFILE}
51 mirror://${PNAME}/menu/firefox.png
52 mirror://${PNAME}/menu/firefox.desktop
53 mirror://${PNAME}/mozilla-firefox-1.5.0-embed-typeaheadfind.patch
54 mirror://${PNAME}/mozilla-firefox-1.5.0.11-pkgconfig.patch
55 mirror://${PNAME}/mozilla-firefox-2.0.0.5-libdeps.patch
56 mirror://${PNAME}/mozilla-firefox-2.0.0.5-asneeded.patch
57 mirror://${PNAME}/mozilla-firefox-2.0.0.5-respect-host-variable.patch
58 mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch
59 mirror://${PNAME}/mozilla-firefox-2.0.0.5-pango-cursor.patch
60 mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.patch
61 )
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 # fix linking issues against pango
87 # https://bugzilla.mozilla.org/show_bug.cgi?id=344821
88 mpatch mozilla-firefox-2.0.0.5-libdeps.patch || die
89
90 # use as-needed with newer binutils
91 # https://bugzilla.mozilla.org/show_bug.cgi?id=311236
92 mpatch mozilla-firefox-2.0.0.5-asneeded.patch || die
93
94 # fixes typeahead and gtk fixes for embeded firefox browsers
95 mpatch mozilla-firefox-1.5.0-embed-typeaheadfind.patch || die
96
97 # fix pkgconfig pathes
98 mpatch mozilla-firefox-1.5.0.11-pkgconfig.patch || die
99
100 # fix some compile issues on multilib systems
101 mpatch mozilla-firefox-2.0.0.5-respect-host-variable.patch || die
102 mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die
103
104 # fix pango-cursor issues
105 mpatch mozilla-firefox-2.0.0.5-pango-cursor.patch || die
106
107 # enable variable languages via environment vars
108 mpatch mozilla-firefox-2.0.0.9-language.patch || die
109
110 # branding the source with our tags
111 sed -i "s|0000000000|Magellan Linux|" xpfe/global/build.dtd.in || die
112
113 export WANT_AUTOCONF="2.1"
114 autoconf || die
115 }
116
117 src_compile()
118 {
119 cd ${SRCDIR}
120
121 # setup .mozconfig
122 cp browser/config/mozconfig .mozconfig || die
123
124 # where shall the files go ?
125 mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox
126
127 # set optimization level based on CFLAGS
128 if [[ ${ARCH} = x86_64 ]]
129 then
130 # opts may cause segfaults on 64bit arches
131 mozconf_add --enable-optimize=-O1
132 export CFLAGS="${CFLAGS} -fPIC"
133 export CXXFLAGS="${CXXFLAGS} -fPIC"
134 else
135 mozconf_add --enable-optimize=-O2
136 fi
137
138 # enable compat mode for plugins build with gcc2
139 mozconf_add --enable-old-abi-compat-wrappers
140
141 # we don't need the installer
142 mozconf_add --disable-installer
143
144 # issue all warnings demanded by strict ANSI C
145 mozconf_add --disable-pedantic
146
147 # enable crypto support (Personal Security Manager)
148 mozconf_add --enable-crypto
149
150 # want system jpeg, pngm, zlib, nspr and nss
151 mozconf_add --with-system-jpeg
152 mozconf_add --with-system-png
153 mozconf_add --with-system-zlib
154 mozconf_add --with-system-nspr
155 mozconf_add --with-system-nss
156
157 # enable gtk2 as default
158 mozconf_add --enable-default-toolkit=gtk2
159
160 # no ipv6 support
161 mozconf_add --enable-ipv6
162
163 # want xinerama
164 mozconf_add --enable-xinerama
165
166 # no xprint ?
167 mozconf_add --disable-xprint
168
169 # >= firefox-1.0.7 should use xft + pango, svg with cairo
170 mozconf_add --disable-freetype2
171 mozconf_add --enable-xft
172 mozconf_add --enable-pango
173 mozconf_add --enable-system-cairo
174 mozconf_add --enable-svg
175 mozconf_add --enable-canvas
176
177 # enable all image encoders
178 mozconf_add --enable-image-encoder=all
179
180 # disable debug build && enable stripping
181 mozconf_add --disable-debug
182 mozconf_add --disable-tests
183 mozconf_add --enable-reorder
184 mozconf_add --enable-strip
185 mozconf_add --enable-strip-libs
186
187 if [[ ${ARCH} = i*86 ]]
188 then
189 # optimze build for x86
190 mozconf_add --enable-elf-dynstr-gc
191 fi
192
193 # both needed to build galeon
194 mozconf_add --enable-oji
195 mozconf_add --enable-mathml
196
197 # enable default extensions and typeaheadfind
198 mozconf_add --enable-extensions=default,typeaheadfind
199
200 # gnome support (needs gnome-vfs)
201 mozconf_add --disable-gnomevfs
202 mozconf_add --enable-extension=-gnomevfs
203
204 # resolve multiple --enable-extensions down to one
205 rebuild_extension_list
206
207 # now run configure
208 #ac_cv_visibility_pragma=no mconfigure || die
209 mconfigure || die
210
211 # removes extraneous CFLAGS
212 # to reduce RAM requirements while compiling
213 mozilla_remove_cflags || die
214
215 mmake || die
216 }
217
218 src_install()
219 {
220 cd ${SRCDIR}
221
222 # needed directories
223 minstalldir /etc/env.d || die
224 minstalldir /usr/bin || die
225 minstalldir /usr/$(mlibdir)/mozilla-firefox/icons || die
226 minstalldir /usr/$(mlibdir)/mozilla-firefox/idl || die
227 minstalldir /usr/$(mlibdir)/mozilla-firefox/include || die
228 minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die
229 minstalldir /usr/$(mlibdir)/pkgconfig || die
230 minstalldir /usr/share/applications || die
231
232 # install binaries
233 cp -RL --no-preserve=links ${SRCDIR}/dist/bin/* \
234 ${BINDIR}/usr/$(mlibdir)/mozilla-firefox || die
235
236 # fix permissions
237 mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die
238
239 # bins
240 mlink /usr/$(mlibdir)/mozilla-firefox/firefox /usr/bin/firefox || die
241
242 # environment
243 # mozilla-1.7* uses already the env var mozilla_five_home
244 # firefox does not need this, the env var is only to compile
245 # mozilla-based sources
246 echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die
247 echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die
248
249
250 # necessary includes and idl files to build against firefox
251 cp -LfR dist/include/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/include || die
252 cp -LfR dist/idl/* ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/idl || die
253 # symlink to a missing header
254 mlink /usr/$(mlibdir)/mozilla-firefox/include/necko/nsIURI.h \
255 /usr/$(mlibdir)/mozilla-firefox/include/nsIURI.h || die
256 # pkgconfig files
257 minstallfile build/unix/\*.pc /usr/$(mlibdir)/pkgconfig || die
258
259
260 # install icons
261 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon16.xpm \
262 /usr/$(mlibdir)/mozilla-firefox/icons || die
263 minstallfile ${SRCDIR}/other-licenses/branding/firefox/mozicon50.xpm \
264 /usr/$(mlibdir)/mozilla-firefox/icons || die
265
266 # menu entries
267 minstallpixmap firefox.png || die
268 minstallfile -s firefox.desktop /usr/share/applications || die
269
270 # now move all plugins to /usr/lib/nsbrowser/plugins
271 # and symlink them (we need a defined location for the plugins of all browsers)
272 cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* \
273 ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die
274 rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die
275 mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die
276 }
277
278 preinstall()
279 {
280 if [[ -n $(magequery -n mozilla) ]]
281 then
282 echo
283 echo "This version of ${PCATEGORIE}/${PNAME} replaces the mozilla development files"
284 echo "and both packages cannot coexist anymore."
285 echo "net-www/mozilla has no official support from mozilla.com"
286 echo "and will not included in future releases of magellan-linux."
287 echo
288 die "Please uninstall net-www/mozilla first!"
289 fi
290 }
291
292 postinstall()
293 {
294 # update environment; needed for REGXPCOM
295 env-rebuild
296 source ${MROOT}/etc/profile
297
298 # firefoxs mozilla_five_home
299 export MOZILLA_FIVE_HOME="${MROOT}/usr/$(mlibdir)/mozilla-firefox"
300
301 # register firefox
302 echo "Registering Components and Chrome..."
303
304 HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regxpcom
305 # HOME=~root LD_LIBRARY_PATH=${MOZILLA_FIVE_HOME} ${MOZILLA_FIVE_HOME}/regchrome
306
307 # fix permissions of component registry
308 chmod 0644 ${MOZILLA_FIVE_HOME}/components/compreg.dat
309
310 # fix directory permissions
311 find ${MOZILLA_FIVE_HOME}/ -type d -perm 0700 -exec chmod 0755 {} \; || :
312
313 # fix permissions on chrome files
314 find ${MOZILLA_FIVE_HOME}/chrome/ -name '*.rdf' -exec chmod 0644 {} \; || :
315 }

Properties

Name Value
svn:keywords Id