libportal: update to 0.10.0.

This commit is contained in:
Duncaen
2026-08-02 23:26:47 +02:00
parent 2d5dd30bd7
commit 9469f54b04
3 changed files with 9 additions and 135 deletions
@@ -1,87 +0,0 @@
From 7921c586073e95aa8007b961a6b461a228c061ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Mon, 22 Sep 2025 15:54:03 +0200
Subject: [PATCH 1/2] tests/notification: Use GioUnix to get InputStream
Gio.UnixInputStream is deprecated since GLib 2.80 (and even broken in
2.86), so use the platform-implementation instead.
See: https://gitlab.gnome.org/GNOME/pygobject/-/merge_requests/452
---
tests/pyportaltest/test_notification.py | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/tests/pyportaltest/test_notification.py b/tests/pyportaltest/test_notification.py
index ecbc4827..1fe2bac2 100644
--- a/tests/pyportaltest/test_notification.py
+++ b/tests/pyportaltest/test_notification.py
@@ -8,7 +8,7 @@
import logging
gi.require_version("Xdp", "1.0")
-from gi.repository import GLib, Gio, Xdp
+from gi.repository import GLib, Gio, GioUnix, Xdp
logger = logging.getLogger(__name__)
@@ -88,7 +88,7 @@ def test_add_notification_bytes_icon(self):
assert dict(notification) == notification_to_set_dict
(icon_type, handle) = icon
assert icon_type == 'file-descriptor'
- input_stream = Gio.UnixInputStream.new(handle.take(), True)
+ input_stream = GioUnix.InputStream.new(handle.take(), True)
res_bytes = input_stream.read_bytes(bytes.get_size(), None)
assert res_bytes.equal (bytes)
@@ -117,7 +117,7 @@ def test_add_notification_file_icon(self):
assert dict(notification) == notification_to_set_dict
(icon_type, handle) = icon
assert icon_type == 'file-descriptor'
- input_stream = Gio.UnixInputStream.new(handle.take(), True)
+ input_stream = GioUnix.InputStream.new(handle.take(), True)
res_bytes = input_stream.read_bytes(bytes.get_size(), None)
assert res_bytes.equal (bytes)
@@ -164,7 +164,7 @@ def test_add_notification_bytes_sound(self):
assert dict(notification) == notification_to_set_dict
(sound_type, handle) = sound
assert sound_type == 'file-descriptor'
- input_stream = Gio.UnixInputStream.new(handle.take(), True)
+ input_stream = GioUnix.InputStream.new(handle.take(), True)
res_bytes = input_stream.read_bytes(bytes.get_size(), None)
assert res_bytes.equal (bytes)
@@ -192,7 +192,7 @@ def test_add_notification_file_sound(self):
assert dict(notification) == notification_to_set_dict
(sound_type, handle) = sound_out
assert sound_type == 'file-descriptor'
- input_stream = Gio.UnixInputStream.new(handle.take(), True)
+ input_stream = GioUnix.InputStream.new(handle.take(), True)
res_bytes = input_stream.read_bytes(bytes.get_size(), None)
assert res_bytes.equal (bytes)
From 5dc3be88553d8994d16caf5d165f13f94f382a94 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marco=20Trevisan=20=28Trevi=C3=B1o=29?= <mail@3v1n0.net>
Date: Mon, 22 Sep 2025 15:56:36 +0200
Subject: [PATCH 2/2] libportal: Bump dependency on gio 2.80
It' mostly a test-dependency only, but it's old enough to just use it
for everything
---
libportal/meson.build | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libportal/meson.build b/libportal/meson.build
index 93094d31..954106a9 100644
--- a/libportal/meson.build
+++ b/libportal/meson.build
@@ -68,7 +68,7 @@ src = [
generated_files,
]
-gio_dep = dependency('gio-2.0', version: '>= 2.72')
+gio_dep = dependency('gio-2.0', version: '>= 2.80')
gio_unix_dep = dependency('gio-unix-2.0')
install_headers(public_headers, subdir: 'libportal')
@@ -1,41 +0,0 @@
From 796053d2eebe4532aad6bd3fd80cdf3b197806ec Mon Sep 17 00:00:00 2001
From: Jan Grulich <jgrulich@redhat.com>
Date: Thu, 27 Mar 2025 09:38:10 +0100
Subject: [PATCH] qt6: fix build against Qt 6.9+
QGenericUnixServices was renamed to QDesktopUnixServices in Qt 6.9.
Upstream change: https://codereview.qt-project.org/c/qt/qtbase/+/609639
---
libportal/portal-qt6.cpp | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/libportal/portal-qt6.cpp b/libportal/portal-qt6.cpp
index d38a4e30..34f0d72a 100644
--- a/libportal/portal-qt6.cpp
+++ b/libportal/portal-qt6.cpp
@@ -31,8 +31,12 @@
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
#include <qpa/qplatformintegration.h>
#include <private/qguiapplication_p.h>
+#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
+#include <private/qdesktopunixservices_p.h>
+#else
#include <private/qgenericunixservices_p.h>
#endif
+#endif
static gboolean
_xdp_parent_export_qt (XdpParent *parent,
@@ -45,7 +49,11 @@ _xdp_parent_export_qt (XdpParent *parent,
}
#if QT_VERSION >= QT_VERSION_CHECK(6, 5, 0)
+#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0)
+ if (const auto services = dynamic_cast<QDesktopUnixServices*>(QGuiApplicationPrivate::platformIntegration()->services()))
+#else
if (const auto services = dynamic_cast<QGenericUnixServices*>(QGuiApplicationPrivate::platformIntegration()->services()))
+#endif
{
g_autofree char *handle = g_strdup(services->portalWindowIdentifier(w).toUtf8().constData());
+9 -7
View File
@@ -1,7 +1,7 @@
# Template file for 'libportal'
pkgname=libportal
version=0.9.1
revision=5
version=0.10.0
revision=1
build_style=meson
build_helper="gir"
configure_args="$(vopt_bool gtk_doc docs) $(vopt_bool gir vapi)
@@ -13,10 +13,12 @@ makedepends="glib-devel gobject-introspection gtk+3-devel gtk4-devel
checkdepends="python3-dbusmock python3-pytest xvfb-run"
short_desc="Flatpak portal library"
maintainer="Orphaned <orphan@voidlinux.org>"
license="LGPL-2.0-or-later"
license="LGPL-3.0-only"
homepage="https://github.com/flatpak/libportal"
distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
checksum=de801ee349ed3c255a9af3c01b1a401fab5b3fc1c35eb2fd7dfb35d4b8194d7f
changelog="https://raw.githubusercontent.com/flatpak/libportal/refs/heads/main/NEWS"
distfiles="https://github.com/flatpak/libportal/releases/download/${version}/libportal-${version}.tar.xz"
checksum=1c74a3f7becbd4ff745d7f565afd06e97e50eb080a0e268cb14bb55289a745bf
make_check_pre="xvfb-run"
build_options="gir gtk_doc"
@@ -87,7 +89,7 @@ libportal-gtk4-devel_package() {
vmove "usr/lib/libportal-gtk4.so"
vmove usr/lib/pkgconfig/libportal-gtk4.pc
if [ "$build_option_gir" ]; then
vmove usr/share/gir-1.0/XdpGtk4*
vmove "usr/share/gir-1.0/XdpGtk4*"
vmove "usr/share/vala/vapi/libportal-gtk4*"
fi
}
@@ -107,7 +109,7 @@ libportal-qt6-devel_package() {
short_desc+=" - Qt6 - development files"
pkg_install() {
vmove usr/include/libportal-qt6
vmove "usr/lib/libportal-qt6.so"
vmove usr/lib/libportal-qt6.so
vmove usr/lib/pkgconfig/libportal-qt6.pc
}
}