Contents of /smage/branches/alx-0_6_0/extras/mozilla-firefox/mozilla-firefox-5.0-r1.smage2
Parent Directory | Revision Log
Revision 2680 -
(show annotations)
(download)
Mon Jul 11 16:47:23 2011 UTC (12 years, 10 months ago) by niro
File size: 7127 byte(s)
Mon Jul 11 16:47:23 2011 UTC (12 years, 10 months ago) by niro
File size: 7127 byte(s)
-removed deprecated actions in preinstall(), postinstall()
1 | # $Id$ |
2 | |
3 | PNAME="mozilla-firefox" |
4 | PVER="5.0" |
5 | PBUILD="r1" |
6 | |
7 | PCATEGORIE="net-www" |
8 | |
9 | DESCRIPTION="Firefox is Mozilla's award-winning next generation web browser." |
10 | HOMEPAGE="http://www.mozilla.org/products/firefox/" |
11 | |
12 | DEPEND=">= virtual/java |
13 | >= x11-libs/libXrender-0.9 |
14 | >= x11-libs/libXcomposite-0.4 |
15 | >= x11-libs/libXt-1 |
16 | >= x11-libs/libXmu-1 |
17 | >= dev-libs/expat-2 |
18 | >= sys-libs/zlib-1.2.3 |
19 | >= media-libs/fontconfig-2.8 |
20 | >= media-libs/libjpeg-8 |
21 | >= media-libs/libpng-1.5 |
22 | >= dev-libs/glib2-2.28 |
23 | >= dev-libs/libidl-0.8.14 |
24 | >= app-arch/unzip-6 |
25 | >= x11-libs/pango-1.28 |
26 | >= x11-libs/cairo-1.10 |
27 | >= x11-libs/gtk2+-2.25 |
28 | >= dev-libs/nspr-4.8.6 |
29 | >= dev-libs/nss-3.12.8" |
30 | |
31 | SDEPEND=">= x11-proto/xineramaproto-1 |
32 | >= x11-proto/compositeproto-0.4 |
33 | >= dev-util/pkgconfig-0.25 |
34 | >= sys-dev/autoconf-5 |
35 | >= sys-dev/automake-4 |
36 | >= sys-apps/sed-4 |
37 | >= app-arch/zip-3" |
38 | |
39 | SRCFILE="firefox-${PVER}.source.tar.bz2" |
40 | SRCDIR="${BUILDDIR}/mozilla-release" |
41 | |
42 | sminclude mozilla mtools |
43 | |
44 | SRC_URI=( |
45 | ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE} |
46 | mirror://${PNAME}/${SRCFILE} |
47 | mirror://${PNAME}/menu/firefox.png |
48 | mirror://${PNAME}/menu/firefox.desktop |
49 | mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch |
50 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch |
51 | mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.patch |
52 | mirror://${PNAME}/mozilla-firefox-3.6.3-no-app-updates.patch |
53 | mirror://${PNAME}/mozilla-firefox-5.0-cache-build.patch |
54 | ) |
55 | |
56 | UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source | sed 's:[-|.]source::' | lasttarball" |
57 | |
58 | export MOZ_PHOENIX=1 |
59 | |
60 | # set by configure (plus USE_AUTOCONF=1), but useful for NSPR |
61 | export MOZILLA_CLIENT=1 |
62 | export BUILD_OPT=1 |
63 | export NO_STATIC_LIB=1 |
64 | export USE_PTHREADS=1 |
65 | |
66 | # now strip optimization from CFLAGS so it doesn't end up in the |
67 | # compile string |
68 | export CFLAGS="${CFLAGS/-O*/}" |
69 | export CXXFLAGS="${CFLAGS}" |
70 | |
71 | # needed to build without warnings on gcc-3 |
72 | export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" |
73 | |
74 | src_prepare() |
75 | { |
76 | munpack ${SRCFILE} || die |
77 | cd ${SRCDIR} |
78 | |
79 | # patches, patches, patches |
80 | |
81 | # fix pkgconfig pathes |
82 | mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die |
83 | |
84 | # fix some compile issues on multilib systems |
85 | mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die |
86 | |
87 | # enable variable languages via environment vars |
88 | mpatch mozilla-firefox-2.0.0.9-language.patch || die |
89 | |
90 | # disable auto app updates |
91 | mpatch mozilla-firefox-3.6.3-no-app-updates.patch || die |
92 | |
93 | # fixes bug: https://bugzilla.mozilla.org/show_bug.cgi?id=633645 |
94 | mpatch mozilla-firefox-5.0-cache-build.patch || die |
95 | |
96 | export WANT_AUTOCONF="2.1" |
97 | autoconf || die |
98 | } |
99 | |
100 | src_compile() |
101 | { |
102 | cd ${SRCDIR} |
103 | |
104 | # setup .mozconfig |
105 | cp browser/config/mozconfig .mozconfig || die |
106 | |
107 | # where shall the files go ? |
108 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox |
109 | |
110 | # set optimization level based on CFLAGS |
111 | if [[ ${ARCH} = x86_64 ]] |
112 | then |
113 | # opts may cause segfaults on 64bit arches |
114 | mozconf_add --enable-optimize=-O1 |
115 | export CFLAGS="${CFLAGS} -fPIC" |
116 | export CXXFLAGS="${CXXFLAGS} -fPIC" |
117 | else |
118 | mozconf_add --enable-optimize=-O2 |
119 | fi |
120 | |
121 | # enable compat mode for plugins build with gcc2 |
122 | mozconf_add --enable-old-abi-compat-wrappers |
123 | |
124 | # we don't need the installer |
125 | mozconf_add --disable-installer |
126 | |
127 | # issue all warnings demanded by strict ANSI C |
128 | mozconf_add --disable-pedantic |
129 | |
130 | # enable crypto support (Personal Security Manager) |
131 | mozconf_add --enable-crypto |
132 | |
133 | # want system jpeg, pngm, zlib, nspr and nss |
134 | mozconf_add --with-system-jpeg |
135 | # doesn't work atm |
136 | #mozconf_add --with-system-png |
137 | mozconf_add --with-system-zlib |
138 | mozconf_add --with-system-nspr |
139 | mozconf_add --with-system-nss |
140 | |
141 | # enable cairo-gtk2 as default |
142 | mozconf_add --enable-default-toolkit=cairo-gtk2 |
143 | |
144 | # libnotify support (disabled atm) |
145 | mozconf_add --disable-libnotify |
146 | |
147 | # no ipv6 support |
148 | mozconf_add --enable-ipv6 |
149 | |
150 | # want xinerama |
151 | mozconf_add --enable-xinerama |
152 | |
153 | # no xprint ? |
154 | mozconf_add --disable-xprint |
155 | |
156 | # >= firefox-1.0.7 should use xft + pango, svg with cairo |
157 | mozconf_add --disable-freetype2 |
158 | mozconf_add --enable-xft |
159 | mozconf_add --enable-pango |
160 | mozconf_add --enable-system-cairo |
161 | mozconf_add --enable-svg |
162 | mozconf_add --enable-canvas |
163 | |
164 | # enable all image encoders |
165 | mozconf_add --enable-image-encoder=all |
166 | |
167 | # disable debug build && enable stripping |
168 | mozconf_add --disable-debug |
169 | mozconf_add --disable-tests |
170 | mozconf_add --enable-reorder |
171 | mozconf_add --enable-strip |
172 | mozconf_add --enable-strip-libs |
173 | |
174 | if [[ ${ARCH} = i*86 ]] |
175 | then |
176 | # optimze build for x86 |
177 | mozconf_add --enable-elf-dynstr-gc |
178 | fi |
179 | |
180 | # both needed to build galeon |
181 | mozconf_add --enable-oji |
182 | mozconf_add --enable-mathml |
183 | |
184 | # enable storage, places and safe-browsing |
185 | mozconf_add --enable-storage |
186 | mozconf_add --enable-places |
187 | mozconf_add --enable-safe-browsing |
188 | |
189 | # enable default extensions |
190 | mozconf_add --enable-extensions=default |
191 | |
192 | # gnome support (needs gnome-vfs) |
193 | mozconf_add --disable-gnomevfs |
194 | mozconf_add --enable-extension=-gnomevfs |
195 | |
196 | # broken with firefox-3.0.10 |
197 | mozconf_add --disable-mochitest |
198 | mozconf_add --disable-crashreporter |
199 | |
200 | # disable libnotify support on alx |
201 | mozconf_add --disable-libnotify |
202 | # and no dbus on alx too |
203 | mozconf_add --disable-dbus |
204 | # no yasm on alx atm, disable webm video format |
205 | # and jpeg-turbo needs yasm too |
206 | mozconf_add --disable-webm |
207 | mozconf_add --disable-libjpeg-turbo |
208 | # no libalsa too |
209 | mozconf_add --disable-ogg |
210 | mozconf_add --disable-wave |
211 | |
212 | # resolve multiple --enable-extensions down to one |
213 | rebuild_extension_list |
214 | |
215 | # now run configure |
216 | mconfigure || die |
217 | |
218 | # removes extraneous CFLAGS |
219 | # to reduce RAM requirements while compiling |
220 | mozilla_remove_cflags || die |
221 | |
222 | mmake || die |
223 | } |
224 | |
225 | src_install() |
226 | { |
227 | cd ${SRCDIR} |
228 | |
229 | # install |
230 | make DESTDIR=${BINDIR} install || die |
231 | |
232 | # fix permissions |
233 | mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die |
234 | |
235 | # environment |
236 | # mozilla-1.7* uses already the env var mozilla_five_home |
237 | # firefox does not need this, the env var is only to compile |
238 | # mozilla-based sources |
239 | minstalldir /etc/env.d || die |
240 | echo "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" > ${BINDIR}/etc/env.d/90mozilla-firefox || die |
241 | echo "LDPATH=/usr/$(mlibdir)/mozilla-firefox" >> ${BINDIR}/etc/env.d/90mozilla-firefox || die |
242 | |
243 | # vendor information |
244 | msetpref general.useragent.vendor Magellan-Linux || die |
245 | |
246 | # disable app.update in default config |
247 | msetpref app.update.auto false || die |
248 | msetpref app.update.enabled false || die |
249 | msetpref app.update.autoInstallEnabled false || die |
250 | |
251 | # menu entries |
252 | minstallpixmap firefox.png || die |
253 | minstalldir /usr/share/applications || die |
254 | minstallfile -s firefox.desktop /usr/share/applications || die |
255 | |
256 | # now move all plugins to /usr/lib/nsbrowser/plugins |
257 | minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die |
258 | if [[ -d ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins ]] |
259 | then |
260 | cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die |
261 | rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die |
262 | fi |
263 | # and symlink them (we need a defined location for the plugins of all browsers) |
264 | mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die |
265 | } |