Commit | Line | Data |
---|---|---|
60b0efeb | 1 | # Description: The Mozilla Firefox browser |
437ff219 | 2 | # URL: https://www.mozilla.com/firefox/ |
60b0efeb VM |
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 | |
40cc59ba | 8 | version=52.6.0esr |
70d6213a | 9 | release=1 |
437ff219 | 10 | source=(https://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() { |
437ff219 VM |
14 | cd $name-$version |
15 | ||
70d6213a VM |
16 | # Fix to avoid gcc6 compilations error at install stage |
17 | export CFLAGS="$CFLAGS -fno-schedule-insns" | |
18 | export CXXFLAGS="$CFLAGS" | |
19 | ||
437ff219 VM |
20 | # Fix python |
21 | sed -i 's@PYTHON ?= $(shell which python2.7 > /dev/null 2>&1 && echo python2.7 || echo python)@PYTHON := python -B@' \ | |
22 | client.mk | |
b28e1726 | 23 | |
6e218fab | 24 | sed -i '/^ftfntfmt.h/ i freetype/ftfntfmt.h' config/system-headers |
3f6fdb87 VM |
25 | # stupid workaround |
26 | sed -i '2,7d' js/src/configure | |
28adcc4f | 27 | patch -p1 -i $SRC/firefox-install-dir.patch |
28adcc4f | 28 | |
c1fcc872 VM |
29 | cat <<- EOF > .mozconfig |
30 | mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-shared | |
31 | mk_add_options MOZ_MAKE_FLAGS="$MAKEFLAGS -s" | |
32 | ac_add_options --prefix=/usr | |
3f6fdb87 | 33 | ac_add_options --enable-default-toolkit=cairo-gtk3 |
28adcc4f | 34 | ac_add_options --with-system-jpeg |
c1fcc872 | 35 | ac_add_options --with-system-zlib |
28adcc4f | 36 | ac_add_options --with-system-png |
c1fcc872 VM |
37 | ac_add_options --with-system-nspr |
38 | ac_add_options --with-system-nss | |
80bee279 | 39 | ac_add_options --with-system-cairo |
c1fcc872 VM |
40 | ac_add_options --enable-system-ffi |
41 | ac_add_options --enable-system-pixman | |
42 | ac_add_options --enable-system-sqlite | |
70d6213a | 43 | ac_add_options --enable-alsa |
c1fcc872 | 44 | ac_add_options --with-pthreads |
c1fcc872 | 45 | ac_add_options --enable-official-branding |
3f6fdb87 | 46 | ac_add_options --with-distribution-id=nu.crux-arm |
c1fcc872 | 47 | ac_add_options --enable-extensions=default,-gnomevfs |
c1fcc872 | 48 | ac_add_options --disable-tests |
c1fcc872 VM |
49 | ac_add_options --disable-dbus |
50 | ac_add_options --disable-debug | |
c1fcc872 | 51 | ac_add_options --disable-updater |
c1fcc872 | 52 | ac_add_options --disable-gnomeui |
c1fcc872 VM |
53 | ac_add_options --disable-crashreporter |
54 | ac_add_options --disable-necko-wifi | |
58ede934 | 55 | ac_add_options --disable-pulseaudio |
d0332e1b | 56 | ac_add_options --disable-gconf |
437ff219 VM |
57 | ac_add_options --disable-rust |
58 | ac_add_options --disable-optimize | |
c1fcc872 | 59 | EOF |
60b0efeb | 60 | |
437ff219 | 61 | #ac_add_options --disable-startupcache |
70d6213a | 62 | # mozonfig optimizations |
437ff219 VM |
63 | # for flag in $CFLAGS; do |
64 | # case $flag in | |
65 | # -mfpu=neon*) echo "ac_add_options --with-fpu=neon" >> .mozconfig ;; | |
66 | # -march=armv7ve) echo "ac_add_options --with-arch=armv7ve" >> .mozconfig ;; | |
67 | # esac | |
68 | # done | |
70d6213a | 69 | |
c1fcc872 VM |
70 | make -f client.mk build |
71 | make -f client.mk DESTDIR=$PKG install | |
437ff219 | 72 | |
b28e1726 | 73 | mkdir -p $PKG/usr/share/pixmaps |
28adcc4f | 74 | ln -s /usr/lib/firefox/browser/chrome/icons/default/default48.png $PKG/usr/share/pixmaps/firefox_default48.png |
b28e1726 | 75 | install -D -m 0644 $SRC/firefox.desktop $PKG/usr/share/applications/firefox.desktop |
93ebab8b VM |
76 | # Remove crap |
77 | rm $PKG/usr/lib/firefox/browser/features/{firefox@getpocket.com.xpi,webcompat@mozilla.org.xpi} | |
78 | ||
79 | mkdir -p $PKG/etc/revdep.d | |
80 | echo "/usr/lib/firefox" > $PKG/etc/revdep.d/firefox | |
60b0efeb | 81 | } |