2018-12-26 11:23:08 +01:00
|
|
|
# Description: The Mozilla Firefox browser with Alsa support
|
|
|
|
# URL: https://www.mozilla.com/firefox/
|
|
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
2019-09-07 05:31:43 +02:00
|
|
|
# Depends on: alsa-lib autoconf-2.13 cbindgen clang dbus-glib gtk libidl libnotify libxkbcommon nodejs nss unzip xorg-libxt yasm zip
|
2018-12-26 11:23:08 +01:00
|
|
|
# Optional: sccache
|
|
|
|
|
|
|
|
name=firefox
|
2019-09-19 14:12:43 +02:00
|
|
|
version=69.0.1
|
2018-12-26 11:23:08 +01:00
|
|
|
release=1
|
|
|
|
source=(https://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.xz
|
|
|
|
firefox.desktop)
|
|
|
|
|
|
|
|
build() {
|
|
|
|
cd firefox-$version
|
|
|
|
|
2019-06-05 16:22:36 +02:00
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
2018-12-26 11:23:08 +01:00
|
|
|
|
|
|
|
cat <<- EOF > .mozconfig
|
|
|
|
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-shared
|
2019-09-07 05:31:43 +02:00
|
|
|
unset MOZ_TELEMETRY_REPORTING
|
2018-12-26 11:23:08 +01:00
|
|
|
ac_add_options --prefix=/usr
|
|
|
|
ac_add_options --enable-default-toolkit=cairo-gtk3
|
2019-02-15 09:56:43 +01:00
|
|
|
ac_add_options --enable-application=browser
|
2018-12-26 11:23:08 +01:00
|
|
|
ac_add_options --with-system-jpeg
|
|
|
|
ac_add_options --with-system-zlib
|
2019-02-15 09:56:43 +01:00
|
|
|
ac_add_options --with-system-bz2
|
2018-12-26 11:23:08 +01:00
|
|
|
ac_add_options --with-system-png
|
|
|
|
ac_add_options --with-system-nspr
|
|
|
|
ac_add_options --with-system-nss
|
2019-09-07 05:31:43 +02:00
|
|
|
ac_add_options --enable-av1
|
2018-12-26 11:23:08 +01:00
|
|
|
ac_add_options --enable-system-ffi
|
|
|
|
ac_add_options --enable-system-pixman
|
|
|
|
ac_add_options --enable-system-sqlite
|
|
|
|
ac_add_options --enable-alsa
|
2019-02-15 09:56:43 +01:00
|
|
|
ac_add_options --enable-optimize
|
2019-09-07 05:31:43 +02:00
|
|
|
ac_add_options --disable-debug-symbols
|
2018-12-26 11:23:08 +01:00
|
|
|
ac_add_options --disable-pulseaudio
|
|
|
|
ac_add_options --enable-official-branding
|
|
|
|
ac_add_options --with-distribution-id=nu.crux
|
|
|
|
ac_add_options --enable-extensions=default,-gnomevfs
|
|
|
|
ac_add_options --disable-tests
|
|
|
|
ac_add_options --disable-debug
|
|
|
|
ac_add_options --disable-updater
|
|
|
|
ac_add_options --disable-crashreporter
|
|
|
|
ac_add_options --disable-necko-wifi
|
|
|
|
ac_add_options --disable-gconf
|
|
|
|
EOF
|
|
|
|
|
2019-02-15 09:56:43 +01:00
|
|
|
sed -e 's/checkImpl/checkFFImpl/g' -i js/src/vm/JSContext*.h
|
|
|
|
export CC=clang CXX=clang++ AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib
|
2018-12-26 11:23:08 +01:00
|
|
|
export MOZ_MAKE_FLAGS="-j ${JOBS-1}"
|
|
|
|
export MOZBUILD_STATE_PATH="$PKGMK_SOURCE_DIR/.mozbuild"
|
2019-05-24 00:55:44 +02:00
|
|
|
|
|
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
2018-12-26 11:23:08 +01:00
|
|
|
|
|
|
|
./mach build
|
2019-02-15 09:56:43 +01:00
|
|
|
#./mach build toolkit/library/rust
|
2018-12-26 11:23:08 +01:00
|
|
|
DESTDIR=$PKG ./mach install
|
|
|
|
|
|
|
|
install -d $PKG/usr/share/pixmaps
|
|
|
|
ln -s /usr/lib/firefox/browser/chrome/icons/default/default48.png $PKG/usr/share/pixmaps/firefox_default48.png
|
|
|
|
install -D -m 0644 $SRC/firefox.desktop $PKG/usr/share/applications/firefox.desktop
|
|
|
|
# Remove crap
|
|
|
|
rm -r $PKG/usr/lib/firefox/browser/features
|
|
|
|
rm $PKG/usr/lib/firefox/removed-files
|
|
|
|
|
|
|
|
install -d $PKG/etc/revdep.d
|
|
|
|
echo "/usr/lib/firefox" > $PKG/etc/revdep.d/firefox
|
|
|
|
}
|