CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
llvm: updated to 14.0.6
[ports/opt-arm.git] / firefox / Pkgfile
1 # Description: The Mozilla Firefox browser
2 # URL: https://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
5 # Depends on: nss, unzip, autoconf-2.13, zip, libidl, gtk, gtk3, python, alsa-lib, xorg-libxt, yasm, mesa3d
6
7 name=firefox
8 version=52.8.0esr
9 release=1
10 source=(https://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.xz
11 firefox-install-dir.patch firefox.desktop)
12
13 build() {
14 cd $name-$version
15
16 # Fix to avoid gcc6 compilations error at install stage
17 export CFLAGS="$CFLAGS -fno-schedule-insns"
18 export CXXFLAGS="$CFLAGS"
19
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
23
24 sed -i '/^ftfntfmt.h/ i freetype/ftfntfmt.h' config/system-headers
25 # stupid workaround
26 sed -i '2,7d' js/src/configure
27 patch -p1 -i $SRC/firefox-install-dir.patch
28
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
33 ac_add_options --enable-default-toolkit=cairo-gtk3
34 ac_add_options --with-system-jpeg
35 ac_add_options --with-system-zlib
36 ac_add_options --with-system-png
37 ac_add_options --with-system-nspr
38 ac_add_options --with-system-nss
39 ac_add_options --with-system-cairo
40 ac_add_options --enable-system-ffi
41 ac_add_options --enable-system-pixman
42 ac_add_options --enable-system-sqlite
43 ac_add_options --enable-alsa
44 ac_add_options --with-pthreads
45 ac_add_options --enable-official-branding
46 ac_add_options --with-distribution-id=nu.crux-arm
47 ac_add_options --enable-extensions=default,-gnomevfs
48 ac_add_options --disable-tests
49 ac_add_options --disable-dbus
50 ac_add_options --disable-debug
51 ac_add_options --disable-updater
52 ac_add_options --disable-gnomeui
53 ac_add_options --disable-crashreporter
54 ac_add_options --disable-necko-wifi
55 ac_add_options --disable-pulseaudio
56 ac_add_options --disable-gconf
57 ac_add_options --disable-rust
58 ac_add_options --disable-optimize
59 EOF
60
61 #ac_add_options --disable-startupcache
62 # mozonfig optimizations
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
69
70 make -f client.mk build
71 make -f client.mk DESTDIR=$PKG install
72
73 mkdir -p $PKG/usr/share/pixmaps
74 ln -s /usr/lib/firefox/browser/chrome/icons/default/default48.png $PKG/usr/share/pixmaps/firefox_default48.png
75 install -D -m 0644 $SRC/firefox.desktop $PKG/usr/share/applications/firefox.desktop
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
81 }