summaryrefslogtreecommitdiff
path: root/lang/ocaml/patches
diff options
context:
space:
mode:
authormaya <maya@pkgsrc.org>2019-10-01 09:07:33 +0000
committermaya <maya@pkgsrc.org>2019-10-01 09:07:33 +0000
commitca0133713c21a5d7a92f79a6214d225186c58e50 (patch)
tree08944272535b69a4d9475193f5ef16c924af03b7 /lang/ocaml/patches
parent8deb908a474f677d8f7652e10c6bcbe459fb8d11 (diff)
downloadpkgsrc-ca0133713c21a5d7a92f79a6214d225186c58e50.tar.gz
ocaml: fix SmartOS build.
- Claimed shared library support. same as other ELF platforms, but since it's not GNU ld, no -Wl,-E available. - Change the PLIST vars based on what is actually built - consider x86_64-*-solaris to be x86_64 and solaris. the arch=none option doesn't build. - Search for socket stuff in -lnsl -lsocket. - for a POSIX prototype sigwait, we need to define _XOPEN_SOURCE to something
Diffstat (limited to 'lang/ocaml/patches')
-rw-r--r--lang/ocaml/patches/patch-configure53
-rw-r--r--lang/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c17
2 files changed, 62 insertions, 8 deletions
diff --git a/lang/ocaml/patches/patch-configure b/lang/ocaml/patches/patch-configure
index cb667f160c0..d3cbd2ab582 100644
--- a/lang/ocaml/patches/patch-configure
+++ b/lang/ocaml/patches/patch-configure
@@ -1,10 +1,15 @@
-$NetBSD: patch-configure,v 1.37 2019/08/24 10:54:23 jaapb Exp $
+$NetBSD: patch-configure,v 1.38 2019/10/01 09:07:33 maya Exp $
All kinds of OS-specific changes to configure
Honor LDFLAGS.
+
+Add SunOS -lnsl -lsocket
+Recognise SunOS/amd64 as amd64
+Recognise SunOS as having shared libraries
+
--- configure.orig 2019-03-01 15:13:45.000000000 +0000
+++ configure
-@@ -13379,7 +13379,7 @@ sharedlib_cflags=''
+@@ -13311,7 +13311,7 @@ sharedlib_cflags=''
mksharedlib='shared-libs-not-available'
rpath=''
mksharedlibrpath=''
@@ -13,7 +18,24 @@ Honor LDFLAGS.
if test x"$enable_shared" != "xno"; then :
case $host in #(
-@@ -13475,6 +13475,8 @@ fi ;; #(
+@@ -13347,9 +13335,14 @@ esac ;; #(
+ rpath="-Wl,-rpath,"
+ mksharedlibrpath="-Wl,-rpath,"
+ natdynlinkopts="-Wl,-E"
+- shared_libraries_supported=true ;; #(
++ shared_libraries_supported=true
++ *-*-solaris* ;; #(
+ *) :
+- ;;
++ sharedlib_cflags="-fPIC"
++ mksharedlib="$CC -shared"
++ rpath="-Wl,-rpath,"
++ mksharedlibrpath="-Wl,-rpath,"
++ shared_libraries_supported=true ;;
+ esac
+ fi
+
+@@ -13415,6 +13415,8 @@ fi ;; #(
natdynlink=true ;; #(
aarch64-*-linux*) :
natdynlink=true ;; #(
@@ -22,7 +44,7 @@ Honor LDFLAGS.
*) :
;;
esac
-@@ -13526,6 +13528,8 @@ case $host in #(
+@@ -13466,6 +13468,8 @@ case $host in #(
arch=i386; system=beos ;; #(
i[3456]86-*-cygwin) :
arch=i386; system=cygwin ;; #(
@@ -31,7 +53,7 @@ Honor LDFLAGS.
i[3456]86-*-darwin*) :
if $arch64; then :
arch=amd64
-@@ -13570,6 +13574,10 @@ fi; system=elf ;; #(
+@@ -13510,6 +13514,10 @@ fi; system=elf ;; #(
arch=arm; model=armv6; system=linux_eabi ;; #(
armv6*-*-freebsd*) :
arch=arm; model=armv6; system=freebsd ;; #(
@@ -42,16 +64,21 @@ Honor LDFLAGS.
earmv6*-*-netbsd*) :
arch=arm; model=armv6; system=netbsd ;; #(
earmv7*-*-netbsd*) :
-@@ -13602,6 +13610,8 @@ fi; system=elf ;; #(
+@@ -13544,8 +13552,12 @@ fi; system=elf ;; #(
arch=amd64; system=mingw64 ;; #(
aarch64-*-linux*) :
arch=arm64; system=linux ;; #(
+ aarch64-*-netbsd*) :
+ arch=arm64; system=netbsd ;; #(
x86_64-*-cygwin*) :
- arch=amd64; system=cygwin
+- arch=amd64; system=cygwin
++ arch=amd64; system=cygwin ;; #(
++ x86_64-*-solaris*) :
++ arch=amd64; system=solaris
;; #(
-@@ -13932,7 +13942,7 @@ fi
+ *) :
+ ;;
+@@ -13884,7 +13896,7 @@ fi
# for the moment, to be backward-compatible
case $host in #(
@@ -60,3 +87,13 @@ Honor LDFLAGS.
;; #(
*) :
has_c99_float_ops=true
+@@ -14085,6 +14097,9 @@ case $host in #(
+ *-*-mingw32|*-pc-windows) :
+ cclibs="$cclibs -lws2_32"
+ sockets=true ;; #(
++ *-*-solaris*) :
++ cclibs="$cclibs -lnsl -lsocket"
++ sockets=true ;; #(
+ *) :
+
+ ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket"
diff --git a/lang/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c b/lang/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c
new file mode 100644
index 00000000000..dbdf5bb48c9
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_systhreads_st__stubs.c
@@ -0,0 +1,17 @@
+$NetBSD: patch-otherlibs_systhreads_st__stubs.c,v 1.1 2019/10/01 09:07:33 maya Exp $
+
+Make the POSIX sigwait visible on SmartOS
+
+--- otherlibs/systhreads/st_stubs.c.orig 2019-08-05 17:32:44.000000000 +0000
++++ otherlibs/systhreads/st_stubs.c
+@@ -15,6 +15,9 @@
+
+ #define CAML_INTERNALS
+
++/* Needed for sigwait */
++#define _XOPEN_SOURCE 500
++
+ #include "caml/alloc.h"
+ #include "caml/backtrace.h"
+ #include "caml/callback.h"
+