pkgname: firefox pkgver: '153.0.4.source' pkgrel: 1 pkgdesc: Standalone web browser from mozilla.org url: 'https://www.mozilla.com/firefox/' arch: x86_64 license: - MPL-2.0 - GPL-2.0-or-later - LGPL-2.1-or-later depends: - pulseaudio - gstreamer - gstreamer-plugins-base - gstreamer-plugins-good - gstreamer-plugins-libav - shared-mime-info - startup-notification - desktop-file-utils - hicolor-icon-theme - gtk-update-icon-cache makedepends: - wget - python - node - cbindgen - libwebp - nspr - libevent - rustc - nss - gtk3 - libvpx - sqlite - dbus-glib - autoconf2-13 - libnotify - yasm - llvm - xorg-libxcomposite - zip - unzip source: - 0001-Install-under-remoting-name.patch - firefox.desktop - 'https://archive.mozilla.org/pub/firefox/releases/${pkgver}/source/${pkgname}-${pkgver}.source.tar.xz' sha256sums: - SKIP - SKIP - SKIP build: | cd ${pkgname}-${pkgver} patch -Np1 -i ../0001-Install-under-remoting-name.patch export AR=llvm-ar NM=llvm-nm RANLIB=llvm-ranlib CC=clang CXX=clang++ # Locale autodetect sed -i '/intl.locale.matchOS/s/false/true/' modules/libpref/init/all.js cat > mozconfig << "EOF" # If you have a multicore machine, all cores will be used by default. # If desired, you can reduce the number of cores used, e.g. to 1, by # uncommenting the next line and setting a valid number of CPU cores. #mk_add_options MOZ_MAKE_FLAGS="-j1" # If you have installed dbus-glib, comment out this line: #ac_add_options --disable-dbus # If you have installed dbus-glib, and you have installed (or will install) # wireless-tools, and you wish to use geolocation web services, comment out # this line ac_add_options --disable-necko-wifi # API Keys for geolocation APIs - necko-wifi (above) is required for MLS # Uncomment the following line if you wish to use Mozilla Location Service #ac_add_options --with-mozilla-api-keyfile=$PWD/mozilla-key # Uncomment the following line if you wish to use Google's geolocaton API # (needed for use with saved maps with Google Maps) #ac_add_options --with-google-api-keyfile=$PWD/google-key # Uncomment these lines if you have installed optional dependencies: #ac_add_options --enable-system-hunspell #ac_add_options --enable-startup-notification ac_add_options --without-wasm-sandboxed-libraries # Choose PulseAudio or alsa: PulseAudio for now # ac_add_options --disable-pulseaudio # ac_add_options --enable-alsa # Comment out following options if you have not installed # recommended dependencies: #ac_add_options --enable-system-sqlite ac_add_options --with-system-libevent # fails to build against libvpx-1.8.0 #ac_add_options --with-system-libvpx ac_add_options --with-system-nss ac_add_options --with-system-nspr ac_add_options --with-system-icu # Do not specify the gold linker which is not the default. It will take # longer and use more disk space when debug symbols are disabled. # If you are going to apply the patch for system graphite # and system harfbuzz, uncomment these lines: #ac_add_options --with-system-graphite2 #ac_add_options --with-system-harfbuzz # Stripping is now enabled by default. # Uncomment these lines if you need to run a debugger: #ac_add_options --disable-strip #ac_add_options --disable-install-strip # Disabling debug symbols makes the build much smaller and a little # faster. Comment this if you need to run a debugger. ac_add_options --disable-debug-symbols # The BLFS editors recommend not changing anything below this line: ac_add_options --prefix=/usr ac_add_options --enable-application=browser ac_add_options --disable-crashreporter ac_add_options --disable-updater ac_add_options --disable-tests # Optimization for size is broken with gcc7 ac_add_options --enable-optimize ac_add_options --enable-official-branding # From firefox-61, system cairo is not supported ac_add_options --enable-system-ffi ac_add_options --enable-system-pixman # From firefox-62 --with-pthreads is not recognized ac_add_options --with-system-jpeg ac_add_options --with-system-png ac_add_options --with-system-zlib # The following option unsets Telemetry Reporting. With the Addons Fiasco, # Mozilla was found to be collecting user's data, including saved passwords and # web form data, without users consent. Mozilla was also found shipping updates # to systems without the user's knowledge or permission. # As a result of this, use the following command to permanently disable # telemetry reporting in Firefox. unset MOZ_TELEMETRY_REPORTING export MOZ_APP_REMOTINGNAME=firefox mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/firefox-build-dir EOF sed -e 's/checkImpl/checkFFImpl/g' -i js/src/vm/JSContext*.h export MOZBUILD_STATE_PATH=${PWD}/mozbuild SHELL=/bin/sh ./mach build SHELL=/bin/sh ./mach buildsymbols mkdir -pv ${PKGDIR}/usr/{bin,lib{,/mozilla/plugins}} SHELL=/bin/sh DESTDIR=${PKGDIR} ./mach install ln -svf ../mozilla/plugins ${PKGDIR}/usr/lib/firefox/browser/ # Launcher mkdir -pv ${PKGDIR}/usr/share/applications install -Dm644 ./firefox.desktop ${PKGDIR}/usr/share/applications/firefox.desktop mkdir -pv ${PKGDIR}/usr/share/pixmaps ln -sf /usr/lib/firefox-${pkgver}/browser/icons/mozicon128.png ${PKGDIR}/usr/share/pixmaps/firefox.png for i in 16 22 24 32 48 256 do mkdir -p ${PKGDIR}/usr/share/icons/hicolor/${i}x${i}/apps cp browser/branding/official/default${i}.png \ ${PKGDIR}/usr/share/icons/hicolor/${i}x${i}/apps/firefox.png done mkdir -pv ${PKGDIR}/usr/lib/firefox/browser/defaults/preferences cat > ${PKGDIR}/usr/lib/firefox/browser/defaults/preferences/vendor.js << "EOF" // Use LANG environment variable to choose locale pref("intl.locale.requested", ""); // Disable default browser checking. pref("browser.shell.checkDefaultBrowser", false); // Don't disable our bundled extensions in the application directory pref("extensions.autoDisableScopes", 11); pref("extensions.shownSelectionUI", true); EOF package: | true