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 somethingdiff -r1.128 -r1.129 pkgsrc/lang/ocaml/Makefile
(maya)
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | # $NetBSD: Makefile,v 1.128 2019/08/27 05:37:38 jaapb Exp $ | 1 | # $NetBSD: Makefile,v 1.129 2019/10/01 09:07:33 maya Exp $ | |
2 | 2 | |||
3 | .include "Makefile.common" | 3 | .include "Makefile.common" | |
4 | 4 | |||
5 | PKGREVISION= 1 | 5 | PKGREVISION= 1 | |
6 | 6 | |||
7 | BUILD_TARGET= world | 7 | BUILD_TARGET= world | |
8 | MAKE_JOBS_SAFE= no | 8 | MAKE_JOBS_SAFE= no | |
9 | UNLIMIT_RESOURCES= stacksize | 9 | UNLIMIT_RESOURCES= stacksize | |
10 | 10 | |||
11 | USE_TOOLS+= bash | 11 | USE_TOOLS+= bash | |
12 | USE_LANGUAGES+= c | 12 | USE_LANGUAGES+= c | |
13 | USE_LIBTOOL= yes | 13 | USE_LIBTOOL= yes | |
14 | USE_GNU_CONFIGURE_HOST= no | 14 | USE_GNU_CONFIGURE_HOST= no | |
@@ -28,42 +28,41 @@ PLIST_VARS+= ocaml-stub ocaml-prof ocaml | @@ -28,42 +28,41 @@ PLIST_VARS+= ocaml-stub ocaml-prof ocaml | |||
28 | ${OPSYS} == "DragonFly" || ${OPSYS} == "NetBSD" || \ | 28 | ${OPSYS} == "DragonFly" || ${OPSYS} == "NetBSD" || \ | |
29 | ${OPSYS} == "FreeBSD" || ${OPSYS} == "SunOS" || \ | 29 | ${OPSYS} == "FreeBSD" || ${OPSYS} == "SunOS" || \ | |
30 | ${OPSYS} == "Linux" | 30 | ${OPSYS} == "Linux" | |
31 | PLIST.ocaml-stub= yes | 31 | PLIST.ocaml-stub= yes | |
32 | .endif | 32 | .endif | |
33 | 33 | |||
34 | # Optional components built only on certain platforms. | 34 | # Optional components built only on certain platforms. | |
35 | .if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \ | 35 | .if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "powerpc") || \ | |
36 | !empty(MACHINE_ARCH:M*arm*) || (${MACHINE_ARCH} == "aarch64") || \ | 36 | !empty(MACHINE_ARCH:M*arm*) || (${MACHINE_ARCH} == "aarch64") || \ | |
37 | (${MACHINE_ARCH} == "x86_64") | 37 | (${MACHINE_ARCH} == "x86_64") | |
38 | BUILD_TARGET+= opt opt.opt | 38 | BUILD_TARGET+= opt opt.opt | |
39 | PLIST.ocaml-opt= yes | 39 | PLIST.ocaml-opt= yes | |
40 | . if empty(MACHINE_PLATFORM:MDarwin-*-powerpc) && \ | 40 | . if empty(MACHINE_PLATFORM:MDarwin-*-powerpc) && \ | |
41 | empty(MACHINE_PLATFORM:MSunOS-*-i386) && \ | 41 | empty(MACHINE_PLATFORM:MSunOS-*-*) && \ | |
42 | (${MACHINE_ARCH} != "aarch64") | 42 | (${MACHINE_ARCH} != "aarch64") | |
43 | PLIST.ocaml-prof= yes | 43 | PLIST.ocaml-prof= yes | |
44 | . endif | 44 | . endif | |
45 | .endif | 45 | .endif | |
46 | 46 | |||
47 | # XXX This conditional is not complete. It should match the | 47 | # XXX This conditional is not complete. It should match the | |
48 | # conditional in ocaml-x.y.z/configure. | 48 | # conditional in ocaml-x.y.z/configure. | |
49 | .if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64") || \ | 49 | .if (${MACHINE_ARCH} == "i386") || (${MACHINE_ARCH} == "x86_64") || \ | |
50 | (${MACHINE_ARCH} == "aarch64") | 50 | (${MACHINE_ARCH} == "aarch64") | |
51 | . if !empty(MACHINE_PLATFORM:MLinux-*-*) || \ | 51 | . if !empty(MACHINE_PLATFORM:MLinux-*-*) || \ | |
52 | !empty(MACHINE_PLATFORM:MFreeBSD-*-*) || \ | 52 | !empty(MACHINE_PLATFORM:MFreeBSD-*-*) || \ | |
53 | !empty(MACHINE_PLATFORM:MDragonFly-*-*) || \ | 53 | !empty(MACHINE_PLATFORM:MDragonFly-*-*) || \ | |
54 | (!empty(MACHINE_PLATFORM:MNetBSD-*-*) && empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)) || \ | 54 | (!empty(MACHINE_PLATFORM:MNetBSD-*-*) && empty(MACHINE_PLATFORM:MNetBSD-*-powerpc)) || \ | |
55 | !empty(MACHINE_PLATFORM:MDarwin-*-*) || \ | 55 | !empty(MACHINE_PLATFORM:MDarwin-*-*) | |
56 | !empty(MACHINE_PLATFORM:MSunOS-*-*) | |||
57 | PLIST.ocaml-nat= yes | 56 | PLIST.ocaml-nat= yes | |
58 | . endif | 57 | . endif | |
59 | .endif | 58 | .endif | |
60 | 59 | |||
61 | # Spacetime profiling is only available for native code on 64-bit targets. | 60 | # Spacetime profiling is only available for native code on 64-bit targets. | |
62 | .if (${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "aarch64") | 61 | .if (${MACHINE_ARCH} == "x86_64") || (${MACHINE_ARCH} == "aarch64") | |
63 | PLIST.ocaml-spacetime= yes | 62 | PLIST.ocaml-spacetime= yes | |
64 | .endif | 63 | .endif | |
65 | 64 | |||
66 | # clock_gettime(2), required by POSIX, is necessary for the | 65 | # clock_gettime(2), required by POSIX, is necessary for the | |
67 | # instrumented_runtime feature. | 66 | # instrumented_runtime feature. | |
68 | # It is missing on macOS before 10.12. | 67 | # It is missing on macOS before 10.12. | |
69 | .if ${OPSYS} != "Darwin" || ${OS_VERSION:R:R} >= 16 | 68 | .if ${OPSYS} != "Darwin" || ${OS_VERSION:R:R} >= 16 |
@@ -1,32 +1,33 @@ | @@ -1,32 +1,33 @@ | |||
1 | $NetBSD: distinfo,v 1.129 2019/08/27 06:23:50 jaapb Exp $ | 1 | $NetBSD: distinfo,v 1.130 2019/10/01 09:07:33 maya Exp $ | |
2 | 2 | |||
3 | SHA1 (ocaml-4.08.1.tar.gz) = f89ae7513ee4f064c7db92066f9dd4ac085634e2 | 3 | SHA1 (ocaml-4.08.1.tar.gz) = f89ae7513ee4f064c7db92066f9dd4ac085634e2 | |
4 | RMD160 (ocaml-4.08.1.tar.gz) = a8c0b80d9b6ff52c9a5725eec3ce64adffd81ca6 | 4 | RMD160 (ocaml-4.08.1.tar.gz) = a8c0b80d9b6ff52c9a5725eec3ce64adffd81ca6 | |
5 | SHA512 (ocaml-4.08.1.tar.gz) = 8239c1879926e59c3d9611ad0d97618ce21b0528f1bd59db3df9c24287ad180ffa74f34e52e1fab39e71cbf8113a9a4ee5037cc33ae64ca6a9a109fe4ada0256 | 5 | SHA512 (ocaml-4.08.1.tar.gz) = 8239c1879926e59c3d9611ad0d97618ce21b0528f1bd59db3df9c24287ad180ffa74f34e52e1fab39e71cbf8113a9a4ee5037cc33ae64ca6a9a109fe4ada0256 | |
6 | Size (ocaml-4.08.1.tar.gz) = 4897908 bytes | 6 | Size (ocaml-4.08.1.tar.gz) = 4897908 bytes | |
7 | SHA1 (patch-Makefile) = 3c1410ba28d7d25ffd8fd4b1ffeef7f0206ec58d | 7 | SHA1 (patch-Makefile) = 3c1410ba28d7d25ffd8fd4b1ffeef7f0206ec58d | |
8 | SHA1 (patch-Makefile.common.in) = bc44846bfa941520b43538189dbc5637c342ef0a | 8 | SHA1 (patch-Makefile.common.in) = bc44846bfa941520b43538189dbc5637c342ef0a | |
9 | SHA1 (patch-asmcomp_amd64_emit.mlp) = 1bc44434fbe1821d3aa2eed1a6b0938258586851 | 9 | SHA1 (patch-asmcomp_amd64_emit.mlp) = 1bc44434fbe1821d3aa2eed1a6b0938258586851 | |
10 | SHA1 (patch-asmcomp_asmlink.ml) = db2b387ea17f41a62c2bce53b91f945d5e29a82f | 10 | SHA1 (patch-asmcomp_asmlink.ml) = db2b387ea17f41a62c2bce53b91f945d5e29a82f | |
11 | SHA1 (patch-asmrun_amd64.S) = 68d8f3ba1c1ad951e688539b4659aee71a527222 | 11 | SHA1 (patch-asmrun_amd64.S) = 68d8f3ba1c1ad951e688539b4659aee71a527222 | |
12 | SHA1 (patch-configure) = 6e204c6feea752c182043ecde52e421f60173e11 | 12 | SHA1 (patch-configure) = 3b43429065b093174bb89329a8f5ed16ac46fc6d | |
13 | SHA1 (patch-driver_compenv.ml) = 27c68072bd73c9c00d2b3093d8c6498f192ca3d3 | 13 | SHA1 (patch-driver_compenv.ml) = 27c68072bd73c9c00d2b3093d8c6498f192ca3d3 | |
14 | SHA1 (patch-driver_main.ml) = 69a6f761ded38e0721a7aed1416a9f19a288d991 | 14 | SHA1 (patch-driver_main.ml) = 69a6f761ded38e0721a7aed1416a9f19a288d991 | |
15 | SHA1 (patch-driver_main_args.ml) = 4c6a6ec25f433974f9aab99b4f2ac9c884bb3b04 | 15 | SHA1 (patch-driver_main_args.ml) = 4c6a6ec25f433974f9aab99b4f2ac9c884bb3b04 | |
16 | SHA1 (patch-driver_main_args.mli) = 5e8164e4392c0dde6c6264eeed87c346128e1863 | 16 | SHA1 (patch-driver_main_args.mli) = 5e8164e4392c0dde6c6264eeed87c346128e1863 | |
17 | SHA1 (patch-driver_optmain.ml) = 5ce77f1f906ce59cb533b4d25e4d57f7a70ab1b3 | 17 | SHA1 (patch-driver_optmain.ml) = 5ce77f1f906ce59cb533b4d25e4d57f7a70ab1b3 | |
18 | SHA1 (patch-lex_Makefile) = 9c3de0a77dbea117b5587cfd77bbdcb3e2db26b6 | 18 | SHA1 (patch-lex_Makefile) = 9c3de0a77dbea117b5587cfd77bbdcb3e2db26b6 | |
19 | SHA1 (patch-man_Makefile) = b780c026aef5f7e6b22b142fce3ec87ef9d2ab22 | 19 | SHA1 (patch-man_Makefile) = b780c026aef5f7e6b22b142fce3ec87ef9d2ab22 | |
20 | SHA1 (patch-ocamldoc_Makefile) = 7f0a90ca7849447b93ae4b3fcbc58901de1e996f | 20 | SHA1 (patch-ocamldoc_Makefile) = 7f0a90ca7849447b93ae4b3fcbc58901de1e996f | |
21 | SHA1 (patch-ocamldoc_odoc__messages.ml) = 77f650a5f34f40b9648a8d5091e9aa31efb5734b | 21 | SHA1 (patch-ocamldoc_odoc__messages.ml) = 77f650a5f34f40b9648a8d5091e9aa31efb5734b | |
22 | SHA1 (patch-otherlibs_Makefile.otherlibs.common) = 2eb71de7bd659c763fb7efdf10af1812e135c904 | 22 | SHA1 (patch-otherlibs_Makefile.otherlibs.common) = 2eb71de7bd659c763fb7efdf10af1812e135c904 | |
23 | SHA1 (patch-otherlibs_systhreads_Makefile) = d6f7818487c156b101b6a78f0dc2824d57453e50 | 23 | SHA1 (patch-otherlibs_systhreads_Makefile) = d6f7818487c156b101b6a78f0dc2824d57453e50 | |
24 | SHA1 (patch-otherlibs_systhreads_st__stubs.c) = 36320714e92f2a3ad52135e4b7c66ffd286717f0 | |||
24 | SHA1 (patch-otherlibs_threads_Makefile) = 3ccc89021d808967bc958d295515ceca1c39c81d | 25 | SHA1 (patch-otherlibs_threads_Makefile) = 3ccc89021d808967bc958d295515ceca1c39c81d | |
25 | SHA1 (patch-runtime_Makefile) = 37b8e9b8d121b9066ccd38ce18a31f8d25369152 | 26 | SHA1 (patch-runtime_Makefile) = 37b8e9b8d121b9066ccd38ce18a31f8d25369152 | |
26 | SHA1 (patch-tools_Makefile) = e891408b43672b164a28f213713b7b211227a4af | 27 | SHA1 (patch-tools_Makefile) = e891408b43672b164a28f213713b7b211227a4af | |
27 | SHA1 (patch-tools_ocamlcp.ml) = 76dfe040e6d61f0c844e01fa2bd9b6b0f1c21b99 | 28 | SHA1 (patch-tools_ocamlcp.ml) = 76dfe040e6d61f0c844e01fa2bd9b6b0f1c21b99 | |
28 | SHA1 (patch-tools_ocamlmklib) = 9a9c0e3b473f7ba4127fe120cf6dbbdbb3c957f2 | 29 | SHA1 (patch-tools_ocamlmklib) = 9a9c0e3b473f7ba4127fe120cf6dbbdbb3c957f2 | |
29 | SHA1 (patch-tools_ocamloptp.ml) = 070bd797fcd4120e58d15a09f25d93ec46b87d1a | 30 | SHA1 (patch-tools_ocamloptp.ml) = 070bd797fcd4120e58d15a09f25d93ec46b87d1a | |
30 | SHA1 (patch-utils_clflags.ml) = 1c8223caac3c81b134b470d9bb2fb5ce62576c53 | 31 | SHA1 (patch-utils_clflags.ml) = 1c8223caac3c81b134b470d9bb2fb5ce62576c53 | |
31 | SHA1 (patch-utils_clflags.mli) = 381951d9583e032d3a520b68a8fe9f867ec49995 | 32 | SHA1 (patch-utils_clflags.mli) = 381951d9583e032d3a520b68a8fe9f867ec49995 | |
32 | SHA1 (patch-yacc_Makefile) = d3a2f606e05f6a58170cf4bad4f3321e54b4324b | 33 | SHA1 (patch-yacc_Makefile) = d3a2f606e05f6a58170cf4bad4f3321e54b4324b |
@@ -1,62 +1,99 @@ | @@ -1,62 +1,99 @@ | |||
1 | $NetBSD: patch-configure,v 1.37 2019/08/24 10:54:23 jaapb Exp $ | 1 | $NetBSD: patch-configure,v 1.38 2019/10/01 09:07:33 maya Exp $ | |
2 | 2 | |||
3 | All kinds of OS-specific changes to configure | 3 | All kinds of OS-specific changes to configure | |
4 | Honor LDFLAGS. | 4 | Honor LDFLAGS. | |
5 | ||||
6 | Add SunOS -lnsl -lsocket | |||
7 | Recognise SunOS/amd64 as amd64 | |||
8 | Recognise SunOS as having shared libraries | |||
9 | ||||
5 | --- configure.orig 2019-03-01 15:13:45.000000000 +0000 | 10 | --- configure.orig 2019-03-01 15:13:45.000000000 +0000 | |
6 | +++ configure | 11 | +++ configure | |
7 | @@ -13379,7 +13379,7 @@ sharedlib_cflags='' | 12 | @@ -13311,7 +13311,7 @@ sharedlib_cflags='' | |
8 | mksharedlib='shared-libs-not-available' | 13 | mksharedlib='shared-libs-not-available' | |
9 | rpath='' | 14 | rpath='' | |
10 | mksharedlibrpath='' | 15 | mksharedlibrpath='' | |
11 | -natdynlinkopts="" | 16 | -natdynlinkopts="" | |
12 | +natdynlinkopts="-L/usr/lib -R/usr/lib -R/usr/pkg/lib" | 17 | +natdynlinkopts="-L/usr/lib -R/usr/lib -R/usr/pkg/lib" | |
13 | 18 | |||
14 | if test x"$enable_shared" != "xno"; then : | 19 | if test x"$enable_shared" != "xno"; then : | |
15 | case $host in #( | 20 | case $host in #( | |
16 | @@ -13475,6 +13475,8 @@ fi ;; #( | 21 | @@ -13347,9 +13335,14 @@ esac ;; #( | |
22 | rpath="-Wl,-rpath," | |||
23 | mksharedlibrpath="-Wl,-rpath," | |||
24 | natdynlinkopts="-Wl,-E" | |||
25 | - shared_libraries_supported=true ;; #( | |||
26 | + shared_libraries_supported=true | |||
27 | + *-*-solaris* ;; #( | |||
28 | *) : | |||
29 | - ;; | |||
30 | + sharedlib_cflags="-fPIC" | |||
31 | + mksharedlib="$CC -shared" | |||
32 | + rpath="-Wl,-rpath," | |||
33 | + mksharedlibrpath="-Wl,-rpath," | |||
34 | + shared_libraries_supported=true ;; | |||
35 | esac | |||
36 | fi | |||
37 | ||||
38 | @@ -13415,6 +13415,8 @@ fi ;; #( | |||
17 | natdynlink=true ;; #( | 39 | natdynlink=true ;; #( | |
18 | aarch64-*-linux*) : | 40 | aarch64-*-linux*) : | |
19 | natdynlink=true ;; #( | 41 | natdynlink=true ;; #( | |
20 | + aarch64-*-netbsd*) : | 42 | + aarch64-*-netbsd*) : | |
21 | + natdynlink=true ;; #( | 43 | + natdynlink=true ;; #( | |
22 | *) : | 44 | *) : | |
23 | ;; | 45 | ;; | |
24 | esac | 46 | esac | |
25 | @@ -13526,6 +13528,8 @@ case $host in #( | 47 | @@ -13466,6 +13468,8 @@ case $host in #( | |
26 | arch=i386; system=beos ;; #( | 48 | arch=i386; system=beos ;; #( | |
27 | i[3456]86-*-cygwin) : | 49 | i[3456]86-*-cygwin) : | |
28 | arch=i386; system=cygwin ;; #( | 50 | arch=i386; system=cygwin ;; #( | |
29 | + i[3456]86-*-interix3) : | 51 | + i[3456]86-*-interix3) : | |
30 | + arch=i386; system=interix3 ;; #( | 52 | + arch=i386; system=interix3 ;; #( | |
31 | i[3456]86-*-darwin*) : | 53 | i[3456]86-*-darwin*) : | |
32 | if $arch64; then : | 54 | if $arch64; then : | |
33 | arch=amd64 | 55 | arch=amd64 | |
34 | @@ -13570,6 +13574,10 @@ fi; system=elf ;; #( | 56 | @@ -13510,6 +13514,10 @@ fi; system=elf ;; #( | |
35 | arch=arm; model=armv6; system=linux_eabi ;; #( | 57 | arch=arm; model=armv6; system=linux_eabi ;; #( | |
36 | armv6*-*-freebsd*) : | 58 | armv6*-*-freebsd*) : | |
37 | arch=arm; model=armv6; system=freebsd ;; #( | 59 | arch=arm; model=armv6; system=freebsd ;; #( | |
38 | + armv6*-*-netbsd*) : | 60 | + armv6*-*-netbsd*) : | |
39 | + arch=arm; model=armv6; system=netbsd ;; #( | 61 | + arch=arm; model=armv6; system=netbsd ;; #( | |
40 | + armv7*-*-netbsd*) : | 62 | + armv7*-*-netbsd*) : | |
41 | + arch=arm; model=armv7; system=netbsd ;; #( | 63 | + arch=arm; model=armv7; system=netbsd ;; #( | |
42 | earmv6*-*-netbsd*) : | 64 | earmv6*-*-netbsd*) : | |
43 | arch=arm; model=armv6; system=netbsd ;; #( | 65 | arch=arm; model=armv6; system=netbsd ;; #( | |
44 | earmv7*-*-netbsd*) : | 66 | earmv7*-*-netbsd*) : | |
45 | @@ -13602,6 +13610,8 @@ fi; system=elf ;; #( | 67 | @@ -13544,8 +13552,12 @@ fi; system=elf ;; #( | |
46 | arch=amd64; system=mingw64 ;; #( | 68 | arch=amd64; system=mingw64 ;; #( | |
47 | aarch64-*-linux*) : | 69 | aarch64-*-linux*) : | |
48 | arch=arm64; system=linux ;; #( | 70 | arch=arm64; system=linux ;; #( | |
49 | + aarch64-*-netbsd*) : | 71 | + aarch64-*-netbsd*) : | |
50 | + arch=arm64; system=netbsd ;; #( | 72 | + arch=arm64; system=netbsd ;; #( | |
51 | x86_64-*-cygwin*) : | 73 | x86_64-*-cygwin*) : | |
52 | arch=amd64; system=cygwin | 74 | - arch=amd64; system=cygwin | |
75 | + arch=amd64; system=cygwin ;; #( | |||
76 | + x86_64-*-solaris*) : | |||
77 | + arch=amd64; system=solaris | |||
53 | ;; #( | 78 | ;; #( | |
54 | @@ -13932,7 +13942,7 @@ fi | 79 | *) : | |
80 | ;; | |||
81 | @@ -13884,7 +13896,7 @@ fi | |||
55 | # for the moment, to be backward-compatible | 82 | # for the moment, to be backward-compatible | |
56 | 83 | |||
57 | case $host in #( | 84 | case $host in #( | |
58 | - *-*-mingw32|*-pc-windows) : | 85 | - *-*-mingw32|*-pc-windows) : | |
59 | + *-*-mingw32|*-pc-windows|*-*-netbsd*) : | 86 | + *-*-mingw32|*-pc-windows|*-*-netbsd*) : | |
60 | ;; #( | 87 | ;; #( | |
61 | *) : | 88 | *) : | |
62 | has_c99_float_ops=true | 89 | has_c99_float_ops=true | |
90 | @@ -14085,6 +14097,9 @@ case $host in #( | |||
91 | *-*-mingw32|*-pc-windows) : | |||
92 | cclibs="$cclibs -lws2_32" | |||
93 | sockets=true ;; #( | |||
94 | + *-*-solaris*) : | |||
95 | + cclibs="$cclibs -lnsl -lsocket" | |||
96 | + sockets=true ;; #( | |||
97 | *) : | |||
98 | ||||
99 | ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" |
$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"