diff options
author | jperkin <jperkin@pkgsrc.org> | 2021-01-05 15:14:38 +0000 |
---|---|---|
committer | jperkin <jperkin@pkgsrc.org> | 2021-01-05 15:14:38 +0000 |
commit | 6347129e41edbc93845c4061921bd3bf452d21aa (patch) | |
tree | 48e35f2ea79fab374fe1ef6ed183cf45970adef2 /sysutils/spice-server | |
parent | a790840bdb8f4c1c2b6b558abe516d90cde64796 (diff) | |
download | pkgsrc-6347129e41edbc93845c4061921bd3bf452d21aa.tar.gz |
spice-server: Fix build on SunOS.
Diffstat (limited to 'sysutils/spice-server')
6 files changed, 65 insertions, 13 deletions
diff --git a/sysutils/spice-server/Makefile b/sysutils/spice-server/Makefile index d17fd7ad8c9..c645efc0ef9 100644 --- a/sysutils/spice-server/Makefile +++ b/sysutils/spice-server/Makefile @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.4 2020/11/01 19:36:37 maya Exp $ +# $NetBSD: Makefile,v 1.5 2021/01/05 15:14:38 jperkin Exp $ DISTNAME= spice-0.14.3 PKGNAME= ${DISTNAME:S/spice/spice-server/} @@ -17,6 +17,8 @@ USE_TOOLS+= gmake pkg-config PKGCONFIG_OVERRIDE+= spice-server.pc.in +LDFLAGS.SunOS+= -lnsl -lsocket + .include "../../audio/libopus/buildlink3.mk" .include "../../devel/glib2/buildlink3.mk" .include "../../security/openssl/buildlink3.mk" diff --git a/sysutils/spice-server/distinfo b/sysutils/spice-server/distinfo index 78337c2bbeb..4922f3b8d7d 100644 --- a/sysutils/spice-server/distinfo +++ b/sysutils/spice-server/distinfo @@ -1,10 +1,11 @@ -$NetBSD: distinfo,v 1.2 2020/11/01 19:36:37 maya Exp $ +$NetBSD: distinfo,v 1.3 2021/01/05 15:14:38 jperkin Exp $ SHA1 (spice-0.14.3.tar.bz2) = f5968dd5df5f64805d093b4c85b4165959e6c65b RMD160 (spice-0.14.3.tar.bz2) = fe99d8d0db4b275b1d19dc9a7231144133c5bfa0 SHA512 (spice-0.14.3.tar.bz2) = 9ecdc455ff25c71ac1fe6c576654b51efbfb860110bd6828065d23f7462d5c5cac772074d1a40f033386258d970b77275b2007bcfdffb23fdff2137154ea46e4 Size (spice-0.14.3.tar.bz2) = 1504304 bytes -SHA1 (patch-server_red-stream.c) = ba48da44bf4a3a94cf85df3bc486e182bea6afaf -SHA1 (patch-server_red-worker.c) = 8478e2ce8959061bd15ea226debc76744378c8cf -SHA1 (patch-server_tests_test-websocket.c) = 8ae8bc975bf81e7683e9f15d1e158899e52f7cc4 +SHA1 (patch-server_red-stream.c) = b5aaee6e4bb7f0cfb89606ad026e4fa2c5f05da9 +SHA1 (patch-server_red-worker.c) = 93699283fa99299bd672f930e8b90f5951d3726a +SHA1 (patch-server_tests_test-stream.c) = 4b06d20626f06581c40164aa6d670e9b6530cdee +SHA1 (patch-server_tests_test-websocket.c) = 19bca4dd6f441336588a1ae224f9d3d9b9984917 SHA1 (patch-tools_reds__stat.c) = 3464bbb8b25aa871adfbc501412f84ad925f6509 diff --git a/sysutils/spice-server/patches/patch-server_red-stream.c b/sysutils/spice-server/patches/patch-server_red-stream.c index bd4e09fe8c3..54a8df73626 100644 --- a/sysutils/spice-server/patches/patch-server_red-stream.c +++ b/sysutils/spice-server/patches/patch-server_red-stream.c @@ -1,10 +1,27 @@ -$NetBSD: patch-server_red-stream.c,v 1.2 2020/11/01 19:36:37 maya Exp $ +$NetBSD: patch-server_red-stream.c,v 1.3 2021/01/05 15:14:39 jperkin Exp $ +Fix build on SunOS. No TCP_CORK on netbsd. Disable (like win32) --- server/red-stream.c.orig 2020-02-27 11:26:12.000000000 +0000 +++ server/red-stream.c -@@ -105,7 +105,7 @@ struct RedStreamPrivate { +@@ -17,6 +17,15 @@ + */ + #include <config.h> + ++#if defined(__sun) ++#define MSG_NOSIGNAL 0 ++# if __STDC_VERSION__ - 0 < 199901L ++#define _XOPEN_SOURCE 500 ++# else ++#define _XOPEN_SOURCE 600 ++# endif ++#endif ++ + #include <errno.h> + #include <unistd.h> + #include <fcntl.h> +@@ -105,7 +114,7 @@ struct RedStreamPrivate { SpiceCoreInterfaceInternal *core; }; diff --git a/sysutils/spice-server/patches/patch-server_red-worker.c b/sysutils/spice-server/patches/patch-server_red-worker.c index fd0534bc865..18f3df04cc0 100644 --- a/sysutils/spice-server/patches/patch-server_red-worker.c +++ b/sysutils/spice-server/patches/patch-server_red-worker.c @@ -1,8 +1,8 @@ -$NetBSD: patch-server_red-worker.c,v 1.2 2020/11/01 19:36:37 maya Exp $ +$NetBSD: patch-server_red-worker.c,v 1.3 2021/01/05 15:14:39 jperkin Exp $ Add NetBSD support. ---- server/red-worker.c.orig 2019-04-30 08:51:11.000000000 +0000 +--- server/red-worker.c.orig 2020-02-27 11:26:12.000000000 +0000 +++ server/red-worker.c @@ -1159,7 +1159,11 @@ bool red_worker_run(RedWorker *worker) #ifndef _WIN32 @@ -10,7 +10,7 @@ Add NetBSD support. #endif +#if defined(__NetBSD__) + pthread_setname_np(worker->thread, "%s", (void *)"SPICE Worker"); -+#else ++#elif !defined(__sun) pthread_setname_np(worker->thread, "SPICE Worker"); +#endif diff --git a/sysutils/spice-server/patches/patch-server_tests_test-stream.c b/sysutils/spice-server/patches/patch-server_tests_test-stream.c new file mode 100644 index 00000000000..7c6aed0d482 --- /dev/null +++ b/sysutils/spice-server/patches/patch-server_tests_test-stream.c @@ -0,0 +1,21 @@ +$NetBSD: patch-server_tests_test-stream.c,v 1.1 2021/01/05 15:14:39 jperkin Exp $ + +Fix build on SunOS. + +--- server/tests/test-stream.c.orig 2020-02-27 11:26:12.000000000 +0000 ++++ server/tests/test-stream.c +@@ -17,6 +17,14 @@ + */ + #include <config.h> + ++#if defined(__sun) ++# if __STDC_VERSION__ - 0 < 199901L ++#define _XOPEN_SOURCE 500 ++# else ++#define _XOPEN_SOURCE 600 ++# endif ++#endif ++ + #include <sys/types.h> + #include <sys/socket.h> + #include <errno.h> diff --git a/sysutils/spice-server/patches/patch-server_tests_test-websocket.c b/sysutils/spice-server/patches/patch-server_tests_test-websocket.c index 064dc31f6fe..c330c4a0041 100644 --- a/sysutils/spice-server/patches/patch-server_tests_test-websocket.c +++ b/sysutils/spice-server/patches/patch-server_tests_test-websocket.c @@ -1,10 +1,21 @@ -$NetBSD: patch-server_tests_test-websocket.c,v 1.1 2020/11/01 19:36:37 maya Exp $ +$NetBSD: patch-server_tests_test-websocket.c,v 1.2 2021/01/05 15:14:39 jperkin Exp $ -Provide a fallback definition for SOL_TCP (for netbsd) +Provide fallback definitions for MSG_NOSIGNAL (SunOS) and SOL_TCP (NetBSD) --- server/tests/test-websocket.c.orig 2020-02-27 11:26:12.000000000 +0000 +++ server/tests/test-websocket.c -@@ -200,6 +200,9 @@ handle_client(int new_sock) +@@ -42,6 +42,10 @@ + #include "net-utils.h" + #include "websocket.h" + ++#if !defined(MSG_NOSIGNAL) ++#define MSG_NOSIGNAL 0 ++#endif ++ + /* + on data arrived on socket: + try to read data, read again till error, handle error, on EAGAIN polling again +@@ -200,6 +204,9 @@ handle_client(int new_sock) } int enable = 1; |