# Maintainer: Vladislav Nepogodin (vnepogodin) # Contributor: lsf # Contributor: Jan Alexander Steffens (heftig) # Contributor: Ionut Biru # Contributor: Jakub Schmidtke pkgname=cachy-browser _pkgname=Cachy __pkgname=cachy pkgver=112.0.2 pkgrel=1 pkgdesc="Community-maintained fork of Firefox, focused on privacy, security and freedom." arch=(x86_64 x86_64_v3) license=( GPL LGPL MPL ) depends=( dbus-glib ffmpeg gtk3 icu libevent libjpeg libpulse libvpx libwebp libxt mime-types nss ttf-font zlib ) makedepends=( cbindgen clang diffutils dump_syms imake inetutils jack lld llvm mesa nasm nodejs python rust unzip wasi-compiler-rt wasi-libc wasi-libc++ wasi-libc++abi xorg-server-xvfb yasm zip ) optdepends=( 'hunspell-en_US: Spell checking, American English' 'libnotify: Notification integration' 'networkmanager: Location detection via available WiFi networks' 'pulseaudio: Audio support' 'speech-dispatcher: Text-to-Speech' 'xdg-desktop-portal: Screensharing with Wayland' ) groups=('cachyos') options=( !debug !emptydirs !lto !makeflags !strip ) install=cachy-browser.install backup=('usr/lib/cachy-browser/cachyos.cfg' 'usr/lib/cachy-browser/distribution/policies.json') source=(https://archive.mozilla.org/pub/firefox/releases/$pkgver/source/firefox-$pkgver.source.tar.xz{,.asc} $pkgname.desktop "git+https://github.com/cachyos/cachyos-browser-settings.git" "git+https://github.com/cachyos/cachyos-browser-common.git" "match.patch") sha256sums=('e6a4819a3b82b1ca6c45296e50e6c9ab653306eeb540e50ba8683e339565992e' 'SKIP' 'c0786df2fd28409da59d0999083914a65e2097cda055c9c6c2a65825f156e29f' 'SKIP' 'SKIP' '1fbb1971a1d0d4c875b1af0f9681601909cfbe4fe0cc2c2f42c523c84c934499') validpgpkeys=('14F26682D0916CDD81E37B6D61B7B526D98F0353') # Mozilla Software Releases prepare() { mkdir -p mozbuild cd firefox-$pkgver local _patches_dir="${srcdir}/cachyos-browser-common/patches" cat >../mozconfig < Clear History when LibreWolf closes > Settings" patch -Np1 -i ${_patches_dir}/librewolf-ui/sanitizing-description.patch msg2 "website-appearance-ui-rfp.patch" patch -Np1 -i ${_patches_dir}/librewolf-ui/website-appearance-ui-rfp.patch msg2 "lw-logo-devtools.patch" patch -Np1 -i ${_patches_dir}/librewolf-ui/lw-logo-devtools-cachy.patch patch -Np1 -i ${_patches_dir}/librewolf-ui/handlers.patch msg2 "Firefox View" patch -Np1 -i ${_patches_dir}/librewolf-ui/firefox-view.patch msg2 "change bus/dbus/remoting names to org.cachyos" patch -Np1 -i ${_patches_dir}/librewolf/dbus_name.patch msg2 "customized pref panel" patch -Np1 -i ${_patches_dir}/librewolf/librewolf-pref-pane.patch msg2 "fix telemetry removal, see https://gitlab.com/librewolf-community/browser/linux/-/merge_requests/17, for example" patch -Np1 -i ${_patches_dir}/librewolf/disable-data-reporting-at-compile-time.patch msg2 "Patch Devtools to bypass devtool detection" patch -Np1 -i ${_patches_dir}/devtools-bypass.patch msg2 "KDE menu and unity menubar" patch -Np1 -i ${_patches_dir}/unity_kde/mozilla-kde.patch patch -Np1 -i ${_patches_dir}/unity_kde/firefox-kde.patch patch -Np1 -i ${_patches_dir}/unity_kde/unity-menubar.patch msg2 "mozilla-nongnome-proxies" patch -Np1 -i ${_patches_dir}/kde/mozilla-nongnome-proxies.patch msg2 "some undesired requests (https://gitlab.com/librewolf-community/browser/common/-/issues/10)" patch -Np1 -i ${_patches_dir}/sed-patches/stop-undesired-requests.patch # msg2 "Match to system libs" # patch -Np1 -i ../match.patch rm -f ${srcdir}/cachyos-browser-common/source_files/mozconfig cp -r ${srcdir}/cachyos-browser-common/source_files/browser ./ } build() { cd firefox-$pkgver export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=system export PIP_NETWORK_INSTALL_RESTRICTED_VIRTUALENVS=mach # LTO needs more open files ulimit -n 4096 # Do 3-tier PGO echo "Building instrumented browser..." cat >.mozconfig ../mozconfig - <.mozconfig ../mozconfig - <