1 # Maintainer: Jan Alexander Steffens (heftig) <heftig@archlinux.org>
4 pkgname=(libportal libportal-{gtk3,gtk4,qt5,docs})
7 pkgdesc="GIO-style async APIs for most Flatpak portals"
8 url="https://github.com/flatpak/libportal"
11 makedepends=(git meson gi-docgen vala gobject-introspection gtk3 gtk4 qt5-base
13 checkdepends=(xorg-server-xvfb)
14 _commit=13df0b887a7eb7b0f9b14069561a41f62e813155 # tags/0.6
15 source=("git+https://github.com/flatpak/libportal#commit=$_commit")
20 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
28 arch-meson libportal build
29 meson compile -C build
33 xvfb-run -s '-nolisten local' \
34 meson test -C build --print-errorlogs
38 local p="$1" f d; shift
40 d="$srcdir/$p/${f#$pkgdir/}"
41 mkdir -p "$(dirname "$d")"
43 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
48 depends=(libg{lib,object,io}-2.0.so)
49 provides=(libportal.so)
51 meson install -C build --destdir "$pkgdir"
55 _pick gtk3 usr/include/libportal-gtk3
56 _pick gtk3 usr/lib{,/pkgconfig}/libportal-gtk3.*
57 _pick gtk3 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk3-1.0.*
58 _pick gtk3 usr/share/vala/vapi/libportal-gtk3.*
60 _pick gtk4 usr/include/libportal-gtk4
61 _pick gtk4 usr/lib{,/pkgconfig}/libportal-gtk4.*
62 _pick gtk4 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk4-1.0.*
63 _pick gtk4 usr/share/vala/vapi/libportal-gtk4.*
65 _pick qt5 usr/include/libportal-qt5
66 _pick qt5 usr/lib{,/pkgconfig}/libportal-qt5.*
68 _pick docs usr/share/doc
71 package_libportal-gtk3() {
72 pkgdesc+=" - GTK 3 backend"
73 depends=(libportal lib{gdk,gtk}-3.so)
74 provides=(libportal-gtk3.so)
79 package_libportal-gtk4() {
80 pkgdesc+=" - GTK 4 backend"
81 depends=(libportal libgtk-4.so)
82 provides=(libportal-gtk4.so)
87 package_libportal-qt5() {
88 pkgdesc+=" - Qt 5 backend"
89 depends=(libportal qt5-base qt5-x11extras)
90 provides=(libportal-qt5.so)
95 package_libportal-docs() {
96 pkgdesc+=" - documentation"