diff options
-rw-r--r-- | .SRCINFO | 109 | ||||
-rw-r--r-- | PKGBUILD | 374 | ||||
-rw-r--r-- | extension.patch | 22 | ||||
-rw-r--r-- | jack-system-ports.patch | 13 | ||||
-rw-r--r-- | no-plt.diff | 48 | ||||
-rw-r--r-- | pgo_fix_missing_kdejs.patch | 10 | ||||
-rw-r--r-- | ua.patch | 22 |
7 files changed, 260 insertions, 338 deletions
@@ -1,77 +1,94 @@ pkgbase = waterfox-kde - pkgdesc = Free, open and private browser with openSUSE's patches for better integration with KDE - pkgver = 2019.10 - pkgrel = 2 + pkgdesc = Customizable privacy conscious web browser with better integration with KDE and primary support for webextensions + pkgver = G6.0.11 + pkgrel = 0 url = https://www.waterfox.net/ arch = x86_64 license = MPL makedepends = unzip makedepends = zip makedepends = diffutils - makedepends = python2 makedepends = yasm makedepends = mesa makedepends = imake - makedepends = gconf makedepends = inetutils makedepends = xorg-server-xvfb makedepends = autoconf2.13 makedepends = rust makedepends = clang makedepends = llvm + makedepends = alsa-lib + makedepends = jack + makedepends = cbindgen + makedepends = nasm + makedepends = nodejs + makedepends = lld + makedepends = bc + makedepends = python<3.12 + makedepends = pciutils + makedepends = dump_syms + makedepends = wasi-compiler-rt + makedepends = wasi-libc + makedepends = wasi-libc++ + makedepends = wasi-libc++abi makedepends = git depends = gtk3 - depends = gtk2 depends = libxt depends = startup-notification depends = mime-types depends = dbus-glib depends = ffmpeg - depends = nss>=3.34 - depends = hunspell - depends = sqlite depends = ttf-font - depends = icu - depends = kwaterfoxhelper - depends = nspr>=4.15 depends = hicolor-icon-theme - depends = jemalloc - depends = libevent - optdepends = networkmanager: Location detection via available WiFi networks - optdepends = libnotify: Notification integration - optdepends = pulseaudio: Audio support - optdepends = alsa-lib: Audio support - optdepends = jack: Audio support - optdepends = speech-dispatcher: Text-to-Speech - provides = waterfox=2019.10 - conflicts = waterfox + depends = glibc + depends = libpulse + depends = nss + depends = nspr + replaces = waterfox-g4-kpe + replaces = waterfox-g3-kpe + replaces = waterfox-g-kpe options = !emptydirs options = !makeflags options = zipman - source = git+https://github.com/MrAlex94/Waterfox.git#commit=ce20cfd2b820901a00d11f8bd2e267c58ae4c566 - source = waterfox.desktop::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/waterfox.desktop - source = kde.js::https://raw.githubusercontent.com/hawkeye116477/Waterfox/plasma/_Plasma_Build/kde.js - source = distribution.ini::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/distribution.ini - source = waterfox.1::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/waterfox.1 - source = jack-system-ports.patch - source = no-plt.diff - source = waterfox-kde-56.2.10.1.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/patches/waterfox-kde-56.2.10.1.patch - source = dont-statically-link-libstdc++.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/patches/dont-statically-link-libstdc%2B%2B.patch - source = pgo_fix_missing_kdejs.patch - source = extension.patch - source = ua.patch + options = !lto + source = git+https://github.com/MrAlex94/Waterfox.git#tag=G6.0.11 + source = waterfox.desktop::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/waterfox.desktop + source = distribution.ini::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/distribution.ini + source = vendor.js::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/vendor.js + source = waterfox.1::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/waterfox.1 + source = syspref.js::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/syspref.js + source = waterfox.appdata.xml.in::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/waterfox.appdata.xml.in + source = g-kde.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/g-kde.patch + source = fis-csd-global-menu.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/fis-csd-global-menu.patch + source = nongnome-proxies.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/nongnome-proxies.patch + source = mozilla-ntlm-full-path.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/mozilla-ntlm-full-path.patch + source = libavcodec58_91.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/libavcodec58_91.patch + source = fix-langpack-id.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/fix-langpack-id.patch + source = fix-wayland-build.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/fix-wayland-build.patch + source = mach-depends.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3/waterfox-kde/patches/mach-depends.patch sha256sums = SKIP - sha256sums = 64d5587093e4d32b0111adf8f531a2e3bfe24e76b8f5166e31cebcad7add8f81 - sha256sums = 0850a8a8dea9003c67a8ee1fa5eb19a6599eaad9f2ad09db753b74dc5048fdbc - sha256sums = 3961c09993c442df97832866ddaea5bcc1ade1313beb313b5ceba60166933016 - sha256sums = 065244d3f6d88c48b7afec313b7da5a3a04377076e198954cda7951500530b84 - sha256sums = be19426cd658ea0ff0dedbdd80da6bf84580c80d92f9b3753da107011dfdd85c - sha256sums = ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa - sha256sums = b55833542edf8cad2b73cf36dac6c667e588dcf79a99b570c5eca645698b80f7 - sha256sums = 877bc1f0e768d96118bb739725e590467773dd897c31263099e52b8d7aaaa4c8 - sha256sums = bf6743660623b7c9a43b94edc8acbcade07aa222ff2102a2808809df333ebe8e - sha256sums = 87b4b11ab95d90d4e84dfb53f785c8cbf233044b8950979b624af8ca6f720d59 - sha256sums = e179856821d463be8ceb75313fa8eb44be7d8580c81b4897e867fefc3e89a864 + sha256sums = ec32cbe949ed23bf7a61eef468a70a2e00e9fc448e4912c1200d110f5538d63a + sha256sums = 63cc269f591b2c6409cd7773f929bcb64f9acf3c9f5c1b8c1848c077056094fe + sha256sums = 5a3b4ebefbd9e5dd3abdc9e694ef4dadcce6fcc93f9352ee30f1fcb639a227f6 + sha256sums = 405cc621d68ad61443ace33142b46c2f089f4a9f021b4ea62ec4183c9046d0f7 + sha256sums = 0120e01edb0bf3d42f4e0280345f2c44372b097739cd2ddb85fa69bb2233ebab + sha256sums = 26db702cd9c258548313d66f53722d7cadd206779e066d1fca5816256581e344 + sha256sums = 9cebb1377a40b8776a7c913641911743a116abaddbff10ff2f9f8dff973bb73c + sha256sums = e507f060ad30ebe61bc6fa9098b07df2802b53e3f77ca2d2ee5fe8e7aac7e9ae + sha256sums = 2ec980e1e912903ee6ec36589fc87cf528ca60be8abe37f8b30febb5e55e018c + sha256sums = b4d25f9a3ea05f1ce7b7bb00f71821978e5db0f78634f80af684356608e708c0 + sha256sums = c10baed9fab17b0c39839df3970d9254b21b17c9b6a36f7c8523bac609d24d57 + sha256sums = 0f9d1d22ec686639c31245fff7db837428e0880fd9ad698890ec81326be52ae0 + sha256sums = 10714e2363c05bf611eec927807101a5babc94a0ab9b584ce8204a89d4f8b73a + sha256sums = 105fa659e4242c1b08bda0457bfddc28762bdd4a33e9bda05940ab38d26b334c pkgname = waterfox-kde - + optdepends = networkmanager: Location detection via available WiFi networks + optdepends = libnotify: Notification integration + optdepends = pulseaudio: Audio support + optdepends = alsa-lib: Audio support + optdepends = speech-dispatcher: Text-to-Speech + optdepends = hunspell-en_US: Spell checking, American English + optdepends = kwaterfoxhelper: KDE Plasma Integration + provides = waterfox-g=6.0.11 + provides = waterfox=G6.0.11 @@ -1,227 +1,234 @@ # Maintainer: hawkeye116477 <hawkeye116477 at gmail dot com> -# Contributor: meatatt <meatatt at aliyun dot com> -# Based on firefox-kde Manjaro's PKGBUILD pkgname=waterfox-kde -pkgver=2019.10 -pkgrel=2 -pkgdesc="Free, open and private browser with openSUSE's patches for better integration with KDE" +_pkgver=6.0.11 +pkgver=G${_pkgver} +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>=3.34' 'hunspell' 'sqlite' 'ttf-font' 'icu' 'kwaterfoxhelper' 'nspr>=4.15' 'hicolor-icon-theme' 'jemalloc' 'libevent') -makedepends=('unzip' 'zip' 'diffutils' 'python2' 'yasm' 'mesa' 'imake' 'gconf' 'inetutils' 'xorg-server-xvfb' - 'autoconf2.13' 'rust' 'clang' 'llvm' 'git') -optdepends=('networkmanager: Location detection via available WiFi networks' - 'libnotify: Notification integration' - 'pulseaudio: Audio support' - 'alsa-lib: Audio support' - 'jack: Audio support' - 'speech-dispatcher: Text-to-Speech') -provides=("waterfox=${pkgver}") -conflicts=('waterfox') -options=('!emptydirs' '!makeflags' 'zipman') -_patchrev=7339b115a221 -_patchurl=http://www.rosenauer.org/hg/mozilla/raw-file/$_patchrev -_commit=ce20cfd2b820901a00d11f8bd2e267c58ae4c566 -source=("git+https://github.com/MrAlex94/Waterfox.git#commit=$_commit" - "waterfox.desktop::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/waterfox.desktop" - "kde.js::https://raw.githubusercontent.com/hawkeye116477/Waterfox/plasma/_Plasma_Build/kde.js" - "distribution.ini::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/distribution.ini" - "waterfox.1::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/waterfox.1" - jack-system-ports.patch - no-plt.diff - "waterfox-kde-56.2.10.1.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/patches/waterfox-kde-56.2.10.1.patch" - "dont-statically-link-libstdc++.patch::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/waterfox-kde/patches/dont-statically-link-libstdc%2B%2B.patch" - pgo_fix_missing_kdejs.patch - extension.patch - ua.patch) +depends=('gtk3' 'libxt' 'startup-notification' 'mime-types' 'dbus-glib' 'ffmpeg' + 'ttf-font' 'hicolor-icon-theme' 'glibc' 'libpulse' 'nss' 'nspr') +makedepends=('unzip' 'zip' 'diffutils' 'yasm' 'mesa' 'imake' 'inetutils' 'xorg-server-xvfb' + 'autoconf2.13' 'rust' 'clang' 'llvm' 'alsa-lib' 'jack' 'cbindgen' 'nasm' + 'nodejs' 'lld' 'bc' 'python<3.12' 'pciutils' 'dump_syms' + 'wasi-compiler-rt' 'wasi-libc' 'wasi-libc++' 'wasi-libc++abi' + 'git') +replaces=("waterfox-g4-kpe" "waterfox-g3-kpe" "waterfox-g-kpe") +options=('!emptydirs' '!makeflags' 'zipman' '!lto') +_filesrev=b0d4bea673c0a249cc5bfa7a4d5907e76ffc0fe3 +_filesurl=https://raw.githubusercontent.com/hawkeye116477/waterfox-deb-rpm-arch-AppImage/$_filesrev/waterfox-kde +source=("git+https://github.com/MrAlex94/Waterfox.git#tag=G$_pkgver" + "waterfox.desktop::$_filesurl/waterfox.desktop" + "distribution.ini::$_filesurl/distribution.ini" + "vendor.js::$_filesurl/vendor.js" + "waterfox.1::$_filesurl/waterfox.1" + "syspref.js::$_filesurl/syspref.js" + "waterfox.appdata.xml.in::$_filesurl/waterfox.appdata.xml.in" + "g-kde.patch::$_filesurl/patches/g-kde.patch" + "fis-csd-global-menu.patch::$_filesurl/patches/fis-csd-global-menu.patch" + "nongnome-proxies.patch::$_filesurl/patches/nongnome-proxies.patch" + "mozilla-ntlm-full-path.patch::$_filesurl/patches/mozilla-ntlm-full-path.patch" + "libavcodec58_91.patch::$_filesurl/patches/libavcodec58_91.patch" + "fix-langpack-id.patch::$_filesurl/patches/fix-langpack-id.patch" + "fix-wayland-build.patch::$_filesurl/patches/fix-wayland-build.patch" + "mach-depends.patch::$_filesurl/patches/mach-depends.patch" + ) sha256sums=('SKIP' - '64d5587093e4d32b0111adf8f531a2e3bfe24e76b8f5166e31cebcad7add8f81' - '0850a8a8dea9003c67a8ee1fa5eb19a6599eaad9f2ad09db753b74dc5048fdbc' - '3961c09993c442df97832866ddaea5bcc1ade1313beb313b5ceba60166933016' - '065244d3f6d88c48b7afec313b7da5a3a04377076e198954cda7951500530b84' - 'be19426cd658ea0ff0dedbdd80da6bf84580c80d92f9b3753da107011dfdd85c' - 'ea8e1b871c0f1dd29cdea1b1a2e7f47bf4713e2ae7b947ec832dba7dfcc67daa' - 'b55833542edf8cad2b73cf36dac6c667e588dcf79a99b570c5eca645698b80f7' - '877bc1f0e768d96118bb739725e590467773dd897c31263099e52b8d7aaaa4c8' - 'bf6743660623b7c9a43b94edc8acbcade07aa222ff2102a2808809df333ebe8e' - '87b4b11ab95d90d4e84dfb53f785c8cbf233044b8950979b624af8ca6f720d59' - 'e179856821d463be8ceb75313fa8eb44be7d8580c81b4897e867fefc3e89a864') + 'ec32cbe949ed23bf7a61eef468a70a2e00e9fc448e4912c1200d110f5538d63a' + '63cc269f591b2c6409cd7773f929bcb64f9acf3c9f5c1b8c1848c077056094fe' + '5a3b4ebefbd9e5dd3abdc9e694ef4dadcce6fcc93f9352ee30f1fcb639a227f6' + '405cc621d68ad61443ace33142b46c2f089f4a9f021b4ea62ec4183c9046d0f7' + '0120e01edb0bf3d42f4e0280345f2c44372b097739cd2ddb85fa69bb2233ebab' + '26db702cd9c258548313d66f53722d7cadd206779e066d1fca5816256581e344' + '9cebb1377a40b8776a7c913641911743a116abaddbff10ff2f9f8dff973bb73c' + 'e507f060ad30ebe61bc6fa9098b07df2802b53e3f77ca2d2ee5fe8e7aac7e9ae' + '2ec980e1e912903ee6ec36589fc87cf528ca60be8abe37f8b30febb5e55e018c' + 'b4d25f9a3ea05f1ce7b7bb00f71821978e5db0f78634f80af684356608e708c0' + 'c10baed9fab17b0c39839df3970d9254b21b17c9b6a36f7c8523bac609d24d57' + '0f9d1d22ec686639c31245fff7db837428e0880fd9ad698890ec81326be52ae0' + '10714e2363c05bf611eec927807101a5babc94a0ab9b584ce8204a89d4f8b73a' + '105fa659e4242c1b08bda0457bfddc28762bdd4a33e9bda05940ab38d26b334c') prepare() { - mkdir path - ln -s /usr/bin/python2 path/python - - # Fix openSUSE's patches for Waterfox - #sed -i 's/Firefox/Waterfox/g' $srcdir/mozilla-kde-$_patchrev.patch - #sed -i 's/KMOZILLAHELPER/KWATERFOXHELPER/g' $srcdir/mozilla-kde-$_patchrev.patch - #sed -i 's|/usr/lib/mozilla/kmozillahelper|/usr/lib/waterfox/kwaterfoxhelper|g' $srcdir/mozilla-kde-$_patchrev.patch - #sed -i 's/kmozillahelper/kwaterfoxhelper/g' $srcdir/mozilla-kde-$_patchrev.patch - #sed -i 's/firefox/waterfox/g' $srcdir/firefox-kde-$_patchrev.patch cd Waterfox - patch -Np1 -i ../dont-statically-link-libstdc++.patch - - # https://bugzilla.mozilla.org/show_bug.cgi?id=1382942 - patch -Np1 -i ../no-plt.diff - - patch -Np1 -i ../extension.patch - - patch -Np1 -i ../ua.patch - - cat >.mozconfig <<END -export CC=clang -export CXX=clang++ -export LDFLAGS="-Wl,-z,norelro,-O3,--sort-common,--as-needed,--relax,-z,combreloc,-z,global,--no-omagic" - -ac_add_options --enable-optimize="-O3 -msse2 -mfpmath=sse -march=native -mtune=native -fcolor-diagnostics -w" -ac_add_options --target=$CARCH-pc-linux-gnu - + # Add patches + patch -Np1 -i ../g-kde.patch + patch -Np1 -i ../fis-csd-global-menu.patch + patch -Np1 -i ../nongnome-proxies.patch + patch -Np1 -i ../mozilla-ntlm-full-path.patch + patch -Np1 -i ../libavcodec58_91.patch + patch -Np1 -i ../fix-langpack-id.patch + patch -Np1 -i ../fix-wayland-build.patch + patch -Np1 -i ../mach-depends.patch + + cat >../mozconfig <<END ac_add_options --enable-alsa ac_add_options --enable-pulseaudio ac_add_options --enable-jack -mk_add_options AUTOCLOBBER=1 -mk_add_options MOZ_MAKE_FLAGS="-j6" - ac_add_options --prefix=/usr -ac_add_options --with-app-name=waterfox -ac_add_options --with-app-basename=Waterfox -ac_add_options --with-branding=browser/branding/unofficial - -# Library and chrome format -ac_add_options --enable-chrome-format=omni +# Libraries ac_add_options --x-libraries=/usr/lib -# System libraries -ac_add_options --with-system-nspr -ac_add_options --with-system-nss -ac_add_options --with-system-icu -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-libevent -ac_add_options --with-system-libvpx -ac_add_options --enable-system-hunspell -ac_add_options --enable-system-sqlite -ac_add_options --enable-system-ffi -ac_add_options --enable-system-pixman -ac_add_options --disable-libproxy - # Disable unwanted features -ac_add_options --disable-crashreporter -ac_add_options --disable-js-shell -ac_add_options --disable-maintenance-service ac_add_options --disable-updater -ac_add_options --disable-verify-mar -ac_add_options --disable-mobile-optimize ac_add_options --disable-debug ac_add_options --disable-debug-symbols -ac_add_options --disable-profiling -ac_add_options --disable-signmar +ac_add_options --disable-crashreporter +ac_add_options --disable-dmd +ac_add_options --disable-geckodriver +ac_add_options --disable-bootstrap +ac_add_options --disable-elf-hack ac_add_options --disable-tests -ac_add_options --disable-parental-controls -ac_add_options --disable-accessibility - -# If you want to have text-to-speech support, comment this line: -ac_add_options --disable-webspeech - -# If you want to have geolocation support, comment this line: -ac_add_options --disable-necko-wifi - -# If you have some problems with Skype Web or other web chat, comment this line: -ac_add_options --disable-webrtc - -# If you want to have gamepad support, comment this line: -ac_add_options --disable-gamepad # Enable wanted features -ac_add_options --enable-jemalloc - -# Stylo doesn't compile with Rust 1.38 (needs newer cssparser) -ac_add_options --disable-stylo - -ac_add_options --with-pthreads -ac_add_options --enable-strip -ac_add_options --enable-startup-notification -ac_add_options --enable-release +ac_add_options --enable-unverified-updates +ac_add_options --enable-jxl +ac_add_options --enable-optimize +ac_add_options --enable-eme=widevine ac_add_options --enable-rust-simd - ac_add_options --enable-application=browser -ac_add_options --enable-eme=widevine -ac_add_options --enable-av1 +ac_add_options --enable-hardening +ac_add_options --enable-linker=lld +ac_add_options --enable-default-toolkit=cairo-gtk3-wayland -export MOZ_GECKO_PROFILER= -export MOZ_ENABLE_PROFILER_SPS= -export MOZ_PROFILING= -END +ac_add_options --with-app-name=waterfox +ac_add_options --with-app-basename=Waterfox +ac_add_options --with-branding=waterfox/browser/branding +ac_add_options --with-unsigned-addon-scopes=app,system +ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot +ac_add_options --allow-addon-sideload +ac_add_options "MOZ_ALLOW_LEGACY_EXTENSIONS=1" + +# System libraries +ac_add_options --with-system-nspr +ac_add_options --with-system-nss - echo "Patching for KDE" - #patch -Np1 -i "../mozilla-kde-$_patchrev.patch" - #patch -Np1 -i "../waterfoxproject-kde-56.2.0.patch" - #patch -Np1 -i "../firefox-kde-$_patchrev.patch" - #patch -Np1 -i "../fix_waterfox_browser-kde_xul.patch" - #patch -Np1 -i "../fix_crash_e10s_upload_cancel.patch" - patch -Np1 -i "../waterfox-kde-56.2.10.1.patch" - patch -Np1 -i "../pgo_fix_missing_kdejs.patch" - # https://bugs.archlinux.org/task/52183 - echo "Patching for Jack" - patch -Np1 -i ../jack-system-ports.patch +export MOZ_REQUIRE_SIGNING= +export MOZ_INCLUDE_SOURCE_INFO=1 +export MOZ_APP_REMOTINGNAME=waterfox-g +X=$(($(nproc --all)/2)) +mk_add_options MOZ_MAKE_FLAGS="-j\${X%.*}" +mk_add_options MOZ_PARALLEL_BUILD="\${X%.*}" +mk_add_options MOZ_OBJDIR=${PWD@Q}/obj +END } build() { cd Waterfox - export PATH="$srcdir/path:$PATH" - ./mach build -} + # Optimize flags + CFLAGS="${CFLAGS//-mtune=generic/-mtune=native}" + CXXFLAGS="${CXXFLAGS//-mtune=generic/-mtune=native}" + CFLAGS="${CFLAGS//-march=x86-64/-march=native}" + CXXFLAGS="${CXXFLAGS//-march=x86-64/-march=native}" -package() { - cd Waterfox + export MOZ_NOSPAM=1 + export MOZBUILD_STATE_PATH="$srcdir/mozbuild" + export LDFLAGS+=" -Wl,--no-keep-memory -Wl,--no-mmap-output-file" + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=pip - cp "$srcdir/kde.js" obj-$CARCH-pc-linux-gnu/dist/bin/defaults/pref + export WF_VERSION="G$pkgver" + echo "$WF_VERSION" > ./browser/config/version_display.txt - DESTDIR="$pkgdir" ./mach install + # LTO needs more open files + ulimit -n 4096 - _vendor_js="$pkgdir/usr/lib/waterfox/browser/defaults/preferences/vendor.js" - install -Dm644 /dev/stdin "$_vendor_js" <<END -// Disable default browser checking -pref("browser.shell.checkDefaultBrowser", false); + # Do 3-tier PGO + echo "Building instrumented browser..." + cat >.mozconfig ../mozconfig - <<END +ac_add_options --enable-profile-generate=cross +END + ./mach build -// Don't disable extensions dropped in to a system -// location, or those owned by the application -pref("extensions.autoDisableScopes", 3); + echo "Profiling instrumented browser..." + ./mach package + LLVM_PROFDATA=llvm-profdata \ + JARLOG_FILE="$PWD/jarlog" \ + xvfb-run -s "-screen 0 1920x1080x24 -nolisten local" \ + ./mach python build/pgo/profileserver.py -// Don't display the one-off addon selection dialog when -// upgrading from a version of Waterfox older than 8.0 -pref("extensions.shownSelectionUI", true); + stat -c "Profile data found (%s bytes)" merged.profdata + test -s merged.profdata -// Use LANG environment variable to choose locale -pref("intl.locale.matchOS", true); + stat -c "Jar log found (%s bytes)" jarlog + test -s jarlog -// Fall back to en-US search plugins if none exist for the current locale -pref("distribution.searchplugins.defaultLocale", "en-US"); + echo "Removing instrumented browser..." + ./mach clobber -// Use OS regional settings for date and time -pref("intl.regional_prefs.use_os_locales", true); + echo "Building optimized browser..." + cat >.mozconfig ../mozconfig - <<END +ac_add_options --enable-lto=cross +ac_add_options --enable-profile-use=cross +ac_add_options --with-pgo-profile-path=${PWD@Q}/merged.profdata +ac_add_options --with-pgo-jarlog=${PWD@Q}/jarlog END + ./mach build - install -Dm644 "$srcdir/kde.js" "$pkgdir/usr/lib/waterfox/browser/defaults/preferences/kde.js" +# # Build langpacks +# cat > ../mozconfig_LANG <<END +# ac_add_options --with-app-name=waterfox +# ac_add_options --with-app-basename=Waterfox +# ac_add_options --with-branding=waterfox/browser/branding +# mk_add_options MOZ_OBJDIR=${PWD}/../obj_LANG +# ac_add_options --prefix=/usr +# ac_add_options --with-l10n-base=${PWD}/waterfox/browser/locales +# ac_add_options --enable-linker=lld +# ac_add_options --disable-updater +# ac_add_options --disable-bootstrap +# ac_add_options --with-wasi-sysroot=/usr/share/wasi-sysroot +# END + +# export JOBS=$(echo $(grep -c ^processor /proc/cpuinfo)\/2 | bc) +# sed -r '/^(ja-JP-mac|en-US|)$/d;s/ .*$//' ../locales.shipped | cut -f1 -d":" \ +# | xargs -n 1 -P $JOBS -I {} /bin/sh -c ' +# locale=$1 +# cp ../mozconfig_LANG ${PWD}/mozconfig_$locale +# sed -i "s|obj_LANG|obj_$locale|" ${PWD}/mozconfig_$locale +# export MOZCONFIG=${PWD}/mozconfig_$locale +# ./mach build config/nsinstall langpack-$locale +# cp -L ../obj_$locale/dist/linux-*/xpi/waterfox-$WF_VERSION.$locale.langpack.xpi \ +# ${PWD}/langpack-$locale@l10n.waterfox.net.xpi +# ' -- {} +} + +package_waterfox-kde() { + optdepends=('networkmanager: Location detection via available WiFi networks' + 'libnotify: Notification integration' + 'pulseaudio: Audio support' + 'alsa-lib: Audio support' + 'speech-dispatcher: Text-to-Speech' + 'hunspell-en_US: Spell checking, American English' + 'kwaterfoxhelper: KDE Plasma Integration') + provides=("waterfox-g=${_pkgver}" "waterfox=G${_pkgver}") + + cd Waterfox + + export MACH_BUILD_PYTHON_NATIVE_PACKAGE_SOURCE=pip + + DESTDIR="$pkgdir" ./mach install + + _spellcheck_js="$pkgdir/usr/lib/waterfox/browser/defaults/preferences/spellcheck.js" + install -Dm644 /dev/stdin "$_spellcheck_js" <<END +pref("spellchecker.dictionary_path", "/usr/share/hunspell"); +END for i in 16 22 24 32 48 64 128 256; do - install -Dm644 browser/branding/unofficial/default$i.png \ - "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/waterfox.png" + install -d "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps" + ln -Ts /usr/lib/waterfox/browser/chrome/icons/default/default$i.png \ + "$pkgdir/usr/share/icons/hicolor/${i}x${i}/apps/waterfox.png" done - install -Dm644 browser/branding/unofficial/content/about-logo.png \ + install -Dm644 waterfox/browser/branding/content/about-logo.png \ "$pkgdir/usr/share/icons/hicolor/192x192/apps/waterfox.png" - install -Dm644 browser/branding/unofficial/content/about-logo@2x.png \ + install -Dm644 waterfox/browser/branding/content/about-logo@2x.png \ "$pkgdir/usr/share/icons/hicolor/384x384/apps/waterfox.png" install -Dm644 $srcdir/waterfox.desktop \ @@ -233,13 +240,15 @@ END install -Dm644 $srcdir/distribution.ini \ "$pkgdir/usr/lib/waterfox/distribution/distribution.ini" - # Use system-provided dictionaries - if [ -d $pkgdir/usr/lib/waterfox/dictionaries ]; then - rm -r "$pkgdir"/usr/lib/waterfox/dictionaries - fi + install -Dm644 "$srcdir/vendor.js" "$pkgdir/usr/lib/waterfox/browser/defaults/preferences/vendor.js" + + # Generate date and version for metadata file + export TODAY_DATE=$(date +%Y-%m-%d) + sed -i "s/__DATE__/$TODAY_DATE/g" ../waterfox.appdata.xml.in + sed -i "s/__VERSION__/G$_pkgver/g" ../waterfox.appdata.xml.in - ln -Ts /usr/share/hunspell "$pkgdir/usr/lib/waterfox/dictionaries" - ln -Ts /usr/share/hyphen "$pkgdir/usr/lib/waterfox/hyphenation" + install -Dm644 $srcdir/waterfox.appdata.xml.in \ + "$pkgdir/usr/share/metainfo/waterfox.appdata.xml" # Install a wrapper to avoid confusion about binary path install -Dm755 /dev/stdin "$pkgdir/usr/bin/waterfox" <<END @@ -251,4 +260,15 @@ END # https://bugzilla.mozilla.org/show_bug.cgi?id=658850 ln -srf "$pkgdir/usr/bin/waterfox" \ "$pkgdir/usr/lib/waterfox/waterfox-bin" + + # Add syspref.js for setting preferences for all users + mkdir -p "$pkgdir/etc/waterfox" + cp "$srcdir/syspref.js" "$pkgdir/etc/waterfox/" + ln -Tsf /etc/waterfox/syspref.js "$pkgdir/usr/lib/waterfox/browser/defaults/preferences/syspref.js" + +# # Install langpacks +# mkdir -p "$pkgdir/usr/lib/waterfox/browser/extensions/" +# cp "${srcdir}"/waterfox-kde-$pkgver/*.xpi "$pkgdir/usr/lib/waterfox/browser/extensions/" } + +# vim: set ts=2 sw=2 et syn=sh ft=sh: diff --git a/extension.patch b/extension.patch deleted file mode 100644 index 9aab23d4eef0..000000000000 --- a/extension.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 68014c079a1d4afa26aaad13466fcc76d0f6dcc4 Mon Sep 17 00:00:00 2001 -From: Alex Kontos <MrAlex94@users.noreply.github.com> -Date: Wed, 16 Oct 2019 21:45:24 +0100 -Subject: [PATCH] Fix usage of undefined variable extension - ---- - toolkit/components/extensions/extension-process-script.js | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/toolkit/components/extensions/extension-process-script.js b/toolkit/components/extensions/extension-process-script.js -index 8509335993ba..6f2b385df93b 100644 ---- a/toolkit/components/extensions/extension-process-script.js -+++ b/toolkit/components/extensions/extension-process-script.js -@@ -303,7 +303,7 @@ ExtensionManager = { - policy = new WebExtensionPolicy({ - id: data.id, - mozExtensionHostname: data.uuid, -- name: extension.name, -+ name: data.name, - baseURL: data.resourceURL, - - permissions: Array.from(data.permissions), diff --git a/jack-system-ports.patch b/jack-system-ports.patch deleted file mode 100644 index 33ac249bbd01..000000000000 --- a/jack-system-ports.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/media/libcubeb/src/cubeb_jack.cpp b/media/libcubeb/src/cubeb_jack.cpp -index b49b66785f7c..80061dd709a7 100644 ---- a/media/libcubeb/src/cubeb_jack.cpp -+++ b/media/libcubeb/src/cubeb_jack.cpp -@@ -861,7 +861,7 @@ cbjack_stream_init(cubeb * context, cubeb_stream ** stream, char const * stream_ - } - } - -- cbjack_connect_ports(stm); -+ //cbjack_connect_ports(stm); - - *stream = stm; - diff --git a/no-plt.diff b/no-plt.diff deleted file mode 100644 index 9014f8b791c7..000000000000 --- a/no-plt.diff +++ /dev/null @@ -1,48 +0,0 @@ -diff --git i/security/nss/lib/freebl/mpi/mpi_x86.s w/security/nss/lib/freebl/mpi/mpi_x86.s -index 8f7e2130c3264754..b3ca1ce5b41b3771 100644 ---- i/security/nss/lib/freebl/mpi/mpi_x86.s -+++ w/security/nss/lib/freebl/mpi/mpi_x86.s -@@ -22,22 +22,41 @@ is_sse: .long -1 - # - .ifndef NO_PIC - .macro GET var,reg -- movl \var@GOTOFF(%ebx),\reg -+ call thunk.ax -+ addl $_GLOBAL_OFFSET_TABLE_, %eax -+ movl \var@GOTOFF(%eax),\reg - .endm - .macro PUT reg,var -- movl \reg,\var@GOTOFF(%ebx) -+ call thunk.dx -+ addl $_GLOBAL_OFFSET_TABLE_, %edx -+ movl \reg,\var@GOTOFF(%edx) - .endm - .else - .macro GET var,reg - movl \var,\reg - .endm - .macro PUT reg,var - movl \reg,\var - .endm - .endif - - .text - -+.ifndef NO_PIC -+.globl thunk.ax -+.hidden thunk.ax -+.type thunk.ax, @function -+thunk.ax: -+ movl (%esp),%eax -+ ret -+ -+.globl thunk.dx -+.hidden thunk.dx -+.type thunk.dx, @function -+thunk.dx: -+ movl (%esp),%edx -+ ret -+.endif - - # ebp - 36: caller's esi - # ebp - 32: caller's edi diff --git a/pgo_fix_missing_kdejs.patch b/pgo_fix_missing_kdejs.patch deleted file mode 100644 index 03c56e9fdbdb..000000000000 --- a/pgo_fix_missing_kdejs.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- b/browser/app/Makefile.in 2016-02-14 15:57:50.000000000 +0100 -+++ a/browser/app/Makefile.in 2016-02-14 16:08:29.823744590 +0100 -@@ -71,6 +71,7 @@ - libs:: $(srcdir)/profile/channel-prefs.js - $(NSINSTALL) -D $(DIST)/bin/defaults/pref - $(call py_action,preprocessor,-Fsubstitution $(PREF_PPFLAGS) $(ACDEFINES) $^ -o $(DIST)/bin/defaults/pref/channel-prefs.js) -+ cp $(topsrcdir)/../kde.js $(DIST)/bin/defaults/pref/kde.js - - ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT)) - diff --git a/ua.patch b/ua.patch deleted file mode 100644 index 3430c9405e4f..000000000000 --- a/ua.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 02999ce8d80bd2d996e61faaec654a69820d6c65 Mon Sep 17 00:00:00 2001 -From: hawkeye116477 <hawkeye116477@gmail.com> -Date: Wed, 16 Oct 2019 18:47:51 +0200 -Subject: [PATCH] Restore user-agent overrides for Linux - ---- - browser/installer/package-manifest.in | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in -index d5f12ce064bc..52a686a67b0c 100644 ---- a/browser/installer/package-manifest.in -+++ b/browser/installer/package-manifest.in -@@ -146,7 +146,7 @@ - @BINPATH@/@DLL_PREFIX@mozavcodec@DLL_SUFFIX@ - #endif - @RESPATH@/browser/blocklist.xml --#ifdef XP_WIN -+#if defined(XP_WIN) || defined(XP_LINUX) - @BINPATH@/browser/ua-update.json - #endif - #ifdef XP_MACOSX |