# Maintainer: hawkeye116477 pkgname=waterfox-g3-kpe pkgver=1.1 pkgrel=0 pkgdesc="Customizable privacy conscious web browser with better integration with KDE and primary support for webextensions" arch=('x86_64') license=('MPL') url="https://www.waterfox.net/" depends=('gtk3' 'gtk2' 'libxt' 'startup-notification' 'mime-types' 'dbus-glib' 'ffmpeg' 'nss' 'nspr' 'ttf-font' 'hicolor-icon-theme' 'glibc' 'kwaterfoxhelper') makedepends=('unzip' 'zip' 'diffutils' 'python' 'yasm' 'mesa' 'imake' 'inetutils' 'xorg-server-xvfb' 'autoconf2.13' 'rust' 'clang' 'llvm' 'libpulse' 'alsa-lib' 'jack' 'cbindgen' 'nasm' 'python-setuptools' 'nodejs' 'python-psutil' 'binutils' 'git') options=('!emptydirs' '!makeflags' 'zipman') _filesrev=e0d8363e58ed288cd10caabb34c1ce153262e045 _filesurl=https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/$_filesrev/waterfox-g3-kpe _commit=11befa20d8c009ee5eaeb44bb3b586de9390bfcd #"git+https://github.com/MrAlex94/Waterfox.git#commit=$_commit" source=("git+https://github.com/MrAlex94/Waterfox.git#tag=G3.$pkgver" "waterfox-g3.desktop::$_filesurl/waterfox-g3.desktop" "distribution.ini::$_filesurl/distribution.ini" "vendor.js::$_filesurl/vendor.js" "waterfox-g3.1::$_filesurl/waterfox-g3.1" "syspref.js::$_filesurl/syspref.js" "g3-kde.patch::$_filesurl/patches/g3-kde.patch" "mozilla-nongnome-proxies.patch::$_filesurl/patches/mozilla-nongnome-proxies.patch" "mozilla-ntlm-full-path.patch::$_filesurl/patches/mozilla-ntlm-full-path.patch" "Use-remoting-name-for-GDK-application-names.patch::$_filesurl/patches/Use-remoting-name-for-GDK-application-names.patch" "sandbox-fips.patch::$_filesurl/patches/sandbox-fips.patch" "remoting-name.patch::$_filesurl/patches/remoting-name.patch" ) sha256sums=('SKIP' '6d37d08ee522173057918de8ad8394ba62b61a38c102cb03439d257a93e4b4a6' 'bf06887c00bbc7176f452a3d18092e1b222731218e461782b2877cba938aaa26' 'b9458af82a1e67497f1a42b69cb69b7a86a87727c35004a4089d207d10c7c2b4' 'e48f932041ac826be48567d090a246bd897744262acca4dc07915abdc9a3e6b9' '0120e01edb0bf3d42f4e0280345f2c44372b097739cd2ddb85fa69bb2233ebab' '9b0c34bdbfc440d585039bc357d39fca5703328a0907a49da355360abb669ff7' 'd8c2c30217b5bc9fbef8f6ca7540a4d8fdacc128c1c0a62226c8f4c287688597' '25846888b48208606ff88c04dc8b9cb5b1a9c433adfd2d72ce13b6b9edc73a87' '71386c2e269bd021c3b8c86b457101bdb730f76db3f2bbb91bf617109564a09c' '809c7dea066cb2ba70fb1c16c1b3dcd69c7e7715f354daf2f1c67af757e6d47b' 'ac5199b397d1fef75d952eedbedcf3806b12f86b64ea29e5b34b541b0cfbe761') prepare() { cd Waterfox # Add patches patch -Np1 -i ../g3-kde.patch patch -Np1 -i ../mozilla-nongnome-proxies.patch patch -Np1 -i ../mozilla-ntlm-full-path.patch patch -Np1 -i ../Use-remoting-name-for-GDK-application-names.patch patch -Np1 -i ../sandbox-fips.patch patch -Np1 -i ../remoting-name.patch cat >../mozconfig </dev/null || getconf NPROCESSORS_ONLN)*3/2)) #mk_add_options AUTOCLOBBER=1 #mk_add_options MOZ_MAKE_FLAGS=-j6 ac_add_options --prefix=/usr ac_add_options --with-app-name=waterfox-g3 ac_add_options --with-app-basename=Waterfox ac_add_options --with-branding=browser/branding/waterfox ac_add_options --with-unsigned-addon-scopes=app,system ac_add_options --allow-addon-sideload # System libraries ac_add_options --with-system-nspr ac_add_options --with-system-nss # Disable unwanted features ac_add_options --disable-crashreporter ac_add_options --disable-debug ac_add_options --disable-updater ac_add_options --disable-verify-mar ac_add_options --disable-profiling ac_add_options --disable-dmd # Enable wanted features ac_add_options --enable-rust-simd ac_add_options --enable-application=browser ac_add_options --enable-hardening ac_add_options --enable-linker=gold ac_add_options --enable-default-toolkit=cairo-gtk3-wayland ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" export MOZ_REQUIRE_SIGNING=0 export MOZ_INCLUDE_SOURCE_INFO=1 END } build() { cd Waterfox export MOZ_NOSPAM=1 export MOZBUILD_STATE_PATH="$srcdir/mozbuild" export LDFLAGS+=" -Wl,--no-keep-memory" # LTO needs more open files ulimit -n 4096 # -fno-plt with cross-LTO causes obscure LLVM errors # LLVM ERROR: Function Import: link error CFLAGS="${CFLAGS/-fno-plt/}" CXXFLAGS="${CXXFLAGS/-fno-plt/}" # Do 3-tier PGO echo "Building instrumented browser..." cat >.mozconfig ../mozconfig - <.mozconfig ../mozconfig - < ../mozconfig_LANG <