jobextra/xdg-desktop-portal-gtk/PKGBUILD-arch

73 lines
1.5 KiB
Plaintext

# Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
# Contributor: Bartłomiej Piotrowski <bpiotrowski@archlinux.org>
# Contributor: Patrick Griffis <tingping@tingping.se>
pkgname=xdg-desktop-portal-gtk
pkgver=1.14.1
pkgrel=3
pkgdesc="A backend implementation for xdg-desktop-portal using GTK"
url="https://github.com/flatpak/xdg-desktop-portal-gtk"
arch=(x86_64)
license=(LGPL)
depends=(
gsettings-desktop-schemas
gtk3
xdg-desktop-portal
)
makedepends=(
git
python
)
optdepends=("evince: Print preview")
provides=(xdg-desktop-portal-impl)
_commit=952005f6a7850a247d286f14838202f506b402b7 # tags/1.14.1^0
source=("git+https://github.com/flatpak/xdg-desktop-portal-gtk#commit=$_commit")
b2sums=('SKIP')
pkgver() {
cd $pkgname
git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
}
prepare() {
cd $pkgname
# Fix use-after-free
git cherry-pick -n 366d3349041c2e06658c7c5a8b5bfd5f345d8157
git cherry-pick -n 2bf8482a1db56308d72ce1a35d04af7c08de08c9
NOCONFIGURE=1 ./autogen.sh
}
build() {
local configure_options=(
--prefix=/usr
--sysconfdir=/etc
--localstatedir=/var
--libexecdir=/usr/lib
)
cd $pkgname
./configure "${configure_options[@]}"
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
make
}
check() {
cd $pkgname
make check
}
package() {
cd $pkgname
DESTDIR="$pkgdir" make install
# fix detection with x-d-p 1.18
install -Dm644 /dev/stdin "$pkgdir/usr/share/xdg-desktop-portal/gtk-portals.conf" <<END
[preferred]
default=gtk
END
}
# vim:set sw=2 sts=-1 et: