aboutsummaryrefslogtreecommitdiff
path: root/graphics/eog/a06e6325907e136678b0bbe7058c25d688034afd.patch
blob: 09fa4ee5cdbef2244d74fed111ff681dd59939d0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
From a06e6325907e136678b0bbe7058c25d688034afd Mon Sep 17 00:00:00 2001
From: Patrick Griffis <pgriffis@igalia.com>
Date: Tue, 21 Dec 2021 16:35:36 -0600
Subject: [PATCH] Update libportal usage

libportal 0.5 is the first release with a stable API so some changes
were made.
---
 meson.build        | 8 ++++++--
 org.gnome.Eog.json | 9 +++++----
 src/eog-util.c     | 2 +-
 3 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/meson.build b/meson.build
index 9a32e4bb..9d49aa45 100644
--- a/meson.build
+++ b/meson.build
@@ -165,11 +165,15 @@ config_h.set('HAVE_EXEMPI', enable_xmp)
 # xdg-desktop-portal support with libportal (optional)
 enable_libportal = get_option('libportal')
 if enable_libportal
-  libportal_dep = dependency('libportal', version: '>= 0.3', required: false)
+  libportal_dep = dependency('libportal', version: '>= 0.5', required: false)
   assert(libportal_dep.found() and cc.has_header('libportal/portal.h', dependencies: libportal_dep),
          'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false')
 
-  common_deps += libportal_dep
+  libportal_gtk3_dep = dependency('libportal-gtk3', version: '>= 0.5', required: false)
+  assert(libportal_gtk3_dep.found() and cc.has_header('libportal-gtk3/portal-gtk3.h', dependencies: libportal_gtk3_dep),
+         'xdg-desktop-portal support requested but library not found. Please use -Dlibportal=false')
+
+  common_deps += [libportal_dep, libportal_gtk3_dep]
 endif
 config_h.set('HAVE_LIBPORTAL', enable_libportal)
 
diff --git a/org.gnome.Eog.json b/org.gnome.Eog.json
index 94f09234..b7def6af 100644
--- a/org.gnome.Eog.json
+++ b/org.gnome.Eog.json
@@ -48,16 +48,17 @@
         {
             "name" : "libportal",
             "config-opts" : [
-                "--libdir=/app/lib",
-                "--buildtype=debugoptimized"
+                "--buildtype=debugoptimized",
+                "-Dbackends=gtk3",
+                "-Dintrospection=false",
+                "-Ddocs=false"
             ],
             "buildsystem" : "meson",
-            "builddir" : true,
             "sources" : [
                 {
                     "type" : "git",
                     "url" : "https://github.com/flatpak/libportal.git",
-                    "tag" : "0.4"
+                    "tag" : "0.5"
                 }
             ]
         },
diff --git a/src/eog-util.c b/src/eog-util.c
index 90b9768e..56d23472 100644
--- a/src/eog-util.c
+++ b/src/eog-util.c
@@ -45,7 +45,7 @@
 #include <glib/gi18n.h>
 #ifdef HAVE_LIBPORTAL
 #include <libportal/portal.h>
-#include <libportal/portal-gtk3.h>
+#include <libportal-gtk3/portal-gtk3.h>
 #endif
 
 void
-- 
GitLab