summaryrefslogtreecommitdiff
path: root/lang/ocaml
diff options
context:
space:
mode:
authorjaapb <jaapb@pkgsrc.org>2015-01-20 14:12:25 +0000
committerjaapb <jaapb@pkgsrc.org>2015-01-20 14:12:25 +0000
commit69a582d44a8257c379bbd545b3f871ac2dfc767f (patch)
tree4efaad81730eed3779823f32459be5305624573a /lang/ocaml
parent5672e73a4affa0d0afd4a1f9aeb198a6aa167555 (diff)
downloadpkgsrc-69a582d44a8257c379bbd545b3f871ac2dfc767f.tar.gz
This is an update of OCaml to 4.02.1. Changes are listed below. There is also
a new patch to include a -pkgsrc-runtime compilation option. This option is needed to compile devel/pcre-ocaml due to buildlink shenanigans (see http://mail-index.netbsd.org/pkgsrc-users/2014/12/18/msg020800.html ) Changes: (Changes that can break existing programs are marked with a "*") Standard library: * Add optional argument ?limit to Arg.align. - Bug in Makefile.nt: won't stop on error - Improve MSVC build - Configure doesn't detect features correctly on Haiku - Non-exhaustive matching warning message for open types is confusing - fix quadratic-time algorithm in Consistbl.extract. - Add stack overflow handling for native code (OpenBSD i386 and amd64) - broken semantics of %(%) when substitued by a box - legacy support for %.10s - better documentation of flag # in format strings - Bytes and CamlinternalFormat missing from threads stdlib.cma - -dsource omits parens for `List ((`String "A")::[]) in patterns - __MODULE__ aborts the compiler if the module name cannot be inferred - Debug section is sometimes not readable when using -pack - Missing command line options for ocamldoc - fix race condition when retrieving backtraces - String.sub throws Invalid_argument("Bytes.sub") - Fix ocamldebug module source lookup - Inclusion of packs failing to run module initializers - infinite loop in Mtype.remove_aliases - compilation fails with Env.Error(_) - -short-paths and signature inclusion errors - Fatal error with recursive modules - Recursive module containing alias causes Segmentation fault - Some bugs in generative functors - ocamldep support for "-open M" - Code generation errors for ARM - Improve Windows (MSVC and mingw) build - ocamlbuild: add -bin-annot when using -pack - Fatal error when tracing a function with abstract type - ocamlbuild: add an -ocamlmklib option to change the ocamlmklib command
Diffstat (limited to 'lang/ocaml')
-rw-r--r--lang/ocaml/Makefile.common4
-rw-r--r--lang/ocaml/PLIST38
-rw-r--r--lang/ocaml/buildlink3.mk4
-rw-r--r--lang/ocaml/distinfo22
-rw-r--r--lang/ocaml/patches/patch-asmcomp_asmlink.ml19
-rw-r--r--lang/ocaml/patches/patch-asmrun_arm.S3
-rw-r--r--lang/ocaml/patches/patch-configure55
-rw-r--r--lang/ocaml/patches/patch-driver_compenv.ml13
-rw-r--r--lang/ocaml/patches/patch-driver_main.ml13
-rw-r--r--lang/ocaml/patches/patch-driver_main_args.ml40
-rw-r--r--lang/ocaml/patches/patch-driver_main_args.mli13
-rw-r--r--lang/ocaml/patches/patch-driver_optmain.ml13
-rw-r--r--lang/ocaml/patches/patch-tools_ocamlcp.ml13
-rw-r--r--lang/ocaml/patches/patch-tools_ocamloptp.ml13
-rw-r--r--lang/ocaml/patches/patch-utils_clflags.ml15
-rw-r--r--lang/ocaml/patches/patch-utils_clflags.mli13
16 files changed, 254 insertions, 37 deletions
diff --git a/lang/ocaml/Makefile.common b/lang/ocaml/Makefile.common
index 9b3a140e090..08964fb7426 100644
--- a/lang/ocaml/Makefile.common
+++ b/lang/ocaml/Makefile.common
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile.common,v 1.39 2014/10/09 19:08:28 jaapb Exp $
+# $NetBSD: Makefile.common,v 1.40 2015/01/20 14:12:25 jaapb Exp $
# used by x11/labltk/Makefile
# used by x11/ocaml-graphics/Makefile
-DISTNAME= ocaml-4.02.0
+DISTNAME= ocaml-4.02.1
CATEGORIES= lang
MASTER_SITES= http://caml.inria.fr/pub/distrib/ocaml-4.02/
#EXTRACT_SUFX= .tar.bz2
diff --git a/lang/ocaml/PLIST b/lang/ocaml/PLIST
index 5ab33d446bf..bf9f17d490d 100644
--- a/lang/ocaml/PLIST
+++ b/lang/ocaml/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.27 2014/10/09 19:08:28 jaapb Exp $
+@comment $NetBSD: PLIST,v 1.28 2015/01/20 14:12:25 jaapb Exp $
bin/ocaml
bin/ocamlbuild
bin/ocamlbuild.byte
@@ -464,6 +464,32 @@ man/man1/ocamlyacc.1
man/man3o/Arg.3o
man/man3o/Array.3o
man/man3o/ArrayLabels.3o
+man/man3o/Ast_helper.3o
+man/man3o/Ast_helper.Cf.3o
+man/man3o/Ast_helper.Ci.3o
+man/man3o/Ast_helper.Cl.3o
+man/man3o/Ast_helper.Csig.3o
+man/man3o/Ast_helper.Cstr.3o
+man/man3o/Ast_helper.Ctf.3o
+man/man3o/Ast_helper.Cty.3o
+man/man3o/Ast_helper.Exp.3o
+man/man3o/Ast_helper.Incl.3o
+man/man3o/Ast_helper.Mb.3o
+man/man3o/Ast_helper.Md.3o
+man/man3o/Ast_helper.Mod.3o
+man/man3o/Ast_helper.Mtd.3o
+man/man3o/Ast_helper.Mty.3o
+man/man3o/Ast_helper.Opn.3o
+man/man3o/Ast_helper.Pat.3o
+man/man3o/Ast_helper.Sig.3o
+man/man3o/Ast_helper.Str.3o
+man/man3o/Ast_helper.Te.3o
+man/man3o/Ast_helper.Typ.3o
+man/man3o/Ast_helper.Type.3o
+man/man3o/Ast_helper.Val.3o
+man/man3o/Ast_helper.Vb.3o
+man/man3o/Ast_mapper.3o
+man/man3o/Asttypes.3o
man/man3o/Bigarray.3o
man/man3o/Bigarray.Array1.3o
man/man3o/Bigarray.Array2.3o
@@ -496,9 +522,12 @@ man/man3o/Hashtbl.SeededS.3o
man/man3o/Int32.3o
man/man3o/Int64.3o
man/man3o/Lazy.3o
+man/man3o/Lexer.3o
man/man3o/Lexing.3o
man/man3o/List.3o
man/man3o/ListLabels.3o
+man/man3o/Location.3o
+man/man3o/Longident.3o
man/man3o/Map.3o
man/man3o/Map.Make.3o
man/man3o/Map.OrderedType.3o
@@ -524,9 +553,15 @@ man/man3o/Nativeint.3o
man/man3o/Num.3o
man/man3o/Obj.3o
man/man3o/Oo.3o
+man/man3o/Parse.3o
+man/man3o/Parser.3o
+man/man3o/Parsetree.3o
man/man3o/Parsing.3o
man/man3o/Pervasives.3o
man/man3o/Pervasives.LargeFile.3o
+man/man3o/Pprintast.3o
+man/man3o/Pprintast.printer.3o
+man/man3o/Printast.3o
man/man3o/Printexc.3o
man/man3o/Printexc.Slot.3o
man/man3o/Printf.3o
@@ -549,6 +584,7 @@ man/man3o/StdLabels.String.3o
man/man3o/Str.3o
man/man3o/Stream.3o
man/man3o/StringLabels.3o
+man/man3o/Syntaxerr.3o
man/man3o/Sys.3o
man/man3o/Unix.3o
man/man3o/Unix.LargeFile.3o
diff --git a/lang/ocaml/buildlink3.mk b/lang/ocaml/buildlink3.mk
index c395da53ae4..66bd4baedd9 100644
--- a/lang/ocaml/buildlink3.mk
+++ b/lang/ocaml/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.30 2014/10/09 19:08:28 jaapb Exp $
+# $NetBSD: buildlink3.mk,v 1.31 2015/01/20 14:12:25 jaapb Exp $
BUILDLINK_TREE+= ocaml
@@ -6,7 +6,7 @@ BUILDLINK_TREE+= ocaml
OCAML_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.ocaml+= ocaml>=3.08.2
-BUILDLINK_ABI_DEPENDS.ocaml+= ocaml>=4.02.0
+BUILDLINK_ABI_DEPENDS.ocaml+= ocaml>=4.02.1
BUILDLINK_PKGSRCDIR.ocaml?= ../../lang/ocaml
#BUILDLINK_DEPMETHOD.ocaml?= build
diff --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo
index a9b8b281c80..944a0fa8276 100644
--- a/lang/ocaml/distinfo
+++ b/lang/ocaml/distinfo
@@ -1,19 +1,25 @@
-$NetBSD: distinfo,v 1.78 2014/11/21 14:15:20 joerg Exp $
+$NetBSD: distinfo,v 1.79 2015/01/20 14:12:25 jaapb Exp $
-SHA1 (ocaml-4.02.0.tar.gz) = 402d730d1c9b5e45b327a0b3fc61a24dff08a747
-RMD160 (ocaml-4.02.0.tar.gz) = 59c72f1378565d49e86be6723506d5b1e2eb376b
-Size (ocaml-4.02.0.tar.gz) = 3048921 bytes
+SHA1 (ocaml-4.02.1.tar.gz) = 6af8c67f2badece81d8e1d1ce70568a16e42313e
+RMD160 (ocaml-4.02.1.tar.gz) = fcb30200e9675d92e402b4b7101a032f918f80c1
+Size (ocaml-4.02.1.tar.gz) = 3063481 bytes
SHA1 (patch-Makefile) = 0aea370689374398924724f1989158dc061c2a18
+SHA1 (patch-asmcomp_asmlink.ml) = c97174d349a02783fd852da6ea707baab646a936
SHA1 (patch-asmcomp_power_emit.mlp) = 726e09e4902b96f4790c7a8093eb245dd7028bf4
SHA1 (patch-asmrun_Makefile) = b6301628b71e3fe3553f32342805ae90159cc773
-SHA1 (patch-asmrun_arm.S) = 5b06bb12190bfe7a003787098ddecc5b63e708c1
+SHA1 (patch-asmrun_arm.S) = af62872815fd9cb996f3ce6a1fbaec5b568b70d1
SHA1 (patch-asmrun_power-bsd.S) = 5428a486835a0254a1768b3157b6b1fdf5ae8dd3
SHA1 (patch-asmrun_signals_osdep.h) = d9dba52a3e1e0170976e64a1ef1860aa5ab560ae
SHA1 (patch-byterun_Makefile) = 2b88b35e5ffcccc315542cb814b9e826126acb54
SHA1 (patch-config_auto__aux_gethostbyaddr.c) = ce724831e93081d3e51a122fef14b17543c3221c
SHA1 (patch-config_auto__aux_gethostbyname.c) = f05a6026a18ca7557558383103c6a2fc08caee28
-SHA1 (patch-configure) = 4f65c0657d80a31aa4d68e875d4b0b39a2d422ad
+SHA1 (patch-configure) = 546e422e15087be02001c20e6cf582fc6017564a
SHA1 (patch-debugger_Makefile.shared) = 9acaa17f22a66311859b6ac4a0c047e6693fce33
+SHA1 (patch-driver_compenv.ml) = cb6197cee99ab77fd1b8aadca7cef613c0e35a31
+SHA1 (patch-driver_main.ml) = ed7a63d0678214efed7871b41575c34464c7272a
+SHA1 (patch-driver_main_args.ml) = 1e80cc88607f20954d1d5cb38ebcf2ad02d34261
+SHA1 (patch-driver_main_args.mli) = 66c691031f8fe726dc3c5c00a058b484213da703
+SHA1 (patch-driver_optmain.ml) = e8b347eb49d9f72e0af6f69c2b6aacd41d8eec4a
SHA1 (patch-man_Makefile) = 7d8c1468c3365803505841a7f688d84c07231a3c
SHA1 (patch-ocamldoc_Makefile) = bf76adf76a2b65c3983dccb483c857600ed9dde8
SHA1 (patch-otherlibs_Makefile) = 08ccf5fd4900d59f1ad32346d8e81388c0cdd92c
@@ -24,4 +30,8 @@ SHA1 (patch-otherlibs_threads_Makefile) = bcaaeb85724e50ce058b79ab4224c9f1aaadd4
SHA1 (patch-stdlib_Makefile) = 501b45018245950c78d663bbd6eea1c38a6d04d2
SHA1 (patch-stdlib_Makefile.shared) = 64a4366efec37aed04ed1bec79a0039bf6fde68f
SHA1 (patch-tools_Makefile.shared) = ff10364c68df2ac548468c9e5d1ab66458d3413e
+SHA1 (patch-tools_ocamlcp.ml) = 779380f7ffb56f0a8156b2b30f477b2de8c1b269
SHA1 (patch-tools_ocamlmklib) = 926eff8927ff31ee060140f7358d75c11f230a76
+SHA1 (patch-tools_ocamloptp.ml) = 7585c65be56def822f87646bac298c549eda9cd5
+SHA1 (patch-utils_clflags.ml) = 41218fe3b807d63a799d224835126c447cb7a1d8
+SHA1 (patch-utils_clflags.mli) = a4e576f94e7a946dfdb64ab695b2d40502430ea1
diff --git a/lang/ocaml/patches/patch-asmcomp_asmlink.ml b/lang/ocaml/patches/patch-asmcomp_asmlink.ml
new file mode 100644
index 00000000000..3d6dd49f6ba
--- /dev/null
+++ b/lang/ocaml/patches/patch-asmcomp_asmlink.ml
@@ -0,0 +1,19 @@
+$NetBSD: patch-asmcomp_asmlink.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- asmcomp/asmlink.ml.orig 2014-05-21 15:08:11.000000000 +0000
++++ asmcomp/asmlink.ml
+@@ -98,6 +98,13 @@ let add_ccobjs l =
+ end
+
+ let runtime_lib () =
++ if !Clflags.pkgsrc_runtime
++ then begin
++ if !Clflags.gprofile
++ then [ "-lasmrunp" ]
++ else [ "-lasmrun" ^ !Clflags.runtime_variant ]
++ end
++ else
+ let libname =
+ if !Clflags.gprofile
+ then "libasmrunp" ^ ext_lib
diff --git a/lang/ocaml/patches/patch-asmrun_arm.S b/lang/ocaml/patches/patch-asmrun_arm.S
index 7f659da2198..d1334ccf20c 100644
--- a/lang/ocaml/patches/patch-asmrun_arm.S
+++ b/lang/ocaml/patches/patch-asmrun_arm.S
@@ -1,5 +1,6 @@
-$NetBSD: patch-asmrun_arm.S,v 1.1 2014/11/21 14:15:20 joerg Exp $
+$NetBSD: patch-asmrun_arm.S,v 1.2 2015/01/20 14:12:25 jaapb Exp $
+pkgsrc_runtime flag
--- asmrun/arm.S.orig 2014-11-20 13:12:25.000000000 +0000
+++ asmrun/arm.S
@@ -44,7 +44,7 @@
diff --git a/lang/ocaml/patches/patch-configure b/lang/ocaml/patches/patch-configure
index 2c635239ef9..8f7f9f144e2 100644
--- a/lang/ocaml/patches/patch-configure
+++ b/lang/ocaml/patches/patch-configure
@@ -1,7 +1,7 @@
-$NetBSD: patch-configure,v 1.8 2014/10/09 19:08:28 jaapb Exp $
+$NetBSD: patch-configure,v 1.9 2015/01/20 14:12:25 jaapb Exp $
Several configure changes to work on and detect NetBSD (and some other OSes)
---- configure.orig 2014-08-21 10:06:19.000000000 +0000
+--- configure.orig 2014-10-03 19:25:46.000000000 +0000
+++ configure
@@ -318,11 +318,11 @@ TOOLCHAIN="cc"
case "$bytecc,$target" in
@@ -17,9 +17,14 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
mathlib="";;
*,*-*-darwin*)
bytecccompopts="$gcc_warnings"
-@@ -334,11 +334,11 @@ case "$bytecc,$target" in
+@@ -334,15 +334,15 @@ case "$bytecc,$target" in
echo "# define ARCH_CODE32" >> m.h
echo "#endif" >> m.h;;
+ *,*-*-haiku*)
+- bytecccompopts="-fno-defer-pop $gcc_warnings"
++ bytecccompopts="$gcc_warnings"
+ # No -lm library
+ mathlib="";;
*,*-*-beos*)
- bytecccompopts="-fno-defer-pop $gcc_warnings"
+ bytecccompopts="$gcc_warnings"
@@ -31,7 +36,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
if cc="$bytecc" sh ./hasgot -mieee; then
bytecccompopts="-mieee $bytecccompopts";
fi
-@@ -366,11 +366,11 @@ case "$bytecc,$target" in
+@@ -370,11 +370,11 @@ case "$bytecc,$target" in
bytecccompopts="-DUMK";;
*gcc*,powerpc-*-aix*)
# Avoid name-space pollution by requiring Unix98-conformant includes
@@ -45,7 +50,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
dllccompopts="-U_WIN32 -DCAML_DLL"
if test $with_sharedlibs = yes; then
flexlink="flexlink -chain cygwin -merge-manifest -stack 16777216"
-@@ -391,7 +391,7 @@ case "$bytecc,$target" in
+@@ -395,7 +395,7 @@ case "$bytecc,$target" in
exe=".exe"
ostype="Cygwin";;
*gcc*,*-*-mingw*)
@@ -54,7 +59,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
dllccompopt="-DCAML_DLL"
if test $with_sharedlibs = yes; then
case "$target" in
-@@ -415,14 +415,14 @@ case "$bytecc,$target" in
+@@ -419,14 +419,14 @@ case "$bytecc,$target" in
SO="dll"
;;
*gcc*,x86_64-*-linux*)
@@ -71,16 +76,16 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
esac
# Configure compiler to use in further tests
-@@ -655,7 +655,7 @@ if test $with_sharedlibs = "yes"; then
+@@ -659,7 +659,7 @@ if test $with_sharedlibs = "yes"; then
mksharedlib="$flexlink"
mkmaindll="$flexlink -maindll"
shared_libraries_supported=true;;
-- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
-+ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-dragonfly)
+- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*)
++ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-dragonfly|*-*-gnu*|*-*-haiku*)
sharedcccompopts="-fPIC"
mksharedlib="$bytecc -shared"
bytecclinkopts="$bytecclinkopts -Wl,-E"
-@@ -752,7 +752,7 @@ if test $with_sharedlibs = "yes"; then
+@@ -756,7 +756,7 @@ if test $with_sharedlibs = "yes"; then
x86_64-*-linux*) natdynlink=true;;
i[3456]86-*-darwin[89].*) natdynlink=true;;
i[3456]86-*-darwin*)
@@ -89,16 +94,16 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
natdynlink=true
fi;;
x86_64-*-darwin*) natdynlink=true;;
-@@ -766,6 +766,8 @@ if test $with_sharedlibs = "yes"; then
+@@ -770,6 +770,8 @@ if test $with_sharedlibs = "yes"; then
x86_64-*-openbsd*) natdynlink=true;;
i[3456]86-*-netbsd*) natdynlink=true;;
x86_64-*-netbsd*) natdynlink=true;;
+ i[3456]86-*-dragonfly*) natdynlink=true;;
+ x86_64-*-dragonfly*) natdynlink=true;;
i386-*-gnu0.3) natdynlink=true;;
+ i[3456]86-*-haiku*) natdynlink=true;;
arm*-*-linux*) natdynlink=true;;
- arm*-*-freebsd*) natdynlink=true;;
-@@ -793,6 +795,7 @@ case "$target" in
+@@ -798,6 +800,7 @@ case "$target" in
sparc*-*-gnu*) arch=sparc; system=gnu;;
i[3456]86-*-linux*) arch=i386; system=linux_`sh ./runtest elf.c`;;
i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
@@ -106,15 +111,15 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
i[3456]86-*-nextstep*) arch=i386; system=nextstep;;
i[3456]86-*-solaris*) if $arch64; then
arch=amd64; system=solaris
-@@ -801,6 +804,7 @@ case "$target" in
- fi;;
+@@ -807,6 +810,7 @@ case "$target" in
+ i[3456]86-*-haiku*) arch=i386; system=beos;;
i[3456]86-*-beos*) arch=i386; system=beos;;
i[3456]86-*-cygwin*) arch=i386; system=cygwin;;
-+ i[3456]86-*-interix3*) arch=i386; system=interix3;;
++ i[3456]86-*-interix3*) arch=i386; system=interix3;;
i[3456]86-*-darwin*) if $arch64; then
arch=amd64; system=macosx
else
-@@ -814,6 +818,7 @@ case "$target" in
+@@ -820,6 +824,7 @@ case "$target" in
powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
powerpc-*-darwin*) arch=power; system=rhapsody
if $arch64;then model=ppc64;else model=ppc;fi;;
@@ -122,7 +127,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
armv6*-*-linux-gnueabihf) arch=arm; model=armv6; system=linux_eabihf;;
arm*-*-linux-gnueabihf) arch=arm; system=linux_eabihf;;
armv7*-*-linux-gnueabi) arch=arm; model=armv7; system=linux_eabi;;
-@@ -829,6 +834,7 @@ case "$target" in
+@@ -835,6 +840,7 @@ case "$target" in
x86_64-*-gnu*) arch=amd64; system=gnu;;
x86_64-*-freebsd*) arch=amd64; system=freebsd;;
x86_64-*-netbsd*) arch=amd64; system=netbsd;;
@@ -130,7 +135,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
x86_64-*-openbsd*) arch=amd64; system=openbsd;;
x86_64-*-darwin*) arch=amd64; system=macosx;;
x86_64-*-mingw*) arch=amd64; system=mingw;;
-@@ -868,7 +874,7 @@ case "$arch,$nativecc,$system,$target" i
+@@ -874,7 +880,7 @@ case "$arch,$nativecc,$system,$target" i
if $arch64; then partialld="ld -r -arch ppc64"; fi;;
*,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";;
amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";;
@@ -139,7 +144,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
*,gcc*,*,*) nativecccompopts="$gcc_warnings";;
esac
-@@ -885,7 +891,7 @@ case "$arch,$system" in
+@@ -891,7 +897,7 @@ case "$arch,$system" in
amd64,solaris) as="${TOOLPREF}as --64"
aspp="${TOOLPREF}gcc -m64 -c";;
i386,solaris) as="${TOOLPREF}as"
@@ -148,7 +153,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
power,elf) as="${TOOLPREF}as -u -m ppc"
aspp="${TOOLPREF}gcc -c";;
power,rhapsody) as="${TOOLPREF}as -arch $model"
-@@ -924,6 +930,7 @@ case "$arch,$system" in
+@@ -930,6 +936,7 @@ case "$arch,$system" in
arm,linux*) profiling='prof';;
power,elf) profiling='prof';;
power,bsd*) profiling='prof';;
@@ -156,7 +161,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
*) profiling='noprof';;
esac
-@@ -1413,6 +1420,8 @@ fi
+@@ -1434,6 +1441,8 @@ fi
x11_include="not found"
x11_link="not found"
@@ -165,7 +170,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
if test -z "$x11_include_dir" -a -z "$x11_lib_dir"; then
if pkg-config --exists x11 2>/dev/null; then
x11_include=`pkg-config --cflags x11`
-@@ -1459,6 +1468,7 @@ if test "$x11_include" = "not found"; th
+@@ -1480,6 +1489,7 @@ if test "$x11_include" = "not found"; th
/usr/XFree86/include/X11 \
\
/usr/include \
@@ -173,7 +178,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
/usr/local/include \
/usr/unsupported/include \
/usr/athena/include \
-@@ -1516,6 +1526,7 @@ if test "$x11_include" = "not found"; th
+@@ -1537,6 +1547,7 @@ if test "$x11_include" = "not found"; th
\
/usr/lib64 \
/usr/lib \
@@ -181,7 +186,7 @@ Several configure changes to work on and detect NetBSD (and some other OSes)
/usr/local/lib \
/usr/unsupported/lib \
/usr/athena/lib \
-@@ -1537,18 +1548,16 @@ if test "$x11_include" = "not found"; th
+@@ -1558,18 +1569,16 @@ if test "$x11_include" = "not found"; th
if test $dir = /usr/lib; then
x11_link="-lX11"
else
diff --git a/lang/ocaml/patches/patch-driver_compenv.ml b/lang/ocaml/patches/patch-driver_compenv.ml
new file mode 100644
index 00000000000..ab1f7860392
--- /dev/null
+++ b/lang/ocaml/patches/patch-driver_compenv.ml
@@ -0,0 +1,13 @@
+$NetBSD: patch-driver_compenv.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- driver/compenv.ml.orig 2014-08-28 16:24:52.000000000 +0000
++++ driver/compenv.ml
+@@ -185,6 +185,7 @@ let read_OCAMLPARAM ppf position =
+
+ | "pp" -> preprocessor := Some v
+ | "runtime-variant" -> runtime_variant := v
++ | "pkgsrc-runtime" -> set "pkgsrc-runtime" [ pkgsrc_runtime ] v
+ | "cc" -> c_compiler := Some v
+
+ (* assembly sources *)
diff --git a/lang/ocaml/patches/patch-driver_main.ml b/lang/ocaml/patches/patch-driver_main.ml
new file mode 100644
index 00000000000..ba09edacb99
--- /dev/null
+++ b/lang/ocaml/patches/patch-driver_main.ml
@@ -0,0 +1,13 @@
+$NetBSD: patch-driver_main.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- driver/main.ml.orig 2014-08-28 16:24:52.000000000 +0000
++++ driver/main.ml
+@@ -112,6 +112,7 @@ module Options = Main_args.Make_bytecomp
+ let _principal = set principal
+ let _rectypes = set recursive_types
+ let _runtime_variant s = runtime_variant := s
++ let _pkgsrc_runtime = set pkgsrc_runtime
+ let _safe_string = unset unsafe_string
+ let _short_paths = unset real_paths
+ let _strict_sequence = set strict_sequence
diff --git a/lang/ocaml/patches/patch-driver_main_args.ml b/lang/ocaml/patches/patch-driver_main_args.ml
new file mode 100644
index 00000000000..6c12d62b279
--- /dev/null
+++ b/lang/ocaml/patches/patch-driver_main_args.ml
@@ -0,0 +1,40 @@
+$NetBSD: patch-driver_main_args.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- driver/main_args.ml.orig 2014-09-26 13:00:20.000000000 +0000
++++ driver/main_args.ml
+@@ -231,6 +231,10 @@ let mk_pack_opt f =
+ "-pack", Arg.Unit f, " Package the given .cmx files into one .cmx"
+ ;;
+
++let mk_pkgsrc_runtime f =
++ "-pkgsrc-runtime", Arg.Unit f, " Use pkgsrc linking for runtime"
++;;
++
+ let mk_pp f =
+ "-pp", Arg.String f, "<command> Pipe sources through preprocessor <command>"
+ ;;
+@@ -522,6 +526,7 @@ module type Compiler_options = sig
+ val _o : string -> unit
+ val _output_obj : unit -> unit
+ val _pack : unit -> unit
++ val _pkgsrc_runtime : unit -> unit
+ val _pp : string -> unit
+ val _principal : unit -> unit
+ val _rectypes : unit -> unit
+@@ -669,6 +674,7 @@ struct
+ mk_open F._open;
+ mk_output_obj F._output_obj;
+ mk_pack_byt F._pack;
++ mk_pkgsrc_runtime F._pkgsrc_runtime;
+ mk_pp F._pp;
+ mk_ppx F._ppx;
+ mk_principal F._principal;
+@@ -785,6 +791,7 @@ struct
+ mk_output_obj F._output_obj;
+ mk_p F._p;
+ mk_pack_opt F._pack;
++ mk_pkgsrc_runtime F._pkgsrc_runtime;
+ mk_pp F._pp;
+ mk_ppx F._ppx;
+ mk_principal F._principal;
diff --git a/lang/ocaml/patches/patch-driver_main_args.mli b/lang/ocaml/patches/patch-driver_main_args.mli
new file mode 100644
index 00000000000..5bdb417b21e
--- /dev/null
+++ b/lang/ocaml/patches/patch-driver_main_args.mli
@@ -0,0 +1,13 @@
+$NetBSD: patch-driver_main_args.mli,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- driver/main_args.mli.orig 2014-09-26 13:00:20.000000000 +0000
++++ driver/main_args.mli
+@@ -68,6 +68,7 @@ module type Compiler_options = sig
+ val _o : string -> unit
+ val _output_obj : unit -> unit
+ val _pack : unit -> unit
++ val _pkgsrc_runtime : unit -> unit
+ val _pp : string -> unit
+ val _principal : unit -> unit
+ val _rectypes : unit -> unit
diff --git a/lang/ocaml/patches/patch-driver_optmain.ml b/lang/ocaml/patches/patch-driver_optmain.ml
new file mode 100644
index 00000000000..4aac4dac9ad
--- /dev/null
+++ b/lang/ocaml/patches/patch-driver_optmain.ml
@@ -0,0 +1,13 @@
+$NetBSD: patch-driver_optmain.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- driver/optmain.ml.orig 2014-08-28 16:24:52.000000000 +0000
++++ driver/optmain.ml
+@@ -111,6 +111,7 @@ module Options = Main_args.Make_optcomp_
+ let _principal = set principal
+ let _rectypes = set recursive_types
+ let _runtime_variant s = runtime_variant := s
++ let _pkgsrc_runtime = set pkgsrc_runtime
+ let _safe_string = clear unsafe_string
+ let _short_paths = clear real_paths
+ let _strict_sequence = set strict_sequence
diff --git a/lang/ocaml/patches/patch-tools_ocamlcp.ml b/lang/ocaml/patches/patch-tools_ocamlcp.ml
new file mode 100644
index 00000000000..6fbcefdcabd
--- /dev/null
+++ b/lang/ocaml/patches/patch-tools_ocamlcp.ml
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_ocamlcp.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- tools/ocamlcp.ml.orig 2014-08-28 16:24:52.000000000 +0000
++++ tools/ocamlcp.ml
+@@ -80,6 +80,7 @@ module Options = Main_args.Make_bytecomp
+ let _principal = option "-principal"
+ let _rectypes = option "-rectypes"
+ let _runtime_variant s = option_with_arg "-runtime-variant" s
++ let _pkgsrc_runtime = option "-pkgsrc-runtime"
+ let _safe_string = option "-safe-string"
+ let _short_paths = option "-short-paths"
+ let _strict_sequence = option "-strict-sequence"
diff --git a/lang/ocaml/patches/patch-tools_ocamloptp.ml b/lang/ocaml/patches/patch-tools_ocamloptp.ml
new file mode 100644
index 00000000000..ec362dcc0b9
--- /dev/null
+++ b/lang/ocaml/patches/patch-tools_ocamloptp.ml
@@ -0,0 +1,13 @@
+$NetBSD: patch-tools_ocamloptp.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- tools/ocamloptp.ml.orig 2014-08-28 16:24:52.000000000 +0000
++++ tools/ocamloptp.ml
+@@ -82,6 +82,7 @@ module Options = Main_args.Make_optcomp_
+ let _principal = option "-principal"
+ let _rectypes = option "-rectypes"
+ let _runtime_variant s = option_with_arg "-runtime-variant" s
++ let _pkgsrc_runtime = option "-pkgsrc-runtime"
+ let _S = option "-S"
+ let _safe_string = option "-safe-string"
+ let _short_paths = option "-short-paths"
diff --git a/lang/ocaml/patches/patch-utils_clflags.ml b/lang/ocaml/patches/patch-utils_clflags.ml
new file mode 100644
index 00000000000..d617bae87c1
--- /dev/null
+++ b/lang/ocaml/patches/patch-utils_clflags.ml
@@ -0,0 +1,15 @@
+$NetBSD: patch-utils_clflags.ml,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- utils/clflags.ml.orig 2014-08-28 16:24:52.000000000 +0000
++++ utils/clflags.ml
+@@ -106,7 +106,8 @@ let std_include_dir () =
+ let shared = ref false (* -shared *)
+ let dlcode = ref true (* not -nodynlink *)
+
+-let runtime_variant = ref "";; (* -runtime-variant *)
++let runtime_variant = ref "" (* -runtime-variant *)
++let pkgsrc_runtime = ref false;; (* -pkgsrc-runtime *)
+
+ let keep_locs = ref false (* -keep-locs *)
+ let unsafe_string = ref true;; (* -safe-string / -unsafe-string *)
diff --git a/lang/ocaml/patches/patch-utils_clflags.mli b/lang/ocaml/patches/patch-utils_clflags.mli
new file mode 100644
index 00000000000..4c97e3816b1
--- /dev/null
+++ b/lang/ocaml/patches/patch-utils_clflags.mli
@@ -0,0 +1,13 @@
+$NetBSD: patch-utils_clflags.mli,v 1.1 2015/01/20 14:12:25 jaapb Exp $
+
+pkgsrc_runtime flag
+--- utils/clflags.mli.orig 2014-08-28 16:24:52.000000000 +0000
++++ utils/clflags.mli
+@@ -90,6 +90,7 @@ val std_include_dir : unit -> string lis
+ val shared : bool ref
+ val dlcode : bool ref
+ val runtime_variant : string ref
++val pkgsrc_runtime : bool ref
+ val force_slash : bool ref
+ val keep_locs : bool ref
+ val unsafe_string : bool ref