xdg-desktop-portal: 1.2.0 -> 1.4.2

* adapt respect-path-env-var.patch to code being
  moved around, etc.

* Add  json-glib

https://github.com/flatpak/xdg-desktop-portal/releases/tag/1.4.0
This commit is contained in:
worldofpeace 2019-07-22 16:01:44 -04:00
parent 1728bc8d22
commit 2eb94bdbb8
2 changed files with 15 additions and 13 deletions

View file

@ -1,8 +1,8 @@
{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, wrapGAppsHook }:
{ stdenv, fetchFromGitHub, substituteAll, autoreconfHook, pkgconfig, libxml2, glib, pipewire, fontconfig, flatpak, gsettings-desktop-schemas, acl, dbus, fuse, geoclue2, json-glib, wrapGAppsHook }:
stdenv.mkDerivation rec {
pname = "xdg-desktop-portal";
version = "1.2.0";
version = "1.4.2";
outputs = [ "out" "installedTests" ];
@ -10,7 +10,7 @@ stdenv.mkDerivation rec {
owner = "flatpak";
repo = pname;
rev = version;
sha256 = "1gjyif4gly0mkdx6ir6wc4vhfh1raah9jq03q28i88hr7phjdy71";
sha256 = "1rs3kmpczkr6nm08kb9njnl7n3rmhh0ral0xav6f0y70pyh8whx6";
};
patches = [
@ -22,7 +22,7 @@ stdenv.mkDerivation rec {
];
nativeBuildInputs = [ autoreconfHook pkgconfig libxml2 wrapGAppsHook ];
buildInputs = [ glib pipewire fontconfig flatpak acl dbus geoclue2 fuse gsettings-desktop-schemas ];
buildInputs = [ glib pipewire fontconfig flatpak acl dbus geoclue2 fuse gsettings-desktop-schemas json-glib ];
doCheck = true; # XXX: investigate!

View file

@ -1,10 +1,12 @@
--- a/src/xdg-desktop-portal.c
+++ b/src/xdg-desktop-portal.c
@@ -177,38 +177,50 @@
static void
load_installed_portals (void)
diff --git a/src/portal-impl.c b/src/portal-impl.c
index 4fd48ff..346da7c 100644
--- a/src/portal-impl.c
+++ b/src/portal-impl.c
@@ -116,38 +116,50 @@ sort_impl_by_name (gconstpointer a,
void
load_installed_portals (gboolean opt_verbose)
{
- const char *portal_dir = PKGDATADIR "/portals";
- const char *portal_dir = DATADIR "/xdg-desktop-portal/portals";
- g_autoptr(GFile) dir = g_file_new_for_path (portal_dir);
- g_autoptr(GFileEnumerator) enumerator = NULL;
@ -14,7 +16,7 @@
+ const char *portal_dir = g_getenv ("XDG_DESKTOP_PORTAL_PATH");
+
+ if (portal_dir == NULL)
+ portal_dir = PKGDATADIR "/portals";
+ portal_dir = DATADIR "/portals";
- if (enumerator == NULL)
- return;
@ -56,7 +58,7 @@
- path = g_file_get_path (child);
+ name = g_file_info_get_name (info);
- if (!register_portal (path, &error))
- if (!register_portal (path, opt_verbose, &error))
- {
- g_warning ("Error loading %s: %s", path, error->message);
- continue;
@ -66,7 +68,7 @@
+ child = g_file_enumerator_get_child (enumerator, info);
+ path = g_file_get_path (child);
+
+ if (!register_portal (path, &error))
+ if (!register_portal (path, opt_verbose, &error))
+ {
+ g_warning ("Error loading %s: %s", path, error->message);
+ continue;