Contents of /smage/branches/alx-0_6_0/extras/mozilla-firefox/mozilla-firefox-10.0.2-r1.smage2
Parent Directory | Revision Log
Revision 3528 -
(show annotations)
(download)
Mon Apr 23 08:28:54 2012 UTC (12 years, 5 months ago) by niro
File size: 8604 byte(s)
Mon Apr 23 08:28:54 2012 UTC (12 years, 5 months ago) by niro
File size: 8604 byte(s)
auto added: ver bump to 10.0.2-r1
1 | # $Id$ |
2 | |
3 | PNAME="mozilla-firefox" |
4 | PVER="10.0.2" |
5 | PBUILD="r1" |
6 | |
7 | PCAT="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=">= x11-libs/libXrender-0.9 |
13 | >= x11-libs/libXcomposite-0.4 |
14 | >= x11-libs/libXt-1 |
15 | >= x11-libs/libXmu-1 |
16 | >= dev-libs/expat-2 |
17 | >= sys-libs/zlib-1.2.3 |
18 | >= media-libs/fontconfig-2.8 |
19 | >= media-libs/libjpeg-8 |
20 | >= media-libs/libpng-1.5 |
21 | >= dev-libs/glib2-2.28 |
22 | >= dev-libs/libidl-0.8.14 |
23 | >= app-arch/unzip-6 |
24 | >= x11-libs/pango-1.28 |
25 | >= x11-libs/cairo-1.10 |
26 | >= x11-libs/gtk2+-2.24 |
27 | >= dev-libs/nspr-4.9 |
28 | >= dev-libs/nss-3.13 |
29 | >= media-fonts/corefonts-2" |
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 | PROVIDE="virtual/webbrowser" |
40 | |
41 | SRCFILE="firefox-${PVER}.source.tar.bz2" |
42 | SRCDIR="${BUILDDIR}/mozilla-release" |
43 | |
44 | ALX_ONLY_KEEP="etc/env.d |
45 | usr/bin |
46 | usr/share |
47 | usr/$(mlibdir)/nsbrowser |
48 | usr/$(mlibdir)/mozilla-firefox/firefox |
49 | usr/$(mlibdir)/mozilla-firefox/firefox-bin |
50 | usr/$(mlibdir)/mozilla-firefox/mozilla-xrmote-client |
51 | usr/$(mlibdir)/mozilla-firefox/plugin-container |
52 | usr/$(mlibdir)/mozilla-firefox/plugins |
53 | usr/$(mlibdir)/mozilla-firefox/run-mozilla.sh |
54 | usr/$(mlibdir)/mozilla-firefox/*.ini |
55 | usr/$(mlibdir)/mozilla-firefox/*.xml |
56 | usr/$(mlibdir)/mozilla-firefox/*.so |
57 | usr/$(mlibdir)/mozilla-firefox/*.jar |
58 | usr/$(mlibdir)/mozilla-firefox/chrome |
59 | usr/$(mlibdir)/mozilla-firefox/chrome.manifest |
60 | usr/$(mlibdir)/mozilla-firefox/components |
61 | usr/$(mlibdir)/mozilla-firefox/default |
62 | usr/$(mlibdir)/mozilla-firefox/dependentlibs.list |
63 | usr/$(mlibdir)/mozilla-firefox/dictionaries |
64 | usr/$(mlibdir)/mozilla-firefox/extensions |
65 | usr/$(mlibdir)/mozilla-firefox/icons |
66 | usr/$(mlibdir)/mozilla-firefox/plugins |
67 | usr/$(mlibdir)/mozilla-firefox/searchplugins |
68 | usr/$(mlibdir)/mozilla-firefox/update.locale" |
69 | sminclude mozilla mtools alx-split |
70 | |
71 | SRC_URI=( |
72 | ftp://ftp.mozilla.org/pub/mozilla.org/${PNAME/mozilla-/}/releases/${PVER}/source/${SRCFILE} |
73 | mirror://${PNAME}/${SRCFILE} |
74 | mirror://${PNAME}/menu/firefox.png |
75 | mirror://${PNAME}/menu/firefox.desktop |
76 | mirror://${PNAME}/mozilla-firefox-3.0.6-pkgconfig.patch |
77 | mirror://${PNAME}/mozilla-firefox-2.0.0.5-rpath-3.patch |
78 | mirror://${PNAME}/mozilla-firefox-2.0.0.9-language.patch |
79 | ) |
80 | |
81 | UP2DATE="updatecmd ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/latest/source | sed 's:[-|.]source::' | lasttarball" |
82 | |
83 | export MOZ_PHOENIX=1 |
84 | |
85 | # set by configure (plus USE_AUTOCONF=1), but useful for NSPR |
86 | export MOZILLA_CLIENT=1 |
87 | export BUILD_OPT=1 |
88 | export NO_STATIC_LIB=1 |
89 | export USE_PTHREADS=1 |
90 | |
91 | # now strip optimization from CFLAGS so it doesn't end up in the |
92 | # compile string |
93 | export CFLAGS="${CFLAGS/-O*/}" |
94 | export CXXFLAGS="${CFLAGS}" |
95 | |
96 | # needed to build without warnings on gcc-3 |
97 | export CXXFLAGS="${CXXFLAGS} -Wno-deprecated" |
98 | |
99 | src_prepare() |
100 | { |
101 | munpack ${SRCFILE} || die |
102 | cd ${SRCDIR} |
103 | |
104 | # patches, patches, patches |
105 | |
106 | # fix pkgconfig pathes |
107 | mpatch mozilla-firefox-3.0.6-pkgconfig.patch || die |
108 | |
109 | # fix some compile issues on multilib systems |
110 | mpatch mozilla-firefox-2.0.0.5-rpath-3.patch || die |
111 | |
112 | # enable variable languages via environment vars |
113 | mpatch mozilla-firefox-2.0.0.9-language.patch || die |
114 | |
115 | # fix newer curl-headers |
116 | sed -i '/#include <curl\/types.h>/d' \ |
117 | toolkit/crashreporter/google-breakpad/src/common/linux/http_upload.cc \ |
118 | toolkit/crashreporter/google-breakpad/src/common/linux/libcurl_wrapper.cc \ |
119 | config/system-headers \ |
120 | js/src/config/system-headers || die |
121 | |
122 | export WANT_AUTOCONF="2.1" |
123 | autoconf || die |
124 | } |
125 | |
126 | src_compile() |
127 | { |
128 | cd ${SRCDIR} |
129 | |
130 | # setup .mozconfig |
131 | cp browser/config/mozconfig .mozconfig || die |
132 | |
133 | # where shall the files go ? |
134 | mozconf_add --with-default-mozilla-five-home=/usr/$(mlibdir)/mozilla-firefox |
135 | |
136 | # set optimization level based on CFLAGS |
137 | if [[ ${ARCH} = x86_64 ]] |
138 | then |
139 | # opts may cause segfaults on 64bit arches |
140 | mozconf_add --enable-optimize=-O1 |
141 | export CFLAGS="${CFLAGS} -fPIC" |
142 | export CXXFLAGS="${CXXFLAGS} -fPIC" |
143 | else |
144 | mozconf_add --enable-optimize=-O2 |
145 | fi |
146 | |
147 | # enable compat mode for plugins build with gcc2 |
148 | mozconf_add --enable-old-abi-compat-wrappers |
149 | |
150 | # we don't need the installer |
151 | mozconf_add --disable-installer |
152 | |
153 | # issue all warnings demanded by strict ANSI C |
154 | mozconf_add --disable-pedantic |
155 | |
156 | # enable crypto support (Personal Security Manager) |
157 | mozconf_add --enable-crypto |
158 | |
159 | # want system jpeg, pngm, zlib, nspr and nss |
160 | #mozconf_add --with-system-jpeg # prefer libjpeg-turbo |
161 | # doesn't work atm |
162 | #mozconf_add --with-system-png |
163 | mozconf_add --with-system-zlib |
164 | mozconf_add --with-system-nspr |
165 | mozconf_add --with-system-nss |
166 | mozconf_add --with-system-pixman |
167 | |
168 | # enable cairo-gtk2 as default |
169 | mozconf_add --enable-default-toolkit=cairo-gtk2 |
170 | |
171 | # libnotify support (disabled atm) |
172 | mozconf_add --disable-libnotify |
173 | |
174 | # ipv6 support |
175 | mozconf_add --enable-ipv6 |
176 | |
177 | # want xinerama |
178 | mozconf_add --enable-xinerama |
179 | |
180 | # no xprint ? |
181 | mozconf_add --disable-xprint |
182 | |
183 | # >= firefox-1.0.7 should use xft + pango, svg with cairo |
184 | mozconf_add --disable-freetype2 |
185 | mozconf_add --enable-xft |
186 | mozconf_add --enable-pango |
187 | mozconf_add --enable-system-cairo |
188 | mozconf_add --enable-svg |
189 | mozconf_add --enable-canvas |
190 | |
191 | # enable all image encoders |
192 | mozconf_add --enable-image-encoder=all |
193 | |
194 | # disable debug build && enable stripping |
195 | mozconf_add --disable-debug |
196 | mozconf_add --disable-tests |
197 | mozconf_add --enable-reorder |
198 | mozconf_add --enable-strip |
199 | mozconf_add --enable-strip-libs |
200 | |
201 | if [[ ${ARCH} = i*86 ]] |
202 | then |
203 | # optimze build for x86 |
204 | mozconf_add --enable-elf-dynstr-gc |
205 | fi |
206 | |
207 | # both needed to build galeon |
208 | mozconf_add --enable-oji |
209 | mozconf_add --enable-mathml |
210 | |
211 | # enable storage, places and safe-browsing |
212 | mozconf_add --enable-storage |
213 | mozconf_add --enable-places |
214 | mozconf_add --enable-safe-browsing |
215 | |
216 | # enable default extensions |
217 | mozconf_add --enable-extensions=default |
218 | |
219 | # gnome support (needs gnome-vfs) |
220 | mozconf_add --disable-gnomevfs |
221 | mozconf_add --enable-extension=-gnomevfs |
222 | |
223 | # broken with firefox-3.0.10 |
224 | mozconf_add --disable-mochitest |
225 | mozconf_add --disable-crashreporter |
226 | |
227 | # disable libnotify support on alx |
228 | mozconf_add --disable-libnotify |
229 | # and no dbus on alx too |
230 | mozconf_add --disable-dbus |
231 | # no yasm on alx atm, disable webm video format |
232 | # and jpeg-turbo needs yasm too |
233 | mozconf_add --disable-webm |
234 | mozconf_add --disable-libjpeg-turbo |
235 | # no libalsa too |
236 | mozconf_add --disable-ogg |
237 | mozconf_add --disable-wave |
238 | # no opengl |
239 | mozconf_add --disable-angle |
240 | |
241 | # resolve multiple --enable-extensions down to one |
242 | rebuild_extension_list |
243 | |
244 | # # now run configure |
245 | # mconfigure || die |
246 | |
247 | # removes extraneous CFLAGS |
248 | # to reduce RAM requirements while compiling |
249 | mozilla_remove_cflags || die |
250 | |
251 | mmake -j1 -f client.mk || die |
252 | } |
253 | |
254 | src_install() |
255 | { |
256 | cd ${SRCDIR} |
257 | |
258 | # install |
259 | make DESTDIR=${BINDIR} install || die |
260 | |
261 | # fix permissions |
262 | mchown -R root:root /usr/$(mlibdir)/mozilla-firefox || die |
263 | |
264 | # environment |
265 | # mozilla-1.7* uses already the env var mozilla_five_home |
266 | # firefox does not need this, the env var is only to compile |
267 | # mozilla-based sources |
268 | minstalldir /etc/env.d || die |
269 | MCONFIG="/etc/env.d/90mozilla-firefox" |
270 | mclearconfig || die |
271 | maddconfig "MOZILLA_FIVE_HOME=/usr/$(mlibdir)/mozilla-firefox" || die |
272 | maddconfig "LDPATH=/usr/$(mlibdir)/mozilla-firefox" || die |
273 | |
274 | # vendor information |
275 | msetpref general.useragent.vendor Magellan-Linux || die |
276 | |
277 | # disable app.update in default config |
278 | msetpref app.update.auto false || die |
279 | msetpref app.update.enabled false || die |
280 | msetpref app.update.autoInstallEnabled false || die |
281 | |
282 | # use system-colors |
283 | msetpref browser.display.use_system_colors true || die |
284 | # disable default-browser check |
285 | msetpref browser.shell.checkDefaultBrowser false || die |
286 | |
287 | # menu entries |
288 | minstallpixmap firefox.png || die |
289 | minstalldir /usr/share/applications || die |
290 | minstallfile -s firefox.desktop /usr/share/applications || die |
291 | |
292 | # now move all plugins to /usr/lib/nsbrowser/plugins |
293 | minstalldir /usr/$(mlibdir)/nsbrowser/plugins || die |
294 | if [[ -d ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins ]] |
295 | then |
296 | cp -a ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins/* ${BINDIR}/usr/$(mlibdir)/nsbrowser/plugins || die |
297 | rm -rf ${BINDIR}/usr/$(mlibdir)/mozilla-firefox/plugins || die |
298 | fi |
299 | # and symlink them (we need a defined location for the plugins of all browsers) |
300 | mlink /usr/$(mlibdir)/nsbrowser/plugins /usr/$(mlibdir)/mozilla-firefox/plugins || die |
301 | |
302 | # alx-only - alway export LANG=de_DE |
303 | # we don't support any locales but firefox needs this to load the german i18n plugin |
304 | sed -i 's:^\(#!/.*\):\1\nexport LANG="de_DE":' /usr/$(mlibdir)/mozilla-firefox/firefox || die |
305 | } |