diff options
| author | Andreas Enge <andreas@enge.fr> | 2026-02-14 10:39:31 +0100 |
|---|---|---|
| committer | Andreas Enge <andreas@enge.fr> | 2026-03-19 18:46:36 +0100 |
| commit | bb91e0afcac80915c1170d4f33f2b551513f0f90 (patch) | |
| tree | 4bfd4c2046050f81d708ea1c84c4a2dc85f59b6f /gnu/packages | |
| parent | 9349e9c57242550077fa5c4dc03bae8d0177e233 (diff) | |
gnu: libportal: Build with Qt6.
* gnu/packages/patches/libportal-qt-6.9.patch: New file.
* gnu/local.mk (dist_patch_DATA): Register patch.
* gnu/packages/freedesktop.scm (libportal)[source]: Add patch.
[inputs]: Replace qtbase-5 by qtbase. Remove qtx11extras.
Change-Id: I8a34979cd10f89efd39749a3a10bf5bb0c93a2f6
Diffstat (limited to 'gnu/packages')
| -rw-r--r-- | gnu/packages/freedesktop.scm | 6 | ||||
| -rw-r--r-- | gnu/packages/patches/libportal-qt-6.9.patch | 43 |
2 files changed, 46 insertions, 3 deletions
diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm index 146d16f4dee..aa2a8d334ff 100644 --- a/gnu/packages/freedesktop.scm +++ b/gnu/packages/freedesktop.scm @@ -3174,7 +3174,8 @@ compatible with the well-known scripts of the same name.") (file-name (git-file-name name version)) (sha256 (base32 - "1rbqkmvvfig98ig8gsf93waiizrminj7gywxbza15hzx3an3hwh9")))) + "1rbqkmvvfig98ig8gsf93waiizrminj7gywxbza15hzx3an3hwh9")) + (patches (search-patches "libportal-qt-6.9.patch")))) (build-system meson-build-system) (arguments (list @@ -3197,8 +3198,7 @@ compatible with the well-known scripts of the same name.") (inputs (list gtk gtk+ - qtbase-5 - qtx11extras)) + qtbase)) (propagated-inputs (list glib)) (home-page "https://github.com/flatpak/libportal") diff --git a/gnu/packages/patches/libportal-qt-6.9.patch b/gnu/packages/patches/libportal-qt-6.9.patch new file mode 100644 index 00000000000..2e746736c2a --- /dev/null +++ b/gnu/packages/patches/libportal-qt-6.9.patch @@ -0,0 +1,43 @@ +Upstream patch, see https://github.com/flatpak/libportal/pull/200 + +From 68bac10ad0c60379884618d78ca7f93d9bb55df8 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()); + |
