Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check
@ 2024-02-11 22:33 chrysos349
  2024-02-12  0:42 ` [PR REVIEW] " oreo639
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: chrysos349 @ 2024-02-11 22:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

There is a new pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages libportal
https://github.com/void-linux/void-packages/pull/48662

libportal: update to 0.7.1, enable qt5 backend, add check
New apps requires the current `libportal`.
Also I enabled qt5 backend, and added check via pytest.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - armv7l x
  - armv6l-musl x

A patch file from https://github.com/void-linux/void-packages/pull/48662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libportal-48662.patch --]
[-- Type: text/x-diff, Size: 5036 bytes --]

From 4463084d76ac2a0ff019aa652c11fd98795e8221 Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Mon, 12 Feb 2024 01:27:45 +0300
Subject: [PATCH] libportal: update to 0.7.1

---
 common/shlibs                              |  1 +
 srcpkgs/libportal-qt5                      |  1 +
 srcpkgs/libportal-qt5-devel                |  1 +
 srcpkgs/libportal/patches/fix-pytest.patch | 28 +++++++++++++++++
 srcpkgs/libportal/template                 | 35 ++++++++++++++++++----
 5 files changed, 61 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libportal-qt5
 create mode 120000 srcpkgs/libportal-qt5-devel
 create mode 100644 srcpkgs/libportal/patches/fix-pytest.patch

diff --git a/common/shlibs b/common/shlibs
index 93fb4b2608729..419abc417867b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4273,3 +4273,4 @@ libunicode.so.0.4 libunicode-0.4.0_1
 libunicode_ucd.so.0.4 libunicode-0.4.0_1
 libunicode_loader.so.0.4 libunicode-0.4.0_1
 force-stage.so.0.1 void-force-stage-0.1_1
+libportal-qt5.so.1 libportal-qt5-0.7.1_1
diff --git a/srcpkgs/libportal-qt5 b/srcpkgs/libportal-qt5
new file mode 120000
index 0000000000000..2e15139a5d95b
--- /dev/null
+++ b/srcpkgs/libportal-qt5
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal-qt5-devel b/srcpkgs/libportal-qt5-devel
new file mode 120000
index 0000000000000..2e15139a5d95b
--- /dev/null
+++ b/srcpkgs/libportal-qt5-devel
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal/patches/fix-pytest.patch b/srcpkgs/libportal/patches/fix-pytest.patch
new file mode 100644
index 0000000000000..8cde864d08e1e
--- /dev/null
+++ b/srcpkgs/libportal/patches/fix-pytest.patch
@@ -0,0 +1,28 @@
+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,
diff --git a/srcpkgs/libportal/template b/srcpkgs/libportal/template
index 41e306f113170..4abed60e96eda 100644
--- a/srcpkgs/libportal/template
+++ b/srcpkgs/libportal/template
@@ -1,24 +1,28 @@
 # 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"
+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"
 
 if [ -n "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qemu-user-static prelink-cross"
+	hostmakedepends+=" qemu-user-static prelink-cross qt5-host-tools"
 fi
 
 libportal-devel_package() {
@@ -87,3 +91,24 @@ 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
+	}
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
@ 2024-02-12  0:42 ` oreo639
  2024-02-12  4:49 ` [PR PATCH] [Updated] " chrysos349
                   ` (16 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-02-12  0:42 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 265 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1485700639

Comment:
Include the patch header:
https://github.com/flatpak/libportal/commit/6cd7c2ab82575b76f876ee2bd2d31f6cb77f022f.patch

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
  2024-02-12  0:42 ` [PR REVIEW] " oreo639
@ 2024-02-12  4:49 ` chrysos349
  2024-02-12  4:56 ` [PR REVIEW] " chrysos349
                   ` (15 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-02-12  4:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

There is an updated pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages libportal
https://github.com/void-linux/void-packages/pull/48662

libportal: update to 0.7.1, enable qt5 backend, add check
New apps requires the current `libportal`.
Also I enabled qt5 backend, and added check via pytest.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - armv7l x
  - armv6l-musl x

A patch file from https://github.com/void-linux/void-packages/pull/48662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libportal-48662.patch --]
[-- Type: text/x-diff, Size: 5947 bytes --]

From 51c4ba9aa563ab85fa66d105b40100ca882caa80 Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Mon, 12 Feb 2024 01:27:45 +0300
Subject: [PATCH] libportal: update to 0.7.1, enable qt5 backend, add check

---
 common/shlibs                              |  1 +
 srcpkgs/libportal-qt5                      |  1 +
 srcpkgs/libportal-qt5-devel                |  1 +
 srcpkgs/libportal/patches/fix-pytest.patch | 47 ++++++++++++++++++++++
 srcpkgs/libportal/template                 | 35 +++++++++++++---
 5 files changed, 80 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libportal-qt5
 create mode 120000 srcpkgs/libportal-qt5-devel
 create mode 100644 srcpkgs/libportal/patches/fix-pytest.patch

diff --git a/common/shlibs b/common/shlibs
index 93fb4b2608729..419abc417867b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4273,3 +4273,4 @@ libunicode.so.0.4 libunicode-0.4.0_1
 libunicode_ucd.so.0.4 libunicode-0.4.0_1
 libunicode_loader.so.0.4 libunicode-0.4.0_1
 force-stage.so.0.1 void-force-stage-0.1_1
+libportal-qt5.so.1 libportal-qt5-0.7.1_1
diff --git a/srcpkgs/libportal-qt5 b/srcpkgs/libportal-qt5
new file mode 120000
index 0000000000000..2e15139a5d95b
--- /dev/null
+++ b/srcpkgs/libportal-qt5
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal-qt5-devel b/srcpkgs/libportal-qt5-devel
new file mode 120000
index 0000000000000..2e15139a5d95b
--- /dev/null
+++ b/srcpkgs/libportal-qt5-devel
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal/patches/fix-pytest.patch b/srcpkgs/libportal/patches/fix-pytest.patch
new file mode 100644
index 0000000000000..ea055c832dc8e
--- /dev/null
+++ b/srcpkgs/libportal/patches/fix-pytest.patch
@@ -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,
diff --git a/srcpkgs/libportal/template b/srcpkgs/libportal/template
index 41e306f113170..4abed60e96eda 100644
--- a/srcpkgs/libportal/template
+++ b/srcpkgs/libportal/template
@@ -1,24 +1,28 @@
 # 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"
+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"
 
 if [ -n "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qemu-user-static prelink-cross"
+	hostmakedepends+=" qemu-user-static prelink-cross qt5-host-tools"
 fi
 
 libportal-devel_package() {
@@ -87,3 +91,24 @@ 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
+	}
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
  2024-02-12  0:42 ` [PR REVIEW] " oreo639
  2024-02-12  4:49 ` [PR PATCH] [Updated] " chrysos349
@ 2024-02-12  4:56 ` chrysos349
  2024-02-12 14:34 ` [PR PATCH] [Updated] " chrysos349
                   ` (14 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-02-12  4:56 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 155 bytes --]

New review comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1485750345

Comment:
done

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (2 preceding siblings ...)
  2024-02-12  4:56 ` [PR REVIEW] " chrysos349
@ 2024-02-12 14:34 ` chrysos349
  2024-02-15 11:57 ` [PR REVIEW] " sgn
                   ` (13 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-02-12 14:34 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

There is an updated pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages libportal
https://github.com/void-linux/void-packages/pull/48662

libportal: update to 0.7.1, enable qt5 backend, add check
New apps requires the current `libportal`.
Also I enabled qt5 backend, and added check via pytest.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - armv7l x
  - armv6l-musl x

A patch file from https://github.com/void-linux/void-packages/pull/48662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libportal-48662.patch --]
[-- Type: text/x-diff, Size: 5945 bytes --]

From bcfdfd2161b3bf12495d4008bece8d07fd8e2923 Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Mon, 12 Feb 2024 01:27:45 +0300
Subject: [PATCH] libportal: update to 0.7.1, enable qt5 backend, add check

---
 common/shlibs                              |  1 +
 srcpkgs/libportal-qt5                      |  1 +
 srcpkgs/libportal-qt5-devel                |  1 +
 srcpkgs/libportal/patches/fix-pytest.patch | 47 ++++++++++++++++++++++
 srcpkgs/libportal/template                 | 34 +++++++++++++---
 5 files changed, 79 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libportal-qt5
 create mode 120000 srcpkgs/libportal-qt5-devel
 create mode 100644 srcpkgs/libportal/patches/fix-pytest.patch

diff --git a/common/shlibs b/common/shlibs
index 93fb4b2608729..419abc417867b 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4273,3 +4273,4 @@ libunicode.so.0.4 libunicode-0.4.0_1
 libunicode_ucd.so.0.4 libunicode-0.4.0_1
 libunicode_loader.so.0.4 libunicode-0.4.0_1
 force-stage.so.0.1 void-force-stage-0.1_1
+libportal-qt5.so.1 libportal-qt5-0.7.1_1
diff --git a/srcpkgs/libportal-qt5 b/srcpkgs/libportal-qt5
new file mode 120000
index 0000000000000..2e15139a5d95b
--- /dev/null
+++ b/srcpkgs/libportal-qt5
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal-qt5-devel b/srcpkgs/libportal-qt5-devel
new file mode 120000
index 0000000000000..2e15139a5d95b
--- /dev/null
+++ b/srcpkgs/libportal-qt5-devel
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal/patches/fix-pytest.patch b/srcpkgs/libportal/patches/fix-pytest.patch
new file mode 100644
index 0000000000000..ea055c832dc8e
--- /dev/null
+++ b/srcpkgs/libportal/patches/fix-pytest.patch
@@ -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,
diff --git a/srcpkgs/libportal/template b/srcpkgs/libportal/template
index 41e306f113170..6b37427fdd08b 100644
--- a/srcpkgs/libportal/template
+++ b/srcpkgs/libportal/template
@@ -1,24 +1,28 @@
 # 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"
+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"
 
 if [ -n "$CROSS_BUILD" ]; then
-	hostmakedepends+=" qemu-user-static prelink-cross"
+	hostmakedepends+=" qemu-user-static prelink-cross qt5-host-tools"
 fi
 
 libportal-devel_package() {
@@ -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
+	}
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (3 preceding siblings ...)
  2024-02-12 14:34 ` [PR PATCH] [Updated] " chrysos349
@ 2024-02-15 11:57 ` sgn
  2024-02-15 11:57 ` sgn
                   ` (12 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sgn @ 2024-02-15 11:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1490901085

Comment:
```suggestion
hostmakedepends="pkg-config glib-devel gobject-introspection qt5-host-tools
 $(vopt_if gir vala) $(vopt_if gtk_doc gi-docgen)"
```

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (4 preceding siblings ...)
  2024-02-15 11:57 ` [PR REVIEW] " sgn
@ 2024-02-15 11:57 ` sgn
  2024-02-15 19:49 ` chrysos349
                   ` (11 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: sgn @ 2024-02-15 11:57 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 215 bytes --]

New review comment by sgn on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1490901261

Comment:
```suggestion
	hostmakedepends+=" qemu-user-static prelink-cross"
```

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (5 preceding siblings ...)
  2024-02-15 11:57 ` sgn
@ 2024-02-15 19:49 ` chrysos349
  2024-02-15 20:46 ` oreo639
                   ` (10 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-02-15 19:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 284 bytes --]

New review comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1491561961

Comment:
`qt5-host-tools` is required for crossbuilding. i followed the logic of the original template. why is your placement more preferable?

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (6 preceding siblings ...)
  2024-02-15 19:49 ` chrysos349
@ 2024-02-15 20:46 ` oreo639
  2024-02-15 20:47 ` oreo639
                   ` (9 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-02-15 20:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 252 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1491651410

Comment:
It is always needed, it just gets installed in the target sysroot by `qt5-tools-devel` in `makedepends`.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (7 preceding siblings ...)
  2024-02-15 20:46 ` oreo639
@ 2024-02-15 20:47 ` oreo639
  2024-02-15 20:53 ` oreo639
                   ` (8 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-02-15 20:47 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1491651410

Comment:
It is always needed, it just gets implicitly installed by `qt5-tools-devel` in `makedepends`, which results in it getting installed to the target sysroot when cross-compiling.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (8 preceding siblings ...)
  2024-02-15 20:47 ` oreo639
@ 2024-02-15 20:53 ` oreo639
  2024-02-15 21:35 ` [PR PATCH] [Updated] " chrysos349
                   ` (7 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-02-15 20:53 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1491651410

Comment:
It is always needed, it just gets implicitly installed by `qt5-tools-devel` in `makedepends`, which gets installed to the target sysroot when cross-compiling.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (9 preceding siblings ...)
  2024-02-15 20:53 ` oreo639
@ 2024-02-15 21:35 ` chrysos349
  2024-02-15 21:46 ` [PR REVIEW] " chrysos349
                   ` (6 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-02-15 21:35 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

There is an updated pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages libportal
https://github.com/void-linux/void-packages/pull/48662

libportal: update to 0.7.1, enable qt5 backend, add check
New apps requires the current `libportal`.
Also I enabled qt5 backend, and added check via pytest.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - armv7l x
  - armv6l-musl x

A patch file from https://github.com/void-linux/void-packages/pull/48662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libportal-48662.patch --]
[-- Type: text/x-diff, Size: 5812 bytes --]

From 6f39b43411f30cef6ef7e8752c8b3da3cd3c27c5 Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Mon, 12 Feb 2024 01:27:45 +0300
Subject: [PATCH] libportal: update to 0.7.1, enable qt5 backend, add check

---
 common/shlibs                              |  1 +
 srcpkgs/libportal-qt5                      |  1 +
 srcpkgs/libportal-qt5-devel                |  1 +
 srcpkgs/libportal/patches/fix-pytest.patch | 47 ++++++++++++++++++++++
 srcpkgs/libportal/template                 | 34 +++++++++++++---
 5 files changed, 79 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libportal-qt5
 create mode 120000 srcpkgs/libportal-qt5-devel
 create mode 100644 srcpkgs/libportal/patches/fix-pytest.patch

diff --git a/common/shlibs b/common/shlibs
index 93fb4b26087297..419abc417867bd 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4273,3 +4273,4 @@ libunicode.so.0.4 libunicode-0.4.0_1
 libunicode_ucd.so.0.4 libunicode-0.4.0_1
 libunicode_loader.so.0.4 libunicode-0.4.0_1
 force-stage.so.0.1 void-force-stage-0.1_1
+libportal-qt5.so.1 libportal-qt5-0.7.1_1
diff --git a/srcpkgs/libportal-qt5 b/srcpkgs/libportal-qt5
new file mode 120000
index 00000000000000..2e15139a5d95ba
--- /dev/null
+++ b/srcpkgs/libportal-qt5
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal-qt5-devel b/srcpkgs/libportal-qt5-devel
new file mode 120000
index 00000000000000..2e15139a5d95ba
--- /dev/null
+++ b/srcpkgs/libportal-qt5-devel
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal/patches/fix-pytest.patch b/srcpkgs/libportal/patches/fix-pytest.patch
new file mode 100644
index 00000000000000..ea055c832dc8e3
--- /dev/null
+++ b/srcpkgs/libportal/patches/fix-pytest.patch
@@ -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,
diff --git a/srcpkgs/libportal/template b/srcpkgs/libportal/template
index 41e306f1131705..c25d354e5afae0 100644
--- a/srcpkgs/libportal/template
+++ b/srcpkgs/libportal/template
@@ -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
+	}
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (10 preceding siblings ...)
  2024-02-15 21:35 ` [PR PATCH] [Updated] " chrysos349
@ 2024-02-15 21:46 ` chrysos349
  2024-03-04 11:24 ` oreo639
                   ` (5 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-02-15 21:46 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 180 bytes --]

New review comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1491707741

Comment:
thanks for the clarification!

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR REVIEW] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (11 preceding siblings ...)
  2024-02-15 21:46 ` [PR REVIEW] " chrysos349
@ 2024-03-04 11:24 ` oreo639
  2024-03-04 11:24 ` oreo639
                   ` (4 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-04 11:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 194 bytes --]

New review comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#discussion_r1511006329

Comment:
This should be with the other libportal shlibs

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (12 preceding siblings ...)
  2024-03-04 11:24 ` oreo639
@ 2024-03-04 11:24 ` oreo639
  2024-03-04 13:01 ` [PR PATCH] [Updated] " chrysos349
                   ` (3 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-04 11:24 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 167 bytes --]

New comment by oreo639 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#issuecomment-1976363302

Comment:
This needs to be rebased.

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (13 preceding siblings ...)
  2024-03-04 11:24 ` oreo639
@ 2024-03-04 13:01 ` chrysos349
  2024-03-04 13:10 ` chrysos349
                   ` (2 subsequent siblings)
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-03-04 13:01 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

There is an updated pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages libportal
https://github.com/void-linux/void-packages/pull/48662

libportal: update to 0.7.1, enable qt5 backend, add check
New apps requires the current `libportal`.
Also I enabled qt5 backend, and added check via pytest.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - armv7l x
  - armv6l-musl x

A patch file from https://github.com/void-linux/void-packages/pull/48662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libportal-48662.patch --]
[-- Type: text/x-diff, Size: 5810 bytes --]

From 080a2d679f6b237b69834f66bca95807a9e05a54 Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Mon, 12 Feb 2024 01:27:45 +0300
Subject: [PATCH] libportal: update to 0.7.1, enable qt5 backend, add check

---
 common/shlibs                              |  1 +
 srcpkgs/libportal-qt5                      |  1 +
 srcpkgs/libportal-qt5-devel                |  1 +
 srcpkgs/libportal/patches/fix-pytest.patch | 47 ++++++++++++++++++++++
 srcpkgs/libportal/template                 | 34 +++++++++++++---
 5 files changed, 79 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libportal-qt5
 create mode 120000 srcpkgs/libportal-qt5-devel
 create mode 100644 srcpkgs/libportal/patches/fix-pytest.patch

diff --git a/common/shlibs b/common/shlibs
index 9cf16d09a85586..c1bf88dc9c2f81 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -4282,3 +4282,4 @@ libunicode_ucd.so.0.4 libunicode-0.4.0_1
 libunicode_loader.so.0.4 libunicode-0.4.0_1
 force-stage.so.0.1 void-force-stage-0.1_1
 libliftoff.so.0 libliftoff-0.4.1_1
+libportal-qt5.so.1 libportal-qt5-0.7.1_1
diff --git a/srcpkgs/libportal-qt5 b/srcpkgs/libportal-qt5
new file mode 120000
index 00000000000000..2e15139a5d95ba
--- /dev/null
+++ b/srcpkgs/libportal-qt5
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal-qt5-devel b/srcpkgs/libportal-qt5-devel
new file mode 120000
index 00000000000000..2e15139a5d95ba
--- /dev/null
+++ b/srcpkgs/libportal-qt5-devel
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal/patches/fix-pytest.patch b/srcpkgs/libportal/patches/fix-pytest.patch
new file mode 100644
index 00000000000000..ea055c832dc8e3
--- /dev/null
+++ b/srcpkgs/libportal/patches/fix-pytest.patch
@@ -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,
diff --git a/srcpkgs/libportal/template b/srcpkgs/libportal/template
index 41e306f1131705..c25d354e5afae0 100644
--- a/srcpkgs/libportal/template
+++ b/srcpkgs/libportal/template
@@ -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
+	}
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (14 preceding siblings ...)
  2024-03-04 13:01 ` [PR PATCH] [Updated] " chrysos349
@ 2024-03-04 13:10 ` chrysos349
  2024-03-04 13:11 ` [PR PATCH] [Updated] " chrysos349
  2024-03-04 13:21 ` [PR PATCH] [Merged]: " oreo639
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-03-04 13:10 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 149 bytes --]

New comment by chrysos349 on void-packages repository

https://github.com/void-linux/void-packages/pull/48662#issuecomment-1976550088

Comment:
done

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Updated] libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (15 preceding siblings ...)
  2024-03-04 13:10 ` chrysos349
@ 2024-03-04 13:11 ` chrysos349
  2024-03-04 13:21 ` [PR PATCH] [Merged]: " oreo639
  17 siblings, 0 replies; 19+ messages in thread
From: chrysos349 @ 2024-03-04 13:11 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 760 bytes --]

There is an updated pull request by chrysos349 against master on the void-packages repository

https://github.com/chrysos349/void-packages libportal
https://github.com/void-linux/void-packages/pull/48662

libportal: update to 0.7.1, enable qt5 backend, add check
New apps requires the current `libportal`.
Also I enabled qt5 backend, and added check via pytest.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - armv7l x
  - armv6l-musl x

A patch file from https://github.com/void-linux/void-packages/pull/48662.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-libportal-48662.patch --]
[-- Type: text/x-diff, Size: 5891 bytes --]

From 5bf27950a54c8129bc7cd57a367d95a74d143413 Mon Sep 17 00:00:00 2001
From: chrysos349 <chrysostom349@gmail.com>
Date: Mon, 12 Feb 2024 01:27:45 +0300
Subject: [PATCH] libportal: update to 0.7.1, enable qt5 backend, add check

---
 common/shlibs                              |  1 +
 srcpkgs/libportal-qt5                      |  1 +
 srcpkgs/libportal-qt5-devel                |  1 +
 srcpkgs/libportal/patches/fix-pytest.patch | 47 ++++++++++++++++++++++
 srcpkgs/libportal/template                 | 34 +++++++++++++---
 5 files changed, 79 insertions(+), 5 deletions(-)
 create mode 120000 srcpkgs/libportal-qt5
 create mode 120000 srcpkgs/libportal-qt5-devel
 create mode 100644 srcpkgs/libportal/patches/fix-pytest.patch

diff --git a/common/shlibs b/common/shlibs
index 9cf16d09a85586..252fd5a1db32d9 100644
--- a/common/shlibs
+++ b/common/shlibs
@@ -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
diff --git a/srcpkgs/libportal-qt5 b/srcpkgs/libportal-qt5
new file mode 120000
index 00000000000000..2e15139a5d95ba
--- /dev/null
+++ b/srcpkgs/libportal-qt5
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal-qt5-devel b/srcpkgs/libportal-qt5-devel
new file mode 120000
index 00000000000000..2e15139a5d95ba
--- /dev/null
+++ b/srcpkgs/libportal-qt5-devel
@@ -0,0 +1 @@
+libportal
\ No newline at end of file
diff --git a/srcpkgs/libportal/patches/fix-pytest.patch b/srcpkgs/libportal/patches/fix-pytest.patch
new file mode 100644
index 00000000000000..ea055c832dc8e3
--- /dev/null
+++ b/srcpkgs/libportal/patches/fix-pytest.patch
@@ -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,
diff --git a/srcpkgs/libportal/template b/srcpkgs/libportal/template
index 41e306f1131705..c25d354e5afae0 100644
--- a/srcpkgs/libportal/template
+++ b/srcpkgs/libportal/template
@@ -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
+	}
+}

