forked from utmapp/UTM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphodav-2.5.patch
135 lines (116 loc) · 4.14 KB
/
phodav-2.5.patch
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
From c0d495a77c7934e982d280a33deaaa9f6595785e Mon Sep 17 00:00:00 2001
From: osy <50960678+osy@users.noreply.github.com>
Date: Sat, 5 Mar 2022 17:40:07 -0800
Subject: [PATCH 1/4] method: fix compile on Darwin
On Darwin systems, removexattr() is defined with 3 arguments.
---
libphodav/phodav-method-proppatch.c | 4 ++++
tests/meson.build | 2 +-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/libphodav/phodav-method-proppatch.c b/libphodav/phodav-method-proppatch.c
index 4cd8211..3421e32 100644
--- a/libphodav/phodav-method-proppatch.c
+++ b/libphodav/phodav-method-proppatch.c
@@ -59,7 +59,11 @@ set_attr (GFile *file, xmlNodePtr attrnode,
return SOUP_STATUS_FORBIDDEN;
gchar *path = g_file_get_path (file);
#ifdef HAVE_SYS_XATTR_H
+#ifdef __APPLE__
+ removexattr (path, attrname, 0);
+#else
removexattr (path, attrname);
+#endif
#else
g_debug ("cannot remove xattr from %s, not supported", path); /* FIXME? */
#endif
diff --git a/tests/meson.build b/tests/meson.build
index aeb48e3..43e9a13 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -1,6 +1,6 @@
tests_sources = []
-if host_machine.system() != 'windows'
+if host_machine.system() not in ['darwin', 'ios', 'windows']
tests_sources += 'virtual-dir.c'
endif
--
2.32.0 (Apple Git-132)
From 8060e63fb82baba60dee6f3360780c6e83d16472 Mon Sep 17 00:00:00 2001
From: osy <50960678+osy@users.noreply.github.com>
Date: Sat, 5 Mar 2022 17:41:18 -0800
Subject: [PATCH 2/4] meson: fix build on unsupported --no-undefined
Clang on Darwin systems do not support this flag.
---
libphodav/meson.build | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libphodav/meson.build b/libphodav/meson.build
index 5443ce0..4ab6821 100644
--- a/libphodav/meson.build
+++ b/libphodav/meson.build
@@ -30,7 +30,10 @@ if not dependency('glib-2.0', version : '>= 2.51.2', required: false).found()
endif
mapfile = 'libphodav.syms'
-vflag = '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
+vflag = compiler.get_supported_link_arguments(
+ '-Wl,--no-undefined',
+ '-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(), mapfile)
+)
libphodav = library(
'phodav-2.0',
@@ -38,7 +41,7 @@ libphodav = library(
c_args : [ '-DG_LOG_DOMAIN="phodav"' ],
include_directories : incdir,
version: '0.0.0',
- link_args : [ '-Wl,--no-undefined', vflag ],
+ link_args : vflag,
link_depends : mapfile,
dependencies : deps,
install : true,
--
2.32.0 (Apple Git-132)
From 450361cefca48f6b8ca191a7024cad29beaa0825 Mon Sep 17 00:00:00 2001
From: osy <50960678+osy@users.noreply.github.com>
Date: Sat, 5 Mar 2022 17:49:26 -0800
Subject: [PATCH 3/4] spice-webdavd: support macOS port
---
bin/spice-webdavd.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/bin/spice-webdavd.c b/bin/spice-webdavd.c
index ee713bd..b9453ff 100644
--- a/bin/spice-webdavd.c
+++ b/bin/spice-webdavd.c
@@ -655,7 +655,11 @@ run_service (ServiceData *service_data)
loop = g_main_loop_new (NULL, TRUE);
#ifdef G_OS_UNIX
+#ifdef __APPLE__
+ open_mux_path ("/dev/tty.org.spice-space.webdav.0");
+#else
open_mux_path ("/dev/virtio-ports/org.spice-space.webdav.0");
+#endif
#else
open_mux_path ("\\\\.\\Global\\org.spice-space.webdav.0");
#endif
--
2.32.0 (Apple Git-132)
From f5c7f192644d8f30817ab23a98425e3179a0021d Mon Sep 17 00:00:00 2001
From: osy <50960678+osy@users.noreply.github.com>
Date: Sat, 5 Mar 2022 23:40:27 -0800
Subject: [PATCH 4/4] meson: link statically with libsoup and libxml
---
meson.build | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/meson.build b/meson.build
index b8ff125..7ab6da1 100644
--- a/meson.build
+++ b/meson.build
@@ -34,8 +34,8 @@ else
deps += dependency('gio-unix-2.0', version : '>= 2.44')
endif
-deps += dependency('libsoup-2.4', version : '>= 2.48.0')
-deps += dependency('libxml-2.0')
+deps += dependency('libsoup-2.4', version : '>= 2.48.0', static : true)
+deps += dependency('libxml-2.0', static : true)
d1 = dependency('avahi-gobject', required : get_option('avahi'))
d2 = dependency('avahi-client', required : get_option('avahi'))
--
2.32.0 (Apple Git-132)