# Maintainer: # Contributor: éclairevoyant ## useful links: # https://astian.org/midori-browser/download/ # https://github.com/goastian/midori-desktop ## options : ${_build_pgo:=true} : ${_build_pgo_reuse:=try} : ${_build_pgo_xvfb:=false} ## basic info _pkgname="midori" pkgname="$_pkgname-git" pkgver=11.3.1.r38.g621c242 pkgrel=1 pkgdesc="Web browser based on Floorp" url="https://github.com/goastian/midori-desktop" arch=('x86_64') license=('MPL-2.0') depends=( dbus-glib ffmpeg gtk3 libevent libjpeg libpulse libvpx.so libwebp.so libxss libxt mime-types nspr nss pipewire ttf-font zlib ) makedepends=( cbindgen clang diffutils dump_syms git imake inetutils jack lld llvm mercurial mesa mold nasm nodejs python rust unzip wasi-compiler-rt wasi-libc wasi-libc++ wasi-libc++abi yasm zip ) optdepends=( 'hunspell-dictionary: Spell checking' 'libnotify: Notification integration' 'networkmanager: Location detection via available WiFi networks' 'speech-dispatcher: Text-to-Speech' 'xdg-desktop-portal: Screensharing with Wayland' ) if [[ "${_build_pgo::1}" == "t" ]] ; then if [[ "${_build_pgo_xvfb::1}" == "t" ]] ; then makedepends+=( xorg-server-xvfb ) else makedepends+=( weston xorg-xwayland xwayland-run # AUR ) fi fi options=( !debug !emptydirs !lto !makeflags !strip ) provides=("$_pkgname=${pkgver%%.r*}") conflicts=("$_pkgname") : ${_lssver:=v2022.10.12} noextract=("lss-${_lssver}.tar.gz") _pkgsrc="midori-tensei" source=( "$_pkgsrc"::"git+https://github.com/goastian/midori-desktop.git" "goastian.l10n-central"::"git+https://github.com/goastian/l10n-central.git" "lss-${_lssver}.tar.gz"::"https://chromium.googlesource.com/linux-syscall-support/+archive/refs/tags/${_lssver}.tar.gz" "$_pkgname.desktop" ) sha256sums=( 'SKIP' 'SKIP' 'SKIP' '7ef0f85f2b111caa08a3e855cb4b6595b6d0f62b3de13ce59eea94a580eec470' ) pkgver() { cd "$_pkgsrc" git describe --long --tags --abbrev=7 --exclude='*[a-zA-Z][a-zA-Z]*' \ | sed -E 's/^[^0-9]*//;s/([^-]*-g)/r\1/;s/-/./g' } prepare() { mkdir -p mozbuild cd "$_pkgsrc" # l10n local _l10n_path="floorp/browser/locales/l10n-central" [ ! -e "$_l10n_path" ] && ln -sf "$srcdir/goastian.l10n-central" "$_l10n_path" # prepare google breakpad local _lss_path="toolkit/crashreporter/google-breakpad/src/third_party/lss" mkdir -p "$_lss_path" bsdtar -xf "$srcdir/lss-${_lssver}.tar.gz" -C "$_lss_path" # clear forced startup pages sed -E 's&^\s*pref\("startup\.homepage.*$&&' -i "browser/branding/official/pref/firefox-branding.js" # prepare api keys cp "floorp/apis"/api-*-key ./ # configure cat >../mozconfig <.mozconfig ../mozconfig - <.mozconfig ../mozconfig if [[ -s merged.profdata ]] ; then stat -c "Profile data found (%s bytes)" merged.profdata cat >>.mozconfig - <>.mozconfig - <.mozconfig ../mozconfig ./mach build fi } package() { cd "$_pkgsrc" DESTDIR="$pkgdir" ./mach install local vendorjs="$pkgdir/usr/lib/$_pkgname/browser/defaults/preferences/vendor.js" install -Dvm644 /dev/stdin "$vendorjs" <