Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] xdg-desktop-portal: update to 1.8.0
@ 2020-09-22 22:54 concatime
  2020-09-22 23:00 ` q66
                   ` (29 more replies)
  0 siblings, 30 replies; 31+ messages in thread
From: concatime @ 2020-09-22 22:54 UTC (permalink / raw)
  To: ml

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

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

https://github.com/concatime/void-packages xdg-desktop-portal
https://github.com/void-linux/void-packages/pull/25040

xdg-desktop-portal: update to 1.8.0


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-desktop-portal-25040.patch --]
[-- Type: text/x-diff, Size: 22275 bytes --]

From c129ec190be64d9e78b1102687a917ff9eeb97f4 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Tue, 22 Sep 2020 18:36:38 -0400
Subject: [PATCH] xdg-desktop-portal: update to 1.8.0

---
 .../patches/pipewire-0.3.patch                | 551 ------------------
 srcpkgs/xdg-desktop-portal/template           |   8 +-
 2 files changed, 4 insertions(+), 555 deletions(-)
 delete mode 100644 srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch

diff --git a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch b/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
deleted file mode 100644
index 94ebe083598..00000000000
--- a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From a38901e5e7f835efe7b7a06c55790c8c20bc91a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Tue, 14 Jan 2020 09:37:09 +0100
-Subject: [PATCH] PipeWire: update to 0.3 API
-
----
- configure.ac      |   2 +-
- src/camera.c      |  24 ++++----
- src/pipewire.c    | 141 +++++++++++++---------------------------------
- src/pipewire.h    |  10 ++--
- src/screen-cast.c |  98 ++++++--------------------------
- 5 files changed, 72 insertions(+), 203 deletions(-)
-
-diff --git configure.ac configure.ac
-index 89902fa..62d7960 100644
---- configure.ac
-+++ configure.ac
-@@ -97,7 +97,7 @@ AC_ARG_ENABLE(pipewire,
- 	      [AS_HELP_STRING([--enable-pipewire],[Enable PipeWire support. Needed for screen cast portal])],
- 	      enable_pipewire=$enableval, enable_pipewire=yes)
- if test x$enable_pipewire = xyes ; then
--	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.2 >= 0.2.6])
-+	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.3 >= 0.2.90])
- 	AC_DEFINE([HAVE_PIPEWIRE],[1], [Define to enable PipeWire support])
- fi
- AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"])
-diff --git src/camera.c src/camera.c
-index c2b392c..20fe3aa 100644
---- src/camera.c
-+++ src/camera.c
-@@ -141,7 +141,7 @@ open_pipewire_camera_remote (const char *app_id,
-                              GError **error)
- {
-   PipeWireRemote *remote;
--  struct spa_dict_item permission_items[1];
-+  struct pw_permission permission_items[2];
-   struct pw_properties *pipewire_properties;
- 
-   pipewire_properties =
-@@ -158,12 +158,12 @@ open_pipewire_camera_remote (const char *app_id,
-    * Hide all existing and future nodes by default. PipeWire will use the
-    * permission store to set up permissions.
-    */
--  permission_items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
--  permission_items[0].value = "---";
-+  permission_items[0] = PW_PERMISSION_INIT (PW_ID_CORE, PW_PERM_RWX);
-+  permission_items[1] = PW_PERMISSION_INIT (PW_ID_ANY, 0);
- 
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             &SPA_DICT_INIT (permission_items,
--                                             G_N_ELEMENTS (permission_items)));
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                G_N_ELEMENTS (permission_items),
-+                                permission_items);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -219,7 +219,7 @@ handle_open_pipewire_remote (XdpCamera *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
-@@ -250,29 +250,28 @@ camera_iface_init (XdpCameraIface *iface)
- static void
- global_added_cb (PipeWireRemote *remote,
-                  uint32_t id,
--                 uint32_t type,
-+                 const char *type,
-                  const struct spa_dict *props,
-                  gpointer user_data)
- {
-   Camera *camera = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *media_class;
-   const struct spa_dict_item *media_role;
- 
--  if (type != core_type->node)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Node) != 0)
-     return;
- 
-   if (!props)
-     return;
- 
--  media_class = spa_dict_lookup_item (props, "media.class");
-+  media_class = spa_dict_lookup_item (props, PW_KEY_MEDIA_CLASS);
-   if (!media_class)
-     return;
- 
-   if (g_strcmp0 (media_class->value, "Video/Source") != 0)
-     return;
- 
--  media_role = spa_dict_lookup_item (props, "media.role");
-+  media_role = spa_dict_lookup_item (props, PW_KEY_MEDIA_ROLE);
-   if (!media_role)
-     return;
- 
-@@ -342,6 +341,7 @@ create_pipewire_remote (Camera *camera,
-     }
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.is_portal", "true",
-+                                           "portal.monitor", "Camera",
-                                            NULL);
-   camera->pipewire_remote = pipewire_remote_new_sync (pipewire_properties,
-                                                       global_added_cb,
-diff --git src/pipewire.c src/pipewire.c
-index 793a378..162cd55 100644
---- src/pipewire.c
-+++ src/pipewire.c
-@@ -21,6 +21,7 @@
- #include <errno.h>
- #include <glib.h>
- #include <pipewire/pipewire.h>
-+#include <spa/utils/result.h>
- 
- #include "pipewire.h"
- 
-@@ -36,27 +37,25 @@ static gboolean is_pipewire_initialized = FALSE;
- static void
- registry_event_global (void *user_data,
-                        uint32_t id,
--                       uint32_t parent_id,
-                        uint32_t permissions,
--                       uint32_t type,
-+                       const char *type,
-                        uint32_t version,
-                        const struct spa_dict *props)
- {
-   PipeWireRemote *remote = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *factory_object_type;
-   PipeWireGlobal *global;
- 
-   global = g_new0 (PipeWireGlobal, 1);
-   *global = (PipeWireGlobal) {
--    .parent_id = parent_id,
-+    .parent_id = id,
-   };
- 
-   g_hash_table_insert (remote->globals, GINT_TO_POINTER (id), global);
-   if (remote->global_added_cb)
-     remote->global_added_cb (remote, id, type, props, remote->user_data);
- 
--  if (type != core_type->factory)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Factory) != 0)
-     return;
- 
-   factory_object_type = spa_dict_lookup_item (props, "factory.type.name");
-@@ -81,8 +80,8 @@ registry_event_global_remove (void *user_data,
-   g_hash_table_remove (remote->globals, GINT_TO_POINTER (id));
- }
- 
--static const struct pw_registry_proxy_events registry_events = {
--  PW_VERSION_REGISTRY_PROXY_EVENTS,
-+static const struct pw_registry_events registry_events = {
-+  PW_VERSION_REGISTRY_EVENTS,
-   .global = registry_event_global,
-   .global_remove = registry_event_global_remove,
- };
-@@ -90,7 +89,7 @@ static const struct pw_registry_proxy_events registry_events = {
- void
- pipewire_remote_roundtrip (PipeWireRemote *remote)
- {
--  pw_core_proxy_sync (remote->core_proxy, ++remote->sync_seq);
-+  remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq);
-   pw_main_loop_run (remote->loop);
- }
- 
-@@ -98,16 +97,13 @@ static gboolean
- discover_node_factory_sync (PipeWireRemote *remote,
-                             GError **error)
- {
--  struct pw_type *core_type = pw_core_get_type (remote->core);
--  struct pw_registry_proxy *registry_proxy;
-+  struct pw_registry *registry;
- 
--  registry_proxy = pw_core_proxy_get_registry (remote->core_proxy,
--                                               core_type->registry,
--                                               PW_VERSION_REGISTRY, 0);
--  pw_registry_proxy_add_listener (registry_proxy,
--                                  &remote->registry_listener,
--                                  &registry_events,
--                                  remote);
-+  registry = pw_core_get_registry (remote->core, PW_VERSION_REGISTRY, 0);
-+  pw_registry_add_listener (registry,
-+                            &remote->registry_listener,
-+                            &registry_events,
-+                            remote);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -122,59 +118,35 @@ discover_node_factory_sync (PipeWireRemote *remote,
- }
- 
- static void
--on_state_changed (void *user_data,
--                  enum pw_remote_state old,
--                  enum pw_remote_state state,
--                  const char *error)
-+core_event_error (void       *user_data,
-+                  uint32_t    id,
-+		  int         seq,
-+		  int         res,
-+		  const char *message)
- {
-   PipeWireRemote *remote = user_data;
- 
--  switch (state)
-+  if (id == PW_ID_CORE)
-     {
--    case PW_REMOTE_STATE_ERROR:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "%s", error);
--        }
-+      g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                 "%s", message);
-       pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_UNCONNECTED:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "Disconnected");
--        }
--      pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_CONNECTING:
--      break;
--    case PW_REMOTE_STATE_CONNECTED:
--      pw_main_loop_quit (remote->loop);
--      break;
--    default:
--      g_warning ("Unknown PipeWire state");
--      break;
-     }
- }
- 
--static const struct pw_remote_events remote_events = {
--  PW_VERSION_REMOTE_EVENTS,
--  .state_changed = on_state_changed,
--};
--
- static void
- core_event_done (void *user_data,
--                 uint32_t seq)
-+                 uint32_t id, int seq)
- {
-   PipeWireRemote *remote = user_data;
- 
--  if (remote->sync_seq == seq)
-+  if (id == PW_ID_CORE && remote->sync_seq == seq)
-     pw_main_loop_quit (remote->loop);
- }
- 
--static const struct pw_core_proxy_events core_events = {
--  PW_VERSION_CORE_PROXY_EVENTS,
-+static const struct pw_core_events core_events = {
-+  PW_VERSION_CORE_EVENTS,
-+  .error = core_event_error,
-   .done = core_event_done,
- };
- 
-@@ -237,8 +209,8 @@ void
- pipewire_remote_destroy (PipeWireRemote *remote)
- {
-   g_clear_pointer (&remote->globals, g_hash_table_destroy);
--  g_clear_pointer (&remote->remote, pw_remote_destroy);
--  g_clear_pointer (&remote->core, pw_core_destroy);
-+  g_clear_pointer (&remote->core, pw_core_disconnect);
-+  g_clear_pointer (&remote->context, pw_context_destroy);
-   g_clear_pointer (&remote->loop, pw_main_loop_destroy);
-   g_clear_error (&remote->error);
- 
-@@ -307,68 +279,31 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
-       return NULL;
-     }
- 
--  remote->core = pw_core_new (pw_main_loop_get_loop (remote->loop), NULL);
--  if (!remote->core)
-+  remote->context = pw_context_new (pw_main_loop_get_loop (remote->loop), NULL, 0);
-+  if (!remote->context)
-     {
-       pipewire_remote_destroy (remote);
-       pw_properties_free (pipewire_properties);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire core");
-+                   "Couldn't create PipeWire context");
-       return NULL;
-     }
- 
--  remote->remote = pw_remote_new (remote->core, pipewire_properties, 0);
--  if (!remote->remote)
-+  remote->core = pw_context_connect (remote->context, pipewire_properties, 0);
-+  if (!remote->core)
-     {
-       pipewire_remote_destroy (remote);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire remote");
-+                   "Couldn't connect to PipeWire");
-       return NULL;
-     }
- 
-   remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free);
- 
--  pw_remote_add_listener (remote->remote,
--                          &remote->remote_listener,
--                          &remote_events,
--                          remote);
--
--  if (pw_remote_connect (remote->remote) != 0)
--    {
--      pipewire_remote_destroy (remote);
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't connect PipeWire remote");
--      return NULL;
--    }
--
--  pw_main_loop_run (remote->loop);
--
--  switch (pw_remote_get_state (remote->remote, NULL))
--    {
--    case PW_REMOTE_STATE_ERROR:
--    case PW_REMOTE_STATE_UNCONNECTED:
--      *error = g_steal_pointer (&remote->error);
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTING:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "PipeWire loop stopped unexpectedly");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTED:
--      break;
--    default:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Unexpected PipeWire state");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    }
--
--  remote->core_proxy = pw_remote_get_core_proxy (remote->remote);
--  pw_core_proxy_add_listener (remote->core_proxy,
--                              &remote->core_listener,
--                              &core_events,
--                              remote);
-+  pw_core_add_listener (remote->core,
-+                        &remote->core_listener,
-+                        &core_events,
-+                        remote);
- 
-   if (!discover_node_factory_sync (remote, error))
-     {
-diff --git src/pipewire.h src/pipewire.h
-index 0f1bf54..bf48d5e 100644
---- src/pipewire.h
-+++ src/pipewire.h
-@@ -32,7 +32,7 @@ typedef struct _PipeWireGlobal
- 
- typedef void (* PipeWireGlobalAddedCallback) (PipeWireRemote *remote,
-                                               uint32_t id,
--                                              uint32_t type,
-+                                              const char *type,
-                                               const struct spa_dict *props,
-                                               gpointer user_data);
- 
-@@ -43,13 +43,11 @@ typedef void (* PipeWireGlobalRemovedCallback) (PipeWireRemote *remote,
- struct _PipeWireRemote
- {
-   struct pw_main_loop *loop;
-+  struct pw_context *context;
-   struct pw_core *core;
--  struct pw_remote *remote;
--  struct spa_hook remote_listener;
--
--  struct pw_core_proxy *core_proxy;
-   struct spa_hook core_listener;
--  uint32_t sync_seq;
-+
-+  int sync_seq;
- 
-   struct spa_hook registry_listener;
- 
-diff --git src/screen-cast.c src/screen-cast.c
-index 7881ddc..1677050 100644
---- src/screen-cast.c
-+++ src/screen-cast.c
-@@ -31,10 +31,10 @@
- #include "xdp-impl-dbus.h"
- #include "xdp-utils.h"
- 
--#define PERMISSION_ITEM(item_key, item_value) \
--  ((struct spa_dict_item) { \
--    .key = item_key, \
--    .value = item_value \
-+#define PERMISSION_ITEM(item_id, item_permissions) \
-+  ((struct pw_permission) { \
-+    .id = item_id, \
-+    .permissions = item_permissions \
-   })
- 
- typedef struct _ScreenCast ScreenCast;
-@@ -517,42 +517,9 @@ screen_cast_stream_get_pipewire_node_id (ScreenCastStream *stream)
-   return stream->id;
- }
- 
--static void
--append_parent_permissions (PipeWireRemote *remote,
--                           GArray *permission_items,
--                           GList **string_stash,
--                           PipeWireGlobal *global,
--                           const char *permission)
--{
--  PipeWireGlobal *parent;
--  char *parent_permission_value;
--
--  if (global->parent_id == 0)
--    return;
--
--  parent = g_hash_table_lookup (remote->globals, GINT_TO_POINTER (global->parent_id));
--
--  if (parent->permission_set)
--    return;
--  parent->permission_set = TRUE;
--
--  append_parent_permissions (remote, permission_items, string_stash,
--                             parent, permission);
--
--  parent_permission_value = g_strdup_printf ("%u:%s",
--                                             global->parent_id,
--                                             permission);
--  *string_stash = g_list_prepend (*string_stash, parent_permission_value);
--
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       parent_permission_value));
--}
--
- static void
- append_stream_permissions (PipeWireRemote *remote,
-                            GArray *permission_items,
--                           GList **string_stash,
-                            GList *streams)
- {
-   GList *l;
-@@ -561,21 +528,10 @@ append_stream_permissions (PipeWireRemote *remote,
-     {
-       ScreenCastStream *stream = l->data;
-       uint32_t stream_id;
--      PipeWireGlobal *stream_global;
--      char *stream_permission_value;
- 
-       stream_id = screen_cast_stream_get_pipewire_node_id (stream);
--      stream_global = g_hash_table_lookup (remote->globals,
--                                           GINT_TO_POINTER (stream_id));
--
--      append_parent_permissions (remote, permission_items, string_stash,
--                                 stream_global, "r--");
--
--      stream_permission_value = g_strdup_printf ("%u:rwx", stream_id);
--      *string_stash = g_list_prepend (*string_stash, stream_permission_value);
-       g_array_append_val (permission_items,
--                          PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                           stream_permission_value));
-+                          PERMISSION_ITEM (stream_id, PW_PERM_RWX));
-     }
- }
- 
-@@ -587,9 +543,6 @@ open_pipewire_screen_cast_remote (const char *app_id,
-   struct pw_properties *pipewire_properties;
-   PipeWireRemote *remote;
-   g_autoptr(GArray) permission_items = NULL;
--  char *node_factory_permission_string;
--  GList *string_stash = NULL;
--  struct spa_dict *permission_dict;
-   PipeWireGlobal *node_global;
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.app_id", app_id,
-@@ -603,48 +556,31 @@ open_pipewire_screen_cast_remote (const char *app_id,
- 
-   permission_items = g_array_new (FALSE, TRUE, sizeof (struct spa_dict_item));
- 
--  /*
--   * Hide all existing and future nodes (except the ones we explicitly list below.
--   */
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_EXISTING,
--                                       "---"));
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_DEFAULT,
--                                       "---"));
--
-   /*
-    * PipeWire:Interface:Core
-    * Needs rwx to be able create the sink node using the create-object method
-    */
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       "0:rwx"));
-+                      PERMISSION_ITEM (PW_ID_CORE, PW_PERM_RWX));
- 
-   /*
-    * PipeWire:Interface:NodeFactory
-    * Needs r-- so it can be passed to create-object when creating the sink node.
-    */
--  node_factory_permission_string = g_strdup_printf ("%d:r--",
--                                                    remote->node_factory_id);
--  string_stash = g_list_prepend (string_stash, node_factory_permission_string);
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       node_factory_permission_string));
--  node_global = g_hash_table_lookup (remote->globals,
--                                     GINT_TO_POINTER (remote->node_factory_id));
--  append_parent_permissions (remote, permission_items, &string_stash,
--                             node_global, "r--");
-+                      PERMISSION_ITEM (remote->node_factory_id, PW_PERM_R));
- 
--  append_stream_permissions (remote, permission_items, &string_stash, streams);
-+  append_stream_permissions (remote, permission_items, streams);
- 
--  permission_dict =
--    &SPA_DICT_INIT ((struct spa_dict_item *) permission_items->data,
--                    permission_items->len);
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             permission_dict);
-+  /*
-+   * Hide all existing and future nodes (except the ones we explicitly list above).
-+   */
-+  g_array_append_val (permission_items,
-+                      PERMISSION_ITEM (PW_ID_ANY, 0));
- 
--  g_list_free_full (string_stash, g_free);
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                permission_items->len,
-+                                (const struct pw_permission *)permission_items->data);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -943,7 +879,7 @@ handle_open_pipewire_remote (XdpScreenCast *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 1136b6a6e0e..a25c486aad3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -1,7 +1,7 @@
 # Template file for 'xdg-desktop-portal'
 pkgname=xdg-desktop-portal
-version=1.6.0
-revision=2
+version=1.8.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
 hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
@@ -11,12 +11,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
-checksum=883c9c9a925e48af54812b5347f546dd776ec2e27076a83d5a8126af6bafb9da
+checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
 pre_configure() {
 	autoreconf -vfi
 }
 
 post_install() {
-	rm -rf "${DESTDIR}/usr/lib/systemd"
+	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
@ 2020-09-22 23:00 ` q66
  2020-09-23 20:31 ` concatime
                   ` (28 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: q66 @ 2020-09-22 23:00 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-697026062

Comment:
should be able to enable libportal now

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
  2020-09-22 23:00 ` q66
@ 2020-09-23 20:31 ` concatime
  2020-09-23 20:43 ` Duncaen
                   ` (27 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-23 20:31 UTC (permalink / raw)
  To: ml

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

New comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-697956587

Comment:
@Duncaen, are you okay with this patch?
I enabled libportal as @q66 told me, and removed `pre_configure` hook.

```diff
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad..11908fbdd3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }
```

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
  2020-09-22 23:00 ` q66
  2020-09-23 20:31 ` concatime
@ 2020-09-23 20:43 ` Duncaen
  2020-09-23 20:44 ` [PR REVIEW] " Duncaen
                   ` (26 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2020-09-23 20:43 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-697962379

Comment:
I just happen to package it initially, I don't use or care about it in any way. Its an OK from me.

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

* Re: [PR REVIEW] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (2 preceding siblings ...)
  2020-09-23 20:43 ` Duncaen
@ 2020-09-23 20:44 ` Duncaen
  2020-09-23 20:45 ` [PR PATCH] [Updated] " concatime
                   ` (25 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2020-09-23 20:44 UTC (permalink / raw)
  To: ml

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

New review comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#discussion_r493883933

Comment:
Is there a reason to change that?

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

* Re: [PR PATCH] [Updated] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (3 preceding siblings ...)
  2020-09-23 20:44 ` [PR REVIEW] " Duncaen
@ 2020-09-23 20:45 ` concatime
  2020-09-23 20:47 ` [PR REVIEW] " concatime
                   ` (24 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-23 20:45 UTC (permalink / raw)
  To: ml

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

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

https://github.com/concatime/void-packages xdg-desktop-portal
https://github.com/void-linux/void-packages/pull/25040

xdg-desktop-portal: update to 1.8.0


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-desktop-portal-25040.patch --]
[-- Type: text/x-diff, Size: 23809 bytes --]

From c129ec190be64d9e78b1102687a917ff9eeb97f4 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Tue, 22 Sep 2020 18:36:38 -0400
Subject: [PATCH 1/2] xdg-desktop-portal: update to 1.8.0

---
 .../patches/pipewire-0.3.patch                | 551 ------------------
 srcpkgs/xdg-desktop-portal/template           |   8 +-
 2 files changed, 4 insertions(+), 555 deletions(-)
 delete mode 100644 srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch

diff --git a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch b/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
deleted file mode 100644
index 94ebe083598..00000000000
--- a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From a38901e5e7f835efe7b7a06c55790c8c20bc91a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Tue, 14 Jan 2020 09:37:09 +0100
-Subject: [PATCH] PipeWire: update to 0.3 API
-
----
- configure.ac      |   2 +-
- src/camera.c      |  24 ++++----
- src/pipewire.c    | 141 +++++++++++++---------------------------------
- src/pipewire.h    |  10 ++--
- src/screen-cast.c |  98 ++++++--------------------------
- 5 files changed, 72 insertions(+), 203 deletions(-)
-
-diff --git configure.ac configure.ac
-index 89902fa..62d7960 100644
---- configure.ac
-+++ configure.ac
-@@ -97,7 +97,7 @@ AC_ARG_ENABLE(pipewire,
- 	      [AS_HELP_STRING([--enable-pipewire],[Enable PipeWire support. Needed for screen cast portal])],
- 	      enable_pipewire=$enableval, enable_pipewire=yes)
- if test x$enable_pipewire = xyes ; then
--	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.2 >= 0.2.6])
-+	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.3 >= 0.2.90])
- 	AC_DEFINE([HAVE_PIPEWIRE],[1], [Define to enable PipeWire support])
- fi
- AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"])
-diff --git src/camera.c src/camera.c
-index c2b392c..20fe3aa 100644
---- src/camera.c
-+++ src/camera.c
-@@ -141,7 +141,7 @@ open_pipewire_camera_remote (const char *app_id,
-                              GError **error)
- {
-   PipeWireRemote *remote;
--  struct spa_dict_item permission_items[1];
-+  struct pw_permission permission_items[2];
-   struct pw_properties *pipewire_properties;
- 
-   pipewire_properties =
-@@ -158,12 +158,12 @@ open_pipewire_camera_remote (const char *app_id,
-    * Hide all existing and future nodes by default. PipeWire will use the
-    * permission store to set up permissions.
-    */
--  permission_items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
--  permission_items[0].value = "---";
-+  permission_items[0] = PW_PERMISSION_INIT (PW_ID_CORE, PW_PERM_RWX);
-+  permission_items[1] = PW_PERMISSION_INIT (PW_ID_ANY, 0);
- 
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             &SPA_DICT_INIT (permission_items,
--                                             G_N_ELEMENTS (permission_items)));
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                G_N_ELEMENTS (permission_items),
-+                                permission_items);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -219,7 +219,7 @@ handle_open_pipewire_remote (XdpCamera *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
-@@ -250,29 +250,28 @@ camera_iface_init (XdpCameraIface *iface)
- static void
- global_added_cb (PipeWireRemote *remote,
-                  uint32_t id,
--                 uint32_t type,
-+                 const char *type,
-                  const struct spa_dict *props,
-                  gpointer user_data)
- {
-   Camera *camera = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *media_class;
-   const struct spa_dict_item *media_role;
- 
--  if (type != core_type->node)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Node) != 0)
-     return;
- 
-   if (!props)
-     return;
- 
--  media_class = spa_dict_lookup_item (props, "media.class");
-+  media_class = spa_dict_lookup_item (props, PW_KEY_MEDIA_CLASS);
-   if (!media_class)
-     return;
- 
-   if (g_strcmp0 (media_class->value, "Video/Source") != 0)
-     return;
- 
--  media_role = spa_dict_lookup_item (props, "media.role");
-+  media_role = spa_dict_lookup_item (props, PW_KEY_MEDIA_ROLE);
-   if (!media_role)
-     return;
- 
-@@ -342,6 +341,7 @@ create_pipewire_remote (Camera *camera,
-     }
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.is_portal", "true",
-+                                           "portal.monitor", "Camera",
-                                            NULL);
-   camera->pipewire_remote = pipewire_remote_new_sync (pipewire_properties,
-                                                       global_added_cb,
-diff --git src/pipewire.c src/pipewire.c
-index 793a378..162cd55 100644
---- src/pipewire.c
-+++ src/pipewire.c
-@@ -21,6 +21,7 @@
- #include <errno.h>
- #include <glib.h>
- #include <pipewire/pipewire.h>
-+#include <spa/utils/result.h>
- 
- #include "pipewire.h"
- 
-@@ -36,27 +37,25 @@ static gboolean is_pipewire_initialized = FALSE;
- static void
- registry_event_global (void *user_data,
-                        uint32_t id,
--                       uint32_t parent_id,
-                        uint32_t permissions,
--                       uint32_t type,
-+                       const char *type,
-                        uint32_t version,
-                        const struct spa_dict *props)
- {
-   PipeWireRemote *remote = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *factory_object_type;
-   PipeWireGlobal *global;
- 
-   global = g_new0 (PipeWireGlobal, 1);
-   *global = (PipeWireGlobal) {
--    .parent_id = parent_id,
-+    .parent_id = id,
-   };
- 
-   g_hash_table_insert (remote->globals, GINT_TO_POINTER (id), global);
-   if (remote->global_added_cb)
-     remote->global_added_cb (remote, id, type, props, remote->user_data);
- 
--  if (type != core_type->factory)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Factory) != 0)
-     return;
- 
-   factory_object_type = spa_dict_lookup_item (props, "factory.type.name");
-@@ -81,8 +80,8 @@ registry_event_global_remove (void *user_data,
-   g_hash_table_remove (remote->globals, GINT_TO_POINTER (id));
- }
- 
--static const struct pw_registry_proxy_events registry_events = {
--  PW_VERSION_REGISTRY_PROXY_EVENTS,
-+static const struct pw_registry_events registry_events = {
-+  PW_VERSION_REGISTRY_EVENTS,
-   .global = registry_event_global,
-   .global_remove = registry_event_global_remove,
- };
-@@ -90,7 +89,7 @@ static const struct pw_registry_proxy_events registry_events = {
- void
- pipewire_remote_roundtrip (PipeWireRemote *remote)
- {
--  pw_core_proxy_sync (remote->core_proxy, ++remote->sync_seq);
-+  remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq);
-   pw_main_loop_run (remote->loop);
- }
- 
-@@ -98,16 +97,13 @@ static gboolean
- discover_node_factory_sync (PipeWireRemote *remote,
-                             GError **error)
- {
--  struct pw_type *core_type = pw_core_get_type (remote->core);
--  struct pw_registry_proxy *registry_proxy;
-+  struct pw_registry *registry;
- 
--  registry_proxy = pw_core_proxy_get_registry (remote->core_proxy,
--                                               core_type->registry,
--                                               PW_VERSION_REGISTRY, 0);
--  pw_registry_proxy_add_listener (registry_proxy,
--                                  &remote->registry_listener,
--                                  &registry_events,
--                                  remote);
-+  registry = pw_core_get_registry (remote->core, PW_VERSION_REGISTRY, 0);
-+  pw_registry_add_listener (registry,
-+                            &remote->registry_listener,
-+                            &registry_events,
-+                            remote);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -122,59 +118,35 @@ discover_node_factory_sync (PipeWireRemote *remote,
- }
- 
- static void
--on_state_changed (void *user_data,
--                  enum pw_remote_state old,
--                  enum pw_remote_state state,
--                  const char *error)
-+core_event_error (void       *user_data,
-+                  uint32_t    id,
-+		  int         seq,
-+		  int         res,
-+		  const char *message)
- {
-   PipeWireRemote *remote = user_data;
- 
--  switch (state)
-+  if (id == PW_ID_CORE)
-     {
--    case PW_REMOTE_STATE_ERROR:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "%s", error);
--        }
-+      g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                 "%s", message);
-       pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_UNCONNECTED:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "Disconnected");
--        }
--      pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_CONNECTING:
--      break;
--    case PW_REMOTE_STATE_CONNECTED:
--      pw_main_loop_quit (remote->loop);
--      break;
--    default:
--      g_warning ("Unknown PipeWire state");
--      break;
-     }
- }
- 
--static const struct pw_remote_events remote_events = {
--  PW_VERSION_REMOTE_EVENTS,
--  .state_changed = on_state_changed,
--};
--
- static void
- core_event_done (void *user_data,
--                 uint32_t seq)
-+                 uint32_t id, int seq)
- {
-   PipeWireRemote *remote = user_data;
- 
--  if (remote->sync_seq == seq)
-+  if (id == PW_ID_CORE && remote->sync_seq == seq)
-     pw_main_loop_quit (remote->loop);
- }
- 
--static const struct pw_core_proxy_events core_events = {
--  PW_VERSION_CORE_PROXY_EVENTS,
-+static const struct pw_core_events core_events = {
-+  PW_VERSION_CORE_EVENTS,
-+  .error = core_event_error,
-   .done = core_event_done,
- };
- 
-@@ -237,8 +209,8 @@ void
- pipewire_remote_destroy (PipeWireRemote *remote)
- {
-   g_clear_pointer (&remote->globals, g_hash_table_destroy);
--  g_clear_pointer (&remote->remote, pw_remote_destroy);
--  g_clear_pointer (&remote->core, pw_core_destroy);
-+  g_clear_pointer (&remote->core, pw_core_disconnect);
-+  g_clear_pointer (&remote->context, pw_context_destroy);
-   g_clear_pointer (&remote->loop, pw_main_loop_destroy);
-   g_clear_error (&remote->error);
- 
-@@ -307,68 +279,31 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
-       return NULL;
-     }
- 
--  remote->core = pw_core_new (pw_main_loop_get_loop (remote->loop), NULL);
--  if (!remote->core)
-+  remote->context = pw_context_new (pw_main_loop_get_loop (remote->loop), NULL, 0);
-+  if (!remote->context)
-     {
-       pipewire_remote_destroy (remote);
-       pw_properties_free (pipewire_properties);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire core");
-+                   "Couldn't create PipeWire context");
-       return NULL;
-     }
- 
--  remote->remote = pw_remote_new (remote->core, pipewire_properties, 0);
--  if (!remote->remote)
-+  remote->core = pw_context_connect (remote->context, pipewire_properties, 0);
-+  if (!remote->core)
-     {
-       pipewire_remote_destroy (remote);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire remote");
-+                   "Couldn't connect to PipeWire");
-       return NULL;
-     }
- 
-   remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free);
- 
--  pw_remote_add_listener (remote->remote,
--                          &remote->remote_listener,
--                          &remote_events,
--                          remote);
--
--  if (pw_remote_connect (remote->remote) != 0)
--    {
--      pipewire_remote_destroy (remote);
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't connect PipeWire remote");
--      return NULL;
--    }
--
--  pw_main_loop_run (remote->loop);
--
--  switch (pw_remote_get_state (remote->remote, NULL))
--    {
--    case PW_REMOTE_STATE_ERROR:
--    case PW_REMOTE_STATE_UNCONNECTED:
--      *error = g_steal_pointer (&remote->error);
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTING:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "PipeWire loop stopped unexpectedly");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTED:
--      break;
--    default:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Unexpected PipeWire state");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    }
--
--  remote->core_proxy = pw_remote_get_core_proxy (remote->remote);
--  pw_core_proxy_add_listener (remote->core_proxy,
--                              &remote->core_listener,
--                              &core_events,
--                              remote);
-+  pw_core_add_listener (remote->core,
-+                        &remote->core_listener,
-+                        &core_events,
-+                        remote);
- 
-   if (!discover_node_factory_sync (remote, error))
-     {
-diff --git src/pipewire.h src/pipewire.h
-index 0f1bf54..bf48d5e 100644
---- src/pipewire.h
-+++ src/pipewire.h
-@@ -32,7 +32,7 @@ typedef struct _PipeWireGlobal
- 
- typedef void (* PipeWireGlobalAddedCallback) (PipeWireRemote *remote,
-                                               uint32_t id,
--                                              uint32_t type,
-+                                              const char *type,
-                                               const struct spa_dict *props,
-                                               gpointer user_data);
- 
-@@ -43,13 +43,11 @@ typedef void (* PipeWireGlobalRemovedCallback) (PipeWireRemote *remote,
- struct _PipeWireRemote
- {
-   struct pw_main_loop *loop;
-+  struct pw_context *context;
-   struct pw_core *core;
--  struct pw_remote *remote;
--  struct spa_hook remote_listener;
--
--  struct pw_core_proxy *core_proxy;
-   struct spa_hook core_listener;
--  uint32_t sync_seq;
-+
-+  int sync_seq;
- 
-   struct spa_hook registry_listener;
- 
-diff --git src/screen-cast.c src/screen-cast.c
-index 7881ddc..1677050 100644
---- src/screen-cast.c
-+++ src/screen-cast.c
-@@ -31,10 +31,10 @@
- #include "xdp-impl-dbus.h"
- #include "xdp-utils.h"
- 
--#define PERMISSION_ITEM(item_key, item_value) \
--  ((struct spa_dict_item) { \
--    .key = item_key, \
--    .value = item_value \
-+#define PERMISSION_ITEM(item_id, item_permissions) \
-+  ((struct pw_permission) { \
-+    .id = item_id, \
-+    .permissions = item_permissions \
-   })
- 
- typedef struct _ScreenCast ScreenCast;
-@@ -517,42 +517,9 @@ screen_cast_stream_get_pipewire_node_id (ScreenCastStream *stream)
-   return stream->id;
- }
- 
--static void
--append_parent_permissions (PipeWireRemote *remote,
--                           GArray *permission_items,
--                           GList **string_stash,
--                           PipeWireGlobal *global,
--                           const char *permission)
--{
--  PipeWireGlobal *parent;
--  char *parent_permission_value;
--
--  if (global->parent_id == 0)
--    return;
--
--  parent = g_hash_table_lookup (remote->globals, GINT_TO_POINTER (global->parent_id));
--
--  if (parent->permission_set)
--    return;
--  parent->permission_set = TRUE;
--
--  append_parent_permissions (remote, permission_items, string_stash,
--                             parent, permission);
--
--  parent_permission_value = g_strdup_printf ("%u:%s",
--                                             global->parent_id,
--                                             permission);
--  *string_stash = g_list_prepend (*string_stash, parent_permission_value);
--
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       parent_permission_value));
--}
--
- static void
- append_stream_permissions (PipeWireRemote *remote,
-                            GArray *permission_items,
--                           GList **string_stash,
-                            GList *streams)
- {
-   GList *l;
-@@ -561,21 +528,10 @@ append_stream_permissions (PipeWireRemote *remote,
-     {
-       ScreenCastStream *stream = l->data;
-       uint32_t stream_id;
--      PipeWireGlobal *stream_global;
--      char *stream_permission_value;
- 
-       stream_id = screen_cast_stream_get_pipewire_node_id (stream);
--      stream_global = g_hash_table_lookup (remote->globals,
--                                           GINT_TO_POINTER (stream_id));
--
--      append_parent_permissions (remote, permission_items, string_stash,
--                                 stream_global, "r--");
--
--      stream_permission_value = g_strdup_printf ("%u:rwx", stream_id);
--      *string_stash = g_list_prepend (*string_stash, stream_permission_value);
-       g_array_append_val (permission_items,
--                          PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                           stream_permission_value));
-+                          PERMISSION_ITEM (stream_id, PW_PERM_RWX));
-     }
- }
- 
-@@ -587,9 +543,6 @@ open_pipewire_screen_cast_remote (const char *app_id,
-   struct pw_properties *pipewire_properties;
-   PipeWireRemote *remote;
-   g_autoptr(GArray) permission_items = NULL;
--  char *node_factory_permission_string;
--  GList *string_stash = NULL;
--  struct spa_dict *permission_dict;
-   PipeWireGlobal *node_global;
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.app_id", app_id,
-@@ -603,48 +556,31 @@ open_pipewire_screen_cast_remote (const char *app_id,
- 
-   permission_items = g_array_new (FALSE, TRUE, sizeof (struct spa_dict_item));
- 
--  /*
--   * Hide all existing and future nodes (except the ones we explicitly list below.
--   */
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_EXISTING,
--                                       "---"));
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_DEFAULT,
--                                       "---"));
--
-   /*
-    * PipeWire:Interface:Core
-    * Needs rwx to be able create the sink node using the create-object method
-    */
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       "0:rwx"));
-+                      PERMISSION_ITEM (PW_ID_CORE, PW_PERM_RWX));
- 
-   /*
-    * PipeWire:Interface:NodeFactory
-    * Needs r-- so it can be passed to create-object when creating the sink node.
-    */
--  node_factory_permission_string = g_strdup_printf ("%d:r--",
--                                                    remote->node_factory_id);
--  string_stash = g_list_prepend (string_stash, node_factory_permission_string);
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       node_factory_permission_string));
--  node_global = g_hash_table_lookup (remote->globals,
--                                     GINT_TO_POINTER (remote->node_factory_id));
--  append_parent_permissions (remote, permission_items, &string_stash,
--                             node_global, "r--");
-+                      PERMISSION_ITEM (remote->node_factory_id, PW_PERM_R));
- 
--  append_stream_permissions (remote, permission_items, &string_stash, streams);
-+  append_stream_permissions (remote, permission_items, streams);
- 
--  permission_dict =
--    &SPA_DICT_INIT ((struct spa_dict_item *) permission_items->data,
--                    permission_items->len);
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             permission_dict);
-+  /*
-+   * Hide all existing and future nodes (except the ones we explicitly list above).
-+   */
-+  g_array_append_val (permission_items,
-+                      PERMISSION_ITEM (PW_ID_ANY, 0));
- 
--  g_list_free_full (string_stash, g_free);
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                permission_items->len,
-+                                (const struct pw_permission *)permission_items->data);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -943,7 +879,7 @@ handle_open_pipewire_remote (XdpScreenCast *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 1136b6a6e0e..a25c486aad3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -1,7 +1,7 @@
 # Template file for 'xdg-desktop-portal'
 pkgname=xdg-desktop-portal
-version=1.6.0
-revision=2
+version=1.8.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
 hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
@@ -11,12 +11,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
-checksum=883c9c9a925e48af54812b5347f546dd776ec2e27076a83d5a8126af6bafb9da
+checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
 pre_configure() {
 	autoreconf -vfi
 }
 
 post_install() {
-	rm -rf "${DESTDIR}/usr/lib/systemd"
+	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 3c0f21d6bdab48e4e0631e20601e7009dc8e4e93 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Wed, 23 Sep 2020 16:44:56 -0400
Subject: [PATCH 2/2] xdg-desktop-portal: enable libportal

---
 srcpkgs/xdg-desktop-portal/template | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad3..11908fbdd3c 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

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

* Re: [PR REVIEW] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (4 preceding siblings ...)
  2020-09-23 20:45 ` [PR PATCH] [Updated] " concatime
@ 2020-09-23 20:47 ` concatime
  2020-09-23 20:48 ` concatime
                   ` (23 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-23 20:47 UTC (permalink / raw)
  To: ml

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

New review comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#discussion_r493885171

Comment:
Well, technically, `-R` is the official argument for recursion. `-r` is just an alias.
If you look at other commands, like `umount`, `-R` is for recursion.

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

* Re: [PR REVIEW] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (5 preceding siblings ...)
  2020-09-23 20:47 ` [PR REVIEW] " concatime
@ 2020-09-23 20:48 ` concatime
  2020-09-23 20:57 ` [PR PATCH] [Updated] " concatime
                   ` (22 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-23 20:48 UTC (permalink / raw)
  To: ml

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

New review comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#discussion_r493886015

Comment:
> -R
> Remove file hierarchies. See the DESCRIPTION.
> -r
> Equivalent to -R.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/rm.html

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

* Re: [PR PATCH] [Updated] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (6 preceding siblings ...)
  2020-09-23 20:48 ` concatime
@ 2020-09-23 20:57 ` concatime
  2020-09-23 20:57 ` concatime
                   ` (21 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-23 20:57 UTC (permalink / raw)
  To: ml

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

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

https://github.com/concatime/void-packages xdg-desktop-portal
https://github.com/void-linux/void-packages/pull/25040

xdg-desktop-portal: update to 1.8.0


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-desktop-portal-25040.patch --]
[-- Type: text/x-diff, Size: 23820 bytes --]

From c129ec190be64d9e78b1102687a917ff9eeb97f4 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Tue, 22 Sep 2020 18:36:38 -0400
Subject: [PATCH 1/2] xdg-desktop-portal: update to 1.8.0

---
 .../patches/pipewire-0.3.patch                | 551 ------------------
 srcpkgs/xdg-desktop-portal/template           |   8 +-
 2 files changed, 4 insertions(+), 555 deletions(-)
 delete mode 100644 srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch

diff --git a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch b/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
deleted file mode 100644
index 94ebe083598..00000000000
--- a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From a38901e5e7f835efe7b7a06c55790c8c20bc91a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Tue, 14 Jan 2020 09:37:09 +0100
-Subject: [PATCH] PipeWire: update to 0.3 API
-
----
- configure.ac      |   2 +-
- src/camera.c      |  24 ++++----
- src/pipewire.c    | 141 +++++++++++++---------------------------------
- src/pipewire.h    |  10 ++--
- src/screen-cast.c |  98 ++++++--------------------------
- 5 files changed, 72 insertions(+), 203 deletions(-)
-
-diff --git configure.ac configure.ac
-index 89902fa..62d7960 100644
---- configure.ac
-+++ configure.ac
-@@ -97,7 +97,7 @@ AC_ARG_ENABLE(pipewire,
- 	      [AS_HELP_STRING([--enable-pipewire],[Enable PipeWire support. Needed for screen cast portal])],
- 	      enable_pipewire=$enableval, enable_pipewire=yes)
- if test x$enable_pipewire = xyes ; then
--	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.2 >= 0.2.6])
-+	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.3 >= 0.2.90])
- 	AC_DEFINE([HAVE_PIPEWIRE],[1], [Define to enable PipeWire support])
- fi
- AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"])
-diff --git src/camera.c src/camera.c
-index c2b392c..20fe3aa 100644
---- src/camera.c
-+++ src/camera.c
-@@ -141,7 +141,7 @@ open_pipewire_camera_remote (const char *app_id,
-                              GError **error)
- {
-   PipeWireRemote *remote;
--  struct spa_dict_item permission_items[1];
-+  struct pw_permission permission_items[2];
-   struct pw_properties *pipewire_properties;
- 
-   pipewire_properties =
-@@ -158,12 +158,12 @@ open_pipewire_camera_remote (const char *app_id,
-    * Hide all existing and future nodes by default. PipeWire will use the
-    * permission store to set up permissions.
-    */
--  permission_items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
--  permission_items[0].value = "---";
-+  permission_items[0] = PW_PERMISSION_INIT (PW_ID_CORE, PW_PERM_RWX);
-+  permission_items[1] = PW_PERMISSION_INIT (PW_ID_ANY, 0);
- 
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             &SPA_DICT_INIT (permission_items,
--                                             G_N_ELEMENTS (permission_items)));
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                G_N_ELEMENTS (permission_items),
-+                                permission_items);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -219,7 +219,7 @@ handle_open_pipewire_remote (XdpCamera *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
-@@ -250,29 +250,28 @@ camera_iface_init (XdpCameraIface *iface)
- static void
- global_added_cb (PipeWireRemote *remote,
-                  uint32_t id,
--                 uint32_t type,
-+                 const char *type,
-                  const struct spa_dict *props,
-                  gpointer user_data)
- {
-   Camera *camera = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *media_class;
-   const struct spa_dict_item *media_role;
- 
--  if (type != core_type->node)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Node) != 0)
-     return;
- 
-   if (!props)
-     return;
- 
--  media_class = spa_dict_lookup_item (props, "media.class");
-+  media_class = spa_dict_lookup_item (props, PW_KEY_MEDIA_CLASS);
-   if (!media_class)
-     return;
- 
-   if (g_strcmp0 (media_class->value, "Video/Source") != 0)
-     return;
- 
--  media_role = spa_dict_lookup_item (props, "media.role");
-+  media_role = spa_dict_lookup_item (props, PW_KEY_MEDIA_ROLE);
-   if (!media_role)
-     return;
- 
-@@ -342,6 +341,7 @@ create_pipewire_remote (Camera *camera,
-     }
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.is_portal", "true",
-+                                           "portal.monitor", "Camera",
-                                            NULL);
-   camera->pipewire_remote = pipewire_remote_new_sync (pipewire_properties,
-                                                       global_added_cb,
-diff --git src/pipewire.c src/pipewire.c
-index 793a378..162cd55 100644
---- src/pipewire.c
-+++ src/pipewire.c
-@@ -21,6 +21,7 @@
- #include <errno.h>
- #include <glib.h>
- #include <pipewire/pipewire.h>
-+#include <spa/utils/result.h>
- 
- #include "pipewire.h"
- 
-@@ -36,27 +37,25 @@ static gboolean is_pipewire_initialized = FALSE;
- static void
- registry_event_global (void *user_data,
-                        uint32_t id,
--                       uint32_t parent_id,
-                        uint32_t permissions,
--                       uint32_t type,
-+                       const char *type,
-                        uint32_t version,
-                        const struct spa_dict *props)
- {
-   PipeWireRemote *remote = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *factory_object_type;
-   PipeWireGlobal *global;
- 
-   global = g_new0 (PipeWireGlobal, 1);
-   *global = (PipeWireGlobal) {
--    .parent_id = parent_id,
-+    .parent_id = id,
-   };
- 
-   g_hash_table_insert (remote->globals, GINT_TO_POINTER (id), global);
-   if (remote->global_added_cb)
-     remote->global_added_cb (remote, id, type, props, remote->user_data);
- 
--  if (type != core_type->factory)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Factory) != 0)
-     return;
- 
-   factory_object_type = spa_dict_lookup_item (props, "factory.type.name");
-@@ -81,8 +80,8 @@ registry_event_global_remove (void *user_data,
-   g_hash_table_remove (remote->globals, GINT_TO_POINTER (id));
- }
- 
--static const struct pw_registry_proxy_events registry_events = {
--  PW_VERSION_REGISTRY_PROXY_EVENTS,
-+static const struct pw_registry_events registry_events = {
-+  PW_VERSION_REGISTRY_EVENTS,
-   .global = registry_event_global,
-   .global_remove = registry_event_global_remove,
- };
-@@ -90,7 +89,7 @@ static const struct pw_registry_proxy_events registry_events = {
- void
- pipewire_remote_roundtrip (PipeWireRemote *remote)
- {
--  pw_core_proxy_sync (remote->core_proxy, ++remote->sync_seq);
-+  remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq);
-   pw_main_loop_run (remote->loop);
- }
- 
-@@ -98,16 +97,13 @@ static gboolean
- discover_node_factory_sync (PipeWireRemote *remote,
-                             GError **error)
- {
--  struct pw_type *core_type = pw_core_get_type (remote->core);
--  struct pw_registry_proxy *registry_proxy;
-+  struct pw_registry *registry;
- 
--  registry_proxy = pw_core_proxy_get_registry (remote->core_proxy,
--                                               core_type->registry,
--                                               PW_VERSION_REGISTRY, 0);
--  pw_registry_proxy_add_listener (registry_proxy,
--                                  &remote->registry_listener,
--                                  &registry_events,
--                                  remote);
-+  registry = pw_core_get_registry (remote->core, PW_VERSION_REGISTRY, 0);
-+  pw_registry_add_listener (registry,
-+                            &remote->registry_listener,
-+                            &registry_events,
-+                            remote);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -122,59 +118,35 @@ discover_node_factory_sync (PipeWireRemote *remote,
- }
- 
- static void
--on_state_changed (void *user_data,
--                  enum pw_remote_state old,
--                  enum pw_remote_state state,
--                  const char *error)
-+core_event_error (void       *user_data,
-+                  uint32_t    id,
-+		  int         seq,
-+		  int         res,
-+		  const char *message)
- {
-   PipeWireRemote *remote = user_data;
- 
--  switch (state)
-+  if (id == PW_ID_CORE)
-     {
--    case PW_REMOTE_STATE_ERROR:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "%s", error);
--        }
-+      g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                 "%s", message);
-       pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_UNCONNECTED:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "Disconnected");
--        }
--      pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_CONNECTING:
--      break;
--    case PW_REMOTE_STATE_CONNECTED:
--      pw_main_loop_quit (remote->loop);
--      break;
--    default:
--      g_warning ("Unknown PipeWire state");
--      break;
-     }
- }
- 
--static const struct pw_remote_events remote_events = {
--  PW_VERSION_REMOTE_EVENTS,
--  .state_changed = on_state_changed,
--};
--
- static void
- core_event_done (void *user_data,
--                 uint32_t seq)
-+                 uint32_t id, int seq)
- {
-   PipeWireRemote *remote = user_data;
- 
--  if (remote->sync_seq == seq)
-+  if (id == PW_ID_CORE && remote->sync_seq == seq)
-     pw_main_loop_quit (remote->loop);
- }
- 
--static const struct pw_core_proxy_events core_events = {
--  PW_VERSION_CORE_PROXY_EVENTS,
-+static const struct pw_core_events core_events = {
-+  PW_VERSION_CORE_EVENTS,
-+  .error = core_event_error,
-   .done = core_event_done,
- };
- 
-@@ -237,8 +209,8 @@ void
- pipewire_remote_destroy (PipeWireRemote *remote)
- {
-   g_clear_pointer (&remote->globals, g_hash_table_destroy);
--  g_clear_pointer (&remote->remote, pw_remote_destroy);
--  g_clear_pointer (&remote->core, pw_core_destroy);
-+  g_clear_pointer (&remote->core, pw_core_disconnect);
-+  g_clear_pointer (&remote->context, pw_context_destroy);
-   g_clear_pointer (&remote->loop, pw_main_loop_destroy);
-   g_clear_error (&remote->error);
- 
-@@ -307,68 +279,31 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
-       return NULL;
-     }
- 
--  remote->core = pw_core_new (pw_main_loop_get_loop (remote->loop), NULL);
--  if (!remote->core)
-+  remote->context = pw_context_new (pw_main_loop_get_loop (remote->loop), NULL, 0);
-+  if (!remote->context)
-     {
-       pipewire_remote_destroy (remote);
-       pw_properties_free (pipewire_properties);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire core");
-+                   "Couldn't create PipeWire context");
-       return NULL;
-     }
- 
--  remote->remote = pw_remote_new (remote->core, pipewire_properties, 0);
--  if (!remote->remote)
-+  remote->core = pw_context_connect (remote->context, pipewire_properties, 0);
-+  if (!remote->core)
-     {
-       pipewire_remote_destroy (remote);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire remote");
-+                   "Couldn't connect to PipeWire");
-       return NULL;
-     }
- 
-   remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free);
- 
--  pw_remote_add_listener (remote->remote,
--                          &remote->remote_listener,
--                          &remote_events,
--                          remote);
--
--  if (pw_remote_connect (remote->remote) != 0)
--    {
--      pipewire_remote_destroy (remote);
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't connect PipeWire remote");
--      return NULL;
--    }
--
--  pw_main_loop_run (remote->loop);
--
--  switch (pw_remote_get_state (remote->remote, NULL))
--    {
--    case PW_REMOTE_STATE_ERROR:
--    case PW_REMOTE_STATE_UNCONNECTED:
--      *error = g_steal_pointer (&remote->error);
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTING:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "PipeWire loop stopped unexpectedly");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTED:
--      break;
--    default:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Unexpected PipeWire state");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    }
--
--  remote->core_proxy = pw_remote_get_core_proxy (remote->remote);
--  pw_core_proxy_add_listener (remote->core_proxy,
--                              &remote->core_listener,
--                              &core_events,
--                              remote);
-+  pw_core_add_listener (remote->core,
-+                        &remote->core_listener,
-+                        &core_events,
-+                        remote);
- 
-   if (!discover_node_factory_sync (remote, error))
-     {
-diff --git src/pipewire.h src/pipewire.h
-index 0f1bf54..bf48d5e 100644
---- src/pipewire.h
-+++ src/pipewire.h
-@@ -32,7 +32,7 @@ typedef struct _PipeWireGlobal
- 
- typedef void (* PipeWireGlobalAddedCallback) (PipeWireRemote *remote,
-                                               uint32_t id,
--                                              uint32_t type,
-+                                              const char *type,
-                                               const struct spa_dict *props,
-                                               gpointer user_data);
- 
-@@ -43,13 +43,11 @@ typedef void (* PipeWireGlobalRemovedCallback) (PipeWireRemote *remote,
- struct _PipeWireRemote
- {
-   struct pw_main_loop *loop;
-+  struct pw_context *context;
-   struct pw_core *core;
--  struct pw_remote *remote;
--  struct spa_hook remote_listener;
--
--  struct pw_core_proxy *core_proxy;
-   struct spa_hook core_listener;
--  uint32_t sync_seq;
-+
-+  int sync_seq;
- 
-   struct spa_hook registry_listener;
- 
-diff --git src/screen-cast.c src/screen-cast.c
-index 7881ddc..1677050 100644
---- src/screen-cast.c
-+++ src/screen-cast.c
-@@ -31,10 +31,10 @@
- #include "xdp-impl-dbus.h"
- #include "xdp-utils.h"
- 
--#define PERMISSION_ITEM(item_key, item_value) \
--  ((struct spa_dict_item) { \
--    .key = item_key, \
--    .value = item_value \
-+#define PERMISSION_ITEM(item_id, item_permissions) \
-+  ((struct pw_permission) { \
-+    .id = item_id, \
-+    .permissions = item_permissions \
-   })
- 
- typedef struct _ScreenCast ScreenCast;
-@@ -517,42 +517,9 @@ screen_cast_stream_get_pipewire_node_id (ScreenCastStream *stream)
-   return stream->id;
- }
- 
--static void
--append_parent_permissions (PipeWireRemote *remote,
--                           GArray *permission_items,
--                           GList **string_stash,
--                           PipeWireGlobal *global,
--                           const char *permission)
--{
--  PipeWireGlobal *parent;
--  char *parent_permission_value;
--
--  if (global->parent_id == 0)
--    return;
--
--  parent = g_hash_table_lookup (remote->globals, GINT_TO_POINTER (global->parent_id));
--
--  if (parent->permission_set)
--    return;
--  parent->permission_set = TRUE;
--
--  append_parent_permissions (remote, permission_items, string_stash,
--                             parent, permission);
--
--  parent_permission_value = g_strdup_printf ("%u:%s",
--                                             global->parent_id,
--                                             permission);
--  *string_stash = g_list_prepend (*string_stash, parent_permission_value);
--
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       parent_permission_value));
--}
--
- static void
- append_stream_permissions (PipeWireRemote *remote,
-                            GArray *permission_items,
--                           GList **string_stash,
-                            GList *streams)
- {
-   GList *l;
-@@ -561,21 +528,10 @@ append_stream_permissions (PipeWireRemote *remote,
-     {
-       ScreenCastStream *stream = l->data;
-       uint32_t stream_id;
--      PipeWireGlobal *stream_global;
--      char *stream_permission_value;
- 
-       stream_id = screen_cast_stream_get_pipewire_node_id (stream);
--      stream_global = g_hash_table_lookup (remote->globals,
--                                           GINT_TO_POINTER (stream_id));
--
--      append_parent_permissions (remote, permission_items, string_stash,
--                                 stream_global, "r--");
--
--      stream_permission_value = g_strdup_printf ("%u:rwx", stream_id);
--      *string_stash = g_list_prepend (*string_stash, stream_permission_value);
-       g_array_append_val (permission_items,
--                          PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                           stream_permission_value));
-+                          PERMISSION_ITEM (stream_id, PW_PERM_RWX));
-     }
- }
- 
-@@ -587,9 +543,6 @@ open_pipewire_screen_cast_remote (const char *app_id,
-   struct pw_properties *pipewire_properties;
-   PipeWireRemote *remote;
-   g_autoptr(GArray) permission_items = NULL;
--  char *node_factory_permission_string;
--  GList *string_stash = NULL;
--  struct spa_dict *permission_dict;
-   PipeWireGlobal *node_global;
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.app_id", app_id,
-@@ -603,48 +556,31 @@ open_pipewire_screen_cast_remote (const char *app_id,
- 
-   permission_items = g_array_new (FALSE, TRUE, sizeof (struct spa_dict_item));
- 
--  /*
--   * Hide all existing and future nodes (except the ones we explicitly list below.
--   */
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_EXISTING,
--                                       "---"));
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_DEFAULT,
--                                       "---"));
--
-   /*
-    * PipeWire:Interface:Core
-    * Needs rwx to be able create the sink node using the create-object method
-    */
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       "0:rwx"));
-+                      PERMISSION_ITEM (PW_ID_CORE, PW_PERM_RWX));
- 
-   /*
-    * PipeWire:Interface:NodeFactory
-    * Needs r-- so it can be passed to create-object when creating the sink node.
-    */
--  node_factory_permission_string = g_strdup_printf ("%d:r--",
--                                                    remote->node_factory_id);
--  string_stash = g_list_prepend (string_stash, node_factory_permission_string);
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       node_factory_permission_string));
--  node_global = g_hash_table_lookup (remote->globals,
--                                     GINT_TO_POINTER (remote->node_factory_id));
--  append_parent_permissions (remote, permission_items, &string_stash,
--                             node_global, "r--");
-+                      PERMISSION_ITEM (remote->node_factory_id, PW_PERM_R));
- 
--  append_stream_permissions (remote, permission_items, &string_stash, streams);
-+  append_stream_permissions (remote, permission_items, streams);
- 
--  permission_dict =
--    &SPA_DICT_INIT ((struct spa_dict_item *) permission_items->data,
--                    permission_items->len);
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             permission_dict);
-+  /*
-+   * Hide all existing and future nodes (except the ones we explicitly list above).
-+   */
-+  g_array_append_val (permission_items,
-+                      PERMISSION_ITEM (PW_ID_ANY, 0));
- 
--  g_list_free_full (string_stash, g_free);
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                permission_items->len,
-+                                (const struct pw_permission *)permission_items->data);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -943,7 +879,7 @@ handle_open_pipewire_remote (XdpScreenCast *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 1136b6a6e0e..a25c486aad3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -1,7 +1,7 @@
 # Template file for 'xdg-desktop-portal'
 pkgname=xdg-desktop-portal
-version=1.6.0
-revision=2
+version=1.8.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
 hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
@@ -11,12 +11,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
-checksum=883c9c9a925e48af54812b5347f546dd776ec2e27076a83d5a8126af6bafb9da
+checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
 pre_configure() {
 	autoreconf -vfi
 }
 
 post_install() {
-	rm -rf "${DESTDIR}/usr/lib/systemd"
+	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 1068aafc0c0fa1b534d3553284ea00e43f0ef76a Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Wed, 23 Sep 2020 16:44:56 -0400
Subject: [PATCH 2/2] xdg-desktop-portal: enable libportal

---
 srcpkgs/xdg-desktop-portal/template | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad3..a288b1a2644 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config glib-devel"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (7 preceding siblings ...)
  2020-09-23 20:57 ` [PR PATCH] [Updated] " concatime
@ 2020-09-23 20:57 ` concatime
  2020-09-24  1:09 ` q66
                   ` (20 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-23 20:57 UTC (permalink / raw)
  To: ml

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

New comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-697956587

Comment:
@Duncaen, are you okay with this patch?
I enabled libportal as @q66 told me, and removed `pre_configure` hook.

```diff
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad..11908fbdd3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config glib-devel"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }
```

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (8 preceding siblings ...)
  2020-09-23 20:57 ` concatime
@ 2020-09-24  1:09 ` q66
  2020-09-24  3:38 ` [PR REVIEW] " ahesford
                   ` (19 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: q66 @ 2020-09-24  1:09 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698052369

Comment:
make sure to try tests too (the check target)

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

* Re: [PR REVIEW] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (9 preceding siblings ...)
  2020-09-24  1:09 ` q66
@ 2020-09-24  3:38 ` ahesford
  2020-09-24  4:26 ` concatime
                   ` (18 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: ahesford @ 2020-09-24  3:38 UTC (permalink / raw)
  To: ml

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

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#discussion_r494018934

Comment:
If you're going to be pedantic, I'll pedantically note that "equivalence" and "alias" are two different concepts. There is no merit in this change.

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

* Re: [PR REVIEW] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (10 preceding siblings ...)
  2020-09-24  3:38 ` [PR REVIEW] " ahesford
@ 2020-09-24  4:26 ` concatime
  2020-09-24  4:26 ` concatime
                   ` (17 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24  4:26 UTC (permalink / raw)
  To: ml

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

New review comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#discussion_r494030864

Comment:
> -R
> Copy file hierarchies.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html

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

* Re: [PR REVIEW] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (11 preceding siblings ...)
  2020-09-24  4:26 ` concatime
@ 2020-09-24  4:26 ` concatime
  2020-09-24  5:03 ` ahesford
                   ` (16 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24  4:26 UTC (permalink / raw)
  To: ml

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

New review comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#discussion_r494030864

Comment:
> -R
> Copy file hierarchies.

https://pubs.opengroup.org/onlinepubs/9699919799/utilities/cp.html

So yeah, `-R` is the norm.

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

* Re: [PR REVIEW] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (12 preceding siblings ...)
  2020-09-24  4:26 ` concatime
@ 2020-09-24  5:03 ` ahesford
  2020-09-24 15:48 ` [PR PATCH] [Updated] " concatime
                   ` (15 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: ahesford @ 2020-09-24  5:03 UTC (permalink / raw)
  To: ml

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

New review comment by ahesford on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#discussion_r494040431

Comment:
What `cp` and `umount` do for recurrence are of no consequence. This is an `rm` invocation. The `rm` man page, from your first link, establishes that `-r` and `-R` are *equivalent*. There is no "official" argument and one is not an "alias". Equivalence means that the two alternatives can be used interchangably *in every instance*.

Stop trying to argue for this change on principle. This is a purely stylistic change with no tangible benefit that has the drawback of concealing the functional history of this line in the template. It is without merit.

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

* Re: [PR PATCH] [Updated] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (13 preceding siblings ...)
  2020-09-24  5:03 ` ahesford
@ 2020-09-24 15:48 ` concatime
  2020-09-24 19:16 ` q66
                   ` (14 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 15:48 UTC (permalink / raw)
  To: ml

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

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

https://github.com/concatime/void-packages xdg-desktop-portal
https://github.com/void-linux/void-packages/pull/25040

xdg-desktop-portal: update to 1.8.0


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-desktop-portal-25040.patch --]
[-- Type: text/x-diff, Size: 24639 bytes --]

From c129ec190be64d9e78b1102687a917ff9eeb97f4 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Tue, 22 Sep 2020 18:36:38 -0400
Subject: [PATCH 1/3] xdg-desktop-portal: update to 1.8.0

---
 .../patches/pipewire-0.3.patch                | 551 ------------------
 srcpkgs/xdg-desktop-portal/template           |   8 +-
 2 files changed, 4 insertions(+), 555 deletions(-)
 delete mode 100644 srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch

diff --git a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch b/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
deleted file mode 100644
index 94ebe083598..00000000000
--- a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From a38901e5e7f835efe7b7a06c55790c8c20bc91a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Tue, 14 Jan 2020 09:37:09 +0100
-Subject: [PATCH] PipeWire: update to 0.3 API
-
----
- configure.ac      |   2 +-
- src/camera.c      |  24 ++++----
- src/pipewire.c    | 141 +++++++++++++---------------------------------
- src/pipewire.h    |  10 ++--
- src/screen-cast.c |  98 ++++++--------------------------
- 5 files changed, 72 insertions(+), 203 deletions(-)
-
-diff --git configure.ac configure.ac
-index 89902fa..62d7960 100644
---- configure.ac
-+++ configure.ac
-@@ -97,7 +97,7 @@ AC_ARG_ENABLE(pipewire,
- 	      [AS_HELP_STRING([--enable-pipewire],[Enable PipeWire support. Needed for screen cast portal])],
- 	      enable_pipewire=$enableval, enable_pipewire=yes)
- if test x$enable_pipewire = xyes ; then
--	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.2 >= 0.2.6])
-+	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.3 >= 0.2.90])
- 	AC_DEFINE([HAVE_PIPEWIRE],[1], [Define to enable PipeWire support])
- fi
- AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"])
-diff --git src/camera.c src/camera.c
-index c2b392c..20fe3aa 100644
---- src/camera.c
-+++ src/camera.c
-@@ -141,7 +141,7 @@ open_pipewire_camera_remote (const char *app_id,
-                              GError **error)
- {
-   PipeWireRemote *remote;
--  struct spa_dict_item permission_items[1];
-+  struct pw_permission permission_items[2];
-   struct pw_properties *pipewire_properties;
- 
-   pipewire_properties =
-@@ -158,12 +158,12 @@ open_pipewire_camera_remote (const char *app_id,
-    * Hide all existing and future nodes by default. PipeWire will use the
-    * permission store to set up permissions.
-    */
--  permission_items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
--  permission_items[0].value = "---";
-+  permission_items[0] = PW_PERMISSION_INIT (PW_ID_CORE, PW_PERM_RWX);
-+  permission_items[1] = PW_PERMISSION_INIT (PW_ID_ANY, 0);
- 
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             &SPA_DICT_INIT (permission_items,
--                                             G_N_ELEMENTS (permission_items)));
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                G_N_ELEMENTS (permission_items),
-+                                permission_items);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -219,7 +219,7 @@ handle_open_pipewire_remote (XdpCamera *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
-@@ -250,29 +250,28 @@ camera_iface_init (XdpCameraIface *iface)
- static void
- global_added_cb (PipeWireRemote *remote,
-                  uint32_t id,
--                 uint32_t type,
-+                 const char *type,
-                  const struct spa_dict *props,
-                  gpointer user_data)
- {
-   Camera *camera = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *media_class;
-   const struct spa_dict_item *media_role;
- 
--  if (type != core_type->node)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Node) != 0)
-     return;
- 
-   if (!props)
-     return;
- 
--  media_class = spa_dict_lookup_item (props, "media.class");
-+  media_class = spa_dict_lookup_item (props, PW_KEY_MEDIA_CLASS);
-   if (!media_class)
-     return;
- 
-   if (g_strcmp0 (media_class->value, "Video/Source") != 0)
-     return;
- 
--  media_role = spa_dict_lookup_item (props, "media.role");
-+  media_role = spa_dict_lookup_item (props, PW_KEY_MEDIA_ROLE);
-   if (!media_role)
-     return;
- 
-@@ -342,6 +341,7 @@ create_pipewire_remote (Camera *camera,
-     }
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.is_portal", "true",
-+                                           "portal.monitor", "Camera",
-                                            NULL);
-   camera->pipewire_remote = pipewire_remote_new_sync (pipewire_properties,
-                                                       global_added_cb,
-diff --git src/pipewire.c src/pipewire.c
-index 793a378..162cd55 100644
---- src/pipewire.c
-+++ src/pipewire.c
-@@ -21,6 +21,7 @@
- #include <errno.h>
- #include <glib.h>
- #include <pipewire/pipewire.h>
-+#include <spa/utils/result.h>
- 
- #include "pipewire.h"
- 
-@@ -36,27 +37,25 @@ static gboolean is_pipewire_initialized = FALSE;
- static void
- registry_event_global (void *user_data,
-                        uint32_t id,
--                       uint32_t parent_id,
-                        uint32_t permissions,
--                       uint32_t type,
-+                       const char *type,
-                        uint32_t version,
-                        const struct spa_dict *props)
- {
-   PipeWireRemote *remote = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *factory_object_type;
-   PipeWireGlobal *global;
- 
-   global = g_new0 (PipeWireGlobal, 1);
-   *global = (PipeWireGlobal) {
--    .parent_id = parent_id,
-+    .parent_id = id,
-   };
- 
-   g_hash_table_insert (remote->globals, GINT_TO_POINTER (id), global);
-   if (remote->global_added_cb)
-     remote->global_added_cb (remote, id, type, props, remote->user_data);
- 
--  if (type != core_type->factory)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Factory) != 0)
-     return;
- 
-   factory_object_type = spa_dict_lookup_item (props, "factory.type.name");
-@@ -81,8 +80,8 @@ registry_event_global_remove (void *user_data,
-   g_hash_table_remove (remote->globals, GINT_TO_POINTER (id));
- }
- 
--static const struct pw_registry_proxy_events registry_events = {
--  PW_VERSION_REGISTRY_PROXY_EVENTS,
-+static const struct pw_registry_events registry_events = {
-+  PW_VERSION_REGISTRY_EVENTS,
-   .global = registry_event_global,
-   .global_remove = registry_event_global_remove,
- };
-@@ -90,7 +89,7 @@ static const struct pw_registry_proxy_events registry_events = {
- void
- pipewire_remote_roundtrip (PipeWireRemote *remote)
- {
--  pw_core_proxy_sync (remote->core_proxy, ++remote->sync_seq);
-+  remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq);
-   pw_main_loop_run (remote->loop);
- }
- 
-@@ -98,16 +97,13 @@ static gboolean
- discover_node_factory_sync (PipeWireRemote *remote,
-                             GError **error)
- {
--  struct pw_type *core_type = pw_core_get_type (remote->core);
--  struct pw_registry_proxy *registry_proxy;
-+  struct pw_registry *registry;
- 
--  registry_proxy = pw_core_proxy_get_registry (remote->core_proxy,
--                                               core_type->registry,
--                                               PW_VERSION_REGISTRY, 0);
--  pw_registry_proxy_add_listener (registry_proxy,
--                                  &remote->registry_listener,
--                                  &registry_events,
--                                  remote);
-+  registry = pw_core_get_registry (remote->core, PW_VERSION_REGISTRY, 0);
-+  pw_registry_add_listener (registry,
-+                            &remote->registry_listener,
-+                            &registry_events,
-+                            remote);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -122,59 +118,35 @@ discover_node_factory_sync (PipeWireRemote *remote,
- }
- 
- static void
--on_state_changed (void *user_data,
--                  enum pw_remote_state old,
--                  enum pw_remote_state state,
--                  const char *error)
-+core_event_error (void       *user_data,
-+                  uint32_t    id,
-+		  int         seq,
-+		  int         res,
-+		  const char *message)
- {
-   PipeWireRemote *remote = user_data;
- 
--  switch (state)
-+  if (id == PW_ID_CORE)
-     {
--    case PW_REMOTE_STATE_ERROR:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "%s", error);
--        }
-+      g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                 "%s", message);
-       pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_UNCONNECTED:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "Disconnected");
--        }
--      pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_CONNECTING:
--      break;
--    case PW_REMOTE_STATE_CONNECTED:
--      pw_main_loop_quit (remote->loop);
--      break;
--    default:
--      g_warning ("Unknown PipeWire state");
--      break;
-     }
- }
- 
--static const struct pw_remote_events remote_events = {
--  PW_VERSION_REMOTE_EVENTS,
--  .state_changed = on_state_changed,
--};
--
- static void
- core_event_done (void *user_data,
--                 uint32_t seq)
-+                 uint32_t id, int seq)
- {
-   PipeWireRemote *remote = user_data;
- 
--  if (remote->sync_seq == seq)
-+  if (id == PW_ID_CORE && remote->sync_seq == seq)
-     pw_main_loop_quit (remote->loop);
- }
- 
--static const struct pw_core_proxy_events core_events = {
--  PW_VERSION_CORE_PROXY_EVENTS,
-+static const struct pw_core_events core_events = {
-+  PW_VERSION_CORE_EVENTS,
-+  .error = core_event_error,
-   .done = core_event_done,
- };
- 
-@@ -237,8 +209,8 @@ void
- pipewire_remote_destroy (PipeWireRemote *remote)
- {
-   g_clear_pointer (&remote->globals, g_hash_table_destroy);
--  g_clear_pointer (&remote->remote, pw_remote_destroy);
--  g_clear_pointer (&remote->core, pw_core_destroy);
-+  g_clear_pointer (&remote->core, pw_core_disconnect);
-+  g_clear_pointer (&remote->context, pw_context_destroy);
-   g_clear_pointer (&remote->loop, pw_main_loop_destroy);
-   g_clear_error (&remote->error);
- 
-@@ -307,68 +279,31 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
-       return NULL;
-     }
- 
--  remote->core = pw_core_new (pw_main_loop_get_loop (remote->loop), NULL);
--  if (!remote->core)
-+  remote->context = pw_context_new (pw_main_loop_get_loop (remote->loop), NULL, 0);
-+  if (!remote->context)
-     {
-       pipewire_remote_destroy (remote);
-       pw_properties_free (pipewire_properties);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire core");
-+                   "Couldn't create PipeWire context");
-       return NULL;
-     }
- 
--  remote->remote = pw_remote_new (remote->core, pipewire_properties, 0);
--  if (!remote->remote)
-+  remote->core = pw_context_connect (remote->context, pipewire_properties, 0);
-+  if (!remote->core)
-     {
-       pipewire_remote_destroy (remote);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire remote");
-+                   "Couldn't connect to PipeWire");
-       return NULL;
-     }
- 
-   remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free);
- 
--  pw_remote_add_listener (remote->remote,
--                          &remote->remote_listener,
--                          &remote_events,
--                          remote);
--
--  if (pw_remote_connect (remote->remote) != 0)
--    {
--      pipewire_remote_destroy (remote);
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't connect PipeWire remote");
--      return NULL;
--    }
--
--  pw_main_loop_run (remote->loop);
--
--  switch (pw_remote_get_state (remote->remote, NULL))
--    {
--    case PW_REMOTE_STATE_ERROR:
--    case PW_REMOTE_STATE_UNCONNECTED:
--      *error = g_steal_pointer (&remote->error);
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTING:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "PipeWire loop stopped unexpectedly");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTED:
--      break;
--    default:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Unexpected PipeWire state");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    }
--
--  remote->core_proxy = pw_remote_get_core_proxy (remote->remote);
--  pw_core_proxy_add_listener (remote->core_proxy,
--                              &remote->core_listener,
--                              &core_events,
--                              remote);
-+  pw_core_add_listener (remote->core,
-+                        &remote->core_listener,
-+                        &core_events,
-+                        remote);
- 
-   if (!discover_node_factory_sync (remote, error))
-     {
-diff --git src/pipewire.h src/pipewire.h
-index 0f1bf54..bf48d5e 100644
---- src/pipewire.h
-+++ src/pipewire.h
-@@ -32,7 +32,7 @@ typedef struct _PipeWireGlobal
- 
- typedef void (* PipeWireGlobalAddedCallback) (PipeWireRemote *remote,
-                                               uint32_t id,
--                                              uint32_t type,
-+                                              const char *type,
-                                               const struct spa_dict *props,
-                                               gpointer user_data);
- 
-@@ -43,13 +43,11 @@ typedef void (* PipeWireGlobalRemovedCallback) (PipeWireRemote *remote,
- struct _PipeWireRemote
- {
-   struct pw_main_loop *loop;
-+  struct pw_context *context;
-   struct pw_core *core;
--  struct pw_remote *remote;
--  struct spa_hook remote_listener;
--
--  struct pw_core_proxy *core_proxy;
-   struct spa_hook core_listener;
--  uint32_t sync_seq;
-+
-+  int sync_seq;
- 
-   struct spa_hook registry_listener;
- 
-diff --git src/screen-cast.c src/screen-cast.c
-index 7881ddc..1677050 100644
---- src/screen-cast.c
-+++ src/screen-cast.c
-@@ -31,10 +31,10 @@
- #include "xdp-impl-dbus.h"
- #include "xdp-utils.h"
- 
--#define PERMISSION_ITEM(item_key, item_value) \
--  ((struct spa_dict_item) { \
--    .key = item_key, \
--    .value = item_value \
-+#define PERMISSION_ITEM(item_id, item_permissions) \
-+  ((struct pw_permission) { \
-+    .id = item_id, \
-+    .permissions = item_permissions \
-   })
- 
- typedef struct _ScreenCast ScreenCast;
-@@ -517,42 +517,9 @@ screen_cast_stream_get_pipewire_node_id (ScreenCastStream *stream)
-   return stream->id;
- }
- 
--static void
--append_parent_permissions (PipeWireRemote *remote,
--                           GArray *permission_items,
--                           GList **string_stash,
--                           PipeWireGlobal *global,
--                           const char *permission)
--{
--  PipeWireGlobal *parent;
--  char *parent_permission_value;
--
--  if (global->parent_id == 0)
--    return;
--
--  parent = g_hash_table_lookup (remote->globals, GINT_TO_POINTER (global->parent_id));
--
--  if (parent->permission_set)
--    return;
--  parent->permission_set = TRUE;
--
--  append_parent_permissions (remote, permission_items, string_stash,
--                             parent, permission);
--
--  parent_permission_value = g_strdup_printf ("%u:%s",
--                                             global->parent_id,
--                                             permission);
--  *string_stash = g_list_prepend (*string_stash, parent_permission_value);
--
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       parent_permission_value));
--}
--
- static void
- append_stream_permissions (PipeWireRemote *remote,
-                            GArray *permission_items,
--                           GList **string_stash,
-                            GList *streams)
- {
-   GList *l;
-@@ -561,21 +528,10 @@ append_stream_permissions (PipeWireRemote *remote,
-     {
-       ScreenCastStream *stream = l->data;
-       uint32_t stream_id;
--      PipeWireGlobal *stream_global;
--      char *stream_permission_value;
- 
-       stream_id = screen_cast_stream_get_pipewire_node_id (stream);
--      stream_global = g_hash_table_lookup (remote->globals,
--                                           GINT_TO_POINTER (stream_id));
--
--      append_parent_permissions (remote, permission_items, string_stash,
--                                 stream_global, "r--");
--
--      stream_permission_value = g_strdup_printf ("%u:rwx", stream_id);
--      *string_stash = g_list_prepend (*string_stash, stream_permission_value);
-       g_array_append_val (permission_items,
--                          PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                           stream_permission_value));
-+                          PERMISSION_ITEM (stream_id, PW_PERM_RWX));
-     }
- }
- 
-@@ -587,9 +543,6 @@ open_pipewire_screen_cast_remote (const char *app_id,
-   struct pw_properties *pipewire_properties;
-   PipeWireRemote *remote;
-   g_autoptr(GArray) permission_items = NULL;
--  char *node_factory_permission_string;
--  GList *string_stash = NULL;
--  struct spa_dict *permission_dict;
-   PipeWireGlobal *node_global;
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.app_id", app_id,
-@@ -603,48 +556,31 @@ open_pipewire_screen_cast_remote (const char *app_id,
- 
-   permission_items = g_array_new (FALSE, TRUE, sizeof (struct spa_dict_item));
- 
--  /*
--   * Hide all existing and future nodes (except the ones we explicitly list below.
--   */
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_EXISTING,
--                                       "---"));
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_DEFAULT,
--                                       "---"));
--
-   /*
-    * PipeWire:Interface:Core
-    * Needs rwx to be able create the sink node using the create-object method
-    */
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       "0:rwx"));
-+                      PERMISSION_ITEM (PW_ID_CORE, PW_PERM_RWX));
- 
-   /*
-    * PipeWire:Interface:NodeFactory
-    * Needs r-- so it can be passed to create-object when creating the sink node.
-    */
--  node_factory_permission_string = g_strdup_printf ("%d:r--",
--                                                    remote->node_factory_id);
--  string_stash = g_list_prepend (string_stash, node_factory_permission_string);
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       node_factory_permission_string));
--  node_global = g_hash_table_lookup (remote->globals,
--                                     GINT_TO_POINTER (remote->node_factory_id));
--  append_parent_permissions (remote, permission_items, &string_stash,
--                             node_global, "r--");
-+                      PERMISSION_ITEM (remote->node_factory_id, PW_PERM_R));
- 
--  append_stream_permissions (remote, permission_items, &string_stash, streams);
-+  append_stream_permissions (remote, permission_items, streams);
- 
--  permission_dict =
--    &SPA_DICT_INIT ((struct spa_dict_item *) permission_items->data,
--                    permission_items->len);
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             permission_dict);
-+  /*
-+   * Hide all existing and future nodes (except the ones we explicitly list above).
-+   */
-+  g_array_append_val (permission_items,
-+                      PERMISSION_ITEM (PW_ID_ANY, 0));
- 
--  g_list_free_full (string_stash, g_free);
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                permission_items->len,
-+                                (const struct pw_permission *)permission_items->data);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -943,7 +879,7 @@ handle_open_pipewire_remote (XdpScreenCast *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 1136b6a6e0e..a25c486aad3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -1,7 +1,7 @@
 # Template file for 'xdg-desktop-portal'
 pkgname=xdg-desktop-portal
-version=1.6.0
-revision=2
+version=1.8.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
 hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
@@ -11,12 +11,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
-checksum=883c9c9a925e48af54812b5347f546dd776ec2e27076a83d5a8126af6bafb9da
+checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
 pre_configure() {
 	autoreconf -vfi
 }
 
 post_install() {
-	rm -rf "${DESTDIR}/usr/lib/systemd"
+	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 1068aafc0c0fa1b534d3553284ea00e43f0ef76a Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Wed, 23 Sep 2020 16:44:56 -0400
Subject: [PATCH 2/3] xdg-desktop-portal: enable libportal

---
 srcpkgs/xdg-desktop-portal/template | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad3..a288b1a2644 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config glib-devel"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 5f611f3e22575c29aee7e7c6c07cf9a83419dc5a Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Thu, 24 Sep 2020 11:48:10 -0400
Subject: [PATCH 3/3] xdg-desktop-portal: enable check target

---
 srcpkgs/xdg-desktop-portal/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a288b1a2644..2a95e587a87 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,6 +3,7 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
+make_check_target="test"
 configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
 hostmakedepends="pkg-config glib-devel"
 makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (14 preceding siblings ...)
  2020-09-24 15:48 ` [PR PATCH] [Updated] " concatime
@ 2020-09-24 19:16 ` q66
  2020-09-24 19:28 ` [PR PATCH] [Updated] " concatime
                   ` (13 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: q66 @ 2020-09-24 19:16 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698537144

Comment:
do the tests pass? if so, squash the commits, and this is ready to go

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

* Re: [PR PATCH] [Updated] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (15 preceding siblings ...)
  2020-09-24 19:16 ` q66
@ 2020-09-24 19:28 ` concatime
  2020-09-24 19:29 ` concatime
                   ` (12 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 19:28 UTC (permalink / raw)
  To: ml

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

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

https://github.com/concatime/void-packages xdg-desktop-portal
https://github.com/void-linux/void-packages/pull/25040

xdg-desktop-portal: update to 1.8.0


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-desktop-portal-25040.patch --]
[-- Type: text/x-diff, Size: 24640 bytes --]

From c129ec190be64d9e78b1102687a917ff9eeb97f4 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Tue, 22 Sep 2020 18:36:38 -0400
Subject: [PATCH 1/3] xdg-desktop-portal: update to 1.8.0

---
 .../patches/pipewire-0.3.patch                | 551 ------------------
 srcpkgs/xdg-desktop-portal/template           |   8 +-
 2 files changed, 4 insertions(+), 555 deletions(-)
 delete mode 100644 srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch

diff --git a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch b/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
deleted file mode 100644
index 94ebe083598..00000000000
--- a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From a38901e5e7f835efe7b7a06c55790c8c20bc91a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Tue, 14 Jan 2020 09:37:09 +0100
-Subject: [PATCH] PipeWire: update to 0.3 API
-
----
- configure.ac      |   2 +-
- src/camera.c      |  24 ++++----
- src/pipewire.c    | 141 +++++++++++++---------------------------------
- src/pipewire.h    |  10 ++--
- src/screen-cast.c |  98 ++++++--------------------------
- 5 files changed, 72 insertions(+), 203 deletions(-)
-
-diff --git configure.ac configure.ac
-index 89902fa..62d7960 100644
---- configure.ac
-+++ configure.ac
-@@ -97,7 +97,7 @@ AC_ARG_ENABLE(pipewire,
- 	      [AS_HELP_STRING([--enable-pipewire],[Enable PipeWire support. Needed for screen cast portal])],
- 	      enable_pipewire=$enableval, enable_pipewire=yes)
- if test x$enable_pipewire = xyes ; then
--	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.2 >= 0.2.6])
-+	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.3 >= 0.2.90])
- 	AC_DEFINE([HAVE_PIPEWIRE],[1], [Define to enable PipeWire support])
- fi
- AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"])
-diff --git src/camera.c src/camera.c
-index c2b392c..20fe3aa 100644
---- src/camera.c
-+++ src/camera.c
-@@ -141,7 +141,7 @@ open_pipewire_camera_remote (const char *app_id,
-                              GError **error)
- {
-   PipeWireRemote *remote;
--  struct spa_dict_item permission_items[1];
-+  struct pw_permission permission_items[2];
-   struct pw_properties *pipewire_properties;
- 
-   pipewire_properties =
-@@ -158,12 +158,12 @@ open_pipewire_camera_remote (const char *app_id,
-    * Hide all existing and future nodes by default. PipeWire will use the
-    * permission store to set up permissions.
-    */
--  permission_items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
--  permission_items[0].value = "---";
-+  permission_items[0] = PW_PERMISSION_INIT (PW_ID_CORE, PW_PERM_RWX);
-+  permission_items[1] = PW_PERMISSION_INIT (PW_ID_ANY, 0);
- 
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             &SPA_DICT_INIT (permission_items,
--                                             G_N_ELEMENTS (permission_items)));
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                G_N_ELEMENTS (permission_items),
-+                                permission_items);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -219,7 +219,7 @@ handle_open_pipewire_remote (XdpCamera *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
-@@ -250,29 +250,28 @@ camera_iface_init (XdpCameraIface *iface)
- static void
- global_added_cb (PipeWireRemote *remote,
-                  uint32_t id,
--                 uint32_t type,
-+                 const char *type,
-                  const struct spa_dict *props,
-                  gpointer user_data)
- {
-   Camera *camera = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *media_class;
-   const struct spa_dict_item *media_role;
- 
--  if (type != core_type->node)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Node) != 0)
-     return;
- 
-   if (!props)
-     return;
- 
--  media_class = spa_dict_lookup_item (props, "media.class");
-+  media_class = spa_dict_lookup_item (props, PW_KEY_MEDIA_CLASS);
-   if (!media_class)
-     return;
- 
-   if (g_strcmp0 (media_class->value, "Video/Source") != 0)
-     return;
- 
--  media_role = spa_dict_lookup_item (props, "media.role");
-+  media_role = spa_dict_lookup_item (props, PW_KEY_MEDIA_ROLE);
-   if (!media_role)
-     return;
- 
-@@ -342,6 +341,7 @@ create_pipewire_remote (Camera *camera,
-     }
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.is_portal", "true",
-+                                           "portal.monitor", "Camera",
-                                            NULL);
-   camera->pipewire_remote = pipewire_remote_new_sync (pipewire_properties,
-                                                       global_added_cb,
-diff --git src/pipewire.c src/pipewire.c
-index 793a378..162cd55 100644
---- src/pipewire.c
-+++ src/pipewire.c
-@@ -21,6 +21,7 @@
- #include <errno.h>
- #include <glib.h>
- #include <pipewire/pipewire.h>
-+#include <spa/utils/result.h>
- 
- #include "pipewire.h"
- 
-@@ -36,27 +37,25 @@ static gboolean is_pipewire_initialized = FALSE;
- static void
- registry_event_global (void *user_data,
-                        uint32_t id,
--                       uint32_t parent_id,
-                        uint32_t permissions,
--                       uint32_t type,
-+                       const char *type,
-                        uint32_t version,
-                        const struct spa_dict *props)
- {
-   PipeWireRemote *remote = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *factory_object_type;
-   PipeWireGlobal *global;
- 
-   global = g_new0 (PipeWireGlobal, 1);
-   *global = (PipeWireGlobal) {
--    .parent_id = parent_id,
-+    .parent_id = id,
-   };
- 
-   g_hash_table_insert (remote->globals, GINT_TO_POINTER (id), global);
-   if (remote->global_added_cb)
-     remote->global_added_cb (remote, id, type, props, remote->user_data);
- 
--  if (type != core_type->factory)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Factory) != 0)
-     return;
- 
-   factory_object_type = spa_dict_lookup_item (props, "factory.type.name");
-@@ -81,8 +80,8 @@ registry_event_global_remove (void *user_data,
-   g_hash_table_remove (remote->globals, GINT_TO_POINTER (id));
- }
- 
--static const struct pw_registry_proxy_events registry_events = {
--  PW_VERSION_REGISTRY_PROXY_EVENTS,
-+static const struct pw_registry_events registry_events = {
-+  PW_VERSION_REGISTRY_EVENTS,
-   .global = registry_event_global,
-   .global_remove = registry_event_global_remove,
- };
-@@ -90,7 +89,7 @@ static const struct pw_registry_proxy_events registry_events = {
- void
- pipewire_remote_roundtrip (PipeWireRemote *remote)
- {
--  pw_core_proxy_sync (remote->core_proxy, ++remote->sync_seq);
-+  remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq);
-   pw_main_loop_run (remote->loop);
- }
- 
-@@ -98,16 +97,13 @@ static gboolean
- discover_node_factory_sync (PipeWireRemote *remote,
-                             GError **error)
- {
--  struct pw_type *core_type = pw_core_get_type (remote->core);
--  struct pw_registry_proxy *registry_proxy;
-+  struct pw_registry *registry;
- 
--  registry_proxy = pw_core_proxy_get_registry (remote->core_proxy,
--                                               core_type->registry,
--                                               PW_VERSION_REGISTRY, 0);
--  pw_registry_proxy_add_listener (registry_proxy,
--                                  &remote->registry_listener,
--                                  &registry_events,
--                                  remote);
-+  registry = pw_core_get_registry (remote->core, PW_VERSION_REGISTRY, 0);
-+  pw_registry_add_listener (registry,
-+                            &remote->registry_listener,
-+                            &registry_events,
-+                            remote);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -122,59 +118,35 @@ discover_node_factory_sync (PipeWireRemote *remote,
- }
- 
- static void
--on_state_changed (void *user_data,
--                  enum pw_remote_state old,
--                  enum pw_remote_state state,
--                  const char *error)
-+core_event_error (void       *user_data,
-+                  uint32_t    id,
-+		  int         seq,
-+		  int         res,
-+		  const char *message)
- {
-   PipeWireRemote *remote = user_data;
- 
--  switch (state)
-+  if (id == PW_ID_CORE)
-     {
--    case PW_REMOTE_STATE_ERROR:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "%s", error);
--        }
-+      g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                 "%s", message);
-       pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_UNCONNECTED:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "Disconnected");
--        }
--      pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_CONNECTING:
--      break;
--    case PW_REMOTE_STATE_CONNECTED:
--      pw_main_loop_quit (remote->loop);
--      break;
--    default:
--      g_warning ("Unknown PipeWire state");
--      break;
-     }
- }
- 
--static const struct pw_remote_events remote_events = {
--  PW_VERSION_REMOTE_EVENTS,
--  .state_changed = on_state_changed,
--};
--
- static void
- core_event_done (void *user_data,
--                 uint32_t seq)
-+                 uint32_t id, int seq)
- {
-   PipeWireRemote *remote = user_data;
- 
--  if (remote->sync_seq == seq)
-+  if (id == PW_ID_CORE && remote->sync_seq == seq)
-     pw_main_loop_quit (remote->loop);
- }
- 
--static const struct pw_core_proxy_events core_events = {
--  PW_VERSION_CORE_PROXY_EVENTS,
-+static const struct pw_core_events core_events = {
-+  PW_VERSION_CORE_EVENTS,
-+  .error = core_event_error,
-   .done = core_event_done,
- };
- 
-@@ -237,8 +209,8 @@ void
- pipewire_remote_destroy (PipeWireRemote *remote)
- {
-   g_clear_pointer (&remote->globals, g_hash_table_destroy);
--  g_clear_pointer (&remote->remote, pw_remote_destroy);
--  g_clear_pointer (&remote->core, pw_core_destroy);
-+  g_clear_pointer (&remote->core, pw_core_disconnect);
-+  g_clear_pointer (&remote->context, pw_context_destroy);
-   g_clear_pointer (&remote->loop, pw_main_loop_destroy);
-   g_clear_error (&remote->error);
- 
-@@ -307,68 +279,31 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
-       return NULL;
-     }
- 
--  remote->core = pw_core_new (pw_main_loop_get_loop (remote->loop), NULL);
--  if (!remote->core)
-+  remote->context = pw_context_new (pw_main_loop_get_loop (remote->loop), NULL, 0);
-+  if (!remote->context)
-     {
-       pipewire_remote_destroy (remote);
-       pw_properties_free (pipewire_properties);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire core");
-+                   "Couldn't create PipeWire context");
-       return NULL;
-     }
- 
--  remote->remote = pw_remote_new (remote->core, pipewire_properties, 0);
--  if (!remote->remote)
-+  remote->core = pw_context_connect (remote->context, pipewire_properties, 0);
-+  if (!remote->core)
-     {
-       pipewire_remote_destroy (remote);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire remote");
-+                   "Couldn't connect to PipeWire");
-       return NULL;
-     }
- 
-   remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free);
- 
--  pw_remote_add_listener (remote->remote,
--                          &remote->remote_listener,
--                          &remote_events,
--                          remote);
--
--  if (pw_remote_connect (remote->remote) != 0)
--    {
--      pipewire_remote_destroy (remote);
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't connect PipeWire remote");
--      return NULL;
--    }
--
--  pw_main_loop_run (remote->loop);
--
--  switch (pw_remote_get_state (remote->remote, NULL))
--    {
--    case PW_REMOTE_STATE_ERROR:
--    case PW_REMOTE_STATE_UNCONNECTED:
--      *error = g_steal_pointer (&remote->error);
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTING:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "PipeWire loop stopped unexpectedly");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTED:
--      break;
--    default:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Unexpected PipeWire state");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    }
--
--  remote->core_proxy = pw_remote_get_core_proxy (remote->remote);
--  pw_core_proxy_add_listener (remote->core_proxy,
--                              &remote->core_listener,
--                              &core_events,
--                              remote);
-+  pw_core_add_listener (remote->core,
-+                        &remote->core_listener,
-+                        &core_events,
-+                        remote);
- 
-   if (!discover_node_factory_sync (remote, error))
-     {
-diff --git src/pipewire.h src/pipewire.h
-index 0f1bf54..bf48d5e 100644
---- src/pipewire.h
-+++ src/pipewire.h
-@@ -32,7 +32,7 @@ typedef struct _PipeWireGlobal
- 
- typedef void (* PipeWireGlobalAddedCallback) (PipeWireRemote *remote,
-                                               uint32_t id,
--                                              uint32_t type,
-+                                              const char *type,
-                                               const struct spa_dict *props,
-                                               gpointer user_data);
- 
-@@ -43,13 +43,11 @@ typedef void (* PipeWireGlobalRemovedCallback) (PipeWireRemote *remote,
- struct _PipeWireRemote
- {
-   struct pw_main_loop *loop;
-+  struct pw_context *context;
-   struct pw_core *core;
--  struct pw_remote *remote;
--  struct spa_hook remote_listener;
--
--  struct pw_core_proxy *core_proxy;
-   struct spa_hook core_listener;
--  uint32_t sync_seq;
-+
-+  int sync_seq;
- 
-   struct spa_hook registry_listener;
- 
-diff --git src/screen-cast.c src/screen-cast.c
-index 7881ddc..1677050 100644
---- src/screen-cast.c
-+++ src/screen-cast.c
-@@ -31,10 +31,10 @@
- #include "xdp-impl-dbus.h"
- #include "xdp-utils.h"
- 
--#define PERMISSION_ITEM(item_key, item_value) \
--  ((struct spa_dict_item) { \
--    .key = item_key, \
--    .value = item_value \
-+#define PERMISSION_ITEM(item_id, item_permissions) \
-+  ((struct pw_permission) { \
-+    .id = item_id, \
-+    .permissions = item_permissions \
-   })
- 
- typedef struct _ScreenCast ScreenCast;
-@@ -517,42 +517,9 @@ screen_cast_stream_get_pipewire_node_id (ScreenCastStream *stream)
-   return stream->id;
- }
- 
--static void
--append_parent_permissions (PipeWireRemote *remote,
--                           GArray *permission_items,
--                           GList **string_stash,
--                           PipeWireGlobal *global,
--                           const char *permission)
--{
--  PipeWireGlobal *parent;
--  char *parent_permission_value;
--
--  if (global->parent_id == 0)
--    return;
--
--  parent = g_hash_table_lookup (remote->globals, GINT_TO_POINTER (global->parent_id));
--
--  if (parent->permission_set)
--    return;
--  parent->permission_set = TRUE;
--
--  append_parent_permissions (remote, permission_items, string_stash,
--                             parent, permission);
--
--  parent_permission_value = g_strdup_printf ("%u:%s",
--                                             global->parent_id,
--                                             permission);
--  *string_stash = g_list_prepend (*string_stash, parent_permission_value);
--
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       parent_permission_value));
--}
--
- static void
- append_stream_permissions (PipeWireRemote *remote,
-                            GArray *permission_items,
--                           GList **string_stash,
-                            GList *streams)
- {
-   GList *l;
-@@ -561,21 +528,10 @@ append_stream_permissions (PipeWireRemote *remote,
-     {
-       ScreenCastStream *stream = l->data;
-       uint32_t stream_id;
--      PipeWireGlobal *stream_global;
--      char *stream_permission_value;
- 
-       stream_id = screen_cast_stream_get_pipewire_node_id (stream);
--      stream_global = g_hash_table_lookup (remote->globals,
--                                           GINT_TO_POINTER (stream_id));
--
--      append_parent_permissions (remote, permission_items, string_stash,
--                                 stream_global, "r--");
--
--      stream_permission_value = g_strdup_printf ("%u:rwx", stream_id);
--      *string_stash = g_list_prepend (*string_stash, stream_permission_value);
-       g_array_append_val (permission_items,
--                          PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                           stream_permission_value));
-+                          PERMISSION_ITEM (stream_id, PW_PERM_RWX));
-     }
- }
- 
-@@ -587,9 +543,6 @@ open_pipewire_screen_cast_remote (const char *app_id,
-   struct pw_properties *pipewire_properties;
-   PipeWireRemote *remote;
-   g_autoptr(GArray) permission_items = NULL;
--  char *node_factory_permission_string;
--  GList *string_stash = NULL;
--  struct spa_dict *permission_dict;
-   PipeWireGlobal *node_global;
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.app_id", app_id,
-@@ -603,48 +556,31 @@ open_pipewire_screen_cast_remote (const char *app_id,
- 
-   permission_items = g_array_new (FALSE, TRUE, sizeof (struct spa_dict_item));
- 
--  /*
--   * Hide all existing and future nodes (except the ones we explicitly list below.
--   */
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_EXISTING,
--                                       "---"));
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_DEFAULT,
--                                       "---"));
--
-   /*
-    * PipeWire:Interface:Core
-    * Needs rwx to be able create the sink node using the create-object method
-    */
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       "0:rwx"));
-+                      PERMISSION_ITEM (PW_ID_CORE, PW_PERM_RWX));
- 
-   /*
-    * PipeWire:Interface:NodeFactory
-    * Needs r-- so it can be passed to create-object when creating the sink node.
-    */
--  node_factory_permission_string = g_strdup_printf ("%d:r--",
--                                                    remote->node_factory_id);
--  string_stash = g_list_prepend (string_stash, node_factory_permission_string);
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       node_factory_permission_string));
--  node_global = g_hash_table_lookup (remote->globals,
--                                     GINT_TO_POINTER (remote->node_factory_id));
--  append_parent_permissions (remote, permission_items, &string_stash,
--                             node_global, "r--");
-+                      PERMISSION_ITEM (remote->node_factory_id, PW_PERM_R));
- 
--  append_stream_permissions (remote, permission_items, &string_stash, streams);
-+  append_stream_permissions (remote, permission_items, streams);
- 
--  permission_dict =
--    &SPA_DICT_INIT ((struct spa_dict_item *) permission_items->data,
--                    permission_items->len);
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             permission_dict);
-+  /*
-+   * Hide all existing and future nodes (except the ones we explicitly list above).
-+   */
-+  g_array_append_val (permission_items,
-+                      PERMISSION_ITEM (PW_ID_ANY, 0));
- 
--  g_list_free_full (string_stash, g_free);
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                permission_items->len,
-+                                (const struct pw_permission *)permission_items->data);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -943,7 +879,7 @@ handle_open_pipewire_remote (XdpScreenCast *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 1136b6a6e0e..a25c486aad3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -1,7 +1,7 @@
 # Template file for 'xdg-desktop-portal'
 pkgname=xdg-desktop-portal
-version=1.6.0
-revision=2
+version=1.8.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
 hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
@@ -11,12 +11,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
-checksum=883c9c9a925e48af54812b5347f546dd776ec2e27076a83d5a8126af6bafb9da
+checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
 pre_configure() {
 	autoreconf -vfi
 }
 
 post_install() {
-	rm -rf "${DESTDIR}/usr/lib/systemd"
+	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 1068aafc0c0fa1b534d3553284ea00e43f0ef76a Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Wed, 23 Sep 2020 16:44:56 -0400
Subject: [PATCH 2/3] xdg-desktop-portal: enable libportal

---
 srcpkgs/xdg-desktop-portal/template | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad3..a288b1a2644 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config glib-devel"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 81c6ef102e83dbc4889bc5e01bc2dd451ffa2f41 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Thu, 24 Sep 2020 11:48:10 -0400
Subject: [PATCH 3/3] xdg-desktop-portal: enable check target

---
 srcpkgs/xdg-desktop-portal/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a288b1a2644..ed5ca02e223 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,6 +3,7 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
+make_check_target="check"
 configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
 hostmakedepends="pkg-config glib-devel"
 makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (16 preceding siblings ...)
  2020-09-24 19:28 ` [PR PATCH] [Updated] " concatime
@ 2020-09-24 19:29 ` concatime
  2020-09-24 19:32 ` concatime
                   ` (11 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 19:29 UTC (permalink / raw)
  To: ml

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

New comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698543215

Comment:
```
ERROR: test-portals - Bail out! GLib-GIO:ERROR:../gio/gtestdbus.c:622:start_daemon: assertion failed (error == NULL): Failed to spawn child process ?dbus-daemon? (No such file or directory) (g-exec-error-quark, 19)
PASS: testdb 1 /db/open
PASS: testdb 2 /db/serialize
PASS: testdb 3 /db/modify
SKIP: test-doc-portal 1 /db/version # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 2 /db/create_doc # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 3 /db/recursive_doc # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 4 /db/create_docs # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 5 /db/add_named # SKIP fuse_mount: Operation not permitted
ERROR: test-permission-store - Bail out! GLib-GIO:ERROR:../gio/gtestdbus.c:622:start_daemon: assertion failed (error == NULL): Failed to spawn child process ?dbus-daemon? (No such file or directory) (g-exec-error-quark, 19)
SKIP: tests/test-document-fuse.sh - No cap_sys_admin in bounding set, can't use FUSE
============================================================================
Testsuite summary for xdg-desktop-portal 1.8.0
============================================================================
# TOTAL: 11
# PASS:  3
# SKIP:  6
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 2
```

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (17 preceding siblings ...)
  2020-09-24 19:29 ` concatime
@ 2020-09-24 19:32 ` concatime
  2020-09-24 19:33 ` concatime
                   ` (10 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 19:32 UTC (permalink / raw)
  To: ml

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

New comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698543215

Comment:
```
ERROR: test-portals - Bail out! GLib-GIO:ERROR:../gio/gtestdbus.c:622:start_daemon: assertion failed (error == NULL): Failed to spawn child process ?dbus-daemon? (No such file or directory) (g-exec-error-quark, 19)
PASS: testdb 1 /db/open
PASS: testdb 2 /db/serialize
PASS: testdb 3 /db/modify
SKIP: test-doc-portal 1 /db/version # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 2 /db/create_doc # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 3 /db/recursive_doc # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 4 /db/create_docs # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 5 /db/add_named # SKIP fuse_mount: Operation not permitted
ERROR: test-permission-store - Bail out! GLib-GIO:ERROR:../gio/gtestdbus.c:622:start_daemon: assertion failed (error == NULL): Failed to spawn child process ?dbus-daemon? (No such file or directory) (g-exec-error-quark, 19)
SKIP: tests/test-document-fuse.sh - No cap_sys_admin in bounding set, can't use FUSE
============================================================================
Testsuite summary for xdg-desktop-portal 1.8.0
============================================================================
# TOTAL: 11
# PASS:  3
# SKIP:  6
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 2
```

`checkdepends="dbus"` should fix this.

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (18 preceding siblings ...)
  2020-09-24 19:32 ` concatime
@ 2020-09-24 19:33 ` concatime
  2020-09-24 19:37 ` [PR PATCH] [Updated] " concatime
                   ` (9 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 19:33 UTC (permalink / raw)
  To: ml

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

New comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698545089

Comment:
```
PASS: test-portals 1 /portal/account/exists
PASS: test-portals 2 /portal/account/basic
PASS: test-portals 3 /portal/account/delay
PASS: test-portals 4 /portal/account/cancel
PASS: test-portals 5 /portal/account/close
PASS: test-portals 6 /portal/account/reason
PASS: test-portals 7 /portal/account/parallel
PASS: test-portals 8 /portal/background/exists
PASS: test-portals 9 /portal/background/basic1
PASS: test-portals 10 /portal/background/basic2
PASS: test-portals 11 /portal/background/commandline
PASS: test-portals 12 /portal/background/reason
PASS: test-portals 13 /portal/camera/exists
PASS: test-portals 14 /portal/camera/basic
PASS: test-portals 15 /portal/camera/delay
PASS: test-portals 16 /portal/camera/close
PASS: test-portals 17 /portal/camera/cancel
PASS: test-portals 18 /portal/camera/lockdown
PASS: test-portals 19 /portal/camera/noaccess1
PASS: test-portals 20 /portal/camera/noaccess2
PASS: test-portals 21 /portal/camera/parallel
PASS: test-portals 22 /portal/email/exists
PASS: test-portals 23 /portal/email/basic
PASS: test-portals 24 /portal/email/delay
PASS: test-portals 25 /portal/email/cancel
PASS: test-portals 26 /portal/email/close
PASS: test-portals 27 /portal/email/address
PASS: test-portals 28 /portal/email/subject
PASS: test-portals 29 /portal/email/parallel
PASS: test-portals 30 /portal/filechooser/exists
PASS: test-portals 31 /portal/gamemode/exists
PASS: test-portals 32 /portal/inhibit/exists
PASS: test-portals 33 /portal/inhibit/basic
PASS: test-portals 34 /portal/inhibit/delay
PASS: test-portals 35 /portal/inhibit/close
PASS: test-portals 36 /portal/inhibit/cancel
PASS: test-portals 37 /portal/inhibit/parallel
PASS: test-portals 38 /portal/inhibit/permissions
ERROR: test-portals - Bail out! xdg-desktop-portal:ERROR:tests/inhibit.c:327:session_state_changed_cb: assertion failed (state == XDP_LOGIN_SESSION_RUNNING): (2 == 1)
PASS: testdb 1 /db/open
PASS: testdb 2 /db/serialize
PASS: testdb 3 /db/modify
SKIP: test-doc-portal 1 /db/version # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 2 /db/create_doc # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 3 /db/recursive_doc # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 4 /db/create_docs # SKIP fuse_mount: Operation not permitted
SKIP: test-doc-portal 5 /db/add_named # SKIP fuse_mount: Operation not permitted
PASS: test-permission-store 1 /permissions/version
PASS: test-permission-store 2 /permissions/change
PASS: test-permission-store 3 /permissions/lookup
PASS: test-permission-store 4 /permissions/delete1
PASS: test-permission-store 5 /permissions/delete2
PASS: test-permission-store 6 /permissions/delete3
PASS: test-permission-store 7 /permissions/delete4
PASS: test-permission-store 8 /permissions/create1
PASS: test-permission-store 9 /permissions/create2
PASS: test-permission-store 10 /permissions/set-value
SKIP: tests/test-document-fuse.sh - No cap_sys_admin in bounding set, can't use FUSE
```

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

* Re: [PR PATCH] [Updated] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (19 preceding siblings ...)
  2020-09-24 19:33 ` concatime
@ 2020-09-24 19:37 ` concatime
  2020-09-24 19:55 ` ericonr
                   ` (8 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 19:37 UTC (permalink / raw)
  To: ml

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

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

https://github.com/concatime/void-packages xdg-desktop-portal
https://github.com/void-linux/void-packages/pull/25040

xdg-desktop-portal: update to 1.8.0


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-desktop-portal-25040.patch --]
[-- Type: text/x-diff, Size: 25521 bytes --]

From c129ec190be64d9e78b1102687a917ff9eeb97f4 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Tue, 22 Sep 2020 18:36:38 -0400
Subject: [PATCH 1/4] xdg-desktop-portal: update to 1.8.0

---
 .../patches/pipewire-0.3.patch                | 551 ------------------
 srcpkgs/xdg-desktop-portal/template           |   8 +-
 2 files changed, 4 insertions(+), 555 deletions(-)
 delete mode 100644 srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch

diff --git a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch b/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
deleted file mode 100644
index 94ebe083598..00000000000
--- a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From a38901e5e7f835efe7b7a06c55790c8c20bc91a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Tue, 14 Jan 2020 09:37:09 +0100
-Subject: [PATCH] PipeWire: update to 0.3 API
-
----
- configure.ac      |   2 +-
- src/camera.c      |  24 ++++----
- src/pipewire.c    | 141 +++++++++++++---------------------------------
- src/pipewire.h    |  10 ++--
- src/screen-cast.c |  98 ++++++--------------------------
- 5 files changed, 72 insertions(+), 203 deletions(-)
-
-diff --git configure.ac configure.ac
-index 89902fa..62d7960 100644
---- configure.ac
-+++ configure.ac
-@@ -97,7 +97,7 @@ AC_ARG_ENABLE(pipewire,
- 	      [AS_HELP_STRING([--enable-pipewire],[Enable PipeWire support. Needed for screen cast portal])],
- 	      enable_pipewire=$enableval, enable_pipewire=yes)
- if test x$enable_pipewire = xyes ; then
--	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.2 >= 0.2.6])
-+	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.3 >= 0.2.90])
- 	AC_DEFINE([HAVE_PIPEWIRE],[1], [Define to enable PipeWire support])
- fi
- AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"])
-diff --git src/camera.c src/camera.c
-index c2b392c..20fe3aa 100644
---- src/camera.c
-+++ src/camera.c
-@@ -141,7 +141,7 @@ open_pipewire_camera_remote (const char *app_id,
-                              GError **error)
- {
-   PipeWireRemote *remote;
--  struct spa_dict_item permission_items[1];
-+  struct pw_permission permission_items[2];
-   struct pw_properties *pipewire_properties;
- 
-   pipewire_properties =
-@@ -158,12 +158,12 @@ open_pipewire_camera_remote (const char *app_id,
-    * Hide all existing and future nodes by default. PipeWire will use the
-    * permission store to set up permissions.
-    */
--  permission_items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
--  permission_items[0].value = "---";
-+  permission_items[0] = PW_PERMISSION_INIT (PW_ID_CORE, PW_PERM_RWX);
-+  permission_items[1] = PW_PERMISSION_INIT (PW_ID_ANY, 0);
- 
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             &SPA_DICT_INIT (permission_items,
--                                             G_N_ELEMENTS (permission_items)));
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                G_N_ELEMENTS (permission_items),
-+                                permission_items);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -219,7 +219,7 @@ handle_open_pipewire_remote (XdpCamera *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
-@@ -250,29 +250,28 @@ camera_iface_init (XdpCameraIface *iface)
- static void
- global_added_cb (PipeWireRemote *remote,
-                  uint32_t id,
--                 uint32_t type,
-+                 const char *type,
-                  const struct spa_dict *props,
-                  gpointer user_data)
- {
-   Camera *camera = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *media_class;
-   const struct spa_dict_item *media_role;
- 
--  if (type != core_type->node)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Node) != 0)
-     return;
- 
-   if (!props)
-     return;
- 
--  media_class = spa_dict_lookup_item (props, "media.class");
-+  media_class = spa_dict_lookup_item (props, PW_KEY_MEDIA_CLASS);
-   if (!media_class)
-     return;
- 
-   if (g_strcmp0 (media_class->value, "Video/Source") != 0)
-     return;
- 
--  media_role = spa_dict_lookup_item (props, "media.role");
-+  media_role = spa_dict_lookup_item (props, PW_KEY_MEDIA_ROLE);
-   if (!media_role)
-     return;
- 
-@@ -342,6 +341,7 @@ create_pipewire_remote (Camera *camera,
-     }
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.is_portal", "true",
-+                                           "portal.monitor", "Camera",
-                                            NULL);
-   camera->pipewire_remote = pipewire_remote_new_sync (pipewire_properties,
-                                                       global_added_cb,
-diff --git src/pipewire.c src/pipewire.c
-index 793a378..162cd55 100644
---- src/pipewire.c
-+++ src/pipewire.c
-@@ -21,6 +21,7 @@
- #include <errno.h>
- #include <glib.h>
- #include <pipewire/pipewire.h>
-+#include <spa/utils/result.h>
- 
- #include "pipewire.h"
- 
-@@ -36,27 +37,25 @@ static gboolean is_pipewire_initialized = FALSE;
- static void
- registry_event_global (void *user_data,
-                        uint32_t id,
--                       uint32_t parent_id,
-                        uint32_t permissions,
--                       uint32_t type,
-+                       const char *type,
-                        uint32_t version,
-                        const struct spa_dict *props)
- {
-   PipeWireRemote *remote = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *factory_object_type;
-   PipeWireGlobal *global;
- 
-   global = g_new0 (PipeWireGlobal, 1);
-   *global = (PipeWireGlobal) {
--    .parent_id = parent_id,
-+    .parent_id = id,
-   };
- 
-   g_hash_table_insert (remote->globals, GINT_TO_POINTER (id), global);
-   if (remote->global_added_cb)
-     remote->global_added_cb (remote, id, type, props, remote->user_data);
- 
--  if (type != core_type->factory)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Factory) != 0)
-     return;
- 
-   factory_object_type = spa_dict_lookup_item (props, "factory.type.name");
-@@ -81,8 +80,8 @@ registry_event_global_remove (void *user_data,
-   g_hash_table_remove (remote->globals, GINT_TO_POINTER (id));
- }
- 
--static const struct pw_registry_proxy_events registry_events = {
--  PW_VERSION_REGISTRY_PROXY_EVENTS,
-+static const struct pw_registry_events registry_events = {
-+  PW_VERSION_REGISTRY_EVENTS,
-   .global = registry_event_global,
-   .global_remove = registry_event_global_remove,
- };
-@@ -90,7 +89,7 @@ static const struct pw_registry_proxy_events registry_events = {
- void
- pipewire_remote_roundtrip (PipeWireRemote *remote)
- {
--  pw_core_proxy_sync (remote->core_proxy, ++remote->sync_seq);
-+  remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq);
-   pw_main_loop_run (remote->loop);
- }
- 
-@@ -98,16 +97,13 @@ static gboolean
- discover_node_factory_sync (PipeWireRemote *remote,
-                             GError **error)
- {
--  struct pw_type *core_type = pw_core_get_type (remote->core);
--  struct pw_registry_proxy *registry_proxy;
-+  struct pw_registry *registry;
- 
--  registry_proxy = pw_core_proxy_get_registry (remote->core_proxy,
--                                               core_type->registry,
--                                               PW_VERSION_REGISTRY, 0);
--  pw_registry_proxy_add_listener (registry_proxy,
--                                  &remote->registry_listener,
--                                  &registry_events,
--                                  remote);
-+  registry = pw_core_get_registry (remote->core, PW_VERSION_REGISTRY, 0);
-+  pw_registry_add_listener (registry,
-+                            &remote->registry_listener,
-+                            &registry_events,
-+                            remote);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -122,59 +118,35 @@ discover_node_factory_sync (PipeWireRemote *remote,
- }
- 
- static void
--on_state_changed (void *user_data,
--                  enum pw_remote_state old,
--                  enum pw_remote_state state,
--                  const char *error)
-+core_event_error (void       *user_data,
-+                  uint32_t    id,
-+		  int         seq,
-+		  int         res,
-+		  const char *message)
- {
-   PipeWireRemote *remote = user_data;
- 
--  switch (state)
-+  if (id == PW_ID_CORE)
-     {
--    case PW_REMOTE_STATE_ERROR:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "%s", error);
--        }
-+      g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                 "%s", message);
-       pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_UNCONNECTED:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "Disconnected");
--        }
--      pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_CONNECTING:
--      break;
--    case PW_REMOTE_STATE_CONNECTED:
--      pw_main_loop_quit (remote->loop);
--      break;
--    default:
--      g_warning ("Unknown PipeWire state");
--      break;
-     }
- }
- 
--static const struct pw_remote_events remote_events = {
--  PW_VERSION_REMOTE_EVENTS,
--  .state_changed = on_state_changed,
--};
--
- static void
- core_event_done (void *user_data,
--                 uint32_t seq)
-+                 uint32_t id, int seq)
- {
-   PipeWireRemote *remote = user_data;
- 
--  if (remote->sync_seq == seq)
-+  if (id == PW_ID_CORE && remote->sync_seq == seq)
-     pw_main_loop_quit (remote->loop);
- }
- 
--static const struct pw_core_proxy_events core_events = {
--  PW_VERSION_CORE_PROXY_EVENTS,
-+static const struct pw_core_events core_events = {
-+  PW_VERSION_CORE_EVENTS,
-+  .error = core_event_error,
-   .done = core_event_done,
- };
- 
-@@ -237,8 +209,8 @@ void
- pipewire_remote_destroy (PipeWireRemote *remote)
- {
-   g_clear_pointer (&remote->globals, g_hash_table_destroy);
--  g_clear_pointer (&remote->remote, pw_remote_destroy);
--  g_clear_pointer (&remote->core, pw_core_destroy);
-+  g_clear_pointer (&remote->core, pw_core_disconnect);
-+  g_clear_pointer (&remote->context, pw_context_destroy);
-   g_clear_pointer (&remote->loop, pw_main_loop_destroy);
-   g_clear_error (&remote->error);
- 
-@@ -307,68 +279,31 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
-       return NULL;
-     }
- 
--  remote->core = pw_core_new (pw_main_loop_get_loop (remote->loop), NULL);
--  if (!remote->core)
-+  remote->context = pw_context_new (pw_main_loop_get_loop (remote->loop), NULL, 0);
-+  if (!remote->context)
-     {
-       pipewire_remote_destroy (remote);
-       pw_properties_free (pipewire_properties);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire core");
-+                   "Couldn't create PipeWire context");
-       return NULL;
-     }
- 
--  remote->remote = pw_remote_new (remote->core, pipewire_properties, 0);
--  if (!remote->remote)
-+  remote->core = pw_context_connect (remote->context, pipewire_properties, 0);
-+  if (!remote->core)
-     {
-       pipewire_remote_destroy (remote);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire remote");
-+                   "Couldn't connect to PipeWire");
-       return NULL;
-     }
- 
-   remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free);
- 
--  pw_remote_add_listener (remote->remote,
--                          &remote->remote_listener,
--                          &remote_events,
--                          remote);
--
--  if (pw_remote_connect (remote->remote) != 0)
--    {
--      pipewire_remote_destroy (remote);
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't connect PipeWire remote");
--      return NULL;
--    }
--
--  pw_main_loop_run (remote->loop);
--
--  switch (pw_remote_get_state (remote->remote, NULL))
--    {
--    case PW_REMOTE_STATE_ERROR:
--    case PW_REMOTE_STATE_UNCONNECTED:
--      *error = g_steal_pointer (&remote->error);
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTING:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "PipeWire loop stopped unexpectedly");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTED:
--      break;
--    default:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Unexpected PipeWire state");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    }
--
--  remote->core_proxy = pw_remote_get_core_proxy (remote->remote);
--  pw_core_proxy_add_listener (remote->core_proxy,
--                              &remote->core_listener,
--                              &core_events,
--                              remote);
-+  pw_core_add_listener (remote->core,
-+                        &remote->core_listener,
-+                        &core_events,
-+                        remote);
- 
-   if (!discover_node_factory_sync (remote, error))
-     {
-diff --git src/pipewire.h src/pipewire.h
-index 0f1bf54..bf48d5e 100644
---- src/pipewire.h
-+++ src/pipewire.h
-@@ -32,7 +32,7 @@ typedef struct _PipeWireGlobal
- 
- typedef void (* PipeWireGlobalAddedCallback) (PipeWireRemote *remote,
-                                               uint32_t id,
--                                              uint32_t type,
-+                                              const char *type,
-                                               const struct spa_dict *props,
-                                               gpointer user_data);
- 
-@@ -43,13 +43,11 @@ typedef void (* PipeWireGlobalRemovedCallback) (PipeWireRemote *remote,
- struct _PipeWireRemote
- {
-   struct pw_main_loop *loop;
-+  struct pw_context *context;
-   struct pw_core *core;
--  struct pw_remote *remote;
--  struct spa_hook remote_listener;
--
--  struct pw_core_proxy *core_proxy;
-   struct spa_hook core_listener;
--  uint32_t sync_seq;
-+
-+  int sync_seq;
- 
-   struct spa_hook registry_listener;
- 
-diff --git src/screen-cast.c src/screen-cast.c
-index 7881ddc..1677050 100644
---- src/screen-cast.c
-+++ src/screen-cast.c
-@@ -31,10 +31,10 @@
- #include "xdp-impl-dbus.h"
- #include "xdp-utils.h"
- 
--#define PERMISSION_ITEM(item_key, item_value) \
--  ((struct spa_dict_item) { \
--    .key = item_key, \
--    .value = item_value \
-+#define PERMISSION_ITEM(item_id, item_permissions) \
-+  ((struct pw_permission) { \
-+    .id = item_id, \
-+    .permissions = item_permissions \
-   })
- 
- typedef struct _ScreenCast ScreenCast;
-@@ -517,42 +517,9 @@ screen_cast_stream_get_pipewire_node_id (ScreenCastStream *stream)
-   return stream->id;
- }
- 
--static void
--append_parent_permissions (PipeWireRemote *remote,
--                           GArray *permission_items,
--                           GList **string_stash,
--                           PipeWireGlobal *global,
--                           const char *permission)
--{
--  PipeWireGlobal *parent;
--  char *parent_permission_value;
--
--  if (global->parent_id == 0)
--    return;
--
--  parent = g_hash_table_lookup (remote->globals, GINT_TO_POINTER (global->parent_id));
--
--  if (parent->permission_set)
--    return;
--  parent->permission_set = TRUE;
--
--  append_parent_permissions (remote, permission_items, string_stash,
--                             parent, permission);
--
--  parent_permission_value = g_strdup_printf ("%u:%s",
--                                             global->parent_id,
--                                             permission);
--  *string_stash = g_list_prepend (*string_stash, parent_permission_value);
--
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       parent_permission_value));
--}
--
- static void
- append_stream_permissions (PipeWireRemote *remote,
-                            GArray *permission_items,
--                           GList **string_stash,
-                            GList *streams)
- {
-   GList *l;
-@@ -561,21 +528,10 @@ append_stream_permissions (PipeWireRemote *remote,
-     {
-       ScreenCastStream *stream = l->data;
-       uint32_t stream_id;
--      PipeWireGlobal *stream_global;
--      char *stream_permission_value;
- 
-       stream_id = screen_cast_stream_get_pipewire_node_id (stream);
--      stream_global = g_hash_table_lookup (remote->globals,
--                                           GINT_TO_POINTER (stream_id));
--
--      append_parent_permissions (remote, permission_items, string_stash,
--                                 stream_global, "r--");
--
--      stream_permission_value = g_strdup_printf ("%u:rwx", stream_id);
--      *string_stash = g_list_prepend (*string_stash, stream_permission_value);
-       g_array_append_val (permission_items,
--                          PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                           stream_permission_value));
-+                          PERMISSION_ITEM (stream_id, PW_PERM_RWX));
-     }
- }
- 
-@@ -587,9 +543,6 @@ open_pipewire_screen_cast_remote (const char *app_id,
-   struct pw_properties *pipewire_properties;
-   PipeWireRemote *remote;
-   g_autoptr(GArray) permission_items = NULL;
--  char *node_factory_permission_string;
--  GList *string_stash = NULL;
--  struct spa_dict *permission_dict;
-   PipeWireGlobal *node_global;
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.app_id", app_id,
-@@ -603,48 +556,31 @@ open_pipewire_screen_cast_remote (const char *app_id,
- 
-   permission_items = g_array_new (FALSE, TRUE, sizeof (struct spa_dict_item));
- 
--  /*
--   * Hide all existing and future nodes (except the ones we explicitly list below.
--   */
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_EXISTING,
--                                       "---"));
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_DEFAULT,
--                                       "---"));
--
-   /*
-    * PipeWire:Interface:Core
-    * Needs rwx to be able create the sink node using the create-object method
-    */
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       "0:rwx"));
-+                      PERMISSION_ITEM (PW_ID_CORE, PW_PERM_RWX));
- 
-   /*
-    * PipeWire:Interface:NodeFactory
-    * Needs r-- so it can be passed to create-object when creating the sink node.
-    */
--  node_factory_permission_string = g_strdup_printf ("%d:r--",
--                                                    remote->node_factory_id);
--  string_stash = g_list_prepend (string_stash, node_factory_permission_string);
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       node_factory_permission_string));
--  node_global = g_hash_table_lookup (remote->globals,
--                                     GINT_TO_POINTER (remote->node_factory_id));
--  append_parent_permissions (remote, permission_items, &string_stash,
--                             node_global, "r--");
-+                      PERMISSION_ITEM (remote->node_factory_id, PW_PERM_R));
- 
--  append_stream_permissions (remote, permission_items, &string_stash, streams);
-+  append_stream_permissions (remote, permission_items, streams);
- 
--  permission_dict =
--    &SPA_DICT_INIT ((struct spa_dict_item *) permission_items->data,
--                    permission_items->len);
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             permission_dict);
-+  /*
-+   * Hide all existing and future nodes (except the ones we explicitly list above).
-+   */
-+  g_array_append_val (permission_items,
-+                      PERMISSION_ITEM (PW_ID_ANY, 0));
- 
--  g_list_free_full (string_stash, g_free);
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                permission_items->len,
-+                                (const struct pw_permission *)permission_items->data);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -943,7 +879,7 @@ handle_open_pipewire_remote (XdpScreenCast *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 1136b6a6e0e..a25c486aad3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -1,7 +1,7 @@
 # Template file for 'xdg-desktop-portal'
 pkgname=xdg-desktop-portal
-version=1.6.0
-revision=2
+version=1.8.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
 hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
@@ -11,12 +11,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
-checksum=883c9c9a925e48af54812b5347f546dd776ec2e27076a83d5a8126af6bafb9da
+checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
 pre_configure() {
 	autoreconf -vfi
 }
 
 post_install() {
-	rm -rf "${DESTDIR}/usr/lib/systemd"
+	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 1068aafc0c0fa1b534d3553284ea00e43f0ef76a Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Wed, 23 Sep 2020 16:44:56 -0400
Subject: [PATCH 2/4] xdg-desktop-portal: enable libportal

---
 srcpkgs/xdg-desktop-portal/template | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad3..a288b1a2644 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config glib-devel"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 81c6ef102e83dbc4889bc5e01bc2dd451ffa2f41 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Thu, 24 Sep 2020 11:48:10 -0400
Subject: [PATCH 3/4] xdg-desktop-portal: enable check target

---
 srcpkgs/xdg-desktop-portal/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a288b1a2644..ed5ca02e223 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,6 +3,7 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
+make_check_target="check"
 configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
 hostmakedepends="pkg-config glib-devel"
 makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel

From c493473dee1618bb2cf6eb1fa3d42f01576a6671 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Thu, 24 Sep 2020 15:37:13 -0400
Subject: [PATCH 4/4] xdg-desktop-portal: add dbus to checkdepends

---
 srcpkgs/xdg-desktop-portal/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index ed5ca02e223..4b4c7ebe1d7 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -8,6 +8,7 @@ configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
 hostmakedepends="pkg-config glib-devel"
 makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
  libportal-devel"
+checkdepends="dbus"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (20 preceding siblings ...)
  2020-09-24 19:37 ` [PR PATCH] [Updated] " concatime
@ 2020-09-24 19:55 ` ericonr
  2020-09-24 20:01 ` concatime
                   ` (7 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: ericonr @ 2020-09-24 19:55 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698556362

Comment:
> checkdepends="dbus" should fix this.

If it doesn't, run the tests with `dbus-run-session <tests>`

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (21 preceding siblings ...)
  2020-09-24 19:55 ` ericonr
@ 2020-09-24 20:01 ` concatime
  2020-09-24 20:01 ` concatime
                   ` (6 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 20:01 UTC (permalink / raw)
  To: ml

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

New comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698558898

Comment:
@ericonr
```
dbus[6734]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[6734]: Failed to start message bus: Memory allocation failure in message bus
dbus-run-session: EOF reading address from bus daemon
```

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (22 preceding siblings ...)
  2020-09-24 20:01 ` concatime
@ 2020-09-24 20:01 ` concatime
  2020-09-24 21:25 ` ericonr
                   ` (5 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 20:01 UTC (permalink / raw)
  To: ml

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

New comment by concatime on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698558898

Comment:
@ericonr
```sh
do_check() {
	dbus-run-session make check
}
```
```
dbus[6734]: Could not get password database information for UID of current process: User "???" unknown or no memory to allocate password entry

dbus[6734]: Failed to start message bus: Memory allocation failure in message bus
dbus-run-session: EOF reading address from bus daemon
```

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (23 preceding siblings ...)
  2020-09-24 20:01 ` concatime
@ 2020-09-24 21:25 ` ericonr
  2020-09-24 22:47 ` q66
                   ` (4 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: ericonr @ 2020-09-24 21:25 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698596689

Comment:
hmm no idea what could have caused that :o 

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (24 preceding siblings ...)
  2020-09-24 21:25 ` ericonr
@ 2020-09-24 22:47 ` q66
  2020-09-24 23:19 ` [PR PATCH] [Updated] " concatime
                   ` (3 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: q66 @ 2020-09-24 22:47 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698626925

Comment:
if a test fails because of environment restrictions, you can always patch out the test from running, if it's not too complicated (should be very easy with meson, just comment out the appropriate lines)

if it is complicated, then just do

```
# reason here
do_check() {
	:
}
```

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

* Re: [PR PATCH] [Updated] xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (25 preceding siblings ...)
  2020-09-24 22:47 ` q66
@ 2020-09-24 23:19 ` concatime
  2020-09-25  0:43 ` q66
                   ` (2 subsequent siblings)
  29 siblings, 0 replies; 31+ messages in thread
From: concatime @ 2020-09-24 23:19 UTC (permalink / raw)
  To: ml

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

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

https://github.com/concatime/void-packages xdg-desktop-portal
https://github.com/void-linux/void-packages/pull/25040

xdg-desktop-portal: update to 1.8.0


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-xdg-desktop-portal-25040.patch --]
[-- Type: text/x-diff, Size: 27136 bytes --]

From c129ec190be64d9e78b1102687a917ff9eeb97f4 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Tue, 22 Sep 2020 18:36:38 -0400
Subject: [PATCH 1/5] xdg-desktop-portal: update to 1.8.0

---
 .../patches/pipewire-0.3.patch                | 551 ------------------
 srcpkgs/xdg-desktop-portal/template           |   8 +-
 2 files changed, 4 insertions(+), 555 deletions(-)
 delete mode 100644 srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch

diff --git a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch b/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
deleted file mode 100644
index 94ebe083598..00000000000
--- a/srcpkgs/xdg-desktop-portal/patches/pipewire-0.3.patch
+++ /dev/null
@@ -1,551 +0,0 @@
-From a38901e5e7f835efe7b7a06c55790c8c20bc91a2 Mon Sep 17 00:00:00 2001
-From: Wim Taymans <wtaymans@redhat.com>
-Date: Tue, 14 Jan 2020 09:37:09 +0100
-Subject: [PATCH] PipeWire: update to 0.3 API
-
----
- configure.ac      |   2 +-
- src/camera.c      |  24 ++++----
- src/pipewire.c    | 141 +++++++++++++---------------------------------
- src/pipewire.h    |  10 ++--
- src/screen-cast.c |  98 ++++++--------------------------
- 5 files changed, 72 insertions(+), 203 deletions(-)
-
-diff --git configure.ac configure.ac
-index 89902fa..62d7960 100644
---- configure.ac
-+++ configure.ac
-@@ -97,7 +97,7 @@ AC_ARG_ENABLE(pipewire,
- 	      [AS_HELP_STRING([--enable-pipewire],[Enable PipeWire support. Needed for screen cast portal])],
- 	      enable_pipewire=$enableval, enable_pipewire=yes)
- if test x$enable_pipewire = xyes ; then
--	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.2 >= 0.2.6])
-+	PKG_CHECK_MODULES(PIPEWIRE, [libpipewire-0.3 >= 0.2.90])
- 	AC_DEFINE([HAVE_PIPEWIRE],[1], [Define to enable PipeWire support])
- fi
- AM_CONDITIONAL([HAVE_PIPEWIRE],[test "$enable_pipewire" = "yes"])
-diff --git src/camera.c src/camera.c
-index c2b392c..20fe3aa 100644
---- src/camera.c
-+++ src/camera.c
-@@ -141,7 +141,7 @@ open_pipewire_camera_remote (const char *app_id,
-                              GError **error)
- {
-   PipeWireRemote *remote;
--  struct spa_dict_item permission_items[1];
-+  struct pw_permission permission_items[2];
-   struct pw_properties *pipewire_properties;
- 
-   pipewire_properties =
-@@ -158,12 +158,12 @@ open_pipewire_camera_remote (const char *app_id,
-    * Hide all existing and future nodes by default. PipeWire will use the
-    * permission store to set up permissions.
-    */
--  permission_items[0].key = PW_CORE_PROXY_PERMISSIONS_DEFAULT;
--  permission_items[0].value = "---";
-+  permission_items[0] = PW_PERMISSION_INIT (PW_ID_CORE, PW_PERM_RWX);
-+  permission_items[1] = PW_PERMISSION_INIT (PW_ID_ANY, 0);
- 
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             &SPA_DICT_INIT (permission_items,
--                                             G_N_ELEMENTS (permission_items)));
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                G_N_ELEMENTS (permission_items),
-+                                permission_items);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -219,7 +219,7 @@ handle_open_pipewire_remote (XdpCamera *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
-@@ -250,29 +250,28 @@ camera_iface_init (XdpCameraIface *iface)
- static void
- global_added_cb (PipeWireRemote *remote,
-                  uint32_t id,
--                 uint32_t type,
-+                 const char *type,
-                  const struct spa_dict *props,
-                  gpointer user_data)
- {
-   Camera *camera = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *media_class;
-   const struct spa_dict_item *media_role;
- 
--  if (type != core_type->node)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Node) != 0)
-     return;
- 
-   if (!props)
-     return;
- 
--  media_class = spa_dict_lookup_item (props, "media.class");
-+  media_class = spa_dict_lookup_item (props, PW_KEY_MEDIA_CLASS);
-   if (!media_class)
-     return;
- 
-   if (g_strcmp0 (media_class->value, "Video/Source") != 0)
-     return;
- 
--  media_role = spa_dict_lookup_item (props, "media.role");
-+  media_role = spa_dict_lookup_item (props, PW_KEY_MEDIA_ROLE);
-   if (!media_role)
-     return;
- 
-@@ -342,6 +341,7 @@ create_pipewire_remote (Camera *camera,
-     }
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.is_portal", "true",
-+                                           "portal.monitor", "Camera",
-                                            NULL);
-   camera->pipewire_remote = pipewire_remote_new_sync (pipewire_properties,
-                                                       global_added_cb,
-diff --git src/pipewire.c src/pipewire.c
-index 793a378..162cd55 100644
---- src/pipewire.c
-+++ src/pipewire.c
-@@ -21,6 +21,7 @@
- #include <errno.h>
- #include <glib.h>
- #include <pipewire/pipewire.h>
-+#include <spa/utils/result.h>
- 
- #include "pipewire.h"
- 
-@@ -36,27 +37,25 @@ static gboolean is_pipewire_initialized = FALSE;
- static void
- registry_event_global (void *user_data,
-                        uint32_t id,
--                       uint32_t parent_id,
-                        uint32_t permissions,
--                       uint32_t type,
-+                       const char *type,
-                        uint32_t version,
-                        const struct spa_dict *props)
- {
-   PipeWireRemote *remote = user_data;
--  struct pw_type *core_type = pw_core_get_type (remote->core);
-   const struct spa_dict_item *factory_object_type;
-   PipeWireGlobal *global;
- 
-   global = g_new0 (PipeWireGlobal, 1);
-   *global = (PipeWireGlobal) {
--    .parent_id = parent_id,
-+    .parent_id = id,
-   };
- 
-   g_hash_table_insert (remote->globals, GINT_TO_POINTER (id), global);
-   if (remote->global_added_cb)
-     remote->global_added_cb (remote, id, type, props, remote->user_data);
- 
--  if (type != core_type->factory)
-+  if (strcmp(type, PW_TYPE_INTERFACE_Factory) != 0)
-     return;
- 
-   factory_object_type = spa_dict_lookup_item (props, "factory.type.name");
-@@ -81,8 +80,8 @@ registry_event_global_remove (void *user_data,
-   g_hash_table_remove (remote->globals, GINT_TO_POINTER (id));
- }
- 
--static const struct pw_registry_proxy_events registry_events = {
--  PW_VERSION_REGISTRY_PROXY_EVENTS,
-+static const struct pw_registry_events registry_events = {
-+  PW_VERSION_REGISTRY_EVENTS,
-   .global = registry_event_global,
-   .global_remove = registry_event_global_remove,
- };
-@@ -90,7 +89,7 @@ static const struct pw_registry_proxy_events registry_events = {
- void
- pipewire_remote_roundtrip (PipeWireRemote *remote)
- {
--  pw_core_proxy_sync (remote->core_proxy, ++remote->sync_seq);
-+  remote->sync_seq = pw_core_sync (remote->core, PW_ID_CORE, remote->sync_seq);
-   pw_main_loop_run (remote->loop);
- }
- 
-@@ -98,16 +97,13 @@ static gboolean
- discover_node_factory_sync (PipeWireRemote *remote,
-                             GError **error)
- {
--  struct pw_type *core_type = pw_core_get_type (remote->core);
--  struct pw_registry_proxy *registry_proxy;
-+  struct pw_registry *registry;
- 
--  registry_proxy = pw_core_proxy_get_registry (remote->core_proxy,
--                                               core_type->registry,
--                                               PW_VERSION_REGISTRY, 0);
--  pw_registry_proxy_add_listener (registry_proxy,
--                                  &remote->registry_listener,
--                                  &registry_events,
--                                  remote);
-+  registry = pw_core_get_registry (remote->core, PW_VERSION_REGISTRY, 0);
-+  pw_registry_add_listener (registry,
-+                            &remote->registry_listener,
-+                            &registry_events,
-+                            remote);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -122,59 +118,35 @@ discover_node_factory_sync (PipeWireRemote *remote,
- }
- 
- static void
--on_state_changed (void *user_data,
--                  enum pw_remote_state old,
--                  enum pw_remote_state state,
--                  const char *error)
-+core_event_error (void       *user_data,
-+                  uint32_t    id,
-+		  int         seq,
-+		  int         res,
-+		  const char *message)
- {
-   PipeWireRemote *remote = user_data;
- 
--  switch (state)
-+  if (id == PW_ID_CORE)
-     {
--    case PW_REMOTE_STATE_ERROR:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "%s", error);
--        }
-+      g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
-+                 "%s", message);
-       pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_UNCONNECTED:
--      if (!remote->error)
--        {
--          g_set_error (&remote->error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                       "Disconnected");
--        }
--      pw_main_loop_quit (remote->loop);
--      break;
--    case PW_REMOTE_STATE_CONNECTING:
--      break;
--    case PW_REMOTE_STATE_CONNECTED:
--      pw_main_loop_quit (remote->loop);
--      break;
--    default:
--      g_warning ("Unknown PipeWire state");
--      break;
-     }
- }
- 
--static const struct pw_remote_events remote_events = {
--  PW_VERSION_REMOTE_EVENTS,
--  .state_changed = on_state_changed,
--};
--
- static void
- core_event_done (void *user_data,
--                 uint32_t seq)
-+                 uint32_t id, int seq)
- {
-   PipeWireRemote *remote = user_data;
- 
--  if (remote->sync_seq == seq)
-+  if (id == PW_ID_CORE && remote->sync_seq == seq)
-     pw_main_loop_quit (remote->loop);
- }
- 
--static const struct pw_core_proxy_events core_events = {
--  PW_VERSION_CORE_PROXY_EVENTS,
-+static const struct pw_core_events core_events = {
-+  PW_VERSION_CORE_EVENTS,
-+  .error = core_event_error,
-   .done = core_event_done,
- };
- 
-@@ -237,8 +209,8 @@ void
- pipewire_remote_destroy (PipeWireRemote *remote)
- {
-   g_clear_pointer (&remote->globals, g_hash_table_destroy);
--  g_clear_pointer (&remote->remote, pw_remote_destroy);
--  g_clear_pointer (&remote->core, pw_core_destroy);
-+  g_clear_pointer (&remote->core, pw_core_disconnect);
-+  g_clear_pointer (&remote->context, pw_context_destroy);
-   g_clear_pointer (&remote->loop, pw_main_loop_destroy);
-   g_clear_error (&remote->error);
- 
-@@ -307,68 +279,31 @@ pipewire_remote_new_sync (struct pw_properties *pipewire_properties,
-       return NULL;
-     }
- 
--  remote->core = pw_core_new (pw_main_loop_get_loop (remote->loop), NULL);
--  if (!remote->core)
-+  remote->context = pw_context_new (pw_main_loop_get_loop (remote->loop), NULL, 0);
-+  if (!remote->context)
-     {
-       pipewire_remote_destroy (remote);
-       pw_properties_free (pipewire_properties);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire core");
-+                   "Couldn't create PipeWire context");
-       return NULL;
-     }
- 
--  remote->remote = pw_remote_new (remote->core, pipewire_properties, 0);
--  if (!remote->remote)
-+  remote->core = pw_context_connect (remote->context, pipewire_properties, 0);
-+  if (!remote->core)
-     {
-       pipewire_remote_destroy (remote);
-       g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't create PipeWire remote");
-+                   "Couldn't connect to PipeWire");
-       return NULL;
-     }
- 
-   remote->globals = g_hash_table_new_full (NULL, NULL, NULL, g_free);
- 
--  pw_remote_add_listener (remote->remote,
--                          &remote->remote_listener,
--                          &remote_events,
--                          remote);
--
--  if (pw_remote_connect (remote->remote) != 0)
--    {
--      pipewire_remote_destroy (remote);
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Couldn't connect PipeWire remote");
--      return NULL;
--    }
--
--  pw_main_loop_run (remote->loop);
--
--  switch (pw_remote_get_state (remote->remote, NULL))
--    {
--    case PW_REMOTE_STATE_ERROR:
--    case PW_REMOTE_STATE_UNCONNECTED:
--      *error = g_steal_pointer (&remote->error);
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTING:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "PipeWire loop stopped unexpectedly");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    case PW_REMOTE_STATE_CONNECTED:
--      break;
--    default:
--      g_set_error (error, G_IO_ERROR, G_IO_ERROR_FAILED,
--                   "Unexpected PipeWire state");
--      pipewire_remote_destroy (remote);
--      return NULL;
--    }
--
--  remote->core_proxy = pw_remote_get_core_proxy (remote->remote);
--  pw_core_proxy_add_listener (remote->core_proxy,
--                              &remote->core_listener,
--                              &core_events,
--                              remote);
-+  pw_core_add_listener (remote->core,
-+                        &remote->core_listener,
-+                        &core_events,
-+                        remote);
- 
-   if (!discover_node_factory_sync (remote, error))
-     {
-diff --git src/pipewire.h src/pipewire.h
-index 0f1bf54..bf48d5e 100644
---- src/pipewire.h
-+++ src/pipewire.h
-@@ -32,7 +32,7 @@ typedef struct _PipeWireGlobal
- 
- typedef void (* PipeWireGlobalAddedCallback) (PipeWireRemote *remote,
-                                               uint32_t id,
--                                              uint32_t type,
-+                                              const char *type,
-                                               const struct spa_dict *props,
-                                               gpointer user_data);
- 
-@@ -43,13 +43,11 @@ typedef void (* PipeWireGlobalRemovedCallback) (PipeWireRemote *remote,
- struct _PipeWireRemote
- {
-   struct pw_main_loop *loop;
-+  struct pw_context *context;
-   struct pw_core *core;
--  struct pw_remote *remote;
--  struct spa_hook remote_listener;
--
--  struct pw_core_proxy *core_proxy;
-   struct spa_hook core_listener;
--  uint32_t sync_seq;
-+
-+  int sync_seq;
- 
-   struct spa_hook registry_listener;
- 
-diff --git src/screen-cast.c src/screen-cast.c
-index 7881ddc..1677050 100644
---- src/screen-cast.c
-+++ src/screen-cast.c
-@@ -31,10 +31,10 @@
- #include "xdp-impl-dbus.h"
- #include "xdp-utils.h"
- 
--#define PERMISSION_ITEM(item_key, item_value) \
--  ((struct spa_dict_item) { \
--    .key = item_key, \
--    .value = item_value \
-+#define PERMISSION_ITEM(item_id, item_permissions) \
-+  ((struct pw_permission) { \
-+    .id = item_id, \
-+    .permissions = item_permissions \
-   })
- 
- typedef struct _ScreenCast ScreenCast;
-@@ -517,42 +517,9 @@ screen_cast_stream_get_pipewire_node_id (ScreenCastStream *stream)
-   return stream->id;
- }
- 
--static void
--append_parent_permissions (PipeWireRemote *remote,
--                           GArray *permission_items,
--                           GList **string_stash,
--                           PipeWireGlobal *global,
--                           const char *permission)
--{
--  PipeWireGlobal *parent;
--  char *parent_permission_value;
--
--  if (global->parent_id == 0)
--    return;
--
--  parent = g_hash_table_lookup (remote->globals, GINT_TO_POINTER (global->parent_id));
--
--  if (parent->permission_set)
--    return;
--  parent->permission_set = TRUE;
--
--  append_parent_permissions (remote, permission_items, string_stash,
--                             parent, permission);
--
--  parent_permission_value = g_strdup_printf ("%u:%s",
--                                             global->parent_id,
--                                             permission);
--  *string_stash = g_list_prepend (*string_stash, parent_permission_value);
--
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       parent_permission_value));
--}
--
- static void
- append_stream_permissions (PipeWireRemote *remote,
-                            GArray *permission_items,
--                           GList **string_stash,
-                            GList *streams)
- {
-   GList *l;
-@@ -561,21 +528,10 @@ append_stream_permissions (PipeWireRemote *remote,
-     {
-       ScreenCastStream *stream = l->data;
-       uint32_t stream_id;
--      PipeWireGlobal *stream_global;
--      char *stream_permission_value;
- 
-       stream_id = screen_cast_stream_get_pipewire_node_id (stream);
--      stream_global = g_hash_table_lookup (remote->globals,
--                                           GINT_TO_POINTER (stream_id));
--
--      append_parent_permissions (remote, permission_items, string_stash,
--                                 stream_global, "r--");
--
--      stream_permission_value = g_strdup_printf ("%u:rwx", stream_id);
--      *string_stash = g_list_prepend (*string_stash, stream_permission_value);
-       g_array_append_val (permission_items,
--                          PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                           stream_permission_value));
-+                          PERMISSION_ITEM (stream_id, PW_PERM_RWX));
-     }
- }
- 
-@@ -587,9 +543,6 @@ open_pipewire_screen_cast_remote (const char *app_id,
-   struct pw_properties *pipewire_properties;
-   PipeWireRemote *remote;
-   g_autoptr(GArray) permission_items = NULL;
--  char *node_factory_permission_string;
--  GList *string_stash = NULL;
--  struct spa_dict *permission_dict;
-   PipeWireGlobal *node_global;
- 
-   pipewire_properties = pw_properties_new ("pipewire.access.portal.app_id", app_id,
-@@ -603,48 +556,31 @@ open_pipewire_screen_cast_remote (const char *app_id,
- 
-   permission_items = g_array_new (FALSE, TRUE, sizeof (struct spa_dict_item));
- 
--  /*
--   * Hide all existing and future nodes (except the ones we explicitly list below.
--   */
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_EXISTING,
--                                       "---"));
--  g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_DEFAULT,
--                                       "---"));
--
-   /*
-    * PipeWire:Interface:Core
-    * Needs rwx to be able create the sink node using the create-object method
-    */
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       "0:rwx"));
-+                      PERMISSION_ITEM (PW_ID_CORE, PW_PERM_RWX));
- 
-   /*
-    * PipeWire:Interface:NodeFactory
-    * Needs r-- so it can be passed to create-object when creating the sink node.
-    */
--  node_factory_permission_string = g_strdup_printf ("%d:r--",
--                                                    remote->node_factory_id);
--  string_stash = g_list_prepend (string_stash, node_factory_permission_string);
-   g_array_append_val (permission_items,
--                      PERMISSION_ITEM (PW_CORE_PROXY_PERMISSIONS_GLOBAL,
--                                       node_factory_permission_string));
--  node_global = g_hash_table_lookup (remote->globals,
--                                     GINT_TO_POINTER (remote->node_factory_id));
--  append_parent_permissions (remote, permission_items, &string_stash,
--                             node_global, "r--");
-+                      PERMISSION_ITEM (remote->node_factory_id, PW_PERM_R));
- 
--  append_stream_permissions (remote, permission_items, &string_stash, streams);
-+  append_stream_permissions (remote, permission_items, streams);
- 
--  permission_dict =
--    &SPA_DICT_INIT ((struct spa_dict_item *) permission_items->data,
--                    permission_items->len);
--  pw_core_proxy_permissions (pw_remote_get_core_proxy (remote->remote),
--                             permission_dict);
-+  /*
-+   * Hide all existing and future nodes (except the ones we explicitly list above).
-+   */
-+  g_array_append_val (permission_items,
-+                      PERMISSION_ITEM (PW_ID_ANY, 0));
- 
--  g_list_free_full (string_stash, g_free);
-+  pw_client_update_permissions (pw_core_get_client(remote->core),
-+                                permission_items->len,
-+                                (const struct pw_permission *)permission_items->data);
- 
-   pipewire_remote_roundtrip (remote);
- 
-@@ -943,7 +879,7 @@ handle_open_pipewire_remote (XdpScreenCast *object,
-     }
- 
-   out_fd_list = g_unix_fd_list_new ();
--  fd = pw_remote_steal_fd (remote->remote);
-+  fd = pw_core_steal_fd (remote->core);
-   fd_id = g_unix_fd_list_append (out_fd_list, fd, &error);
-   close (fd);
-   pipewire_remote_destroy (remote);
diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 1136b6a6e0e..a25c486aad3 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -1,7 +1,7 @@
 # Template file for 'xdg-desktop-portal'
 pkgname=xdg-desktop-portal
