* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xdg-desktop-portal/files/, sys-apps/xdg-desktop-portal/
@ 2023-05-06 9:40 Sam James
0 siblings, 0 replies; 3+ messages in thread
From: Sam James @ 2023-05-06 9:40 UTC (permalink / raw
To: gentoo-commits
commit: e3e36c9794b4defc7012f19a3efa3a09c12cab71
Author: Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Sat May 6 09:30:19 2023 +0000
Commit: Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Sat May 6 09:40:08 2023 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e3e36c97
sys-apps/xdg-desktop-portal: add delay/slowness backport
From the 1.16 branch upstream & backported in Fedora as well.
Bug: https://bugs.gentoo.org/905482
Signed-off-by: Sam James <sam <AT> gentoo.org>
.../xdg-desktop-portal-1.16.0-delay-open-fix.patch | 300 +++++++++++++++++++++
.../xdg-desktop-portal-1.16.0-r1.ebuild | 68 +++++
2 files changed, 368 insertions(+)
diff --git a/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.16.0-delay-open-fix.patch b/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.16.0-delay-open-fix.patch
new file mode 100644
index 000000000000..1e1598744c46
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.16.0-delay-open-fix.patch
@@ -0,0 +1,300 @@
+https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74
+https://github.com/flatpak/xdg-desktop-portal/pull/985
+https://github.com/flatpak/xdg-desktop-portal/commit/2a219279997c2124c8a639b0d009c9946ec97b40
+
+Fedora's backported it as well at https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74.
+
+From 2a219279997c2124c8a639b0d009c9946ec97b40 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
+Date: Mon, 13 Mar 2023 12:38:17 +0100
+Subject: [PATCH] portal-impl: Only return found implementation if it launched
+
+If no portal backend for a given interface is found, a fallback is
+always tried anyway, despite that fallback not being listed as
+compatible with the current desktop environment.
+
+Sometimes it's good that a fallback is returned; e.g. the
+xdg-desktop-portal-gtk file chooser backend is technically usable
+anywhere, however, some backends might be specifically designed to only
+work in a specific desktop environment, e.g. xdg-desktop-portal-gnome.
+
+In order to avoid creating portals with non-functional backends, make
+sure it's possible to create a proxy object for the interface and D-Bus
+name, and that it launched successfully (i.e. has no name owner after
+creating the proxy).
+--- a/src/portal-impl.c
++++ b/src/portal-impl.c
+@@ -29,9 +29,12 @@
+ #include <glib.h>
+ #include <gio/gio.h>
+
++#include "xdp-utils.h"
++
+ static void
+ portal_implementation_free (PortalImplementation *impl)
+ {
++ g_clear_pointer (&impl->dummy_proxies, g_hash_table_unref);
+ g_free (impl->source);
+ g_free (impl->dbus_name);
+ g_strfreev (impl->interfaces);
+@@ -55,6 +58,10 @@ register_portal (const char *path, gboolean opt_verbose, GError **error)
+ if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, error))
+ return FALSE;
+
++ impl->dummy_proxies = g_hash_table_new_full (g_str_hash,
++ g_str_equal,
++ g_free,
++ g_object_unref);
+ impl->source = g_path_get_basename (path);
+ impl->dbus_name = g_key_file_get_string (keyfile, "portal", "DBusName", error);
+ if (impl->dbus_name == NULL)
+@@ -198,8 +205,44 @@ load_installed_portals (gboolean opt_verbose)
+ implementations = g_list_sort (implementations, sort_impl_by_use_in_and_name);
+ }
+
++static gboolean
++create_dummy_proxy (PortalImplementation *impl,
++ GDBusConnection *connection,
++ const char *interface,
++ GError **error)
++{
++ g_autoptr(GDBusProxy) proxy = NULL;
++
++ g_debug ("Creating dummy proxy for %s on %s", interface, impl->dbus_name);
++ proxy = g_dbus_proxy_new_sync (connection,
++ G_DBUS_PROXY_FLAGS_NONE,
++ NULL,
++ impl->dbus_name,
++ DESKTOP_PORTAL_OBJECT_PATH,
++ interface,
++ NULL,
++ error);
++ if (!proxy)
++ return FALSE;
++
++ if (!g_dbus_proxy_get_name_owner (proxy))
++ {
++ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
++ "Proxy has no owner");
++ return FALSE;
++ }
++
++ g_debug ("Dummy proxy created");
++
++ g_hash_table_insert (impl->dummy_proxies,
++ g_strdup (interface),
++ g_steal_pointer (&proxy));
++ return TRUE;
++}
++
+ PortalImplementation *
+-find_portal_implementation (const char *interface)
++find_portal_implementation (GDBusConnection *connection,
++ const char *interface)
+ {
+ const char *desktops_str = g_getenv ("XDG_CURRENT_DESKTOP");
+ g_auto(GStrv) desktops = NULL;
+@@ -216,15 +259,23 @@ find_portal_implementation (const char *interface)
+ for (l = implementations; l != NULL; l = l->next)
+ {
+ PortalImplementation *impl = l->data;
++ g_autoptr(GError) error = NULL;
+
+ if (!g_strv_contains ((const char **)impl->interfaces, interface))
+ continue;
+
+- if (g_strv_case_contains ((const char **)impl->use_in, desktops[i]))
++ if (!g_strv_case_contains ((const char **)impl->use_in, desktops[i]))
++ continue;
++
++ if (!create_dummy_proxy (impl, connection, interface, &error))
+ {
+- g_debug ("Using %s for %s in %s", impl->source, interface, desktops[i]);
+- return impl;
++ g_debug ("Failed to create dummy proxy on %s for %s: %s",
++ impl->dbus_name, interface, error->message);
++ continue;
+ }
++
++ g_debug ("Using %s for %s in %s", impl->source, interface, desktops[i]);
++ return impl;
+ }
+ }
+
+@@ -232,10 +283,18 @@ find_portal_implementation (const char *interface)
+ for (l = implementations; l != NULL; l = l->next)
+ {
+ PortalImplementation *impl = l->data;
++ g_autoptr(GError) error = NULL;
+
+ if (!g_strv_contains ((const char **)impl->interfaces, interface))
+ continue;
+
++ if (!create_dummy_proxy (impl, connection, interface, &error))
++ {
++ g_debug ("Failed to create dummy fallback proxy on %s for %s: %s",
++ impl->dbus_name, interface, error->message);
++ continue;
++ }
++
+ g_debug ("Falling back to %s for %s", impl->source, interface);
+ return impl;
+ }
+--- a/src/portal-impl.h
++++ b/src/portal-impl.h
+@@ -23,6 +23,7 @@
+ #define __PORTAL_IMPL_H__
+
+ #include <glib.h>
++#include <gio/gio.h>
+
+ typedef struct {
+ char *source;
+@@ -30,10 +31,12 @@ typedef struct {
+ char **interfaces;
+ char **use_in;
+ int priority;
++ GHashTable *dummy_proxies;
+ } PortalImplementation;
+
+ void load_installed_portals (gboolean opt_verbose);
+-PortalImplementation *find_portal_implementation (const char *interface);
++PortalImplementation *find_portal_implementation (GDBusConnection *connection,
++ const char *interface);
+ GPtrArray *find_all_portal_implementations (const char *interface);
+
+ #endif /* __PORTAL_IMPL_H__ */
+--- a/src/xdg-desktop-portal.c
++++ b/src/xdg-desktop-portal.c
+@@ -237,7 +237,8 @@ on_bus_acquired (GDBusConnection *connection,
+ init_document_proxy (connection);
+ init_permission_store (connection);
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Lockdown");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Lockdown");
+ if (implementation != NULL)
+ lockdown = xdp_dbus_impl_lockdown_proxy_new_sync (connection,
+ G_DBUS_PROXY_FLAGS_NONE,
+@@ -259,40 +260,48 @@ on_bus_acquired (GDBusConnection *connection,
+ export_portal_implementation (connection, settings_create (connection, impls));
+ g_ptr_array_free (impls, TRUE);
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.FileChooser");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.FileChooser");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ file_chooser_create (connection, implementation->dbus_name, lockdown));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.AppChooser");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.AppChooser");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ open_uri_create (connection, implementation->dbus_name, lockdown));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Print");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Print");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ print_create (connection, implementation->dbus_name, lockdown));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Notification");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Notification");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ notification_create (connection, implementation->dbus_name));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Inhibit");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Inhibit");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ inhibit_create (connection, implementation->dbus_name));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Access");
+- implementation2 = find_portal_implementation ("org.freedesktop.impl.portal.Screenshot");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Access");
++ implementation2 = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Screenshot");
+ if (implementation != NULL && implementation2 != NULL)
+ export_portal_implementation (connection,
+ screenshot_create (connection,
+ implementation->dbus_name,
+ implementation2->dbus_name));
+
+- implementation2 = find_portal_implementation ("org.freedesktop.impl.portal.Background");
++ implementation2 = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Background");
+ if (implementation != NULL)
+ {
+ export_portal_implementation (connection,
+@@ -313,47 +322,55 @@ on_bus_acquired (GDBusConnection *connection,
+ implementation->dbus_name,
+ implementation2->dbus_name));
+
+- implementation2 = find_portal_implementation ("org.freedesktop.impl.portal.Wallpaper");
++ implementation2 = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Wallpaper");
+ if (implementation != NULL && implementation2 != NULL)
+ export_portal_implementation (connection,
+ wallpaper_create (connection,
+ implementation->dbus_name,
+ implementation2->dbus_name));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Account");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Account");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ account_create (connection, implementation->dbus_name));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Email");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Email");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ email_create (connection, implementation->dbus_name));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Secret");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.Secret");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ secret_create (connection, implementation->dbus_name));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.GlobalShortcuts");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.GlobalShortcuts");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ global_shortcuts_create (connection, implementation->dbus_name));
+
+ #ifdef HAVE_GLIB_2_66
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.DynamicLauncher");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.DynamicLauncher");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ dynamic_launcher_create (connection, implementation->dbus_name));
+ #endif
+
+ #ifdef HAVE_PIPEWIRE
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.ScreenCast");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.ScreenCast");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ screen_cast_create (connection, implementation->dbus_name));
+
+- implementation = find_portal_implementation ("org.freedesktop.impl.portal.RemoteDesktop");
++ implementation = find_portal_implementation (connection,
++ "org.freedesktop.impl.portal.RemoteDesktop");
+ if (implementation != NULL)
+ export_portal_implementation (connection,
+ remote_desktop_create (connection, implementation->dbus_name));
+
diff --git a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.16.0-r1.ebuild b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.16.0-r1.ebuild
new file mode 100644
index 000000000000..3a9bda386772
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.16.0-r1.ebuild
@@ -0,0 +1,68 @@
+# Copyright 1999-2023 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=8
+
+inherit autotools systemd
+
+DESCRIPTION="Desktop integration portal"
+HOMEPAGE="https://flatpak.org/ https://github.com/flatpak/xdg-desktop-portal"
+SRC_URI="https://github.com/flatpak/${PN}/releases/download/${PV}/${P}.tar.xz"
+
+LICENSE="LGPL-2.1"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
+IUSE="geolocation screencast systemd"
+
+DEPEND="
+ >=dev-libs/glib-2.66:2
+ dev-libs/json-glib
+ >=sys-fs/fuse-3.10.0:3[suid]
+ x11-libs/gdk-pixbuf
+ geolocation? ( >=app-misc/geoclue-2.5.3:2.0 )
+ screencast? ( >=media-video/pipewire-0.3:= )
+ systemd? ( sys-apps/systemd )
+"
+RDEPEND="${DEPEND}
+ sys-apps/dbus
+"
+BDEPEND="
+ dev-util/gdbus-codegen
+ sys-devel/gettext
+ virtual/pkgconfig
+"
+
+PATCHES=(
+ "${FILESDIR}"/${P}-delay-open-fix.patch
+)
+
+src_prepare() {
+ default
+ eautoreconf
+}
+
+src_configure() {
+ local myeconfargs=(
+ --disable-docbook-docs # requires flatpak
+ --disable-libportal # not packaged
+ --with-systemduserunitdir="$(systemd_get_userunitdir)"
+ $(use_enable geolocation geoclue)
+ $(use_enable screencast pipewire)
+ $(use_with systemd)
+ )
+ econf "${myeconfargs[@]}"
+}
+
+pkg_postinst() {
+ if ! has_version gui-libs/xdg-desktop-portal-lxqt && ! has_version gui-libs/xdg-desktop-portal-wlr && \
+ ! has_version kde-plasma/xdg-desktop-portal-kde && ! has_version sys-apps/xdg-desktop-portal-gnome && \
+ ! has_version sys-apps/xdg-desktop-portal-gtk; then
+ elog "${PN} is not usable without any of the following XDP"
+ elog "implementations installed:"
+ elog " gui-libs/xdg-desktop-portal-lxqt"
+ elog " gui-libs/xdg-desktop-portal-wlr"
+ elog " kde-plasma/xdg-desktop-portal-kde"
+ elog " sys-apps/xdg-desktop-portal-gnome"
+ elog " sys-apps/xdg-desktop-portal-gtk"
+ fi
+}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xdg-desktop-portal/files/, sys-apps/xdg-desktop-portal/
@ 2024-04-06 18:26 Andreas Sturmlechner
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2024-04-06 18:26 UTC (permalink / raw
To: gentoo-commits
commit: e7ff8b05931bb485273c9566a758f0e5a7a93e5e
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Sat Apr 6 17:59:10 2024 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Sat Apr 6 18:25:17 2024 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e7ff8b05
sys-apps/xdg-desktop-portal: drop 1.16.0-r1, 1.18.0-r2, 1.18.1
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
sys-apps/xdg-desktop-portal/Manifest | 3 -
...-allow-linux-to-build-without-flatpak-ins.patch | 37 ---
...d-allow-linux-to-build-without-bubblewrap.patch | 33 ---
.../files/0003-Make-flatpak-bwrap-optional.patch | 57 ----
.../xdg-desktop-portal-1.16.0-delay-open-fix.patch | 300 ---------------------
.../xdg-desktop-portal-1.16.0-r1.ebuild | 68 -----
.../xdg-desktop-portal-1.18.0-r2.ebuild | 121 ---------
.../xdg-desktop-portal-1.18.1.ebuild | 116 --------
8 files changed, 735 deletions(-)
diff --git a/sys-apps/xdg-desktop-portal/Manifest b/sys-apps/xdg-desktop-portal/Manifest
index fd0511c003aa..6b87b19b4a24 100644
--- a/sys-apps/xdg-desktop-portal/Manifest
+++ b/sys-apps/xdg-desktop-portal/Manifest
@@ -1,5 +1,2 @@
-DIST xdg-desktop-portal-1.16.0.tar.xz 250524 BLAKE2B 9d5bd760621b114a19c1cc8895f91c43fcfed0dd067ba9678de0f11dc7835ec29c4a2c452274adbd36ee1318359caa8d7ca0c585558eb73a2a4e53528e6b02da SHA512 f7e7e96d3a6757901fbc4c0310aac0afbf37882c279a2859e06f63528049cd9b50dd2d55445d1386f03f62557c1a2ec81d4ee081200367d6269d2dffc75f0912
-DIST xdg-desktop-portal-1.18.0.tar.xz 260788 BLAKE2B 3a7575af17a5b21d6f313a098a9144df9d6f24768c6e16e4fb45382fac3c64aab3b361b29226769c8cc979c278ec61469f32841792bb0f4e7d9e83fc1fab40fc SHA512 416c0736342b2909c10db025da72edca6d106b46224341bdf45ab41152c01b97f4a4eb78df924a6fbc771475bf103c1aea3005d8ff683f1eca935dbd1afe4a51
-DIST xdg-desktop-portal-1.18.1.tar.xz 696988 BLAKE2B b458b50b7adf2ad3cf47f86f01d4323ca5110bd07c76eb19b789445f1bab1662ae031f3c99d171f41d1db87f262c28e1ed810527612f7b1cec521a21d690088f SHA512 b4340d14a94a03bdf3ebee8d5a13e7d9386e870b50654369293670d5a828fd258fe419b330c036eaa28963447764db2169aa7f225819a4f9877e57d18c59030e
DIST xdg-desktop-portal-1.18.2.tar.xz 698912 BLAKE2B c8b0da07c094627c36b72b775367ec9081d7e710c0c29640afc239c2048e686611ae0ab941515337605c175ad63345e8ffdcd4982ad0997d5ca67fc31e289f89 SHA512 937fea3dfa0ab4b99146fbf5e4e42fdd94a22ab204f45395257c562e97803e71a777ca17faa5077205a1dd6b7d86291dfeed75922e311a61a402ebf4e05cfa19
DIST xdg-desktop-portal-1.18.3.tar.xz 699168 BLAKE2B 495deda38f20c384b80db25f11010a67ed9b26d8577e23e16221d54e9eb0edd5f4b1fac633e70eefc4bf1a689c0cdbbb5b524aff219c020e8ef227397eff4802 SHA512 aada58ac8ad5e15b509a3435b350f898b12e4638e09b1fd2f517e641e67991d5ae22ca32e0f2f0edfa902a4e1515a36b367b84040e95d27ef0b5b8092b768f55
diff --git a/sys-apps/xdg-desktop-portal/files/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch b/sys-apps/xdg-desktop-portal/files/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch
deleted file mode 100644
index 9f758f7b5432..000000000000
--- a/sys-apps/xdg-desktop-portal/files/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-https://github.com/flatpak/xdg-desktop-portal/pull/1100
-
-From b734c44545276141b785dd31ff9c0c78a7801baa Mon Sep 17 00:00:00 2001
-From: "Anna (navi) Figueiredo Gomes" <navi@vlhl.dev>
-Date: Fri, 8 Sep 2023 22:07:06 +0200
-Subject: [PATCH 1/3] meson.build: allow linux to build without flatpak
- installed
-
-the old automake scripts would allow for building without flatpak, as the
-xml file would just not be copied (because it doesn't exist) so it
-wouldn't be used to generate files.
-
-this allows similar behaviour by not requiring the flatpak dependency in
-meson.
-
-Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
----
- meson.build | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 2254c0d..2366d9e 100644
---- a/meson.build
-+++ b/meson.build
-@@ -21,8 +21,7 @@ endif
-
- flatpak_intf_dir = get_option('flatpak-interfaces-dir')
- if flatpak_intf_dir == ''
-- flatpak_required = host_machine.system() in ['linux']
-- flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : flatpak_required)
-+ flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : false)
- if flatpak_dep.found()
- flatpak_intf_dir = flatpak_dep.get_variable(pkgconfig: 'interfaces_dir')
- endif
---
-2.42.0
-
diff --git a/sys-apps/xdg-desktop-portal/files/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch b/sys-apps/xdg-desktop-portal/files/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch
deleted file mode 100644
index ce10d326828f..000000000000
--- a/sys-apps/xdg-desktop-portal/files/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch
+++ /dev/null
@@ -1,33 +0,0 @@
-https://github.com/flatpak/xdg-desktop-portal/pull/1100
-
-From 8cf28b590ab23e94d6b80eaa6893ed51542d3dd8 Mon Sep 17 00:00:00 2001
-From: "Anna (navi) Figueiredo Gomes" <navi@vlhl.dev>
-Date: Sat, 9 Sep 2023 01:20:36 +0200
-Subject: [PATCH 2/3] meson.build: allow linux to build without bubblewrap
-
-per the same logic as flatpak, there's no reason to force bwrap as a
-dependency to build xdp under linux, as there is systems without bwrap
-that would want to be able to build xdp
-
-Signed-off-by: Anna (navi) Figueiredo Gomes <navi@vlhl.dev>
----
- meson.build | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index 2366d9e..ad7faae 100644
---- a/meson.build
-+++ b/meson.build
-@@ -112,8 +112,7 @@ libportal_dep = dependency('libportal',
- pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.2.90')
- libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
-
--bwrap_required = host_machine.system() in ['linux']
--bwrap = find_program('bwrap', required: bwrap_required)
-+bwrap = find_program('bwrap', required: false)
-
- have_libportal = libportal_dep.found()
- if have_libportal
---
-2.42.0
-
diff --git a/sys-apps/xdg-desktop-portal/files/0003-Make-flatpak-bwrap-optional.patch b/sys-apps/xdg-desktop-portal/files/0003-Make-flatpak-bwrap-optional.patch
deleted file mode 100644
index 78b0b3e522a2..000000000000
--- a/sys-apps/xdg-desktop-portal/files/0003-Make-flatpak-bwrap-optional.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 5b4ad3e7a9828df2cd06d663d89800c346f5051f Mon Sep 17 00:00:00 2001
-From: Sam James <sam@gentoo.org>
-Date: Fri, 22 Sep 2023 17:35:21 +0100
-Subject: [PATCH] Make flatpak, bwrap optional
-
-See https://github.com/flatpak/xdg-desktop-portal/pull/1100
-
-Signed-off-by: Sam James <sam@gentoo.org>
----
- meson.build | 4 ++--
- meson_options.txt | 8 ++++++++
- 2 files changed, 10 insertions(+), 2 deletions(-)
-
-diff --git a/meson.build b/meson.build
-index ad7faae..933eb54 100644
---- a/meson.build
-+++ b/meson.build
-@@ -21,7 +21,7 @@ endif
-
- flatpak_intf_dir = get_option('flatpak-interfaces-dir')
- if flatpak_intf_dir == ''
-- flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : false)
-+ flatpak_dep = dependency('flatpak', version: '>= 1.5.0', required : get_option('flatpak'))
- if flatpak_dep.found()
- flatpak_intf_dir = flatpak_dep.get_variable(pkgconfig: 'interfaces_dir')
- endif
-@@ -112,7 +112,7 @@ libportal_dep = dependency('libportal',
- pipewire_dep = dependency('libpipewire-0.3', version: '>= 0.2.90')
- libsystemd_dep = dependency('libsystemd', required: get_option('systemd'))
-
--bwrap = find_program('bwrap', required: false)
-+bwrap = find_program('bwrap', required: get_option('bwrap'))
-
- have_libportal = libportal_dep.found()
- if have_libportal
-diff --git a/meson_options.txt b/meson_options.txt
-index edcbcd8..d1914ce 100644
---- a/meson_options.txt
-+++ b/meson_options.txt
-@@ -2,6 +2,14 @@ option('dbus-service-dir',
- type: 'string',
- value: '',
- description: 'directory for dbus service files (default: PREFIX/share/dbus-1/services)')
-+option('bwrap',
-+ type: 'feature',
-+ value: 'enabled',
-+ description: 'Use bwrap (requires seccomp) for sandboxing for e.g. icon validation. Recommended.')
-+option('flatpak',
-+ type: 'feature',
-+ value: 'enabled',
-+ description: 'Enable flatpak integration')
- option('flatpak-interfaces-dir',
- type: 'string',
- value: '',
---
-2.42.0
-
diff --git a/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.16.0-delay-open-fix.patch b/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.16.0-delay-open-fix.patch
deleted file mode 100644
index 1e1598744c46..000000000000
--- a/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.16.0-delay-open-fix.patch
+++ /dev/null
@@ -1,300 +0,0 @@
-https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74
-https://github.com/flatpak/xdg-desktop-portal/pull/985
-https://github.com/flatpak/xdg-desktop-portal/commit/2a219279997c2124c8a639b0d009c9946ec97b40
-
-Fedora's backported it as well at https://gitlab.gnome.org/GNOME/xdg-desktop-portal-gnome/-/issues/74.
-
-From 2a219279997c2124c8a639b0d009c9946ec97b40 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Jonas=20=C3=85dahl?= <jadahl@gmail.com>
-Date: Mon, 13 Mar 2023 12:38:17 +0100
-Subject: [PATCH] portal-impl: Only return found implementation if it launched
-
-If no portal backend for a given interface is found, a fallback is
-always tried anyway, despite that fallback not being listed as
-compatible with the current desktop environment.
-
-Sometimes it's good that a fallback is returned; e.g. the
-xdg-desktop-portal-gtk file chooser backend is technically usable
-anywhere, however, some backends might be specifically designed to only
-work in a specific desktop environment, e.g. xdg-desktop-portal-gnome.
-
-In order to avoid creating portals with non-functional backends, make
-sure it's possible to create a proxy object for the interface and D-Bus
-name, and that it launched successfully (i.e. has no name owner after
-creating the proxy).
---- a/src/portal-impl.c
-+++ b/src/portal-impl.c
-@@ -29,9 +29,12 @@
- #include <glib.h>
- #include <gio/gio.h>
-
-+#include "xdp-utils.h"
-+
- static void
- portal_implementation_free (PortalImplementation *impl)
- {
-+ g_clear_pointer (&impl->dummy_proxies, g_hash_table_unref);
- g_free (impl->source);
- g_free (impl->dbus_name);
- g_strfreev (impl->interfaces);
-@@ -55,6 +58,10 @@ register_portal (const char *path, gboolean opt_verbose, GError **error)
- if (!g_key_file_load_from_file (keyfile, path, G_KEY_FILE_NONE, error))
- return FALSE;
-
-+ impl->dummy_proxies = g_hash_table_new_full (g_str_hash,
-+ g_str_equal,
-+ g_free,
-+ g_object_unref);
- impl->source = g_path_get_basename (path);
- impl->dbus_name = g_key_file_get_string (keyfile, "portal", "DBusName", error);
- if (impl->dbus_name == NULL)
-@@ -198,8 +205,44 @@ load_installed_portals (gboolean opt_verbose)
- implementations = g_list_sort (implementations, sort_impl_by_use_in_and_name);
- }
-
-+static gboolean
-+create_dummy_proxy (PortalImplementation *impl,
-+ GDBusConnection *connection,
-+ const char *interface,
-+ GError **error)
-+{
-+ g_autoptr(GDBusProxy) proxy = NULL;
-+
-+ g_debug ("Creating dummy proxy for %s on %s", interface, impl->dbus_name);
-+ proxy = g_dbus_proxy_new_sync (connection,
-+ G_DBUS_PROXY_FLAGS_NONE,
-+ NULL,
-+ impl->dbus_name,
-+ DESKTOP_PORTAL_OBJECT_PATH,
-+ interface,
-+ NULL,
-+ error);
-+ if (!proxy)
-+ return FALSE;
-+
-+ if (!g_dbus_proxy_get_name_owner (proxy))
-+ {
-+ g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+ "Proxy has no owner");
-+ return FALSE;
-+ }
-+
-+ g_debug ("Dummy proxy created");
-+
-+ g_hash_table_insert (impl->dummy_proxies,
-+ g_strdup (interface),
-+ g_steal_pointer (&proxy));
-+ return TRUE;
-+}
-+
- PortalImplementation *
--find_portal_implementation (const char *interface)
-+find_portal_implementation (GDBusConnection *connection,
-+ const char *interface)
- {
- const char *desktops_str = g_getenv ("XDG_CURRENT_DESKTOP");
- g_auto(GStrv) desktops = NULL;
-@@ -216,15 +259,23 @@ find_portal_implementation (const char *interface)
- for (l = implementations; l != NULL; l = l->next)
- {
- PortalImplementation *impl = l->data;
-+ g_autoptr(GError) error = NULL;
-
- if (!g_strv_contains ((const char **)impl->interfaces, interface))
- continue;
-
-- if (g_strv_case_contains ((const char **)impl->use_in, desktops[i]))
-+ if (!g_strv_case_contains ((const char **)impl->use_in, desktops[i]))
-+ continue;
-+
-+ if (!create_dummy_proxy (impl, connection, interface, &error))
- {
-- g_debug ("Using %s for %s in %s", impl->source, interface, desktops[i]);
-- return impl;
-+ g_debug ("Failed to create dummy proxy on %s for %s: %s",
-+ impl->dbus_name, interface, error->message);
-+ continue;
- }
-+
-+ g_debug ("Using %s for %s in %s", impl->source, interface, desktops[i]);
-+ return impl;
- }
- }
-
-@@ -232,10 +283,18 @@ find_portal_implementation (const char *interface)
- for (l = implementations; l != NULL; l = l->next)
- {
- PortalImplementation *impl = l->data;
-+ g_autoptr(GError) error = NULL;
-
- if (!g_strv_contains ((const char **)impl->interfaces, interface))
- continue;
-
-+ if (!create_dummy_proxy (impl, connection, interface, &error))
-+ {
-+ g_debug ("Failed to create dummy fallback proxy on %s for %s: %s",
-+ impl->dbus_name, interface, error->message);
-+ continue;
-+ }
-+
- g_debug ("Falling back to %s for %s", impl->source, interface);
- return impl;
- }
---- a/src/portal-impl.h
-+++ b/src/portal-impl.h
-@@ -23,6 +23,7 @@
- #define __PORTAL_IMPL_H__
-
- #include <glib.h>
-+#include <gio/gio.h>
-
- typedef struct {
- char *source;
-@@ -30,10 +31,12 @@ typedef struct {
- char **interfaces;
- char **use_in;
- int priority;
-+ GHashTable *dummy_proxies;
- } PortalImplementation;
-
- void load_installed_portals (gboolean opt_verbose);
--PortalImplementation *find_portal_implementation (const char *interface);
-+PortalImplementation *find_portal_implementation (GDBusConnection *connection,
-+ const char *interface);
- GPtrArray *find_all_portal_implementations (const char *interface);
-
- #endif /* __PORTAL_IMPL_H__ */
---- a/src/xdg-desktop-portal.c
-+++ b/src/xdg-desktop-portal.c
-@@ -237,7 +237,8 @@ on_bus_acquired (GDBusConnection *connection,
- init_document_proxy (connection);
- init_permission_store (connection);
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Lockdown");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Lockdown");
- if (implementation != NULL)
- lockdown = xdp_dbus_impl_lockdown_proxy_new_sync (connection,
- G_DBUS_PROXY_FLAGS_NONE,
-@@ -259,40 +260,48 @@ on_bus_acquired (GDBusConnection *connection,
- export_portal_implementation (connection, settings_create (connection, impls));
- g_ptr_array_free (impls, TRUE);
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.FileChooser");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.FileChooser");
- if (implementation != NULL)
- export_portal_implementation (connection,
- file_chooser_create (connection, implementation->dbus_name, lockdown));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.AppChooser");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.AppChooser");
- if (implementation != NULL)
- export_portal_implementation (connection,
- open_uri_create (connection, implementation->dbus_name, lockdown));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Print");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Print");
- if (implementation != NULL)
- export_portal_implementation (connection,
- print_create (connection, implementation->dbus_name, lockdown));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Notification");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Notification");
- if (implementation != NULL)
- export_portal_implementation (connection,
- notification_create (connection, implementation->dbus_name));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Inhibit");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Inhibit");
- if (implementation != NULL)
- export_portal_implementation (connection,
- inhibit_create (connection, implementation->dbus_name));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Access");
-- implementation2 = find_portal_implementation ("org.freedesktop.impl.portal.Screenshot");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Access");
-+ implementation2 = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Screenshot");
- if (implementation != NULL && implementation2 != NULL)
- export_portal_implementation (connection,
- screenshot_create (connection,
- implementation->dbus_name,
- implementation2->dbus_name));
-
-- implementation2 = find_portal_implementation ("org.freedesktop.impl.portal.Background");
-+ implementation2 = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Background");
- if (implementation != NULL)
- {
- export_portal_implementation (connection,
-@@ -313,47 +322,55 @@ on_bus_acquired (GDBusConnection *connection,
- implementation->dbus_name,
- implementation2->dbus_name));
-
-- implementation2 = find_portal_implementation ("org.freedesktop.impl.portal.Wallpaper");
-+ implementation2 = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Wallpaper");
- if (implementation != NULL && implementation2 != NULL)
- export_portal_implementation (connection,
- wallpaper_create (connection,
- implementation->dbus_name,
- implementation2->dbus_name));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Account");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Account");
- if (implementation != NULL)
- export_portal_implementation (connection,
- account_create (connection, implementation->dbus_name));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Email");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Email");
- if (implementation != NULL)
- export_portal_implementation (connection,
- email_create (connection, implementation->dbus_name));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.Secret");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.Secret");
- if (implementation != NULL)
- export_portal_implementation (connection,
- secret_create (connection, implementation->dbus_name));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.GlobalShortcuts");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.GlobalShortcuts");
- if (implementation != NULL)
- export_portal_implementation (connection,
- global_shortcuts_create (connection, implementation->dbus_name));
-
- #ifdef HAVE_GLIB_2_66
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.DynamicLauncher");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.DynamicLauncher");
- if (implementation != NULL)
- export_portal_implementation (connection,
- dynamic_launcher_create (connection, implementation->dbus_name));
- #endif
-
- #ifdef HAVE_PIPEWIRE
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.ScreenCast");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.ScreenCast");
- if (implementation != NULL)
- export_portal_implementation (connection,
- screen_cast_create (connection, implementation->dbus_name));
-
-- implementation = find_portal_implementation ("org.freedesktop.impl.portal.RemoteDesktop");
-+ implementation = find_portal_implementation (connection,
-+ "org.freedesktop.impl.portal.RemoteDesktop");
- if (implementation != NULL)
- export_portal_implementation (connection,
- remote_desktop_create (connection, implementation->dbus_name));
-
diff --git a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.16.0-r1.ebuild b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.16.0-r1.ebuild
deleted file mode 100644
index a339198301e6..000000000000
--- a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.16.0-r1.ebuild
+++ /dev/null
@@ -1,68 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-inherit autotools systemd
-
-DESCRIPTION="Desktop integration portal"
-HOMEPAGE="https://flatpak.org/ https://github.com/flatpak/xdg-desktop-portal"
-SRC_URI="https://github.com/flatpak/${PN}/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="amd64 ~arm arm64 ~loong ~ppc ~ppc64 ~riscv x86"
-IUSE="geolocation screencast systemd"
-
-DEPEND="
- >=dev-libs/glib-2.66:2
- dev-libs/json-glib
- >=sys-fs/fuse-3.10.0:3[suid]
- x11-libs/gdk-pixbuf
- geolocation? ( >=app-misc/geoclue-2.5.3:2.0 )
- screencast? ( >=media-video/pipewire-0.3:= )
- systemd? ( sys-apps/systemd )
-"
-RDEPEND="${DEPEND}
- sys-apps/dbus
-"
-BDEPEND="
- dev-util/gdbus-codegen
- sys-devel/gettext
- virtual/pkgconfig
-"
-
-PATCHES=(
- "${FILESDIR}"/${P}-delay-open-fix.patch
-)
-
-src_prepare() {
- default
- eautoreconf
-}
-
-src_configure() {
- local myeconfargs=(
- --disable-docbook-docs # requires flatpak
- --disable-libportal # not packaged
- --with-systemduserunitdir="$(systemd_get_userunitdir)"
- $(use_enable geolocation geoclue)
- $(use_enable screencast pipewire)
- $(use_with systemd)
- )
- econf "${myeconfargs[@]}"
-}
-
-pkg_postinst() {
- if ! has_version gui-libs/xdg-desktop-portal-lxqt && ! has_version gui-libs/xdg-desktop-portal-wlr && \
- ! has_version kde-plasma/xdg-desktop-portal-kde && ! has_version sys-apps/xdg-desktop-portal-gnome && \
- ! has_version sys-apps/xdg-desktop-portal-gtk; then
- elog "${PN} is not usable without any of the following XDP"
- elog "implementations installed:"
- elog " gui-libs/xdg-desktop-portal-lxqt"
- elog " gui-libs/xdg-desktop-portal-wlr"
- elog " kde-plasma/xdg-desktop-portal-kde"
- elog " sys-apps/xdg-desktop-portal-gnome"
- elog " sys-apps/xdg-desktop-portal-gtk"
- fi
-}
diff --git a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0-r2.ebuild b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0-r2.ebuild
deleted file mode 100644
index 959007f5e9ff..000000000000
--- a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.0-r2.ebuild
+++ /dev/null
@@ -1,121 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit meson python-any-r1 systemd
-
-DESCRIPTION="Desktop integration portal"
-HOMEPAGE="https://flatpak.org/ https://github.com/flatpak/xdg-desktop-portal"
-SRC_URI="https://github.com/flatpak/${PN}/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
-IUSE="geolocation flatpak seccomp systemd test"
-RESTRICT="!test? ( test )"
-# Upstream expect flatpak to be used w/ seccomp and flatpak needs bwrap anyway
-REQUIRED_USE="flatpak? ( seccomp )"
-
-DEPEND="
- >=dev-libs/glib-2.66:2
- dev-libs/json-glib
- >=media-video/pipewire-0.3:=
- >=sys-fs/fuse-3.10.0:3[suid]
- x11-libs/gdk-pixbuf
- geolocation? ( >=app-misc/geoclue-2.5.3:2.0 )
- flatpak? ( sys-apps/flatpak )
- seccomp? ( sys-apps/bubblewrap )
- systemd? ( sys-apps/systemd )
-"
-RDEPEND="
- ${DEPEND}
- sys-apps/dbus
-"
-BDEPEND="
- dev-util/gdbus-codegen
- dev-python/docutils
- sys-devel/gettext
- virtual/pkgconfig
- test? (
- ${PYTHON_DEPS}
- dev-libs/libportal
- $(python_gen_any_dep '
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
- dev-python/python-dbusmock[${PYTHON_USEDEP}]
- ')
- )
-"
-
-PATCHES=(
- # These tests require connections to pipewire, internet, /dev/fuse
- "${FILESDIR}/${P}-sandbox-disable-failing-tests.patch"
-
- # https://github.com/flatpak/xdg-desktop-portal/pull/1100
- "${FILESDIR}/0001-meson.build-allow-linux-to-build-without-flatpak-ins.patch"
- "${FILESDIR}/0002-meson.build-allow-linux-to-build-without-bubblewrap.patch"
- "${FILESDIR}/0003-Make-flatpak-bwrap-optional.patch"
-)
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-python_check_deps() {
- python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
- python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]" &&
- python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
- local emesonargs=(
- -Ddbus-service-dir="${EPREFIX}/usr/share/dbus-1/services"
- -Dsystemd-user-unit-dir="$(systemd_get_userunitdir)"
- $(meson_feature flatpak)
- # Only used for tests
- $(meson_feature test libportal)
- $(meson_feature geolocation geoclue)
- $(meson_feature seccomp bwrap)
- $(meson_feature systemd)
- # Requires flatpak
- -Ddocbook-docs=disabled
- # -Dxmlto-flags=
- -Ddatarootdir="${EPREFIX}/usr/share"
- -Dman-pages=enabled
- -Dinstalled-tests=false
- $(meson_feature test pytest)
- )
-
- meson_src_configure
-}
-
-src_install() {
- meson_src_install
-
- # Install a default to avoid breakage: >=1.18.0 assumes that DEs/WMs
- # will install their own, but we want some fallback in case they don't
- # (so will probably keep this forever). DEs need time to catch up even
- # if they will eventually provide one anyway. See bug #915356.
- #
- # TODO: Add some docs on wiki for users to add their own preference
- # for minimalist WMs etc.
- insinto /usr/share/xdg-desktop-portal
- newins "${FILESDIR}"/default-portals.conf portals.conf
-}
-
-pkg_postinst() {
- if ! has_version gui-libs/xdg-desktop-portal-lxqt && ! has_version gui-libs/xdg-desktop-portal-wlr && \
- ! has_version kde-plasma/xdg-desktop-portal-kde && ! has_version sys-apps/xdg-desktop-portal-gnome && \
- ! has_version sys-apps/xdg-desktop-portal-gtk; then
- elog "${PN} is not usable without any of the following XDP"
- elog "implementations installed:"
- elog " gui-libs/xdg-desktop-portal-lxqt"
- elog " gui-libs/xdg-desktop-portal-wlr"
- elog " kde-plasma/xdg-desktop-portal-kde"
- elog " sys-apps/xdg-desktop-portal-gnome"
- elog " sys-apps/xdg-desktop-portal-gtk"
- fi
-}
diff --git a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.1.ebuild b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.1.ebuild
deleted file mode 100644
index 096cde882a78..000000000000
--- a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.1.ebuild
+++ /dev/null
@@ -1,116 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..12} )
-
-inherit meson python-any-r1 systemd
-
-DESCRIPTION="Desktop integration portal"
-HOMEPAGE="https://flatpak.org/ https://github.com/flatpak/xdg-desktop-portal"
-SRC_URI="https://github.com/flatpak/${PN}/releases/download/${PV}/${P}.tar.xz"
-
-LICENSE="LGPL-2.1"
-SLOT="0"
-KEYWORDS="~amd64 ~arm ~arm64 ~loong ~ppc ~ppc64 ~riscv ~x86"
-IUSE="geolocation flatpak seccomp systemd test"
-RESTRICT="!test? ( test )"
-# Upstream expect flatpak to be used w/ seccomp and flatpak needs bwrap anyway
-REQUIRED_USE="flatpak? ( seccomp )"
-
-DEPEND="
- >=dev-libs/glib-2.66:2
- dev-libs/json-glib
- >=media-video/pipewire-0.3:=
- >=sys-fs/fuse-3.10.0:3[suid]
- x11-libs/gdk-pixbuf
- geolocation? ( >=app-misc/geoclue-2.5.3:2.0 )
- flatpak? ( sys-apps/flatpak )
- seccomp? ( sys-apps/bubblewrap )
- systemd? ( sys-apps/systemd )
-"
-RDEPEND="
- ${DEPEND}
- sys-apps/dbus
-"
-BDEPEND="
- dev-util/gdbus-codegen
- dev-python/docutils
- sys-devel/gettext
- virtual/pkgconfig
- test? (
- ${PYTHON_DEPS}
- dev-libs/libportal
- $(python_gen_any_dep '
- dev-python/pytest[${PYTHON_USEDEP}]
- dev-python/pytest-xdist[${PYTHON_USEDEP}]
- dev-python/python-dbusmock[${PYTHON_USEDEP}]
- ')
- )
-"
-
-PATCHES=(
- # These tests require connections to pipewire, internet, /dev/fuse
- "${FILESDIR}/${PN}-1.18.0-sandbox-disable-failing-tests.patch"
-)
-
-pkg_setup() {
- use test && python-any-r1_pkg_setup
-}
-
-python_check_deps() {
- python_has_version "dev-python/pytest[${PYTHON_USEDEP}]" &&
- python_has_version "dev-python/pytest-xdist[${PYTHON_USEDEP}]" &&
- python_has_version "dev-python/python-dbusmock[${PYTHON_USEDEP}]"
-}
-
-src_configure() {
- local emesonargs=(
- -Ddbus-service-dir="${EPREFIX}/usr/share/dbus-1/services"
- -Dsystemd-user-unit-dir="$(systemd_get_userunitdir)"
- $(meson_feature flatpak flatpak-interfaces)
- # Only used for tests
- $(meson_feature test libportal)
- $(meson_feature geolocation geoclue)
- $(meson_use seccomp sandboxed-image-validation)
- $(meson_feature systemd)
- # Requires flatpak
- -Ddocbook-docs=disabled
- # -Dxmlto-flags=
- -Ddatarootdir="${EPREFIX}/usr/share"
- -Dman-pages=enabled
- -Dinstalled-tests=false
- $(meson_feature test pytest)
- )
-
- meson_src_configure
-}
-
-src_install() {
- meson_src_install
-
- # Install a default to avoid breakage: >=1.18.0 assumes that DEs/WMs
- # will install their own, but we want some fallback in case they don't
- # (so will probably keep this forever). DEs need time to catch up even
- # if they will eventually provide one anyway. See bug #915356.
- #
- # TODO: Add some docs on wiki for users to add their own preference
- # for minimalist WMs etc.
- insinto /usr/share/xdg-desktop-portal
- newins "${FILESDIR}"/default-portals.conf portals.conf
-}
-
-pkg_postinst() {
- if ! has_version gui-libs/xdg-desktop-portal-lxqt && ! has_version gui-libs/xdg-desktop-portal-wlr && \
- ! has_version kde-plasma/xdg-desktop-portal-kde && ! has_version sys-apps/xdg-desktop-portal-gnome && \
- ! has_version sys-apps/xdg-desktop-portal-gtk; then
- elog "${PN} is not usable without any of the following XDP"
- elog "implementations installed:"
- elog " gui-libs/xdg-desktop-portal-lxqt"
- elog " gui-libs/xdg-desktop-portal-wlr"
- elog " kde-plasma/xdg-desktop-portal-kde"
- elog " sys-apps/xdg-desktop-portal-gnome"
- elog " sys-apps/xdg-desktop-portal-gtk"
- fi
-}
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [gentoo-commits] repo/gentoo:master commit in: sys-apps/xdg-desktop-portal/files/, sys-apps/xdg-desktop-portal/
@ 2025-04-01 21:30 Andreas Sturmlechner
0 siblings, 0 replies; 3+ messages in thread
From: Andreas Sturmlechner @ 2025-04-01 21:30 UTC (permalink / raw
To: gentoo-commits
commit: 91bc7256864417974a9b11f9551596530690298a
Author: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
AuthorDate: Tue Apr 1 21:28:37 2025 +0000
Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
CommitDate: Tue Apr 1 21:30:13 2025 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=91bc7256
sys-apps/xdg-desktop-portal: Fix build w/ media-video/pipewire-1.4.1
Closes: https://bugs.gentoo.org/952125
Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
.../xdg-desktop-portal-1.18.4-pipewire-1.4.patch | 29 ++++++++++++++++++++++
.../xdg-desktop-portal-1.18.4-r2.ebuild | 1 +
2 files changed, 30 insertions(+)
diff --git a/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.18.4-pipewire-1.4.patch b/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.18.4-pipewire-1.4.patch
new file mode 100644
index 000000000000..d8cced4a291c
--- /dev/null
+++ b/sys-apps/xdg-desktop-portal/files/xdg-desktop-portal-1.18.4-pipewire-1.4.patch
@@ -0,0 +1,29 @@
+From da7b73b0b0174e9a6dcf706ae64218e822e2c685 Mon Sep 17 00:00:00 2001
+From: Antonio Larrosa <antonio.larrosa@gmail.com>
+Date: Wed, 12 Feb 2025 10:26:08 +0100
+Subject: [PATCH] Fix build with pipewire 1.3.82
+
+While submitting pipewire 1.3.82 to openSUSE Tumbleweed I noticed this
+is needed to build xdg-desktop-portal. This was already submitted
+as an issue in #1611 in Debian, in which the reporter doesn't mention the
+used pipewire version but says "I am also building my own pipewire"
+so I guess it's one of the latest RCs (1.3.81 or 1.3.82).
+
+Fixes: #1611
+---
+ src/pipewire.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/pipewire.c b/src/pipewire.c
+index bc4ec5047..39b05c71c 100644
+--- a/src/pipewire.c
++++ b/src/pipewire.c
+@@ -331,7 +331,7 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
+ remote->registry = (struct pw_proxy*) pw_core_get_registry (remote->core,
+ PW_VERSION_REGISTRY,
+ 0);
+- pw_registry_add_listener (remote->registry,
++ pw_registry_add_listener ((struct pw_registry*)remote->registry,
+ &remote->registry_listener,
+ ®istry_events,
+ remote);
diff --git a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.4-r2.ebuild b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.4-r2.ebuild
index d0bdd56fd06c..7f8a4eb71334 100644
--- a/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.4-r2.ebuild
+++ b/sys-apps/xdg-desktop-portal/xdg-desktop-portal-1.18.4-r2.ebuild
@@ -53,6 +53,7 @@ BDEPEND="
PATCHES=(
# These tests require connections to pipewire, internet, /dev/fuse
"${FILESDIR}/${PN}-1.18.0-sandbox-disable-failing-tests.patch"
+ "${FILESDIR}/${P}-pipewire-1.4.patch" # bug 952125; in 1.20
)
pkg_setup() {
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-04-01 21:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-06 18:26 [gentoo-commits] repo/gentoo:master commit in: sys-apps/xdg-desktop-portal/files/, sys-apps/xdg-desktop-portal/ Andreas Sturmlechner
-- strict thread matches above, loose matches on Subject: below --
2025-04-01 21:30 Andreas Sturmlechner
2023-05-06 9:40 Sam James
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox