pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/devel/ocaml-core_unix ocaml-core_unix: fix build on SunOS



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ae9a4ea55376
branches:  trunk
changeset: 383467:ae9a4ea55376
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Fri Aug 19 12:42:34 2022 +0000

description:
ocaml-core_unix: fix build on SunOS

diffstat:

 devel/ocaml-core_unix/distinfo                                             |   5 +-
 devel/ocaml-core_unix/patches/patch-bigstring__unix_src_bigstring__unix.ml |  16 ++++++
 devel/ocaml-core_unix/patches/patch-core__unix_src_core__unix__stubs.c     |  26 ++++++++++
 devel/ocaml-core_unix/patches/patch-syslog_src_syslog__stubs.c             |  16 ++++++
 4 files changed, 62 insertions(+), 1 deletions(-)

diffs (83 lines):

diff -r b26ba1f176d5 -r ae9a4ea55376 devel/ocaml-core_unix/distinfo
--- a/devel/ocaml-core_unix/distinfo    Fri Aug 19 12:30:23 2022 +0000
+++ b/devel/ocaml-core_unix/distinfo    Fri Aug 19 12:42:34 2022 +0000
@@ -1,5 +1,8 @@
-$NetBSD: distinfo,v 1.1 2022/05/05 09:26:58 jaapb Exp $
+$NetBSD: distinfo,v 1.2 2022/08/19 12:42:34 tnn Exp $
 
 BLAKE2s (core_unix-0.15.0.tar.gz) = 4c2a4fdf1a4fcc9967f4eb6e86c5b081968110fdd4acec4b81ce7981a315a969
 SHA512 (core_unix-0.15.0.tar.gz) = eeb53bd0c06a7d1facfb133f0a45a232d57941eff644d4ed6c2d5002acd4e6b323376ec9c05838f760ebd9da3fbc39332989ed50b3921191c175811c947fcbfe
 Size (core_unix-0.15.0.tar.gz) = 377928 bytes
+SHA1 (patch-bigstring__unix_src_bigstring__unix.ml) = 3fb49b23bdf93b8d1c4fe0c7574347ad5f53c8ef
+SHA1 (patch-core__unix_src_core__unix__stubs.c) = 0a6ab8913d7151cc7106f0b047751d198d0e13fa
+SHA1 (patch-syslog_src_syslog__stubs.c) = c8d5270b66227ddd225067aa793f17732d3e66c4
diff -r b26ba1f176d5 -r ae9a4ea55376 devel/ocaml-core_unix/patches/patch-bigstring__unix_src_bigstring__unix.ml
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ocaml-core_unix/patches/patch-bigstring__unix_src_bigstring__unix.ml        Fri Aug 19 12:42:34 2022 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-bigstring__unix_src_bigstring__unix.ml,v 1.1 2022/08/19 12:42:34 tnn Exp $
+
+define used in ifdef must be explicitly undefined or defined.
+So make sure to undef it first, that way it should have a well defined state.
+
+--- bigstring_unix/src/bigstring_unix.ml.orig  2022-02-15 14:18:18.000000000 +0000
++++ bigstring_unix/src/bigstring_unix.ml
+@@ -128,6 +128,8 @@ let pwrite_assume_fd_is_nonblocking fd ~
+   check_args ~loc ~pos ~len bstr;
+   unsafe_pwrite_assume_fd_is_nonblocking fd ~offset ~pos ~len bstr
+ 
++[%%undef JSC_NOSIGPIPE]
++
+ [%%ifdef JSC_MSG_NOSIGNAL]
+ [%%define JSC_NOSIGPIPE]
+ [%%endif]
diff -r b26ba1f176d5 -r ae9a4ea55376 devel/ocaml-core_unix/patches/patch-core__unix_src_core__unix__stubs.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ocaml-core_unix/patches/patch-core__unix_src_core__unix__stubs.c    Fri Aug 19 12:42:34 2022 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-core__unix_src_core__unix__stubs.c,v 1.1 2022/08/19 12:42:34 tnn Exp $
+
+add SunOS support
+
+--- core_unix/src/core_unix_stubs.c.orig       2022-02-15 14:18:18.000000000 +0000
++++ core_unix/src/core_unix_stubs.c
+@@ -10,6 +10,9 @@
+ #include <sys/socket.h>
+ #elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
+ #include <sys/socket.h>
++#elif defined(__sun)
++#include <sys/socket.h>
++#include <sys/sockio.h>
+ #endif
+ #include <sys/uio.h>
+ #include <sys/utsname.h>
+@@ -86,6 +89,9 @@ UNIX_INT63_CONST(F_GETFL)
+ UNIX_INT63_CONST(F_SETFL)
+ 
+ UNIX_INT63_CONST(O_APPEND)
++#ifndef O_ASYNC
++#define O_ASYNC 0
++#endif
+ UNIX_INT63_CONST(O_ASYNC)
+ #ifndef O_CLOEXEC
+ #define O_CLOEXEC 0
diff -r b26ba1f176d5 -r ae9a4ea55376 devel/ocaml-core_unix/patches/patch-syslog_src_syslog__stubs.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/devel/ocaml-core_unix/patches/patch-syslog_src_syslog__stubs.c    Fri Aug 19 12:42:34 2022 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-syslog_src_syslog__stubs.c,v 1.1 2022/08/19 12:42:34 tnn Exp $
+
+LOG_PERROR not present on SunOS
+
+--- syslog/src/syslog_stubs.c.orig     2022-02-15 14:18:18.000000000 +0000
++++ syslog/src/syslog_stubs.c
+@@ -8,6 +8,9 @@
+ 
+ #include "ocaml_utils.h"
+ 
++#ifndef LOG_PERROR
++#define LOG_PERROR 0
++#endif
+ static int log_open_options[] = {
+   /* THESE MUST STAY IN THE SAME ORDER AS IN syslog.ml!!! */
+   LOG_PID, LOG_CONS, LOG_ODELAY, LOG_NDELAY, LOG_NOWAIT, LOG_PERROR



Home | Main Index | Thread Index | Old Index