Commit | Line | Data |
---|---|---|
60b0efeb VM |
1 | # Description: The Mozilla Firefox browser |
2 | # URL: http://www.mozilla.com/firefox/ | |
3 | # Maintainer: Fredrik Rinnestam, fredrik at crux dot nu | |
4 | # Arch Maintainer: CRUX-ARM System Team, devel at crux-arm dot nu | |
77e20c75 | 5 | # Depends on: nss, unzip, autoconf-2.13, zip, libidl, gtk, gtk3, python, alsa-lib, xorg-libxt, yasm, mesa3d |
60b0efeb VM |
6 | |
7 | name=firefox | |
65c1966f | 8 | version=52.0.2 |
70d6213a | 9 | release=1 |
d0332e1b | 10 | source=(http://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.xz |
c5082f81 | 11 | firefox-install-dir.patch firefox.desktop) |
8d236139 | 12 | |
60b0efeb | 13 | build() { |
70d6213a VM |
14 | # Fix to avoid gcc6 compilations error at install stage |
15 | export CFLAGS="$CFLAGS -fno-schedule-insns" | |
16 | export CXXFLAGS="$CFLAGS" | |
17 | ||
6e218fab | 18 | cd $name-$version |
b28e1726 | 19 | |
6e218fab | 20 | sed -i '/^ftfntfmt.h/ i freetype/ftfntfmt.h' config/system-headers |
3f6fdb87 VM |
21 | # stupid workaround |
22 | sed -i '2,7d' js/src/configure | |
28adcc4f | 23 | patch -p1 -i $SRC/firefox-install-dir.patch |
28adcc4f | 24 | |
c1fcc872 VM |
25 | cat <<- EOF > .mozconfig |
26 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-shared | |
27 | mk_add_options MOZ_MAKE_FLAGS="$MAKEFLAGS -s" | |
28 | ac_add_options --prefix=/usr | |
3f6fdb87 | 29 | ac_add_options --enable-default-toolkit=cairo-gtk3 |
28adcc4f | 30 | ac_add_options --with-system-jpeg |
c1fcc872 | 31 | ac_add_options --with-system-zlib |
28adcc4f | 32 | ac_add_options --with-system-png |
c1fcc872 VM |
33 | ac_add_options --with-system-nspr |
34 | ac_add_options --with-system-nss | |
80bee279 | 35 | ac_add_options --with-system-cairo |
c1fcc872 VM |
36 | ac_add_options --enable-system-ffi |
37 | ac_add_options --enable-system-pixman | |
38 | ac_add_options --enable-system-sqlite | |
70d6213a | 39 | ac_add_options --enable-alsa |
c1fcc872 | 40 | ac_add_options --with-pthreads |
c1fcc872 | 41 | ac_add_options --enable-official-branding |
3f6fdb87 | 42 | ac_add_options --with-distribution-id=nu.crux-arm |
c1fcc872 | 43 | ac_add_options --enable-extensions=default,-gnomevfs |
c1fcc872 | 44 | ac_add_options --disable-tests |
c1fcc872 VM |
45 | ac_add_options --disable-dbus |
46 | ac_add_options --disable-debug | |
c1fcc872 | 47 | ac_add_options --disable-updater |
c1fcc872 | 48 | ac_add_options --disable-gnomeui |
c1fcc872 VM |
49 | ac_add_options --disable-crashreporter |
50 | ac_add_options --disable-necko-wifi | |
58ede934 | 51 | ac_add_options --disable-pulseaudio |
d0332e1b | 52 | ac_add_options --disable-gconf |
70d6213a | 53 | ac_add_options --disable-skia |
c1fcc872 | 54 | EOF |
60b0efeb | 55 | |
70d6213a VM |
56 | # mozonfig optimizations |
57 | for flag in $CFLAGS; do | |
58 | case $flag in | |
59 | -mfpu=neon*) echo "ac_add_options --with-fpu=neon" >> .mozconfig ;; | |
60 | -march=armv7ve) echo "ac_add_options --with-arch=armv7ve" >> .mozconfig ;; | |
61 | esac | |
62 | done | |
63 | ||
c1fcc872 VM |
64 | make -f client.mk build |
65 | make -f client.mk DESTDIR=$PKG install | |
28adcc4f | 66 | |
b28e1726 | 67 | mkdir -p $PKG/usr/share/pixmaps |
28adcc4f | 68 | ln -s /usr/lib/firefox/browser/chrome/icons/default/default48.png $PKG/usr/share/pixmaps/firefox_default48.png |
b28e1726 | 69 | install -D -m 0644 $SRC/firefox.desktop $PKG/usr/share/applications/firefox.desktop |
93ebab8b VM |
70 | # Remove crap |
71 | rm $PKG/usr/lib/firefox/browser/features/{firefox@getpocket.com.xpi,webcompat@mozilla.org.xpi} | |
72 | ||
73 | mkdir -p $PKG/etc/revdep.d | |
74 | echo "/usr/lib/firefox" > $PKG/etc/revdep.d/firefox | |
60b0efeb | 75 | } |