^ permalink raw reply	[flat|nested] 19+ messages in thread

* Re: [PR PATCH] [Merged]: libportal: update to 0.7.1, enable qt5 backend, add check
  2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
                   ` (16 preceding siblings ...)
  2024-03-04 13:11 ` [PR PATCH] [Updated] " chrysos349
@ 2024-03-04 13:21 ` oreo639
  17 siblings, 0 replies; 19+ messages in thread
From: oreo639 @ 2024-03-04 13:21 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 596 bytes --]

There's a merged pull request on the void-packages repository

libportal: update to 0.7.1, enable qt5 backend, add check
https://github.com/void-linux/void-packages/pull/48662

Description:
New apps requires the current `libportal`.
Also I enabled qt5 backend, and added check via pytest.

#### Testing the changes
- I tested the changes in this PR: **briefly**

#### Local build testing
- I built this PR locally for my native architecture, (x86_64)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl x
  - armv7l x
  - armv6l-musl x

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2024-03-04 13:21 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-11 22:33 [PR PATCH] libportal: update to 0.7.1, enable qt5 backend, add check chrysos349
2024-02-12  0:42 ` [PR REVIEW] " oreo639
2024-02-12  4:49 ` [PR PATCH] [Updated] " chrysos349
2024-02-12  4:56 ` [PR REVIEW] " chrysos349
2024-02-12 14:34 ` [PR PATCH] [Updated] " chrysos349
2024-02-15 11:57 ` [PR REVIEW] " sgn
2024-02-15 11:57 ` sgn
2024-02-15 19:49 ` chrysos349
2024-02-15 20:46 ` oreo639
2024-02-15 20:47 ` oreo639
2024-02-15 20:53 ` oreo639
2024-02-15 21:35 ` [PR PATCH] [Updated] " chrysos349
2024-02-15 21:46 ` [PR REVIEW] " chrysos349
2024-03-04 11:24 ` oreo639
2024-03-04 11:24 ` oreo639
2024-03-04 13:01 ` [PR PATCH] [Updated] " chrysos349
2024-03-04 13:10 ` chrysos349
2024-03-04 13:11 ` [PR PATCH] [Updated] " chrysos349
2024-03-04 13:21 ` [PR PATCH] [Merged]: " oreo639

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).