libportal: update to 0.7.1, enable qt5 backend, add check

This commit is contained in:
chrysos349 2024-02-12 01:27:45 +03:00 committed by oreo639
parent 30f44dde36
commit 5514ed0076
5 changed files with 79 additions and 5 deletions

View File

@ -3868,6 +3868,7 @@ libmatio.so.11 matio-1.5.23_1
libportal.so.1 libportal-0.6_1
libportal-gtk3.so.1 libportal-gtk3-0.6_1
libportal-gtk4.so.1 libportal-gtk4-0.6_1
libportal-qt5.so.1 libportal-qt5-0.7.1_1
libvips.so.42 libvips-8.9.2_1
libvips-cpp.so.42 libvips-8.9.2_1
libselinux.so.1 libselinux-3.0_1

1
srcpkgs/libportal-qt5 Symbolic link
View File

@ -0,0 +1 @@
libportal

1
srcpkgs/libportal-qt5-devel Symbolic link
View File

@ -0,0 +1 @@
libportal

View File

@ -0,0 +1,47 @@
From 6cd7c2ab82575b76f876ee2bd2d31f6cb77f022f Mon Sep 17 00:00:00 2001
From: Simon McVittie <smcv@debian.org>
Date: Tue, 26 Dec 2023 14:35:46 +0000
Subject: [PATCH] pyportaltest: Only create one session bus per DBusTestCase
subclass
DBusTestCase.start_session_bus() is a class method, and can only be
called once per class, because DBusTestCase.tearDownClass() will only
clean up one session bus. In older versions of dbusmock, calling it more
than once will result in dbus-daemon processes being leaked; since
0.30.0, calling it more than once will result in an assertion failure.
Resolves: https://github.com/flatpak/libportal/issues/136
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1058245
Signed-off-by: Simon McVittie <smcv@debian.org>
---
tests/pyportaltest/__init__.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tests/pyportaltest/__init__.py b/tests/pyportaltest/__init__.py
index af053c2a..80f04a91 100644
--- a/tests/pyportaltest/__init__.py
+++ b/tests/pyportaltest/__init__.py
@@ -83,6 +83,14 @@ def setUpClass(cls):
except AttributeError:
pytest.skip("Updated version of dbusmock required")
+ cls.__have_session_bus = False
+
+ @classmethod
+ def ensure_session_bus(cls):
+ if not cls.__have_session_bus:
+ cls.__have_session_bus = True
+ cls.start_session_bus()
+
def setUp(self):
self.p_mock = None
self._mainloop = None
@@ -96,7 +104,7 @@ def setup_daemon(self, params=None, extra_templates: List[Tuple[str, Dict]] = []
portal name as first value and the param dict to be passed to that
template as second value, e.g. ("ScreenCast", {...}).
"""
- self.start_session_bus()
+ self.ensure_session_bus()
self.p_mock, self.obj_portal = self.spawn_server_template(
template=f"pyportaltest/templates/{self.PORTAL_NAME.lower()}.py",
parameters=params,

View File

@ -1,18 +1,22 @@
# Template file for 'libportal'
pkgname=libportal
version=0.6
version=0.7.1
revision=1
build_style=meson
configure_args="$(vopt_bool gtk_doc docs) $(vopt_bool gir vapi) -Dbackends=gtk3,gtk4"
configure_args="$(vopt_bool gtk_doc docs) $(vopt_bool gir vapi)
-Dbackend-gtk3=enabled -Dbackend-gtk4=enabled -Dbackend-qt5=enabled"
hostmakedepends="pkg-config glib-devel gobject-introspection $(vopt_if gir vala)
$(vopt_if gtk_doc gi-docgen)"
makedepends="glib-devel gobject-introspection gtk+3-devel gtk4-devel"
$(vopt_if gtk_doc gi-docgen) qt5-host-tools"
makedepends="glib-devel gobject-introspection gtk+3-devel gtk4-devel
qt5-tools-devel qt5-x11extras-devel"
checkdepends="python3-dbusmock python3-pytest xvfb-run"
short_desc="Flatpak portal library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.0-or-later"
homepage="https://github.com/flatpak/libportal"
distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
checksum=88a12c3ba71bc31acff7238c280de697d609cebc50830c3766776ec35abc6566
checksum=297b90b263fad22190a26b8c7e8ea938fe6b18fb936265e588927179920d3805
make_check_pre="xvfb-run"
build_options="gir gtk_doc"
build_options_default="gir gtk_doc"
@ -87,3 +91,23 @@ libportal-gtk4-devel_package() {
fi
}
}
libportal-qt5_package() {
depends="${sourcepkg}>=${version}_${revision}"
short_desc+=" - Qt5"
pkg_install() {
vmove "usr/lib/libportal-qt5.so.*"
}
}
libportal-qt5-devel_package() {
depends="libportal-devel>=${version}_${revision}
libportal-qt5>=${version}_${revision} qt5-devel
qt5-x11extras-devel"
short_desc+=" - Qt5 - development files"
pkg_install() {
vmove usr/include/libportal-qt5
vmove "usr/lib/libportal-qt5.so"
vmove usr/lib/pkgconfig/libportal-qt5.pc
}
}