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)
15 _commit=13df0b887a7eb7b0f9b14069561a41f62e813155 # tags/0.6
16 source=("git+https://github.com/flatpak/libportal#commit=$_commit")
21 git describe --tags | sed 's/[^-]*-g/r&/;s/-/+/g'
29 arch-meson libportal build
30 meson compile -C build
34 xvfb-run -s '-nolisten local' \
35 meson test -C build --print-errorlogs
39 local p="$1" f d; shift
41 d="$srcdir/$p/${f#$pkgdir/}"
42 mkdir -p "$(dirname "$d")"
44 rmdir -p --ignore-fail-on-non-empty "$(dirname "$f")"
49 depends=(libg{lib,object,io}-2.0.so)
50 provides=(libportal.so)
52 meson install -C build --destdir "$pkgdir"
56 _pick gtk3 usr/include/libportal-gtk3
57 _pick gtk3 usr/lib{,/pkgconfig}/libportal-gtk3.*
58 _pick gtk3 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk3-1.0.*
59 _pick gtk3 usr/share/vala/vapi/libportal-gtk3.*
61 _pick gtk4 usr/include/libportal-gtk4
62 _pick gtk4 usr/lib{,/pkgconfig}/libportal-gtk4.*
63 _pick gtk4 {usr/lib/girepository-1.0,usr/share/gir-1.0}/XdpGtk4-1.0.*
64 _pick gtk4 usr/share/vala/vapi/libportal-gtk4.*
66 _pick qt5 usr/include/libportal-qt5
67 _pick qt5 usr/lib{,/pkgconfig}/libportal-qt5.*
69 _pick docs usr/share/doc
72 package_libportal-gtk3() {
73 pkgdesc+=" - GTK 3 backend"
74 depends=(libportal lib{gdk,gtk}-3.so)
75 provides=(libportal-gtk3.so)
80 package_libportal-gtk4() {
81 pkgdesc+=" - GTK 4 backend"
82 depends=(libportal libgtk-4.so)
83 provides=(libportal-gtk4.so)
88 package_libportal-qt5() {
89 pkgdesc+=" - Qt 5 backend"
90 depends=(libportal qt5-base qt5-x11extras)
91 provides=(libportal-qt5.so)
96 package_libportal-docs() {
97 pkgdesc+=" - documentation"