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