# Maintainer: hawkeye116477 # Based on firefox-kde Manjaro's PKGBUILD pkgname=waterfox-kde _pkgname=Waterfox pkgver=54.0.1 pkgrel=2 pkgdesc="Free, open and private browser with openSUSE's patches for better integration with KDE" arch=('x86_64') license=('MPL') url="https://www.waterfoxproject.org/" depends=('gtk3' 'gtk2' 'mozilla-common' 'libxt' 'startup-notification' 'mime-types' 'dbus-glib' 'ffmpeg' 'nss' 'hunspell' 'sqlite' 'ttf-font' 'icu' 'libvpx' 'kwaterfoxhelper' 'libevent' 'nspr' 'hicolor-icon-theme') makedepends=('unzip' 'zip' 'diffutils' 'python2' 'yasm' 'mesa' 'imake' 'gconf' 'inetutils' 'xorg-server-xvfb' 'autoconf2.13' 'cargo' 'rust' 'clang' 'llvm') 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=53443ffb496a _patchurl=http://www.rosenauer.org/hg/mozilla/raw-file/$_patchrev _commit=d3e9b4534ab9069eb661097e3aff896ef6ada0f5 source=("waterfox-$pkgver.source.tar.gz::https://github.com/MrAlex94/Waterfox/archive/$_commit.tar.gz" "waterfox.desktop::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/BUILD/waterfox-kde/debian/waterfox.desktop" waterfox-install-dir.patch no-crmf.diff "fix-wifi-scanner.diff::https://github.com/hawkeye116477/Waterfox/raw/plasma/_Plasma_Build/fix-wifi-scanner.diff" "mozilla-kde.patch::$_patchurl/mozilla-kde.patch" "firefox-kde.patch::$_patchurl/firefox-kde.patch" "fix_waterfox_browser-kde_xul.patch::https://raw.githubusercontent.com/hawkeye116477/Waterfox/plasma/_Plasma_Build/fix_waterfox_browser-kde_xul.patch" pgo_fix_missing_kdejs.patch "kde.js::https://raw.githubusercontent.com/hawkeye116477/Waterfox/plasma/_Plasma_Build/kde.js" "distribution.ini::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/BUILD/waterfox-kde/debian/distribution.ini" "waterfox.1::https://raw.githubusercontent.com/hawkeye116477/waterfox-deb/master/BUILD/waterfox-kde/debian/waterfox.1") sha256sums=('0e415a856339b72ee6ad4b420a425b0da25b50400d0ca1255189914aaf33846d' '2a17f68e86c2c871a1ff32f0a012c7ad20ac542b935044e5ffd9716874641f4d' 'd86e41d87363656ee62e12543e2f5181aadcff448e406ef3218e91865ae775cd' 'fb85a538044c15471c12cf561d6aa74570f8de7b054a7063ef88ee1bdfc1ccbb' '9765bca5d63fb5525bbd0520b7ab1d27cabaed697e2fc7791400abc3fa4f13b8' '193f7a6e0f422e24b1a3c1f02fa445c088e3c0665841a689511a95e923c1db29' 'a8b49c56f4dfe371af6c3e1b214fb8274258823d702d334dbdec55e5a43671cd' '774d13c0d319b83a3f90d15ceed093e80ff07a2794038c95ffa79539ca2819cc' 'bf6743660623b7c9a43b94edc8acbcade07aa222ff2102a2808809df333ebe8e' '0850a8a8dea9003c67a8ee1fa5eb19a6599eaad9f2ad09db753b74dc5048fdbc' 'e144a6fac4466acdba86194b43fb41c185c38e296d6262f26c3bff3d2b6db3be' '03a25b7bde971ecfa35326b3c6e45450da325babed29d9cc2e10dd639f816ef6') prepare() { mkdir path ln -s /usr/bin/python2 path/python mv $srcdir/$_pkgname-$_commit $srcdir/$pkgname-$pkgver # Fix openSUSE's patches for Waterfox sed -i 's/Firefox/Waterfox/g' $srcdir/mozilla-kde.patch sed -i 's/KMOZILLAHELPER/KWATERFOXHELPER/g' $srcdir/mozilla-kde.patch sed -i 's|/usr/lib/mozilla/kmozillahelper|/opt/waterfox/kwaterfoxhelper|g' $srcdir/mozilla-kde.patch sed -i 's/kmozillahelper/kwaterfoxhelper/g' $srcdir/mozilla-kde.patch sed -i 's/firefox/waterfox/g' $srcdir/firefox-kde.patch cd $pkgname-$pkgver patch -Np1 -i ../waterfox-install-dir.patch # https://bugzilla.mozilla.org/show_bug.cgi?id=1371991 patch -Np1 -i ../no-crmf.diff # https://bugzilla.mozilla.org/show_bug.cgi?id=1314968 patch -Np1 -i $srcdir/fix-wifi-scanner.diff cat >.mozconfig <