mirror of https://github.com/utmapp/UTM.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
135 lines
4.1 KiB
135 lines
4.1 KiB
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)
|
|
|