-version=1.6.0
-revision=2
+version=1.8.0
+revision=1
 build_style=gnu-configure
 configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
 hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
@@ -11,12 +11,12 @@ maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
 homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
-checksum=883c9c9a925e48af54812b5347f546dd776ec2e27076a83d5a8126af6bafb9da
+checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
 pre_configure() {
 	autoreconf -vfi
 }
 
 post_install() {
-	rm -rf "${DESTDIR}/usr/lib/systemd"
+	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 1068aafc0c0fa1b534d3553284ea00e43f0ef76a Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Wed, 23 Sep 2020 16:44:56 -0400
Subject: [PATCH 2/5] xdg-desktop-portal: enable libportal

---
 srcpkgs/xdg-desktop-portal/template | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a25c486aad3..a288b1a2644 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,9 +3,10 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-configure_args="--enable-pipewire --enable-geoclue --disable-libportal"
-hostmakedepends="automake libtool gettext-devel pkg-config glib-devel"
-makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel"
+configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
+hostmakedepends="pkg-config glib-devel"
+makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
+ libportal-devel"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"
@@ -13,10 +14,6 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
-pre_configure() {
-	autoreconf -vfi
-}
-
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

From 81c6ef102e83dbc4889bc5e01bc2dd451ffa2f41 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Thu, 24 Sep 2020 11:48:10 -0400
Subject: [PATCH 3/5] xdg-desktop-portal: enable check target

---
 srcpkgs/xdg-desktop-portal/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index a288b1a2644..ed5ca02e223 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,6 +3,7 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
+make_check_target="check"
 configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
 hostmakedepends="pkg-config glib-devel"
 makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel

From c493473dee1618bb2cf6eb1fa3d42f01576a6671 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Thu, 24 Sep 2020 15:37:13 -0400
Subject: [PATCH 4/5] xdg-desktop-portal: add dbus to checkdepends

---
 srcpkgs/xdg-desktop-portal/template | 1 +
 1 file changed, 1 insertion(+)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index ed5ca02e223..4b4c7ebe1d7 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -8,6 +8,7 @@ configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
 hostmakedepends="pkg-config glib-devel"
 makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
  libportal-devel"
+checkdepends="dbus"
 short_desc="Portal frontend service for Flatpak"
 maintainer="Duncaen <duncaen@voidlinux.org>"
 license="LGPL-2.1-or-later"

From edc3518f581b8b28c807e9f8abe59bdf61402a02 Mon Sep 17 00:00:00 2001
From: "Issam E. Maghni" <issam.e.maghni@mailbox.org>
Date: Thu, 24 Sep 2020 19:18:19 -0400
Subject: [PATCH 5/5] xdg-desktop-portal: run tests but ignore them

---
 srcpkgs/xdg-desktop-portal/template | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/srcpkgs/xdg-desktop-portal/template b/srcpkgs/xdg-desktop-portal/template
index 4b4c7ebe1d7..8a39a1afb06 100644
--- a/srcpkgs/xdg-desktop-portal/template
+++ b/srcpkgs/xdg-desktop-portal/template
@@ -3,7 +3,7 @@ pkgname=xdg-desktop-portal
 version=1.8.0
 revision=1
 build_style=gnu-configure
-make_check_target="check"
+#make_check_target="check"
 configure_args="--enable-pipewire --enable-geoclue --enable-libportal"
 hostmakedepends="pkg-config glib-devel"
 makedepends="flatpak-devel fuse-devel pipewire-devel geoclue2-devel
@@ -16,6 +16,12 @@ homepage="https://github.com/flatpak/xdg-desktop-portal"
 distfiles="https://github.com/flatpak/${pkgname}/releases/download/${version}/${pkgname}-${version}.tar.xz"
 checksum=a2fc5681b3a35078239072a98d6435a4c8404016730cab17c9febfd4ecec3610
 
+# ERROR: test-portals - Bail out! xdg-desktop-portal:ERROR:tests/test-portals.c:156:global_setup: assertion failed (error == NULL): The connection is closed (g-io-error-quark, 18)
+# ERROR: test-permission-store - Bail out! xdg-desktop-portal:ERROR:tests/test-permission-store.c:472:global_setup: assertion failed (error == NULL): The connection is closed (g-io-error-quark, 18)
+do_check() {
+	make check || :
+}
+
 post_install() {
 	rm -fR "${DESTDIR}/usr/lib/systemd"
 }

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (26 preceding siblings ...)
  2020-09-24 23:19 ` [PR PATCH] [Updated] " concatime
@ 2020-09-25  0:43 ` q66
  2020-11-19 23:32 ` Duncaen
  2020-11-19 23:32 ` [PR PATCH] [Closed]: " Duncaen
  29 siblings, 0 replies; 31+ messages in thread
From: q66 @ 2020-09-25  0:43 UTC (permalink / raw)
  To: ml

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

New comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-698659405

Comment:
running tests but ignoring them is not good because it defeats the point of running tests at all - i.e. to ensure that the ones you expect to pass actually pass

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

* Re: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (27 preceding siblings ...)
  2020-09-25  0:43 ` q66
@ 2020-11-19 23:32 ` Duncaen
  2020-11-19 23:32 ` [PR PATCH] [Closed]: " Duncaen
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2020-11-19 23:32 UTC (permalink / raw)
  To: ml

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

New comment by Duncaen on void-packages repository

https://github.com/void-linux/void-packages/pull/25040#issuecomment-730703164

Comment:
Merged in https://github.com/void-linux/void-packages/commit/ef8cc6480d416fd36528648e2712b258d79d7087.

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

* Re: [PR PATCH] [Closed]: xdg-desktop-portal: update to 1.8.0
  2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
                   ` (28 preceding siblings ...)
  2020-11-19 23:32 ` Duncaen
@ 2020-11-19 23:32 ` Duncaen
  29 siblings, 0 replies; 31+ messages in thread
From: Duncaen @ 2020-11-19 23:32 UTC (permalink / raw)
  To: ml

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

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

xdg-desktop-portal: update to 1.8.0
https://github.com/void-linux/void-packages/pull/25040

Description:


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

end of thread, other threads:[~2020-11-19 23:32 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 22:54 [PR PATCH] xdg-desktop-portal: update to 1.8.0 concatime
2020-09-22 23:00 ` q66
2020-09-23 20:31 ` concatime
2020-09-23 20:43 ` Duncaen
2020-09-23 20:44 ` [PR REVIEW] " Duncaen
2020-09-23 20:45 ` [PR PATCH] [Updated] " concatime
2020-09-23 20:47 ` [PR REVIEW] " concatime
2020-09-23 20:48 ` concatime
2020-09-23 20:57 ` [PR PATCH] [Updated] " concatime
2020-09-23 20:57 ` concatime
2020-09-24  1:09 ` q66
2020-09-24  3:38 ` [PR REVIEW] " ahesford
2020-09-24  4:26 ` concatime
2020-09-24  4:26 ` concatime
2020-09-24  5:03 ` ahesford
2020-09-24 15:48 ` [PR PATCH] [Updated] " concatime
2020-09-24 19:16 ` q66
2020-09-24 19:28 ` [PR PATCH] [Updated] " concatime
2020-09-24 19:29 ` concatime
2020-09-24 19:32 ` concatime
2020-09-24 19:33 ` concatime
2020-09-24 19:37 ` [PR PATCH] [Updated] " concatime
2020-09-24 19:55 ` ericonr
2020-09-24 20:01 ` concatime
2020-09-24 20:01 ` concatime
2020-09-24 21:25 ` ericonr
2020-09-24 22:47 ` q66
2020-09-24 23:19 ` [PR PATCH] [Updated] " concatime
2020-09-25  0:43 ` q66
2020-11-19 23:32 ` Duncaen
2020-11-19 23:32 ` [PR PATCH] [Closed]: " Duncaen

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).