forked from ports/contrib
71 lines
2.4 KiB
Plaintext
71 lines
2.4 KiB
Plaintext
# Description: The Mozilla Firefox browser with Alsa support
|
|
# URL: https://www.mozilla.com/firefox/
|
|
# Maintainer: Danny Rawlins, crux at romster dot me
|
|
# Depends on: alsa-lib autoconf-2.13 cbindgen clang dbus-glib gtk libidl libnotify libxkbcommon nodejs nss unzip xorg-libxt yasm zip
|
|
# Optional: sccache
|
|
|
|
name=firefox
|
|
version=69.0
|
|
release=1
|
|
source=(https://ftp.mozilla.org/pub/firefox/releases/$version/source/firefox-$version.source.tar.xz
|
|
firefox.desktop)
|
|
|
|
build() {
|
|
cd firefox-$version
|
|
|
|
prt-get isinst sccache && export RUSTC_WRAPPER=/usr/bin/sccache
|
|
|
|
cat <<- EOF > .mozconfig
|
|
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-shared
|
|
unset MOZ_TELEMETRY_REPORTING
|
|
ac_add_options --prefix=/usr
|
|
ac_add_options --enable-default-toolkit=cairo-gtk3
|
|
ac_add_options --enable-application=browser
|
|
ac_add_options --with-system-jpeg
|
|
ac_add_options --with-system-zlib
|
|
ac_add_options --with-system-bz2
|
|
ac_add_options --with-system-png
|
|
ac_add_options --with-system-nspr
|
|
ac_add_options --with-system-nss
|
|
ac_add_options --enable-av1
|
|
ac_add_options --enable-system-ffi
|
|
ac_add_options --enable-system-pixman
|
|
ac_add_options --enable-system-sqlite
|
|
ac_add_options --enable-alsa
|
|
ac_add_options --enable-optimize
|
|
ac_add_options --disable-debug-symbols
|
|
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
|
|
|
|
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
|
|
export MOZ_MAKE_FLAGS="-j ${JOBS-1}"
|
|
export MOZBUILD_STATE_PATH="$PKGMK_SOURCE_DIR/.mozbuild"
|
|
|
|
mkdir "$PKGMK_SOURCE_DIR/rust" || true
|
|
export CARGO_HOME="$PKGMK_SOURCE_DIR/rust"
|
|
|
|
./mach build
|
|
#./mach build toolkit/library/rust
|
|
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
|
|
}
|