summaryrefslogtreecommitdiff
path: root/lang
diff options
context:
space:
mode:
authorjaapb <jaapb>2012-10-08 15:05:32 +0000
committerjaapb <jaapb>2012-10-08 15:05:32 +0000
commitfb596156fd101c986401de53e30aef399639865e (patch)
tree73066e24ff5297f35482ee5164afd7c67f5c63ee /lang
parentfb7a4f9137a71bb72042b34e01cbec5b25a88ddb (diff)
downloadpkgsrc-fb596156fd101c986401de53e30aef399639865e.tar.gz
Update to version 4.00.1. Renamed patches from two-letter system and added
comments. Updated buildlink3.mk to default to a full dependency (more pertinent in most cases; usually the standard library needs to be installed for an ocaml program to run) Changes from 3.12 to 4.00.1 include: OCaml 4.00.1: ------------- Various bug fixes. OCaml 4.00.0: ------------- (Changes that can break existing programs are marked with a "*") - The official name of the language is now OCaml. Language features: - Added Generalized Algebraic Data Types (GADTs) to the language. See chapter "Language extensions" of the reference manual for documentation. - It is now possible to omit type annotations when packing and unpacking first-class modules. The type-checker attempts to infer it from the context. Using the -principal option guarantees forward compatibility. - New (module M) and (module M : S) syntax in patterns, for immediate unpacking of a first-class module. Compilers: - Revised simplification of let-alias (PR#5205, PR#5288) - Better reporting of compiler version mismatch in .cmi files * Warning 28 is now enabled by default. - New option -absname to use absolute paths in error messages - Optimize away compile-time beta-redexes, e.g. (fun x y -> e) a b. - Added option -bin-annot to dump the AST with type annotations. - Added lots of new warnings about unused variables, opens, fields, constructors, etc. * New meaning for warning 7: it is now triggered when a method is overridden with the "method" keyword. Use "method!" to avoid the warning. Native-code compiler: - Optimized handling of partially-applied functions (PR#5287) - Small improvements in code generated for array bounds checks (PR#5345, PR#5360). * New ARM backend (PR#5433): . Supports both Linux/EABI (armel) and Linux/EABI+VFPv3 (armhf). . Added support for the Thumb-2 instruction set with average code size savings of 28%. . Added support for position-independent code, natdynlink, profiling and exception backtraces. - Generation of CFI information, and filename/line number debugging (with -g) annotations, enabling in particular precise stack backtraces with the gdb debugger. Currently supported for x86 32-bits and 64-bits only. (PR#5487) - New tool: ocamloptp, the equivalent of ocamlcp for the native-code compiler. OCamldoc: - PR#5645: ocamldoc doesn't handle module/type substitution in signatures - PR#5544: improve HTML output (less formatting in html code) - PR#5522: allow refering to record fields and variant constructors - fix PR#5419 (error message in french) - fix PR#5535 (no cross ref to class after dump+load) * Use first class modules for custom generators, to be able to load various plugins incrementally adding features to the current generator * PR#5507: Use Location.t structures for locations. - fix: do not keep code when not told to keep code. Standard library: - Added float functions "hypot" and "copysign" (PR#3806, PR#4752, PR#5246) * Arg: options with empty doc strings are no longer included in the usage string (PR#5437) - Array: faster implementations of "blit", "copy", "sub", "append" and "concat" (PR#2395, PR#2787, PR#4591) * Hashtbl: . Statistically-better generic hash function based on Murmur 3 (PR#5225) . Fixed behavior of generic hash function w.r.t. -0.0 and NaN (PR#5222) . Added optional "random" parameter to Hashtbl.create to randomize collision patterns and improve security (PR#5572, CVE-2012-0839) . Added "randomize" function and "R" parameter to OCAMLRUNPARAM to turn randomization on by default (PR#5572, CVE-2012-0839) . Added new functorial interface "MakeSeeded" to support randomization with user-provided seeded hash functions. . Install new header <caml/hash.h> for C code. - Filename: on-demand (lazy) initialization of the PRNG used by "temp_file". - Marshal: marshalling of function values (flag Marshal.Closures) now also works for functions that come from dynamically-loaded modules (PR#5215) - Random: . More random initialization (Random.self_init()), using /dev/urandom when available (e.g. Linux, FreeBSD, MacOS X, Solaris) * Faster implementation of Random.float (changes the generated sequences) - Scanf: new function "unescaped" (PR#3888) - Set and Map: more efficient implementation of "filter" and "partition" - String: new function "map" (PR#3888) Installation procedure: - Compiler internals are now installed in `ocamlc -where`/compiler-libs. The files available there include the .cmi interfaces for all compiler modules, plus the following libraries: ocamlcommon.cma/.cmxa modules common to ocamlc, ocamlopt, ocaml ocamlbytecomp.cma/.cmxa modules for ocamlc and ocaml ocamloptcomp.cma/.cmxa modules specific to ocamlopt camltoplevel.cma modules specific to ocaml (PR#1804, PR#4653, frequently-asked feature). * Some .cmi for toplevel internals that used to be installed in `ocamlc -where` are now to be found in `ocamlc -where`/compiler-libs. Add "-I +compiler-libs" where needed. * toplevellib.cma is no longer installed because subsumed by ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma - Added a configuration option (-with-debug-runtime) to compile and install a debug version of the runtime system, and a compiler option (-runtime-variant) to select the debug runtime. and various bug fixes.
Diffstat (limited to 'lang')
-rw-r--r--lang/ocaml/Makefile4
-rw-r--r--lang/ocaml/Makefile.common6
-rw-r--r--lang/ocaml/PLIST162
-rw-r--r--lang/ocaml/PLIST.natdynlink3
-rw-r--r--lang/ocaml/PLIST.opt8
-rw-r--r--lang/ocaml/PLIST.stub3
-rw-r--r--lang/ocaml/buildlink3.mk6
-rw-r--r--lang/ocaml/distinfo69
-rw-r--r--lang/ocaml/patches/patch-Makefile83
-rw-r--r--lang/ocaml/patches/patch-asmcomp_power_emit.mlp36
-rw-r--r--lang/ocaml/patches/patch-asmrun_Makefile31
-rw-r--r--lang/ocaml/patches/patch-asmrun_power-bsd.S65
-rw-r--r--lang/ocaml/patches/patch-asmrun_signals_osdep.h (renamed from lang/ocaml/patches/patch-bv)30
-rw-r--r--lang/ocaml/patches/patch-at240
-rw-r--r--lang/ocaml/patches/patch-av12
-rw-r--r--lang/ocaml/patches/patch-ax13
-rw-r--r--lang/ocaml/patches/patch-ay29
-rw-r--r--lang/ocaml/patches/patch-bb13
-rw-r--r--lang/ocaml/patches/patch-bc22
-rw-r--r--lang/ocaml/patches/patch-be17
-rw-r--r--lang/ocaml/patches/patch-bf17
-rw-r--r--lang/ocaml/patches/patch-bg22
-rw-r--r--lang/ocaml/patches/patch-bi30
-rw-r--r--lang/ocaml/patches/patch-bp31
-rw-r--r--lang/ocaml/patches/patch-bq13
-rw-r--r--lang/ocaml/patches/patch-bt73
-rw-r--r--lang/ocaml/patches/patch-bu30
-rw-r--r--lang/ocaml/patches/patch-bw56
-rw-r--r--lang/ocaml/patches/patch-bx31
-rw-r--r--lang/ocaml/patches/patch-bytecomp_bytelink.ml25
-rw-r--r--lang/ocaml/patches/patch-byterun_Makefile23
-rw-r--r--lang/ocaml/patches/patch-camlp4_man_Makefile16
-rw-r--r--lang/ocaml/patches/patch-configure130
-rw-r--r--lang/ocaml/patches/patch-debugger_Makefile.shared (renamed from lang/ocaml/patches/patch-au)7
-rw-r--r--lang/ocaml/patches/patch-man_Makefile14
-rw-r--r--lang/ocaml/patches/patch-ocamldoc_Makefile (renamed from lang/ocaml/patches/patch-aw)11
-rw-r--r--lang/ocaml/patches/patch-otherlibs_Makefile.shared28
-rw-r--r--lang/ocaml/patches/patch-otherlibs_dynlink_Makefile (renamed from lang/ocaml/patches/patch-az)11
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_browser_Makefile.shared14
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_camltk_Makefile23
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_compiler_Makefile (renamed from lang/ocaml/patches/patch-bd)9
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_frx_Makefile18
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_jpf_Makefile18
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_labltk_Makefile23
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_lib_Makefile (renamed from lang/ocaml/patches/patch-bh)11
-rw-r--r--lang/ocaml/patches/patch-otherlibs_labltk_support_Makefile31
-rw-r--r--lang/ocaml/patches/patch-otherlibs_systhreads_Makefile (renamed from lang/ocaml/patches/patch-bo)9
-rw-r--r--lang/ocaml/patches/patch-otherlibs_threads_Makefile23
-rw-r--r--lang/ocaml/patches/patch-stdlib_Makefile (renamed from lang/ocaml/patches/patch-br)9
-rw-r--r--lang/ocaml/patches/patch-stdlib_Makefile.shared14
-rw-r--r--lang/ocaml/patches/patch-tools_Makefile.shared (renamed from lang/ocaml/patches/patch-bs)34
51 files changed, 858 insertions, 798 deletions
diff --git a/lang/ocaml/Makefile b/lang/ocaml/Makefile
index 008f0a7550a..62b5434c427 100644
--- a/lang/ocaml/Makefile
+++ b/lang/ocaml/Makefile
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.79 2012/10/02 20:11:46 asau Exp $
+# $NetBSD: Makefile,v 1.80 2012/10/08 15:05:32 jaapb Exp $
-PKGREVISION= 1
+PKG_DESTDIR_SUPPORT= user-destdir
.include "Makefile.common"
diff --git a/lang/ocaml/Makefile.common b/lang/ocaml/Makefile.common
index 6244fb9ae5d..81b0b28f01d 100644
--- a/lang/ocaml/Makefile.common
+++ b/lang/ocaml/Makefile.common
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile.common,v 1.33 2012/06/22 11:36:10 sbd Exp $
+# $NetBSD: Makefile.common,v 1.34 2012/10/08 15:05:32 jaapb Exp $
# used by x11/labltk/Makefile
# used by x11/ocaml-graphics/Makefile
-DISTNAME= ocaml-3.12.1
+DISTNAME= ocaml-4.00.1
CATEGORIES= lang
-MASTER_SITES= http://caml.inria.fr/pub/distrib/ocaml-3.12/
+MASTER_SITES= http://caml.inria.fr/pub/distrib/ocaml-4.00/
EXTRACT_SUFX= .tar.bz2
MAINTAINER= adam@NetBSD.org
diff --git a/lang/ocaml/PLIST b/lang/ocaml/PLIST
index 003a8047ef6..fc1968f37cc 100644
--- a/lang/ocaml/PLIST
+++ b/lang/ocaml/PLIST
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST,v 1.23 2010/11/28 08:41:33 is Exp $
+@comment $NetBSD: PLIST,v 1.24 2012/10/08 15:05:32 jaapb Exp $
bin/camlp4
bin/camlp4boot
bin/camlp4o
@@ -25,6 +25,7 @@ bin/ocamlprof
bin/ocamlrun
bin/ocamlyacc
lib/ocaml/Makefile.config
+lib/ocaml/VERSION
lib/ocaml/arg.cmi
lib/ocaml/arg.ml
lib/ocaml/arg.mli
@@ -54,6 +55,7 @@ lib/ocaml/caml/compatibility.h
lib/ocaml/caml/config.h
lib/ocaml/caml/custom.h
lib/ocaml/caml/fail.h
+lib/ocaml/caml/hash.h
lib/ocaml/caml/intext.h
lib/ocaml/caml/memory.h
lib/ocaml/caml/misc.h
@@ -154,13 +156,146 @@ lib/ocaml/camlp4/camlp4rf.cma
lib/ocaml/char.cmi
lib/ocaml/char.ml
lib/ocaml/char.mli
+lib/ocaml/compiler-libs/annot.cmi
+lib/ocaml/compiler-libs/arch.cmi
+lib/ocaml/compiler-libs/asmgen.cmi
+lib/ocaml/compiler-libs/asmlibrarian.cmi
+lib/ocaml/compiler-libs/asmlink.cmi
+lib/ocaml/compiler-libs/asmpackager.cmi
+lib/ocaml/compiler-libs/asttypes.cmi
+lib/ocaml/compiler-libs/btype.cmi
+lib/ocaml/compiler-libs/bytegen.cmi
+lib/ocaml/compiler-libs/bytelibrarian.cmi
+lib/ocaml/compiler-libs/bytelink.cmi
+lib/ocaml/compiler-libs/bytepackager.cmi
+lib/ocaml/compiler-libs/bytesections.cmi
+lib/ocaml/compiler-libs/ccomp.cmi
+lib/ocaml/compiler-libs/clambda.cmi
+lib/ocaml/compiler-libs/clflags.cmi
+lib/ocaml/compiler-libs/closure.cmi
+lib/ocaml/compiler-libs/cmi_format.cmi
+lib/ocaml/compiler-libs/cmm.cmi
+lib/ocaml/compiler-libs/cmmgen.cmi
+lib/ocaml/compiler-libs/cmo_format.cmi
+lib/ocaml/compiler-libs/cmt_format.cmi
+lib/ocaml/compiler-libs/cmx_format.cmi
+lib/ocaml/compiler-libs/coloring.cmi
+lib/ocaml/compiler-libs/comballoc.cmi
+lib/ocaml/compiler-libs/compile.cmi
+lib/ocaml/compiler-libs/compilenv.cmi
+lib/ocaml/compiler-libs/config.cmi
+lib/ocaml/compiler-libs/consistbl.cmi
+lib/ocaml/compiler-libs/ctype.cmi
+lib/ocaml/compiler-libs/datarepr.cmi
+lib/ocaml/compiler-libs/debuginfo.cmi
+lib/ocaml/compiler-libs/dll.cmi
+lib/ocaml/compiler-libs/emit.cmi
+lib/ocaml/compiler-libs/emitaux.cmi
+lib/ocaml/compiler-libs/emitcode.cmi
+lib/ocaml/compiler-libs/env.cmi
+lib/ocaml/compiler-libs/errors.cmi
+lib/ocaml/compiler-libs/expunge.cmi
+lib/ocaml/compiler-libs/genprintval.cmi
+lib/ocaml/compiler-libs/ident.cmi
+lib/ocaml/compiler-libs/includeclass.cmi
+lib/ocaml/compiler-libs/includecore.cmi
+lib/ocaml/compiler-libs/includemod.cmi
+lib/ocaml/compiler-libs/instruct.cmi
+lib/ocaml/compiler-libs/interf.cmi
+lib/ocaml/compiler-libs/lambda.cmi
+lib/ocaml/compiler-libs/lexer.cmi
+lib/ocaml/compiler-libs/linearize.cmi
+lib/ocaml/compiler-libs/liveness.cmi
+lib/ocaml/compiler-libs/location.cmi
+lib/ocaml/compiler-libs/longident.cmi
+lib/ocaml/compiler-libs/mach.cmi
+lib/ocaml/compiler-libs/main.cmi
+lib/ocaml/compiler-libs/main.cmo
+lib/ocaml/compiler-libs/main.cmx
+lib/ocaml/compiler-libs/main.o
+lib/ocaml/compiler-libs/main_args.cmi
+lib/ocaml/compiler-libs/matching.cmi
+lib/ocaml/compiler-libs/meta.cmi
+lib/ocaml/compiler-libs/misc.cmi
+lib/ocaml/compiler-libs/mtype.cmi
+lib/ocaml/compiler-libs/ocamlbytecomp.a
+lib/ocaml/compiler-libs/ocamlbytecomp.cma
+lib/ocaml/compiler-libs/ocamlbytecomp.cmxa
+lib/ocaml/compiler-libs/ocamlcommon.a
+lib/ocaml/compiler-libs/ocamlcommon.cma
+lib/ocaml/compiler-libs/ocamlcommon.cmxa
+lib/ocaml/compiler-libs/ocamloptcomp.a
+lib/ocaml/compiler-libs/ocamloptcomp.cma
+lib/ocaml/compiler-libs/ocamloptcomp.cmxa
+lib/ocaml/compiler-libs/ocamltoplevel.cma
+lib/ocaml/compiler-libs/opcodes.cmi
+lib/ocaml/compiler-libs/oprint.cmi
+lib/ocaml/compiler-libs/optcompile.cmi
+lib/ocaml/compiler-libs/opterrors.cmi
+lib/ocaml/compiler-libs/optmain.cmi
+lib/ocaml/compiler-libs/optmain.cmo
+lib/ocaml/compiler-libs/optmain.cmx
+lib/ocaml/compiler-libs/optmain.o
+lib/ocaml/compiler-libs/outcometree.cmi
+lib/ocaml/compiler-libs/parmatch.cmi
+lib/ocaml/compiler-libs/parse.cmi
+lib/ocaml/compiler-libs/parser.cmi
+lib/ocaml/compiler-libs/parsetree.cmi
+lib/ocaml/compiler-libs/path.cmi
+lib/ocaml/compiler-libs/pparse.cmi
+lib/ocaml/compiler-libs/predef.cmi
+lib/ocaml/compiler-libs/primitive.cmi
+lib/ocaml/compiler-libs/printast.cmi
+lib/ocaml/compiler-libs/printclambda.cmi
+lib/ocaml/compiler-libs/printcmm.cmi
+lib/ocaml/compiler-libs/printinstr.cmi
+lib/ocaml/compiler-libs/printlambda.cmi
+lib/ocaml/compiler-libs/printlinear.cmi
+lib/ocaml/compiler-libs/printmach.cmi
+lib/ocaml/compiler-libs/printtyp.cmi
+lib/ocaml/compiler-libs/printtyped.cmi
+lib/ocaml/compiler-libs/proc.cmi
+lib/ocaml/compiler-libs/reg.cmi
+lib/ocaml/compiler-libs/reload.cmi
+lib/ocaml/compiler-libs/reloadgen.cmi
+lib/ocaml/compiler-libs/runtimedef.cmi
+lib/ocaml/compiler-libs/schedgen.cmi
+lib/ocaml/compiler-libs/scheduling.cmi
+lib/ocaml/compiler-libs/selectgen.cmi
+lib/ocaml/compiler-libs/selection.cmi
+lib/ocaml/compiler-libs/simplif.cmi
+lib/ocaml/compiler-libs/spill.cmi
+lib/ocaml/compiler-libs/split.cmi
+lib/ocaml/compiler-libs/stypes.cmi
+lib/ocaml/compiler-libs/subst.cmi
+lib/ocaml/compiler-libs/switch.cmi
+lib/ocaml/compiler-libs/symtable.cmi
+lib/ocaml/compiler-libs/syntaxerr.cmi
+lib/ocaml/compiler-libs/tbl.cmi
+lib/ocaml/compiler-libs/terminfo.cmi
+lib/ocaml/compiler-libs/topdirs.cmi
+lib/ocaml/compiler-libs/toploop.cmi
+lib/ocaml/compiler-libs/topmain.cmi
+lib/ocaml/compiler-libs/topstart.cmi
+lib/ocaml/compiler-libs/topstart.cmo
+lib/ocaml/compiler-libs/trace.cmi
+lib/ocaml/compiler-libs/translclass.cmi
+lib/ocaml/compiler-libs/translcore.cmi
+lib/ocaml/compiler-libs/translmod.cmi
+lib/ocaml/compiler-libs/translobj.cmi
+lib/ocaml/compiler-libs/typeclass.cmi
+lib/ocaml/compiler-libs/typecore.cmi
+lib/ocaml/compiler-libs/typedecl.cmi
+lib/ocaml/compiler-libs/typedtree.cmi
+lib/ocaml/compiler-libs/typemod.cmi
+lib/ocaml/compiler-libs/typeopt.cmi
+lib/ocaml/compiler-libs/types.cmi
+lib/ocaml/compiler-libs/typetexp.cmi
+lib/ocaml/compiler-libs/warnings.cmi
lib/ocaml/complex.cmi
lib/ocaml/complex.ml
lib/ocaml/complex.mli
lib/ocaml/condition.mli
-lib/ocaml/dbm.cma
-lib/ocaml/dbm.cmi
-lib/ocaml/dbm.mli
lib/ocaml/digest.cmi
lib/ocaml/digest.ml
lib/ocaml/digest.mli
@@ -202,7 +337,6 @@ lib/ocaml/libbigarray.a
lib/ocaml/libcamlrun.a
lib/ocaml/libcamlrun_shared.so
lib/ocaml/libcamlstr.a
-lib/ocaml/libmldbm.a
lib/ocaml/libnums.a
lib/ocaml/libthreads.a
lib/ocaml/libunix.a
@@ -258,6 +392,7 @@ lib/ocaml/ocamldoc/odoc_dep.cmi
lib/ocaml/ocamldoc/odoc_dot.cmi
lib/ocaml/ocamldoc/odoc_env.cmi
lib/ocaml/ocamldoc/odoc_exception.cmi
+lib/ocaml/ocamldoc/odoc_gen.cmi
lib/ocaml/ocamldoc/odoc_global.cmi
lib/ocaml/ocamldoc/odoc_html.cmi
lib/ocaml/ocamldoc/odoc_info.cma
@@ -294,8 +429,6 @@ lib/ocaml/ocamldoc/odoc_value.cmi
lib/ocaml/oo.cmi
lib/ocaml/oo.ml
lib/ocaml/oo.mli
-lib/ocaml/outcometree.cmi
-lib/ocaml/outcometree.mli
lib/ocaml/parsing.cmi
lib/ocaml/parsing.ml
lib/ocaml/parsing.mli
@@ -361,10 +494,6 @@ lib/ocaml/threads/thread.cmi
lib/ocaml/threads/threadUnix.cmi
lib/ocaml/threads/threads.cma
lib/ocaml/topdirs.cmi
-lib/ocaml/toplevellib.cma
-lib/ocaml/toploop.cmi
-lib/ocaml/topmain.cmi
-lib/ocaml/topstart.cmo
lib/ocaml/unix.cma
lib/ocaml/unix.cmi
lib/ocaml/unix.mli
@@ -398,6 +527,7 @@ man/man1/ocamldoc.1
man/man1/ocamllex.1
man/man1/ocamlmktop.1
man/man1/ocamlopt.1
+man/man1/ocamloptp.1
man/man1/ocamlopt.opt.1
man/man1/ocamlprof.1
man/man1/ocamlrun.1
@@ -415,7 +545,6 @@ man/man3/Callback.3o
man/man3/CamlinternalLazy.3o
man/man3/CamlinternalMod.3o
man/man3/CamlinternalOO.3o
-man/man3/Char.3o
man/man3/Complex.3o
man/man3/Digest.3o
man/man3/Filename.3o
@@ -425,10 +554,12 @@ man/man3/Genlex.3o
man/man3/Hashtbl.3o
man/man3/Hashtbl.HashedType.3o
man/man3/Hashtbl.Make.3o
+man/man3/Hashtbl.MakeSeeded.3o
man/man3/Hashtbl.S.3o
+man/man3/Hashtbl.SeededHashedType.3o
+man/man3/Hashtbl.SeededS.3o
man/man3/Int32.3o
man/man3/Int64.3o
-man/man3/Lazy.3o
man/man3/Lexing.3o
man/man3/List.3o
man/man3/ListLabels.3o
@@ -441,7 +572,10 @@ man/man3/MoreLabels.3o
man/man3/MoreLabels.Hashtbl.3o
man/man3/MoreLabels.Hashtbl.HashedType.3o
man/man3/MoreLabels.Hashtbl.Make.3o
+man/man3/MoreLabels.Hashtbl.MakeSeeded.3o
man/man3/MoreLabels.Hashtbl.S.3o
+man/man3/MoreLabels.Hashtbl.SeededHashedType.3o
+man/man3/MoreLabels.Hashtbl.SeededS.3o
man/man3/MoreLabels.Map.3o
man/man3/MoreLabels.Map.Make.3o
man/man3/MoreLabels.Map.OrderedType.3o
@@ -464,7 +598,6 @@ man/man3/Random.3o
man/man3/Random.State.3o
man/man3/Scanf.3o
man/man3/Scanf.Scanning.3o
-man/man3/Set.3o
man/man3/Set.Make.3o
man/man3/Set.OrderedType.3o
man/man3/Set.S.3o
@@ -476,7 +609,6 @@ man/man3/StdLabels.List.3o
man/man3/StdLabels.String.3o
man/man3/Str.3o
man/man3/Stream.3o
-man/man3/String.3o
man/man3/StringLabels.3o
man/man3/Sys.3o
man/man3/Unix.3o
diff --git a/lang/ocaml/PLIST.natdynlink b/lang/ocaml/PLIST.natdynlink
index 01fe81e74ed..9dc21bca357 100644
--- a/lang/ocaml/PLIST.natdynlink
+++ b/lang/ocaml/PLIST.natdynlink
@@ -1,6 +1,5 @@
-@comment $NetBSD: PLIST.natdynlink,v 1.1 2010/10/28 20:46:07 tonio Exp $
+@comment $NetBSD: PLIST.natdynlink,v 1.2 2012/10/08 15:05:32 jaapb Exp $
lib/ocaml/bigarray.cmxs
-lib/ocaml/dbm.cmxs
lib/ocaml/dynlink.a
lib/ocaml/dynlink.cmx
lib/ocaml/dynlink.cmxa
diff --git a/lang/ocaml/PLIST.opt b/lang/ocaml/PLIST.opt
index b74e1b06c08..4a52d8bf2d1 100644
--- a/lang/ocaml/PLIST.opt
+++ b/lang/ocaml/PLIST.opt
@@ -1,4 +1,4 @@
-@comment $NetBSD: PLIST.opt,v 1.18 2011/03/29 13:45:02 adam Exp $
+@comment $NetBSD: PLIST.opt,v 1.19 2012/10/08 15:05:32 jaapb Exp $
bin/camlp4o.opt
bin/camlp4of.opt
bin/camlp4oof.opt
@@ -11,6 +11,7 @@ bin/ocamldep.opt
bin/ocamldoc.opt
bin/ocamllex.opt
bin/ocamlopt
+bin/ocamloptp
bin/ocamlopt.opt
lib/ocaml/arg.cmx
lib/ocaml/arith_flags.cmx
@@ -96,9 +97,6 @@ lib/ocaml/camlp4/camlp4prof.cmx
lib/ocaml/camlp4/camlp4prof.o
lib/ocaml/char.cmx
lib/ocaml/complex.cmx
-lib/ocaml/dbm.a
-lib/ocaml/dbm.cmx
-lib/ocaml/dbm.cmxa
lib/ocaml/digest.cmx
lib/ocaml/filename.cmx
lib/ocaml/format.cmx
@@ -139,6 +137,8 @@ lib/ocaml/parsing.cmx
lib/ocaml/pervasives.cmx
lib/ocaml/printexc.cmx
lib/ocaml/printf.cmx
+lib/ocaml/profiling.cmx
+lib/ocaml/profiling.o
lib/ocaml/queue.cmx
lib/ocaml/random.cmx
lib/ocaml/ratio.cmx
diff --git a/lang/ocaml/PLIST.stub b/lang/ocaml/PLIST.stub
index dfd23d89f31..e3f913b8fee 100644
--- a/lang/ocaml/PLIST.stub
+++ b/lang/ocaml/PLIST.stub
@@ -1,7 +1,6 @@
-@comment $NetBSD: PLIST.stub,v 1.5 2010/08/19 08:06:53 asau Exp $
+@comment $NetBSD: PLIST.stub,v 1.6 2012/10/08 15:05:32 jaapb Exp $
lib/ocaml/stublibs/dllbigarray.so
lib/ocaml/stublibs/dllcamlstr.so
-lib/ocaml/stublibs/dllmldbm.so
lib/ocaml/stublibs/dllnums.so
lib/ocaml/stublibs/dllthreads.so
lib/ocaml/stublibs/dllunix.so
diff --git a/lang/ocaml/buildlink3.mk b/lang/ocaml/buildlink3.mk
index 940d33ac59b..b76531ac1bd 100644
--- a/lang/ocaml/buildlink3.mk
+++ b/lang/ocaml/buildlink3.mk
@@ -1,4 +1,4 @@
-# $NetBSD: buildlink3.mk,v 1.26 2011/12/06 00:19:07 sbd Exp $
+# $NetBSD: buildlink3.mk,v 1.27 2012/10/08 15:05:32 jaapb Exp $
BUILDLINK_TREE+= ocaml
@@ -6,9 +6,9 @@ BUILDLINK_TREE+= ocaml
OCAML_BUILDLINK3_MK:=
BUILDLINK_API_DEPENDS.ocaml+= ocaml>=3.08.2
-BUILDLINK_ABI_DEPENDS.ocaml+= ocaml>=3.12.0nb5
+BUILDLINK_ABI_DEPENDS.ocaml+= ocaml>=4.00.1
BUILDLINK_PKGSRCDIR.ocaml?= ../../lang/ocaml
-BUILDLINK_DEPMETHOD.ocaml?= build
+#BUILDLINK_DEPMETHOD.ocaml?= build
.include "../../mk/bsd.fast.prefs.mk"
.if ${OPSYS} == "Darwin"
diff --git a/lang/ocaml/distinfo b/lang/ocaml/distinfo
index de289141ceb..98b63be94fd 100644
--- a/lang/ocaml/distinfo
+++ b/lang/ocaml/distinfo
@@ -1,39 +1,32 @@
-$NetBSD: distinfo,v 1.63 2012/06/24 08:27:31 sbd Exp $
+$NetBSD: distinfo,v 1.64 2012/10/08 15:05:32 jaapb Exp $
-SHA1 (ocaml-3.12.1.tar.bz2) = 29b44117b116b1a5bc54a8b4514af483793a769f
-RMD160 (ocaml-3.12.1.tar.bz2) = 61d38c0785491c8790ac02ab78fb2f26ea490fc1
-Size (ocaml-3.12.1.tar.bz2) = 2949124 bytes
-SHA1 (patch-aa) = 288f8aa1c0a4c080e69e1d2b552250da98304597
-SHA1 (patch-ab) = e91cbb94c0897ffd02daebc19835a24c257dccd9
-SHA1 (patch-ac) = efe8290b394f40d6675fc9d57557c49ddafdb239
-SHA1 (patch-ad) = f2c1dcc3c31db31e2484fdea1076692a63252a87
-SHA1 (patch-ag) = f1b751098d3693b92feb26cda87970426bffcaf1
-SHA1 (patch-ah) = 3165bbcdb98d09f5161912e51a3131486aa0b488
-SHA1 (patch-aj) = 6fd989f1e5dd1263890c14459dd4ab85d75e86cd
-SHA1 (patch-an) = 8fb8efecd2b3f0ec6f913a0840f4cfebcbb6161e
-SHA1 (patch-at) = 14f2686bd1ac25e2b122cc9c39da60141a34f7f0
-SHA1 (patch-au) = 1e36bcdf39d40e781273ea51df213db05ff46c89
-SHA1 (patch-av) = f56c8924b81a620602bc5a67b0c4459b721701d2
-SHA1 (patch-aw) = cf66a2296cb86adfc0945e0009a6ed2805b57eed
-SHA1 (patch-ax) = d46667e6874aa8aa656f6fb15ddcedc493d7bdf1
-SHA1 (patch-ay) = 702dd7d24ac94851bbb0f2c3f22e2141345ee8ea
-SHA1 (patch-az) = 9b9e1cfa8972e6bea9563d4d12866d567fdce668
-SHA1 (patch-bb) = 50bd9aa5b46052d8f35c04f6e4c3cbb365d2f93c
-SHA1 (patch-bc) = 3b6cab5af3d34b2d25c7ba718e5dd89e2d1f2171
-SHA1 (patch-bd) = 50df69a687953e8c34a36366396ea32a111e64ed
-SHA1 (patch-be) = 6c7232154b4935b9b4606940fd35799e20fafde2
-SHA1 (patch-bf) = 0b4efd564362b816154bfd7ffacecae27c75c0ee
-SHA1 (patch-bg) = 91cb75e2d7f347b9ef7f3f1814d0c7deccfedd3a
-SHA1 (patch-bh) = c7b1e218c67b9691452e7d1c8b53febe844d156c
-SHA1 (patch-bi) = aaf8fcb6ecde980cb914258efe93bd37ec9f0bf4
-SHA1 (patch-bo) = 318b5c023c692a3d6fb05b3276e755fae642d6b0
-SHA1 (patch-bp) = 45038c5900aefdb8d21b8c3d3b8798b45014bae2
-SHA1 (patch-bq) = 2ac3b7c1cdf9bdf1e6dcd5905e54291169d069c6
-SHA1 (patch-br) = f9dacbd8742a9cdc9ae0232f297898f0df62a95b
-SHA1 (patch-bs) = d169c3196d9f9c3f36764174c52e5db2512a3942
-SHA1 (patch-bt) = 400ac1c2935690bd204da116272017ec167f4b0d
-SHA1 (patch-bu) = 0b3bbe273142ebed3a24e7e92d4cfd9f30a032b6
-SHA1 (patch-bv) = 595641bb079174f393e420bdf5c48fe8ca1912cf
-SHA1 (patch-bw) = 6214af031d165f7485f5b422262e8a0e0cc95588
-SHA1 (patch-bx) = 3cfcad488901f616a3a2f968247d7915f05891d7
-SHA1 (patch-bytecomp_bytelink.ml) = 182c5f7cb9e79aadbfe62eaf0b5523ae121cb2b4
+SHA1 (ocaml-4.00.1.tar.bz2) = 10b8a4d0b88d20b003e3dd719f2ac9434e6a1042
+RMD160 (ocaml-4.00.1.tar.bz2) = db28f57b463af90650b877af0baf44eb226b0a79
+Size (ocaml-4.00.1.tar.bz2) = 2762205 bytes
+SHA1 (patch-Makefile) = d5ff5fea13f355ae120532aa7b7d03a11c87f9ee
+SHA1 (patch-asmcomp_power_emit.mlp) = 726e09e4902b96f4790c7a8093eb245dd7028bf4
+SHA1 (patch-asmrun_Makefile) = 5d49c710937c21df9974ad07f255992ef0f0dac8
+SHA1 (patch-asmrun_power-bsd.S) = bd52898dde14adc1dbf9cd85a7f8af4d77218e6f
+SHA1 (patch-asmrun_signals_osdep.h) = cc7131ef020563ae28c1fddbe8fe634174f73826
+SHA1 (patch-bytecomp_bytelink.ml) = 051044bc6f534d3f197d40e6d527e5224a1f166a
+SHA1 (patch-byterun_Makefile) = 9681ce78c78879d29d9c58f35278a14e6cb18e96
+SHA1 (patch-camlp4_man_Makefile) = c3a5dc09a2cc15d969c4e074be7da98a979f7db4
+SHA1 (patch-configure) = 0a6a4c75f1c6ef6d4dfc0a1bcfe1a003e5e0db6b
+SHA1 (patch-debugger_Makefile.shared) = 583fa88caf965164aa3b638dda4c2a6e8878bdf9
+SHA1 (patch-man_Makefile) = 3f52dd1fcbde53399852a6490d5f27fc7c1c98e5
+SHA1 (patch-ocamldoc_Makefile) = d09c5f779dc1da9317d1c6e5eb4b251a9af45562
+SHA1 (patch-otherlibs_Makefile.shared) = f3865f30b76cc903f9c0a5d1d9d5edfb7001e139
+SHA1 (patch-otherlibs_dynlink_Makefile) = b045aa0d16dcc7327a37482189168dcab6976a08
+SHA1 (patch-otherlibs_labltk_browser_Makefile.shared) = 5558d385f962195563ca7dd68a238a97b5ffb8a6
+SHA1 (patch-otherlibs_labltk_camltk_Makefile) = eebfab73d526e24f52b6cc4fc09bc9e0a7cb7193
+SHA1 (patch-otherlibs_labltk_compiler_Makefile) = 387e8f41f4efdb733385b9b0c4dd576d3cc03cb8
+SHA1 (patch-otherlibs_labltk_frx_Makefile) = 94142aaade7b3c2f44509f1907f1ee4bbf793d79
+SHA1 (patch-otherlibs_labltk_jpf_Makefile) = 2f768f78ed4c723c567f1a4c0ac3eff00a716261
+SHA1 (patch-otherlibs_labltk_labltk_Makefile) = 31c496143255c31f1e3474fbc775f4bd7689a642
+SHA1 (patch-otherlibs_labltk_lib_Makefile) = 20bb9f5fffc3271d45025bfd5b033173e8cf5319
+SHA1 (patch-otherlibs_labltk_support_Makefile) = 9bf06605324e167fb09f4f943ebc147c54868b67
+SHA1 (patch-otherlibs_systhreads_Makefile) = 85c8816059d6be3dd4b437cbd3bccf0d16d3a73a
+SHA1 (patch-otherlibs_threads_Makefile) = 16e18f7992059a66da001b5233aa8236cde1a8c9
+SHA1 (patch-stdlib_Makefile) = 85c89d6b9caf08056407da3564e7d2f5353b93a0
+SHA1 (patch-stdlib_Makefile.shared) = 42dafb10f88b501982fb0d65c380f1fa61740f54
+SHA1 (patch-tools_Makefile.shared) = 8c23fc72c627e2315451e6223946e9257c3e341d
diff --git a/lang/ocaml/patches/patch-Makefile b/lang/ocaml/patches/patch-Makefile
new file mode 100644
index 00000000000..5ed02255d78
--- /dev/null
+++ b/lang/ocaml/patches/patch-Makefile
@@ -0,0 +1,83 @@
+$NetBSD: patch-Makefile,v 1.1 2012/10/08 15:05:32 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- Makefile.orig 2012-07-20 08:06:01.000000000 +0000
++++ Makefile
+@@ -264,26 +264,26 @@ base.opt: checkstack runtime core ocaml
+ COMPLIBDIR=$(LIBDIR)/compiler-libs
+
+ install:
+- if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
+- if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi
+- if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(STUBLIBDIR); fi
+- if test -d $(COMPLIBDIR); then : ; else $(MKDIR) $(COMPLIBDIR); fi
++ if test -d $(BINDIR); then : ; else $(BSD_INSTALL_PROGRAM_DIR) $(BINDIR); fi
++ if test -d $(LIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(LIBDIR); fi
++ if test -d $(STUBLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(STUBLIBDIR); fi
++ if test -d $(COMPLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(COMPLIBDIR); fi
+ if test -d $(MANDIR)/man$(MANEXT); then : ; \
+- else $(MKDIR) $(MANDIR)/man$(MANEXT); fi
+- cp VERSION $(LIBDIR)/
++ else $(BSD_INSTALL_MAN_DIR) $(MANDIR)/man$(MANEXT); fi
++ $(BSD_INSTALL_DATA) VERSION $(LIBDIR)/
+ cd $(LIBDIR); rm -f dllbigarray.so dlllabltk.so dllnums.so \
+ dllthreads.so dllunix.so dllgraphics.so dllstr.so \
+ dlltkanim.so
+ cd byterun; $(MAKE) install
+- cp ocamlc $(BINDIR)/ocamlc$(EXE)
+- cp ocaml $(BINDIR)/ocaml$(EXE)
++ $(BSD_INSTALL_SCRIPT) ocamlc $(BINDIR)/ocamlc$(EXE)
++ $(BSD_INSTALL_SCRIPT) ocaml $(BINDIR)/ocaml$(EXE)
+ cd stdlib; $(MAKE) install
+- cp lex/ocamllex $(BINDIR)/ocamllex$(EXE)
+- cp yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
+- cp utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR)
+- cp compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR)
+- cp expunge $(LIBDIR)/expunge$(EXE)
+- cp toplevel/topdirs.cmi $(LIBDIR)
++ $(BSD_INSTALL_SCRIPT) lex/ocamllex $(BINDIR)/ocamllex$(EXE)
++ $(BSD_INSTALL_PROGRAM) yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
++ $(BSD_INSTALL_DATA) utils/*.cmi parsing/*.cmi typing/*.cmi bytecomp/*.cmi driver/*.cmi toplevel/*.cmi $(COMPLIBDIR)
++ $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cma compilerlibs/ocamlbytecomp.cma compilerlibs/ocamltoplevel.cma $(BYTESTART) $(TOPLEVELSTART) $(COMPLIBDIR)
++ $(BSD_INSTALL_SCRIPT) expunge $(LIBDIR)/expunge$(EXE)
++ $(BSD_INSTALL_DATA) toplevel/topdirs.cmi $(LIBDIR)
+ cd tools; $(MAKE) install
+ -cd man; $(MAKE) install
+ for i in $(OTHERLIBRARIES); do \
+@@ -293,17 +293,17 @@ install:
+ if test -f ocamlopt; then $(MAKE) installopt; else :; fi
+ if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
+ else :; fi
+- cp config/Makefile $(LIBDIR)/Makefile.config
++ $(BSD_INSTALL_DATA) config/Makefile $(LIBDIR)/Makefile.config
+ BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) \
+ ./build/partial-install.sh
+
+ # Installation of the native-code compiler
+ installopt:
+ cd asmrun; $(MAKE) install
+- cp ocamlopt $(BINDIR)/ocamlopt$(EXE)
++ $(BSD_INSTALL_SCRIPT) ocamlopt $(BINDIR)/ocamlopt$(EXE)
+ cd stdlib; $(MAKE) installopt
+- cp asmcomp/*.cmi $(COMPLIBDIR)
+- cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR)
++ $(BSD_INSTALL_DATA) asmcomp/*.cmi $(COMPLIBDIR)
++ $(BSD_INSTALL_DATA) compilerlibs/ocamloptcomp.cma $(OPTSTART) $(COMPLIBDIR)
+ cd ocamldoc; $(MAKE) installopt
+ for i in $(OTHERLIBRARIES); \
+ do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
+@@ -311,10 +311,10 @@ installopt:
+ cd tools; $(MAKE) installopt
+
+ installoptopt:
+- cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
+- cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE)
+- cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE)
+- cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
++ $(BSD_INSTALL_PROGRAM) ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE)
++ $(BSD_INSTALL_PROGRAM) ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE)
++ $(BSD_INSTALL_PROGRAM) lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE)
++ $(BSD_INSTALL_DATA) compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \
+ compilerlibs/ocamlbytecomp.cmxa compilerlibs/ocamlbytecomp.a \
+ compilerlibs/ocamloptcomp.cmxa compilerlibs/ocamloptcomp.a \
+ $(BYTESTART:.cmo=.cmx) $(BYTESTART:.cmo=.o) \
diff --git a/lang/ocaml/patches/patch-asmcomp_power_emit.mlp b/lang/ocaml/patches/patch-asmcomp_power_emit.mlp
new file mode 100644
index 00000000000..f1fcc0ce4d7
--- /dev/null
+++ b/lang/ocaml/patches/patch-asmcomp_power_emit.mlp
@@ -0,0 +1,36 @@
+$NetBSD: patch-asmcomp_power_emit.mlp,v 1.1 2012/10/08 15:05:32 jaapb Exp $
+
+Add profiling to power architecture
+--- asmcomp/power/emit.mlp.orig 2012-09-11 13:17:13.000000000 +0000
++++ asmcomp/power/emit.mlp
+@@ -828,6 +828,30 @@ let rec emit_all i =
+ emit_instr i None;
+ emit_all i.next
+
++(* Emission of the profiling prelude *)
++
++let emit_profile () =
++ match Config.system with
++ "bsd" ->
++ ` stwu 1, -32(1)\n`;
++ ` mflr 0\n`;
++ ` stw 0, 4(1)\n`;
++ ` stw 2, 8(1)\n`;
++ ` stw 3, 12(1)\n`;
++ ` stw 4, 16(1)\n`;
++ ` stw 5, 20(1)\n`;
++ ` stw 6, 24(1)\n`;
++ ` stw 7, 28(1)\n`;
++ ` bl {emit_symbol "_mcount"}\n`;
++ ` lwz 2, 8(1)\n`;
++ ` lwz 3, 12(1)\n`;
++ ` lwz 4, 16(1)\n`;
++ ` lwz 5, 20(1)\n`;
++ ` lwz 6, 24(1)\n`;
++ ` lwz 7, 28(1)\n`;
++ ` addic 1, 1, 32\n`;
++ | _ -> () (*unsupported yet*)
++
+ (* Emission of a function declaration *)
+
+ let fundecl fundecl =
diff --git a/lang/ocaml/patches/patch-asmrun_Makefile b/lang/ocaml/patches/patch-asmrun_Makefile
new file mode 100644
index 00000000000..fbe3d439247
--- /dev/null
+++ b/lang/ocaml/patches/patch-asmrun_Makefile
@@ -0,0 +1,31 @@
+$NetBSD: patch-asmrun_Makefile,v 1.1 2012/10/08 15:05:32 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- asmrun/Makefile.orig 2012-05-24 16:17:19.000000000 +0000
++++ asmrun/Makefile
+@@ -65,14 +65,14 @@ libasmrunp.a: $(POBJS)
+ install: install-default install-$(RUNTIMED) install-$(PROFILING)
+
+ install-default:
+- cp libasmrun.a $(LIBDIR)/libasmrun.a
++ $(BSD_INSTALL_DATA) libasmrun.a $(LIBDIR)/libasmrun.a
+ cd $(LIBDIR); $(RANLIB) libasmrun.a
+
+ install-noruntimed:
+ .PHONY: install-noruntimed
+
+ install-runtimed:
+- cp libasmrund.a $(LIBDIR)/libasmrund.a
++ $(BSD_INSTALL_DATA) libasmrund.a $(LIBDIR)/libasmrund.a
+ cd $(LIBDIR); $(RANLIB) libasmrund.a
+ .PHONY: install-runtimed
+
+@@ -80,7 +80,7 @@ install-noprof:
+ rm -f $(LIBDIR)/libasmrunp.a; ln -s libasmrun.a $(LIBDIR)/libasmrunp.a
+
+ install-prof:
+- cp libasmrunp.a $(LIBDIR)/libasmrunp.a
++ $(BSD_INSTALL_DATA) libasmrunp.a $(LIBDIR)/libasmrunp.a
+ cd $(LIBDIR); $(RANLIB) libasmrunp.a
+
+ power.o: power-$(SYSTEM).o
diff --git a/lang/ocaml/patches/patch-asmrun_power-bsd.S b/lang/ocaml/patches/patch-asmrun_power-bsd.S
new file mode 100644
index 00000000000..6fab51c20d9
--- /dev/null
+++ b/lang/ocaml/patches/patch-asmrun_power-bsd.S
@@ -0,0 +1,65 @@
+$NetBSD: patch-asmrun_power-bsd.S,v 1.1 2012/10/08 15:05:32 jaapb Exp $
+
+Add profiling to power architecture
+--- asmrun/power-bsd.S.orig 2012-09-11 13:01:14.000000000 +0000
++++ asmrun/power-bsd.S
+@@ -15,2 +15,31 @@
+
++#if defined(PROFILING)
++#define PROFILE_CAML \
++ stwu 1, -32(1) \
++ mflr 0 \
++ stw 0, 4(1) \
++ stw 2, 8(1) \
++ stw 3, 12(1) \
++ stw 4, 16(1) \
++ stw 5, 20(1) \
++ stw 6, 24(1) \
++ stw 7, 28(1) \
++ bl _mcount \
++ lwz 2, 8(1) \
++ lwz 3, 12(1) \
++ lwz 4, 16(1) \
++ lwz 5, 20(1) \
++ lwz 6, 24(1) \
++ lwz 7, 28(1) \
++ addic 1, 1, 32
++
++#define PROFILE_C \
++ mflr 0 \
++ stw 0, 4(1) \
++ bl _mcount
++#else
++#define PROFILE_CAML
++#define PROFILE_C
++#endif
++
+ #define Addrglobal(reg,glob) \
+@@ -35,2 +64,3 @@ caml_system__code_begin:
+ caml_call_gc:
++ PROFILE_CAML
+ /* Set up stack frame */
+@@ -187,2 +217,3 @@ caml_call_gc:
+ caml_c_call:
++ PROFILE_CAML
+ /* Save return address */
+@@ -215,2 +246,3 @@ caml_c_call:
+ caml_raise_exception:
++ P ROFILE_C
+ /* Reload OCaml global registers */
+@@ -235,2 +267,3 @@ caml_raise_exception:
+ caml_start_program:
++ PROFILE_C
+ Addrglobal(12, caml_program)
+@@ -385,2 +418,3 @@ caml_start_program:
+ caml_callback_exn:
++ PROFILE_C
+ /* Initial shuffling of arguments */
+@@ -395,2 +429,3 @@ caml_callback_exn:
+ caml_callback2_exn:
++ PROFILE_C
+ mr 0, 3 /* Closure */
+@@ -405,2 +440,3 @@ caml_callback2_exn:
+ caml_callback3_exn:
++ PROFILE_C
+ mr 0, 3 /* Closure */
diff --git a/lang/ocaml/patches/patch-bv b/lang/ocaml/patches/patch-asmrun_signals_osdep.h
index 528b7370d86..70c3060d3d2 100644
--- a/lang/ocaml/patches/patch-bv
+++ b/lang/ocaml/patches/patch-asmrun_signals_osdep.h
@@ -1,38 +1,28 @@
-$NetBSD: patch-bv,v 1.5 2009/01/22 01:00:34 he Exp $
+$NetBSD: patch-asmrun_signals_osdep.h,v 1.1 2012/10/08 15:05:32 jaapb Exp $
---- ./asmrun/signals_osdep.h.orig 2007-11-26 17:58:51.000000000 +0100
-+++ ./asmrun/signals_osdep.h
-@@ -158,10 +158,9 @@
- #define CONTEXT_SP (CONTEXT_STATE.CONTEXT_REG(r1))
- #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr)
-
--/****************** PowerPC, ELF (Linux) */
-+/****************** PowerPC, ELF (Linux | NetBSD) */
-
- #elif defined(TARGET_power) && defined(SYS_elf)
--
- #define DECLARE_SIGNAL_HANDLER(name) \
- static void name(int sig, struct sigcontext * context)
-
-@@ -169,11 +168,21 @@
+Use correct data structures for power architecture
+--- asmrun/signals_osdep.h.orig 2012-02-04 10:15:24.000000000 +0000
++++ asmrun/signals_osdep.h
+@@ -212,12 +212,22 @@
+ #define SET_SIGACT(sigact,name) \
sigact.sa_handler = (void (*)(int)) (name); \
sigact.sa_flags = 0
-
++
+ #ifdef __NetBSD__
+ typedef register_t context_reg;
+ #define CONTEXT_PC (context->sc_frame.srr0)
+ #define CONTEXT_EXCEPTION_POINTER (context->sc_frame.fixreg[29])
+ #define CONTEXT_YOUNG_LIMIT (context->sc_frame.fixreg[30])
+ #define CONTEXT_YOUNG_PTR (context->sc_frame.fixreg[31])
-+
++
+ #else
-+
+
typedef unsigned long context_reg;
#define CONTEXT_PC (context->regs->nip)
#define CONTEXT_EXCEPTION_POINTER (context->regs->gpr[29])
#define CONTEXT_YOUNG_LIMIT (context->regs->gpr[30])
#define CONTEXT_YOUNG_PTR (context->regs->gpr[31])
-+ #endif /* __NetBSD__ */
++ #endif /* __NetBSD */
/****************** PowerPC, BSD */
diff --git a/lang/ocaml/patches/patch-at b/lang/ocaml/patches/patch-at
deleted file mode 100644
index b7db6d5e10a..00000000000
--- a/lang/ocaml/patches/patch-at
+++ /dev/null
@@ -1,240 +0,0 @@
-$NetBSD: patch-at,v 1.28 2012/06/24 08:27:31 sbd Exp $
-
-. Include CFLAGS in bytecccompopts and LDFLAGS in bytecclinkopts.
-. Add cases for dragonfly support.
-. Use the portable `test x = y', not `test x == y' GNUism.
-. Enable native dynamic loading on NetBSD/i386 and NetBSD/amd64.
-. Fix pattern to match Solaris versions.
-. Add cases for interix support.
-. Add cases for NetBSD/arm support.
-. Update Darwin patterns to match versions >=10.
-. Enable profiling support on BSD/powerpc.
-. Skip X11 library and header file checks when X11 support is disabled.
-. Frobnicate dbm detection.
-. Enable suport for x86_64-DragonFly
-. Enable profiling and native dynamic loading for all DragonFly platforms
-. Add pkgsrc X11 checks in case X11 support is enabled in the future
-. When linking with X11 add an rpath to X11 libdir.
-. Fix SunOS linker and as args
-. On Linux libieee can only appear once on the linker command line.
-
---- configure.orig 2011-07-04 21:15:01.000000000 +0000
-+++ configure
-@@ -328,6 +328,8 @@ case "$bytecc,$host" in
- gcc*)
- bytecccompopts="-fno-defer-pop $gcc_warnings";;
- esac
-+bytecccompopts="$bytecccompopts $CFLAGS"
-+bytecclinkopts="$bytecclinkopts $LDFLAGS"
-
- # Configure compiler to use in further tests
-
-@@ -521,7 +523,7 @@ if test $withsharedlibs = "yes"; then
- mksharedlib="$flexlink"
- mkmaindll="$flexlink -maindll"
- shared_libraries_supported=true;;
-- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*)
-+ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-dragonfly)
- sharedcccompopts="-fPIC"
- mksharedlib="$bytecc -shared"
- bytecclinkopts="$bytecclinkopts -Wl,-E"
-@@ -621,7 +623,7 @@ if test $withsharedlibs = "yes"; then
- i[3456]86-*-linux*) natdynlink=true;;
- x86_64-*-linux*) natdynlink=true;;
- i[3456]86-*-darwin10.*)
-- if test $arch64 == true; then
-+ if test $arch64 = true; then
- natdynlink=true
- fi;;
- i[3456]86-*-darwin[89]*) natdynlink=true;;
-@@ -635,6 +637,8 @@ if test $withsharedlibs = "yes"; then
- x86_64-*-openbsd*) natdynlink=true;;
- i[345]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;;
- esac
- fi
-@@ -660,12 +664,13 @@ case "$host" in
- alpha*-*-netbsd*) arch=alpha; system=netbsd;;
- alpha*-*-openbsd*) arch=alpha; system=openbsd;;
- sparc*-*-sunos4.*) arch=sparc; system=sunos;;
-- sparc*-*-solaris2.*) arch=sparc; system=solaris;;
-+ sparc*-*-solaris2*) arch=sparc; system=solaris;;
- sparc*-*-*bsd*) arch=sparc; system=bsd;;
- sparc*-*-linux*) arch=sparc; system=linux;;
- 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`;;
-+ i[3456]86-*-dragonfly*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
- i[3456]86-*-nextstep*) arch=i386; system=nextstep;;
- i[3456]86-*-solaris*) if $arch64; then
- arch=amd64; system=solaris
-@@ -674,6 +679,7 @@ case "$host" in
- fi;;
- 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-*-darwin*) if $arch64; then
- arch=amd64; system=macosx
- else
-@@ -690,17 +696,21 @@ case "$host" in
- powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
- powerpc-*-darwin*) arch=power; system=rhapsody
- if $arch64; then model=ppc64; else model=ppc; fi;;
-+ arm*-*-netbsd*) arch=arm; system=netbsd;;
- arm*-*-linux*) arch=arm; system=linux;;
- arm*-*-gnu*) arch=arm; system=gnu;;
- ia64-*-linux*) arch=ia64; system=linux;;
- ia64-*-gnu*) arch=ia64; system=gnu;;
- ia64-*-freebsd*) arch=ia64; system=freebsd;;
-+ x86_64-*-dragonfly*) arch=amd64; system=dragonfly;;
- x86_64-*-linux*) arch=amd64; system=linux;;
- x86_64-*-gnu*) arch=amd64; system=gnu;;
- x86_64-*-freebsd*) arch=amd64; system=freebsd;;
- x86_64-*-netbsd*) arch=amd64; system=netbsd;;
- x86_64-*-openbsd*) arch=amd64; system=openbsd;;
-+ x86_64-*-solaris*) arch=amd64; system=solaris;;
- x86_64-*-darwin9.5) arch=amd64; system=macosx;;
-+ x86_64-*-darwin1[0-9]*) arch=amd64; system=macosx;;
- esac
-
- # Some platforms exist both in 32-bit and 64-bit variants, not distinguished
-@@ -740,7 +750,7 @@ case "$arch,$nativecc,$system,$host_type
- 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";;
-- amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";;
-+ amd64,gcc*,solaris,*) partialld="ld -r -64";;
- *,gcc*,*,*) nativecccompopts="$gcc_warnings";;
- esac
-
-@@ -763,7 +773,7 @@ case "$arch,$model,$system" in
- hppa,*,*) as='as';
- aspp='gcc -traditional -c';;
- i386,*,solaris) as='as'
-- aspp='/usr/ccs/bin/as -P';;
-+ aspp='gcc -traditional -c';;
- i386,*,*) as='as'
- aspp='gcc -c';;
- ia64,*,*) as='as -xexplicit'
-@@ -801,6 +811,8 @@ case "$arch,$model,$system" in
- case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
- amd64,*,linux) profiling='prof';;
- amd64,*,gnu) profiling='prof';;
-+ power,*,bsd) profiling='prof';;
-+ *,*,dragonfly) profiling='prof';;
- *) profiling='noprof';;
- esac
-
-@@ -1205,6 +1217,8 @@ if test "$pthread_wanted" = "yes"; then
- pthread_caml_link="-cclib -lpthread -cclib -lposix4";;
- *-*-freebsd*) pthread_link="-pthread"
- pthread_caml_link="-cclib -pthread";;
-+ *-*-dragonfly*) pthread_link="-pthread"
-+ pthread_caml_link="-cclib -pthread";;
- *-*-openbsd*) pthread_link="-pthread"
- pthread_caml_link="-cclib -pthread";;
- *) pthread_link="-lpthread"
-@@ -1256,6 +1270,7 @@ fi
- x11_include="not found"
- x11_link="not found"
-
-+if test "$disable_x11" != "yes"; then
- for dir in \
- $x11_include_dir \
- \
-@@ -1294,6 +1309,7 @@ for dir in \
- /usr/XFree86/include/X11 \
- \
- /usr/include \
-+ /usr/pkg/include \
- /usr/local/include \
- /usr/unsupported/include \
- /usr/athena/include \
-@@ -1308,6 +1324,7 @@ do
- break
- fi
- done
-+fi
-
- if test "$x11_include" = "not found"; then
- x11_try_lib_dir=''
-@@ -1350,6 +1367,7 @@ for dir in \
- \
- /usr/lib64 \
- /usr/lib \
-+ /usr/pkg/lib/ \
- /usr/local/lib \
- /usr/unsupported/lib \
- /usr/athena/lib \
-@@ -1368,11 +1386,8 @@ do
- if test $dir = /usr/lib; then
- x11_link="-lX11"
- else
-- x11_libs="-L$dir"
-- case "$host" in
-- *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
-- *) x11_link="-L$dir -lX11";;
-- esac
-+ x11_libs="-L$dir ${COMPILER_RPATH_FLAG}$dir"
-+ x11_link="-L$dir ${COMPILER_RPATH_FLAG}$dir -lX11"
- fi
- break
- fi
-@@ -1402,31 +1417,8 @@ dbm_include="not found"
- dbm_link="not found"
- use_gdbm_ndbm=no
-
--for dir in /usr/include /usr/include/db1 /usr/include/gdbm; do
-- if test -f $dir/ndbm.h; then
-- dbm_include=$dir
-- if sh ./hasgot dbm_open; then
-- dbm_link=""
-- elif sh ./hasgot -lndbm dbm_open; then
-- dbm_link="-lndbm"
-- elif sh ./hasgot -ldb1 dbm_open; then
-- dbm_link="-ldb1"
-- elif sh ./hasgot -lgdbm dbm_open; then
-- dbm_link="-lgdbm"
-- elif sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
-- dbm_link="-lgdbm_compat -lgdbm"
-- fi
-- break
-- fi
-- if test -f $dir/gdbm-ndbm.h; then
-- dbm_include=$dir
-- use_gdbm_ndbm=yes
-- if sh ./hasgot -lgdbm_compat -lgdbm dbm_open; then
-- dbm_link="-lgdbm_compat -lgdbm"
-- fi
-- break
-- fi
--done
-+dbm_include=/usr/include
-+dbm_link=${BDB_LIBS}
- if test "$dbm_include" = "not found" || test "$dbm_link" = "not found"; then
- echo "NDBM not found, the \"dbm\" library will not be supported."
- else
-@@ -1436,8 +1428,8 @@ else
- else
- dbm_include="-I$dbm_include"
- fi
-- if test "$use_gdbm_ndbm" = "yes"; then
-- echo "#define DBM_USES_GDBM_NDBM" >> s.h
-+ if test ${BDB_BUILTIN} = "yes"; then
-+ echo "#define DBM_USES_DB" >> s.h
- fi
- otherlibraries="$otherlibraries dbm"
- fi
-@@ -1500,6 +1492,9 @@ if test $has_tk = true; then
- fi
- fi
-
-+case "$host" in
-+ *-*-linux*) tk_libs=`echo $tk_libs | sed -e's,-lieee,,'`;;
-+esac
- tkauxlibs="$mathlib $dllib"
- tcllib=''
- tklib=''
diff --git a/lang/ocaml/patches/patch-av b/lang/ocaml/patches/patch-av
deleted file mode 100644
index e306236386b..00000000000
--- a/lang/ocaml/patches/patch-av
+++ /dev/null
@@ -1,12 +0,0 @@
-$NetBSD: patch-av,v 1.2 2005/02/04 21:35:51 adrianp Exp $
-
---- man/Makefile.orig 2004-10-15 15:24:00.000000000 +0100
-+++ man/Makefile 2004-10-15 15:24:39.000000000 +0100
-@@ -17,6 +17,6 @@
- DIR=$(MANDIR)/man$(MANEXT)
-
- install:
-- for i in *.m; do cp $$i $(DIR)/`basename $$i .m`.$(MANEXT); done
-+ for i in *.m; do ${BSD_INSTALL_MAN} $$i $(DIR)/`basename $$i .m`.$(MANEXT); done
- echo '.so man$(MANEXT)/ocamlc.$(MANEXT)' > $(DIR)/ocamlc.opt.$(MANEXT)
- echo '.so man$(MANEXT)/ocamlopt.$(MANEXT)' > $(DIR)/ocamlopt.opt.$(MANEXT)
diff --git a/lang/ocaml/patches/patch-ax b/lang/ocaml/patches/patch-ax
deleted file mode 100644
index 7e899b95e10..00000000000
--- a/lang/ocaml/patches/patch-ax
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-ax,v 1.4 2009/09/07 21:48:13 tonio Exp $
-
---- otherlibs/Makefile.orig 2007-11-08 10:17:47.000000000 +0100
-+++ otherlibs/Makefile
-@@ -17,7 +17,7 @@
-
- CAMLC=$(ROOTDIR)/ocamlcomp.sh
- CAMLOPT=$(ROOTDIR)/ocamlcompopt.sh
--CFLAGS=-I$(ROOTDIR)/byterun -O $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
-+CFLAGS+=-I$(ROOTDIR)/byterun $(SHAREDCCCOMPOPTS) $(EXTRACFLAGS)
-
- include ../Makefile.shared
- # Note .. is the current directory (this makefile is included from
diff --git a/lang/ocaml/patches/patch-ay b/lang/ocaml/patches/patch-ay
deleted file mode 100644
index 0ddf3e2feee..00000000000
--- a/lang/ocaml/patches/patch-ay
+++ /dev/null
@@ -1,29 +0,0 @@
-$NetBSD: patch-ay,v 1.3 2009/09/07 21:48:13 tonio Exp $
-
---- ./otherlibs/Makefile.shared.orig 2008-07-15 17:31:32.000000000 +0200
-+++ ./otherlibs/Makefile.shared
-@@ -58,16 +58,18 @@ lib$(CLIBNAME).$(A): $(COBJS)
-
- install::
- if test -f dll$(CLIBNAME)$(EXT_DLL); then \
-- cp dll$(CLIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
-- cp lib$(CLIBNAME).$(A) $(LIBDIR)/
-+ ${BSD_INSTALL_DATA} dll$(CLIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
-+ ${BSD_INSTALL_DATA} lib$(CLIBNAME).$(A) $(LIBDIR)/
- cd $(LIBDIR); $(RANLIB) lib$(CLIBNAME).$(A)
-- cp $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)/
-- if test -n "$(HEADERS)"; then cp $(HEADERS) $(LIBDIR)/caml/; fi
-+ ${BSD_INSTALL_DATA} $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)/
-+ if test -n "$(HEADERS)"; then \
-+ ${BSD_INSTALL_DATA} $(HEADERS) $(LIBDIR)/caml/; fi
-
- installopt:
-- cp $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(LIBDIR)/
-+ ${BSD_INSTALL_DATA} $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(LIBDIR)/
- cd $(LIBDIR); $(RANLIB) $(LIBNAME).a
-- if test -f $(LIBNAME).cmxs; then cp $(LIBNAME).cmxs $(LIBDIR)/; fi
-+ if test -f $(LIBNAME).cmxs; then \
-+ ${BSD_INSTALL_DATA} $(LIBNAME).cmxs $(LIBDIR)/; fi
-
- partialclean:
- rm -f *.cm*
diff --git a/lang/ocaml/patches/patch-bb b/lang/ocaml/patches/patch-bb
deleted file mode 100644
index 48caff876dc..00000000000
--- a/lang/ocaml/patches/patch-bb
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bb,v 1.2 2009/09/07 21:48:14 tonio Exp $
-
---- otherlibs/labltk/browser/Makefile.shared.orig 2009-05-21 11:08:07.000000000 +0200
-+++ otherlibs/labltk/browser/Makefile.shared 2009-05-21 11:07:29.000000000 +0200
-@@ -49,7 +49,7 @@
-
- install:
- if test -f ocamlbrowser$(EXE); then : ; \
-- cp ocamlbrowser$(EXE) $(BINDIR); fi
-+ ${BSD_INSTALL_SCRIPT} ocamlbrowser$(EXE) $(BINDIR); fi
-
- clean:
- rm -f *.cm? ocamlbrowser$(EXE) dummy.mli *~ *.orig *.$(O)
diff --git a/lang/ocaml/patches/patch-bc b/lang/ocaml/patches/patch-bc
deleted file mode 100644
index 2ca93729acd..00000000000
--- a/lang/ocaml/patches/patch-bc
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-bc,v 1.3 2009/09/08 18:35:46 tonio Exp $
-
---- otherlibs/labltk/camltk/Makefile.orig 2007-12-12 15:09:45.000000000 +0100
-+++ otherlibs/labltk/camltk/Makefile 2009-05-21 11:13:08.000000000 +0200
-@@ -19,13 +19,13 @@
- $(MAKE) -f Makefile.gen clean
-
- install:
-- if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
-- cp $(CAMLTKOBJS:.cmo=.cmi) $(CWIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
-+ if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} $(INSTALLDIR); fi
-+ ${BSD_INSTALL_DATA} $(CAMLTKOBJS:.cmo=.cmi) $(CWIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
- chmod 644 $(INSTALLDIR)/*.cmi
-
- installopt:
-- @if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
-- cp $(CAMLTKOBJSX) $(INSTALLDIR)
-+ @if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} $(INSTALLDIR); fi
-+ ${BSD_INSTALL_DATA} $(CAMLTKOBJSX) $(INSTALLDIR)
- chmod 644 $(INSTALLDIR)/*.cmx
-
- .SUFFIXES :
diff --git a/lang/ocaml/patches/patch-be b/lang/ocaml/patches/patch-be
deleted file mode 100644
index ba282a4ffc1..00000000000
--- a/lang/ocaml/patches/patch-be
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-be,v 1.3 2009/09/07 21:48:14 tonio Exp $
-
---- otherlibs/labltk/frx/Makefile.orig 2007-12-12 15:09:45.000000000 +0100
-+++ otherlibs/labltk/frx/Makefile 2009-05-21 11:14:12.000000000 +0200
-@@ -20,10 +20,10 @@
- $(CAMLOPTLIBR) -o frxlib.cmxa $(OBJSX)
-
- install:
-- cp *.cmi *.mli frxlib.cma $(INSTALLDIR)
-+ ${BSD_INSTALL_DATA} *.cmi *.mli frxlib.cma $(INSTALLDIR)
-
- installopt:
-- cp frxlib.cmxa frxlib.$(A) $(INSTALLDIR)
-+ ${BSD_INSTALL_DATA} frxlib.cmxa frxlib.$(A) $(INSTALLDIR)
-
- clean:
- rm -f *.cm* *.$(O) *.$(A)
diff --git a/lang/ocaml/patches/patch-bf b/lang/ocaml/patches/patch-bf
deleted file mode 100644
index 18ce1fe0a1b..00000000000
--- a/lang/ocaml/patches/patch-bf
+++ /dev/null
@@ -1,17 +0,0 @@
-$NetBSD: patch-bf,v 1.3 2009/09/07 21:48:14 tonio Exp $
-
---- otherlibs/labltk/jpf/Makefile.orig 2007-12-12 15:09:45.000000000 +0100
-+++ otherlibs/labltk/jpf/Makefile 2009-05-21 11:14:53.000000000 +0200
-@@ -21,10 +21,10 @@
- $(CAMLOPTLIBR) -o jpflib.cmxa $(OBJSX)
-
- install:
-- cp $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) jpflib.cma $(INSTALLDIR)
-+ ${BSD_INSTALL_DATA} $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) jpflib.cma $(INSTALLDIR)
-
- installopt:
-- cp jpflib.cmxa jpflib.$(A) $(OBJS:.cmo=.cmx) $(INSTALLDIR)
-+ ${BSD_INSTALL_DATA} jpflib.cmxa jpflib.$(A) $(OBJS:.cmo=.cmx) $(INSTALLDIR)
-
- clean:
- rm -f *.cm* *.$(O) *.$(A) *~ *test
diff --git a/lang/ocaml/patches/patch-bg b/lang/ocaml/patches/patch-bg
deleted file mode 100644
index a04c62a96e4..00000000000
--- a/lang/ocaml/patches/patch-bg
+++ /dev/null
@@ -1,22 +0,0 @@
-$NetBSD: patch-bg,v 1.2 2009/09/07 21:48:14 tonio Exp $
-
---- otherlibs/labltk/labltk/Makefile.orig 2007-12-12 15:09:45.000000000 +0100
-+++ otherlibs/labltk/labltk/Makefile 2009-05-21 11:16:27.000000000 +0200
-@@ -16,13 +16,13 @@
- labltkobjsx: $(LABLTKOBJSX)
-
- install:
-- if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
-- cp $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
-+ if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} $(INSTALLDIR); fi
-+ ${BSD_INSTALL_DATA} $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
- chmod 644 $(INSTALLDIR)/*.cmi
-
- installopt:
-- @if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
-- cp $(LABLTKOBJSX) $(INSTALLDIR)
-+ @if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} $(INSTALLDIR); fi
-+ ${BSD_INSTALL_DATA} $(LABLTKOBJSX) $(INSTALLDIR)
- chmod 644 $(INSTALLDIR)/*.cmx
-
- clean:
diff --git a/lang/ocaml/patches/patch-bi b/lang/ocaml/patches/patch-bi
deleted file mode 100644
index 8464baadb04..00000000000
--- a/lang/ocaml/patches/patch-bi
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-bi,v 1.3 2009/09/07 21:48:14 tonio Exp $
-
---- otherlibs/labltk/support/Makefile.orig 2008-04-22 09:38:07.000000000 +0200
-+++ otherlibs/labltk/support/Makefile 2009-05-21 11:21:02.000000000 +0200
-@@ -25,19 +25,17 @@
- PUB= $(PUBMLI) $(PUBMLI:.mli=.cmi) tkthread.mli tkthread.cmi tkthread.cmo
-
- install:
-- if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
-- cp $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
-+ if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} $(INSTALLDIR); fi
-+ ${BSD_INSTALL_DATA} $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
- cd $(INSTALLDIR); $(RANLIB) lib$(LIBNAME).$(A)
-- cd $(INSTALLDIR); chmod 644 $(PUB) lib$(LIBNAME).$(A)
- if test -f dll$(LIBNAME)$(EXT_DLL); then \
-- cp dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
-+ ${BSD_INSTALL_DATA} dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
-
- installopt:
-- @if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
-- cp $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
-+ @if test -d $(INSTALLDIR); then : ; else ${BSD_INSTALL_DATA_DIR} $(INSTALLDIR); fi
-+ ${BSD_INSTALL_DATA} $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
- if test -f tkthread.$(O); then \
-- cp tkthread.cmx tkthread.$(O) $(INSTALLDIR); \
-- chmod 644 $(INSTALLDIR)/tkthread.cmx $(INSTALLDIR)/tkthread.$(O); \
-+ ${BSD_INSTALL_DATA} tkthread.cmx tkthread.$(O) $(INSTALLDIR); \
- fi
-
- clean:
diff --git a/lang/ocaml/patches/patch-bp b/lang/ocaml/patches/patch-bp
deleted file mode 100644
index 2a3312a93c0..00000000000
--- a/lang/ocaml/patches/patch-bp
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-bp,v 1.3 2005/03/24 11:32:50 adam Exp $
-
---- otherlibs/threads/Makefile.orig 2003-07-17 08:38:28.000000000 +0000
-+++ otherlibs/threads/Makefile
-@@ -16,7 +16,7 @@
- include ../../config/Makefile
-
- CC=$(BYTECC)
--CFLAGS=-I../../byterun -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
-+CFLAGS+=-I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) -g
- CAMLC=../../ocamlcomp.sh -I ../unix
- MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
- COMPFLAGS=-warn-error A
-@@ -99,12 +99,12 @@ clean: partialclean
- rm -f pervasives.mli marshal.mli unix.mli
-
- install:
-- if test -f dllvmthreads.so; then cp dllvmthreads.so $(STUBLIBDIR)/.; fi
-- mkdir -p $(LIBDIR)/vmthreads
-- cp libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
-+ if test -f dllvmthreads.so; then ${BSD_INSTALL_DATA} dllvmthreads.so $(STUBLIBDIR)/.; fi
-+ ${BSD_INSTALL_DATA_DIR} $(LIBDIR)/vmthreads
-+ ${BSD_INSTALL_DATA} libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
- cd $(LIBDIR)/vmthreads; $(RANLIB) libvmthreads.a
-- cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
-- cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)/vmthreads
-+ ${BSD_INSTALL_DATA} thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
-+ ${BSD_INSTALL_DATA} thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)/vmthreads
-
- installopt:
-
diff --git a/lang/ocaml/patches/patch-bq b/lang/ocaml/patches/patch-bq
deleted file mode 100644
index c542d11c913..00000000000
--- a/lang/ocaml/patches/patch-bq
+++ /dev/null
@@ -1,13 +0,0 @@
-$NetBSD: patch-bq,v 1.4 2009/09/07 21:48:14 tonio Exp $
-
---- stdlib/Makefile.shared.orig 2008-08-01 18:57:10.000000000 +0200
-+++ stdlib/Makefile.shared
-@@ -41,7 +41,7 @@ OTHERS=array.cmo list.cmo char.cmo strin
- all: stdlib.cma std_exit.cmo camlheader camlheader_ur
-
- install:
-- cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
-+ ${BSD_INSTALL_DATA} stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur $(LIBDIR)
-
- stdlib.cma: $(OBJS)
- $(CAMLC) -a -o stdlib.cma $(OBJS)
diff --git a/lang/ocaml/patches/patch-bt b/lang/ocaml/patches/patch-bt
deleted file mode 100644
index 83d1ce94be9..00000000000
--- a/lang/ocaml/patches/patch-bt
+++ /dev/null
@@ -1,73 +0,0 @@
-$NetBSD: patch-bt,v 1.5 2010/08/19 08:06:53 asau Exp $
-
---- Makefile.orig 2010-06-16 05:32:26.000000000 +0400
-+++ Makefile 2010-08-12 14:47:49.000000000 +0400
-@@ -273,25 +273,25 @@
-
- # Installation
- install:
-- if test -d $(BINDIR); then : ; else $(MKDIR) $(BINDIR); fi
-- if test -d $(LIBDIR); then : ; else $(MKDIR) $(LIBDIR); fi
-- if test -d $(STUBLIBDIR); then : ; else $(MKDIR) $(STUBLIBDIR); fi
-+ if test -d $(BINDIR); then : ; else $(BSD_INSTALL_PROGRAM_DIR) $(BINDIR); fi
-+ if test -d $(LIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(LIBDIR); fi
-+ if test -d $(STUBLIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(STUBLIBDIR); fi
- if test -d $(MANDIR)/man$(MANEXT); then : ; \
-- else $(MKDIR) $(MANDIR)/man$(MANEXT); fi
-+ else $(BSD_INSTALL_MAN_DIR) $(MANDIR)/man$(MANEXT); fi
- cd $(LIBDIR); rm -f dllbigarray.so dlllabltk.so dllnums.so \
- dllthreads.so dllunix.so dllgraphics.so dllmldbm.so dllstr.so \
- dlltkanim.so
- cd byterun; $(MAKE) install
-- cp ocamlc $(BINDIR)/ocamlc$(EXE)
-- cp ocaml $(BINDIR)/ocaml$(EXE)
-+ $(BSD_INSTALL_SCRIPT) ocamlc $(BINDIR)/ocamlc$(EXE)
-+ $(BSD_INSTALL_SCRIPT) ocaml $(BINDIR)/ocaml$(EXE)
- cd stdlib; $(MAKE) install
-- cp lex/ocamllex $(BINDIR)/ocamllex$(EXE)
-- cp yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
-- cp toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
-- cp expunge $(LIBDIR)/expunge$(EXE)
-- cp typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
-- cp toplevel/topstart.cmo $(LIBDIR)
-- cp toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi \
-+ $(BSD_INSTALL_SCRIPT) lex/ocamllex $(BINDIR)/ocamllex$(EXE)
-+ $(BSD_INSTALL_PROGRAM) yacc/ocamlyacc$(EXE) $(BINDIR)/ocamlyacc$(EXE)
-+ $(BSD_INSTALL_DATA) toplevel/toplevellib.cma $(LIBDIR)/toplevellib.cma
-+ $(BSD_INSTALL_DATA) expunge $(LIBDIR)/expunge$(EXE)
-+ $(BSD_INSTALL_DATA) typing/outcometree.cmi typing/outcometree.mli $(LIBDIR)
-+ $(BSD_INSTALL_DATA) toplevel/topstart.cmo $(LIBDIR)
-+ $(BSD_INSTALL_DATA) toplevel/toploop.cmi toplevel/topdirs.cmi toplevel/topmain.cmi \
- $(LIBDIR)
- cd tools; $(MAKE) install
- -cd man; $(MAKE) install
-@@ -302,24 +302,24 @@
- if test -f ocamlopt; then $(MAKE) installopt; else :; fi
- if test -f debugger/ocamldebug; then (cd debugger; $(MAKE) install); \
- else :; fi
-- cp config/Makefile $(LIBDIR)/Makefile.config
-+ $(BSD_INSTALL_DATA) config/Makefile $(LIBDIR)/Makefile.config
- BINDIR=$(BINDIR) LIBDIR=$(LIBDIR) PREFIX=$(PREFIX) \
- ./build/partial-install.sh
-
- # Installation of the native-code compiler
- installopt:
- cd asmrun; $(MAKE) install
-- cp ocamlopt $(BINDIR)/ocamlopt$(EXE)
-+ $(BSD_INSTALL_SCRIPT) ocamlopt $(BINDIR)/ocamlopt$(EXE)
- cd stdlib; $(MAKE) installopt
- cd ocamldoc; $(MAKE) installopt
- for i in $(OTHERLIBRARIES); \
- do (cd otherlibs/$$i; $(MAKE) installopt) || exit $$?; done
- if test -f ocamlc.opt; \
-- then cp ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
-+ then $(BSD_INSTALL_PROGRAM) ocamlc.opt $(BINDIR)/ocamlc.opt$(EXE); else :; fi
- if test -f ocamlopt.opt; \
-- then cp ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
-+ then $(BSD_INSTALL_PROGRAM) ocamlopt.opt $(BINDIR)/ocamlopt.opt$(EXE); else :; fi
- if test -f lex/ocamllex.opt; \
-- then cp lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
-+ then $(BSD_INSTALL_PROGRAM) lex/ocamllex.opt $(BINDIR)/ocamllex.opt$(EXE); else :; fi
-
- clean:: partialclean
-
diff --git a/lang/ocaml/patches/patch-bu b/lang/ocaml/patches/patch-bu
deleted file mode 100644
index 629f072da81..00000000000
--- a/lang/ocaml/patches/patch-bu
+++ /dev/null
@@ -1,30 +0,0 @@
-$NetBSD: patch-bu,v 1.3 2009/09/07 21:48:14 tonio Exp $
-
---- asmrun/Makefile.orig 2007-11-15 14:21:15.000000000 +0100
-+++ asmrun/Makefile
-@@ -18,7 +18,7 @@ include ../config/Makefile
- CC=$(NATIVECC)
- FLAGS=-I../byterun -DCAML_NAME_SPACE -DNATIVE_CODE \
- -DTARGET_$(ARCH) -DSYS_$(SYSTEM) $(IFLEXDIR)
--CFLAGS=$(FLAGS) -O $(NATIVECCCOMPOPTS)
-+CFLAGS+=$(FLAGS) $(NATIVECCCOMPOPTS)
- DFLAGS=$(FLAGS) -g -DDEBUG $(NATIVECCCOMPOPTS)
- PFLAGS=$(FLAGS) -pg -O -DPROFILING $(NATIVECCPROFOPTS)
-
-@@ -58,14 +58,14 @@ libasmrunp.a: $(POBJS)
- install: install-default install-$(PROFILING)
-
- install-default:
-- cp libasmrun.a $(LIBDIR)/libasmrun.a
-+ ${BSD_INSTALL_DATA} libasmrun.a $(LIBDIR)/libasmrun.a
- cd $(LIBDIR); $(RANLIB) libasmrun.a
-
- install-noprof:
- rm -f $(LIBDIR)/libasmrunp.a; ln -s libasmrun.a $(LIBDIR)/libasmrunp.a
-
- install-prof:
-- cp libasmrunp.a $(LIBDIR)/libasmrunp.a
-+ ${BSD_INSTALL_DATA} libasmrunp.a $(LIBDIR)/libasmrunp.a
- cd $(LIBDIR); $(RANLIB) libasmrunp.a
-
- power.o: power-$(SYSTEM).o
diff --git a/lang/ocaml/patches/patch-bw b/lang/ocaml/patches/patch-bw
deleted file mode 100644
index 2d9fece6a77..00000000000
--- a/lang/ocaml/patches/patch-bw
+++ /dev/null
@@ -1,56 +0,0 @@
-$NetBSD: patch-bw,v 1.1 2010/12/19 08:27:17 is Exp $
-
---- asmrun/arm.S.orig 2009-05-04 13:46:46.000000000 +0000
-+++ asmrun/arm.S
-@@ -38,7 +38,7 @@ caml_call_gc:
- ldr r12, .Lcaml_requested_size
- ldr r12, [r12, #0]
- sub alloc_ptr, alloc_ptr, r12
-- bx lr
-+ mov pc,lr
-
- .globl caml_alloc1
- caml_alloc1:
-@@ -128,7 +128,7 @@ caml_allocN:
- ldr alloc_limit, [r12, #0]
- /* Return to caller */
- ldr r12, [sp], #4
-- bx r12
-+ mov pc,r12 /* optimize! */
-
- /* Call a C function from Caml */
- /* Function to call is in r12 */
-@@ -149,13 +149,13 @@ caml_c_call:
- str trap_ptr, [r7, #0]
- /* Call the function */
- mov lr, pc
-- bx r12
-+ mov pc,r12
- /* Reload alloc ptr and alloc limit */
- ldr r5, .Lcaml_young_limit
- ldr alloc_ptr, [r6, #0] /* r6 still points to caml_young_ptr */
- ldr alloc_limit, [r5, #0]
- /* Return */
-- bx r4
-+ mov pc,r4
-
- /* Start the Caml program */
-
-@@ -196,7 +196,7 @@ caml_start_program:
- ldr alloc_limit, [r4, #0]
- /* Call the Caml code */
- mov lr, pc
-- bx r12
-+ mov pc,r12
- .Lcaml_retaddr:
- /* Pop the trap frame, restoring caml_exception_pointer */
- ldr r4, .Lcaml_exception_pointer
-@@ -220,7 +220,7 @@ caml_start_program:
- str alloc_ptr, [r4, #0]
- /* Reload callee-save registers and return */
- ldmfd sp!, {r4,r5,r6,r7,r8,r10,r11,lr}
-- bx lr
-+ mov pc,lr
-
- /* The trap handler */
- .Ltrap_handler:
diff --git a/lang/ocaml/patches/patch-bx b/lang/ocaml/patches/patch-bx
deleted file mode 100644
index 013c861b8d7..00000000000
--- a/lang/ocaml/patches/patch-bx
+++ /dev/null
@@ -1,31 +0,0 @@
-$NetBSD: patch-bx,v 1.1 2010/12/19 08:27:17 is Exp $
-
---- asmcomp/arm/emit.mlp.orig 2010-04-22 09:33:18.000000000 +0000
-+++ asmcomp/arm/emit.mlp
-@@ -285,7 +285,7 @@ let emit_instr i =
- ` ldr {emit_reg i.res.(0)}, {emit_label lbl} @ {emit_symbol s}\n`; 1
- | Lop(Icall_ind) ->
- ` mov lr, pc\n`;
-- `{record_frame i.live} bx {emit_reg i.arg.(0)}\n`; 2
-+ `{record_frame i.live} mov pc, {emit_reg i.arg.(0)}\n`; 2
- | Lop(Icall_imm s) ->
- `{record_frame i.live} bl {emit_symbol s}\n`; 1
- | Lop(Itailcall_ind) ->
-@@ -293,7 +293,7 @@ let emit_instr i =
- if !contains_calls then
- ` ldr lr, [sp, #{emit_int (n-4)}]\n`;
- let ninstr = emit_stack_adjustment "add" n in
-- ` bx {emit_reg i.arg.(0)}\n`;
-+ ` mov pc, {emit_reg i.arg.(0)}\n`;
- 2 + ninstr
- | Lop(Itailcall_imm s) ->
- if s = !function_name then begin
-@@ -448,7 +448,7 @@ let emit_instr i =
- ` ldr lr, [sp, #{emit_int(n-4)}]\n`; 1
- | Lreturn ->
- let ninstr = emit_stack_adjustment "add" (frame_size()) in
-- ` bx lr\n`;
-+ ` mov pc, lr\n`;
- ninstr + 1
- | Llabel lbl ->
- `{emit_label lbl}:\n`; 0
diff --git a/lang/ocaml/patches/patch-bytecomp_bytelink.ml b/lang/ocaml/patches/patch-bytecomp_bytelink.ml
index b90e17b07a9..4db5384d92e 100644
--- a/lang/ocaml/patches/patch-bytecomp_bytelink.ml
+++ b/lang/ocaml/patches/patch-bytecomp_bytelink.ml
@@ -1,22 +1,23 @@
-$NetBSD: patch-bytecomp_bytelink.ml,v 1.1 2011/11/27 19:46:00 joerg Exp $
+$NetBSD: patch-bytecomp_bytelink.ml,v 1.2 2012/10/08 15:05:33 jaapb Exp $
---- bytecomp/bytelink.ml.orig 2011-11-26 23:11:19.000000000 +0000
+Honour EXTRA_RT_LIBS
+--- bytecomp/bytelink.ml.orig 2012-04-16 15:27:42.000000000 +0000
+++ bytecomp/bytelink.ml
-@@ -467,7 +467,7 @@ void caml_startup(char ** argv)\n\
+@@ -475,7 +475,7 @@ let link_bytecode_as_c ppf tolink outfil
+ (* Build a custom runtime *)
let build_custom_runtime prim_name exec_name =
+- let runtime_lib = "-lcamlrun" ^ !Clflags.runtime_variant in
++ let runtime_lib = "-lcamlrun @EXTRA_RT_LIBS@" ^ !Clflags.runtime_variant in
Ccomp.call_linker Ccomp.Exe exec_name
-- ([prim_name] @ List.rev !Clflags.ccobjs @ ["-lcamlrun"])
-+ ([prim_name] @ List.rev !Clflags.ccobjs @ ["-lcamlrun @EXTRA_RT_LIBS@"])
+ ([prim_name] @ List.rev !Clflags.ccobjs @ [runtime_lib])
(Clflags.std_include_flag "-I" ^ " " ^ Config.bytecomp_c_libraries)
-
- let append_bytecode_and_cleanup bytecode_name exec_name prim_name =
-@@ -547,7 +547,7 @@ let link objfiles output_name =
+@@ -560,7 +560,7 @@ let link ppf objfiles output_name =
+ if not (Filename.check_suffix output_name Config.ext_obj) then begin
temps := obj_file :: !temps;
if not (
+- let runtime_lib = "-lcamlrun" ^ !Clflags.runtime_variant in
++ let runtime_lib = "-lcamlrun @EXTRA_RT_LIBS@" ^ !Clflags.runtime_variant in
Ccomp.call_linker Ccomp.MainDll output_name
-- ([obj_file] @ List.rev !Clflags.ccobjs @ ["-lcamlrun"])
-+ ([obj_file] @ List.rev !Clflags.ccobjs @ ["-lcamlrun @EXTRA_RT_LIBS@"])
+ ([obj_file] @ List.rev !Clflags.ccobjs @ [runtime_lib])
Config.bytecomp_c_libraries
- ) then raise (Error Custom_runtime);
- end
diff --git a/lang/ocaml/patches/patch-byterun_Makefile b/lang/ocaml/patches/patch-byterun_Makefile
new file mode 100644
index 00000000000..400fece54c5
--- /dev/null
+++ b/lang/ocaml/patches/patch-byterun_Makefile
@@ -0,0 +1,23 @@
+$NetBSD: patch-byterun_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- byterun/Makefile.orig 2012-06-04 16:33:59.000000000 +0000
++++ byterun/Makefile
+@@ -15,7 +15,7 @@
+
+ include Makefile.common
+
+-CFLAGS=-DCAML_NAME_SPACE -O $(BYTECCCOMPOPTS) $(IFLEXDIR)
++CFLAGS+=-DCAML_NAME_SPACE -O $(BYTECCCOMPOPTS) $(IFLEXDIR)
+ DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR)
+
+ OBJS=$(COMMONOBJS) unix.o main.o
+@@ -48,7 +48,7 @@ libcamlrun_shared.so: $(PICOBJS)
+
+ install::
+ if test -f libcamlrun_shared.so; then \
+- cp libcamlrun_shared.so $(LIBDIR)/libcamlrun_shared.so; fi
++ $(BSD_INSTALL_PROGRAM) libcamlrun_shared.so $(LIBDIR)/libcamlrun_shared.so; fi
+
+ clean::
+ rm -f libcamlrun_shared.so
diff --git a/lang/ocaml/patches/patch-camlp4_man_Makefile b/lang/ocaml/patches/patch-camlp4_man_Makefile
new file mode 100644
index 00000000000..c1d4dd1b52a
--- /dev/null
+++ b/lang/ocaml/patches/patch-camlp4_man_Makefile
@@ -0,0 +1,16 @@
+$NetBSD: patch-camlp4_man_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- camlp4/man/Makefile.orig 2011-07-27 14:17:02.000000000 +0000
++++ camlp4/man/Makefile
+@@ -20,8 +20,8 @@ include ../config/Makefile.base
+
+ install-local:
+ if test -n '$(MANDIR)'; then \
+- $(MKDIR) $(MANDIR)/man1 ; \
+- cp $(TARGET) $(MANDIR)/man1/. ; \
++ $(BSD_INSTALL_MAN_DIR) $(MANDIR)/man1
++ $(BSD_INSTALL_MAN) $(TARGET) $(MANDIR)/man1/. ; \
+ for i in $(ALIASES); do \
+ rm -f $(MANDIR)/man1/$$i; \
+ echo '.so man1/$(TARGET)' > $(MANDIR)/man1/$$i; \
diff --git a/lang/ocaml/patches/patch-configure b/lang/ocaml/patches/patch-configure
new file mode 100644
index 00000000000..53ba8a41cb2
--- /dev/null
+++ b/lang/ocaml/patches/patch-configure
@@ -0,0 +1,130 @@
+$NetBSD: patch-configure,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Several configure changes to work on and detect NetBSD (and some other OSes)
+--- configure.orig 2012-06-26 15:33:50.000000000 +0000
++++ configure
+@@ -633,7 +633,7 @@ if test $withsharedlibs = "yes"; then
+ x86_64-*-linux*) natdynlink=true;;
+ i[3456]86-*-darwin[89].*) natdynlink=true;;
+ i[3456]86-*-darwin*)
+- if test $arch64 == true; then
++ if test $arch64 = true; then
+ natdynlink=true
+ fi;;
+ x86_64-*-darwin*) natdynlink=true;;
+@@ -647,6 +647,8 @@ if test $withsharedlibs = "yes"; then
+ x86_64-*-openbsd*) natdynlink=true;;
+ i[345]86-*-netbsd*) natdynlink=true;;
+ x86_64-*-netbsd*) natdynlink=true;;
++ i[345]86-*-dragonfly) natdynlink=true;;
++ x86_64-*-dragonfly) natdynlink=true;;
+ i386-*-gnu0.3) natdynlink=true;;
+ arm*-*-linux*) natdynlink=true;;
+ esac
+@@ -672,6 +674,7 @@ case "$host" 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`;;
++ i[3456]86-*-dragonfly*) arch=i386; system=bsd_`sh ./runtest elf.c`;;
+ i[3456]86-*-nextstep*) arch=i386; system=nextstep;;
+ i[3456]86-*-solaris*) if $arch64; then
+ arch=amd64; system=solaris
+@@ -680,6 +683,7 @@ case "$host" in
+ fi;;
+ 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-*-darwin*) if $arch64; then
+ arch=amd64; system=macosx
+ else
+@@ -691,6 +695,7 @@ case "$host" in
+ powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
+ powerpc-*-darwin*) arch=power; system=rhapsody
+ if $arch64; then model=ppc64; else model=ppc; fi;;
++ arm*-*-netbsd*) arch=arm; system=netbsd;;
+ arm*-*-linux-gnueabihf) arch=arm; system=linux_eabihf;;
+ armv7*-*-linux-gnueabi) arch=arm; model=armv7; system=linux_eabi;;
+ armv6t2*-*-linux-gnueabi) arch=arm; model=armv6t2; system=linux_eabi;;
+@@ -702,6 +707,7 @@ case "$host" in
+ x86_64-*-gnu*) arch=amd64; system=gnu;;
+ x86_64-*-freebsd*) arch=amd64; system=freebsd;;
+ x86_64-*-netbsd*) arch=amd64; system=netbsd;;
++ x86_64-*-dragonfly*) arch=amd64; system=dragonfly;;
+ x86_64-*-openbsd*) arch=amd64; system=openbsd;;
+ x86_64-*-darwin*) arch=amd64; system=macosx;;
+ esac
+@@ -736,7 +742,7 @@ case "$arch,$nativecc,$system,$host_type
+ 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";;
+- amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";;
++ amd64,gcc*,solaris,*) partialld="ld -r -64";;
+ *,gcc*,*,*) nativecccompopts="$gcc_warnings";;
+ esac
+
+@@ -752,7 +758,7 @@ case "$arch,$model,$system" in
+ arm,*,*) as='as';
+ aspp='gcc -c';;
+ i386,*,solaris) as='as'
+- aspp='/usr/ccs/bin/as -P';;
++ aspp='gcc -traditional -c';;
+ i386,*,*) as='as'
+ aspp='gcc -c';;
+ power,*,elf) as='as -u -m ppc'
+@@ -786,6 +792,8 @@ case "$arch,$model,$system" in
+ amd64,*,linux) profiling='prof';;
+ amd64,*,gnu) profiling='prof';;
+ arm,*,linux*) profiling='prof';;
++ power,*,bsd) profiling='prof';;
++ *,*,dragonfly) profiling='prof';;
+ *) profiling='noprof';;
+ esac
+
+@@ -1244,6 +1252,8 @@ fi
+ x11_include="not found"
+ x11_link="not found"
+
++if test "$disable_x11" != "yes"; then
++
+ 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`
+@@ -1290,6 +1300,7 @@ if test "$x11_include" = "not found"; th
+ /usr/XFree86/include/X11 \
+ \
+ /usr/include \
++ /usr/pkg/include \
+ /usr/local/include \
+ /usr/unsupported/include \
+ /usr/athena/include \
+@@ -1347,6 +1358,7 @@ if test "$x11_include" = "not found"; th
+ \
+ /usr/lib64 \
+ /usr/lib \
++ /usr/pkg/lib \
+ /usr/local/lib \
+ /usr/unsupported/lib \
+ /usr/athena/lib \
+@@ -1368,18 +1380,16 @@ if test "$x11_include" = "not found"; th
+ if test $dir = /usr/lib; then
+ x11_link="-lX11"
+ else
+- x11_libs="-L$dir"
+- case "$host" in
+- *-kfreebsd*-gnu) x11_link="-L$dir -lX11";;
+- *-*-*bsd*) x11_link="-R$dir -L$dir -lX11";;
+- *) x11_link="-L$dir -lX11";;
+- esac
++ x11_libs="-L$dir ${COMPILER_RPATH_FLAG}$dir"
++ x11_link="-L$dir ${COMPILER_RPATH_FLAG}$dir -lX11"
+ fi
+ break
+ fi
+ done
+ fi
+
++fi # end of disable_x11 test
++
+ if test "x11_include" != "not found"; then
+ if test "$x11_include" = "-I/usr/include"; then
+ x11_include=""
diff --git a/lang/ocaml/patches/patch-au b/lang/ocaml/patches/patch-debugger_Makefile.shared
index 63c8ecbfb75..98f1e322288 100644
--- a/lang/ocaml/patches/patch-au
+++ b/lang/ocaml/patches/patch-debugger_Makefile.shared
@@ -1,13 +1,14 @@
-$NetBSD: patch-au,v 1.4 2009/09/07 21:48:13 tonio Exp $
+$NetBSD: patch-debugger_Makefile.shared,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- debugger/Makefile.shared.orig 2008-07-29 10:31:41.000000000 +0200
+Use BSD_INSTALL_* instead of mkdir and cp
+--- debugger/Makefile.shared.orig 2012-05-31 12:41:49.000000000 +0000
+++ debugger/Makefile.shared
@@ -83,7 +83,7 @@ ocamldebug$(EXE): $(OBJS) $(OTHEROBJS)
$(CAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) -linkall $(OTHEROBJS) $(OBJS)
install:
- cp ocamldebug$(EXE) $(BINDIR)/ocamldebug$(EXE)
-+ ${BSD_INSTALL_SCRIPT} ocamldebug$(EXE) $(BINDIR)/ocamldebug$(EXE)
++ $(BSD_INSTALL_SCRIPT) ocamldebug$(EXE) $(BINDIR)/ocamldebug$(EXE)
clean::
rm -f ocamldebug$(EXE)
diff --git a/lang/ocaml/patches/patch-man_Makefile b/lang/ocaml/patches/patch-man_Makefile
new file mode 100644
index 00000000000..f0a66e8d1d5
--- /dev/null
+++ b/lang/ocaml/patches/patch-man_Makefile
@@ -0,0 +1,14 @@
+$NetBSD: patch-man_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- man/Makefile.orig 2012-03-16 15:53:07.000000000 +0000
++++ man/Makefile
+@@ -17,7 +17,7 @@ include ../config/Makefile
+ DIR=$(MANDIR)/man$(MANEXT)
+
+ install:
+- for i in *.m; do cp $$i $(DIR)/`basename $$i .m`.$(MANEXT); done
++ for i in *.m; do $(BSD_INSTALL_MAN) $$i $(DIR)/`basename $$i .m`.$(MANEXT); done
+ echo '.so man$(MANEXT)/ocamlc.$(MANEXT)' > $(DIR)/ocamlc.opt.$(MANEXT)
+ echo '.so man$(MANEXT)/ocamlopt.$(MANEXT)' > $(DIR)/ocamlopt.opt.$(MANEXT)
+ echo '.so man$(MANEXT)/ocamlcp.$(MANEXT)' > $(DIR)/ocamloptp.$(MANEXT)
diff --git a/lang/ocaml/patches/patch-aw b/lang/ocaml/patches/patch-ocamldoc_Makefile
index 8e553f50703..70e688bd2e5 100644
--- a/lang/ocaml/patches/patch-aw
+++ b/lang/ocaml/patches/patch-ocamldoc_Makefile
@@ -1,8 +1,9 @@
-$NetBSD: patch-aw,v 1.9 2012/03/04 09:06:46 asau Exp $
+$NetBSD: patch-ocamldoc_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- ocamldoc/Makefile.orig 2011-05-02 17:14:14.000000000 +0400
-+++ ocamldoc/Makefile 2012-03-04 07:19:46.000000000 +0400
-@@ -258,24 +258,24 @@
+Use BSD_INSTALL_* instead of mkdir and cp
+--- ocamldoc/Makefile.orig 2012-07-13 11:23:13.000000000 +0000
++++ ocamldoc/Makefile
+@@ -273,24 +273,24 @@ odoc_see_lexer.ml: odoc_see_lexer.mll
# Installation targets
######################
install: dummy
@@ -33,7 +34,7 @@ $NetBSD: patch-aw,v 1.9 2012/03/04 09:06:46 asau Exp $
- $(CP) ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
- $(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
+ if test -d $(INSTALL_BINDIR); then : ; else $(BSD_INSTALL_PROGRAM_DIR) $(INSTALL_BINDIR); fi
-+ if test -d $(INSTALL_LIBDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALL_LIBDIR); fi
++ if test -d $(INSTALL_LIBDIR); then : ; else $(BSD_INSTAALL_DATA_DIR) $(INSTALL_LIBDIR); fi
+ $(BSD_INSTALL_PROGRAM) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE)
+ $(BSD_INSTALL_DATA) ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
+ $(BSD_INSTALL_DATA) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
diff --git a/lang/ocaml/patches/patch-otherlibs_Makefile.shared b/lang/ocaml/patches/patch-otherlibs_Makefile.shared
new file mode 100644
index 00000000000..47669285915
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_Makefile.shared
@@ -0,0 +1,28 @@
+$NetBSD: patch-otherlibs_Makefile.shared,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/Makefile.shared.orig 2011-07-27 14:17:02.000000000 +0000
++++ otherlibs/Makefile.shared
+@@ -58,16 +58,16 @@ lib$(CLIBNAME).$(A): $(COBJS)
+
+ install::
+ if test -f dll$(CLIBNAME)$(EXT_DLL); then \
+- cp dll$(CLIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
+- cp lib$(CLIBNAME).$(A) $(LIBDIR)/
++ $(BSD_INSTALL_DATA) dll$(CLIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
++ $(BSD_INSTALL_DATA) lib$(CLIBNAME).$(A) $(LIBDIR)/
+ cd $(LIBDIR); $(RANLIB) lib$(CLIBNAME).$(A)
+- cp $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)/
+- if test -n "$(HEADERS)"; then cp $(HEADERS) $(LIBDIR)/caml/; fi
++ $(BSD_INSTALL_DATA) $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(LIBDIR)/
++ if test -n "$(HEADERS)"; then $(BSD_INSTALL_DATA) $(HEADERS) $(LIBDIR)/caml/; fi
+
+ installopt:
+- cp $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(LIBDIR)/
++ $(BSD_INSTALL_DATA) $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(LIBDIR)/
+ cd $(LIBDIR); $(RANLIB) $(LIBNAME).a
+- if test -f $(LIBNAME).cmxs; then cp $(LIBNAME).cmxs $(LIBDIR)/; fi
++ if test -f $(LIBNAME).cmxs; then $(BSD_INSTALL_DATA) $(LIBNAME).cmxs $(LIBDIR)/; fi
+
+ partialclean:
+ rm -f *.cm*
diff --git a/lang/ocaml/patches/patch-az b/lang/ocaml/patches/patch-otherlibs_dynlink_Makefile
index 3e19d4245f0..2a590abf446 100644
--- a/lang/ocaml/patches/patch-az
+++ b/lang/ocaml/patches/patch-otherlibs_dynlink_Makefile
@@ -1,8 +1,9 @@
-$NetBSD: patch-az,v 1.4 2010/08/19 08:06:53 asau Exp $
+$NetBSD: patch-otherlibs_dynlink_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- otherlibs/dynlink/Makefile.orig 2010-05-28 19:09:22.000000000 +0400
-+++ otherlibs/dynlink/Makefile 2010-08-12 14:56:17.000000000 +0400
-@@ -66,12 +66,12 @@
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/dynlink/Makefile.orig 2012-05-30 13:29:48.000000000 +0000
++++ otherlibs/dynlink/Makefile
+@@ -66,12 +66,12 @@ extract_crc: dynlink.cma extract_crc.cmo
$(CAMLC) $(COMPFLAGS) -o extract_crc dynlink.cma extract_crc.cmo
install:
@@ -14,7 +15,7 @@ $NetBSD: patch-az,v 1.4 2010/08/19 08:06:53 asau Exp $
installopt:
if $(NATDYNLINK); then \
- cp $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR) && \
-+ $(BSD_INSTALL_DATA) $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR); \
++ $(BSD_INSTALL_DATA) $(NATOBJS) dynlink.cmxa dynlink.$(A) $(LIBDIR) && \
cd $(LIBDIR) && $(RANLIB) dynlink.$(A); \
fi
diff --git a/lang/ocaml/patches/patch-otherlibs_labltk_browser_Makefile.shared b/lang/ocaml/patches/patch-otherlibs_labltk_browser_Makefile.shared
new file mode 100644
index 00000000000..f052e4395dd
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_browser_Makefile.shared
@@ -0,0 +1,14 @@
+$NetBSD: patch-otherlibs_labltk_browser_Makefile.shared,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/browser/Makefile.shared.orig 2012-05-30 13:29:48.000000000 +0000
++++ otherlibs/labltk/browser/Makefile.shared
+@@ -63,7 +63,7 @@ help.ml:
+
+ install:
+ if test -f ocamlbrowser$(EXE); then : ; \
+- cp ocamlbrowser$(EXE) $(BINDIR); fi
++ $(BSD_INSTALL_SCRIPT) ocamlbrowser$(EXE) $(BINDIR); fi
+
+ clean:
+ rm -f *.cm? ocamlbrowser$(EXE) dummy.mli *~ *.orig *.$(O) help.ml
diff --git a/lang/ocaml/patches/patch-otherlibs_labltk_camltk_Makefile b/lang/ocaml/patches/patch-otherlibs_labltk_camltk_Makefile
new file mode 100644
index 00000000000..7c685682267
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_camltk_Makefile
@@ -0,0 +1,23 @@
+$NetBSD: patch-otherlibs_labltk_camltk_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/camltk/Makefile.orig 2011-07-27 14:17:02.000000000 +0000
++++ otherlibs/labltk/camltk/Makefile
+@@ -35,13 +35,13 @@ clean:
+ $(MAKE) -f Makefile.gen clean
+
+ install:
+- if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
+- cp $(CAMLTKOBJS:.cmo=.cmi) $(CWIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
++ if test -d $(INSTALLDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALLDIR); fi
++ $(BSD_INSTALL_DATA) $(CAMLTKOBJS:.cmo=.cmi) $(CWIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
+ chmod 644 $(INSTALLDIR)/*.cmi
+
+ installopt:
+- @if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
+- cp $(CAMLTKOBJSX) $(INSTALLDIR)
++ @if test -d $(INSTALLDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALLDIR); fi
++ $(BSD_INSTALL_DATA) $(CAMLTKOBJSX) $(INSTALLDIR)
+ chmod 644 $(INSTALLDIR)/*.cmx
+
+ .SUFFIXES :
diff --git a/lang/ocaml/patches/patch-bd b/lang/ocaml/patches/patch-otherlibs_labltk_compiler_Makefile
index d9a05a572f1..3018c58d5a1 100644
--- a/lang/ocaml/patches/patch-bd
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_compiler_Makefile
@@ -1,8 +1,9 @@
-$NetBSD: patch-bd,v 1.3 2010/08/19 08:06:53 asau Exp $
+$NetBSD: patch-otherlibs_labltk_compiler_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- otherlibs/labltk/compiler/Makefile.orig 2010-01-19 16:12:47.000000000 +0300
-+++ otherlibs/labltk/compiler/Makefile 2010-08-12 14:35:37.000000000 +0400
-@@ -45,8 +45,8 @@
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/compiler/Makefile.orig 2011-07-27 14:17:02.000000000 +0000
++++ otherlibs/labltk/compiler/Makefile
+@@ -61,8 +61,8 @@ scratch :
rm -f *.cm* pplex.ml ppyac.ml ppyac.mli pp$(EXE)
install:
diff --git a/lang/ocaml/patches/patch-otherlibs_labltk_frx_Makefile b/lang/ocaml/patches/patch-otherlibs_labltk_frx_Makefile
new file mode 100644
index 00000000000..12f7f350bdd
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_frx_Makefile
@@ -0,0 +1,18 @@
+$NetBSD: patch-otherlibs_labltk_frx_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/frx/Makefile.orig 2011-07-27 14:17:02.000000000 +0000
++++ otherlibs/labltk/frx/Makefile
+@@ -36,10 +36,10 @@ frxlib.cmxa: $(OBJSX)
+ $(CAMLOPTLIBR) -o frxlib.cmxa $(OBJSX)
+
+ install:
+- cp *.cmi *.mli frxlib.cma $(INSTALLDIR)
++ $(BSD_INSTALL_DATA) *.cmi *.mli frxlib.cma $(INSTALLDIR)
+
+ installopt:
+- cp frxlib.cmxa frxlib.$(A) $(INSTALLDIR)
++ $(BSD_INSTALL_DATA) frxlib.cmxa frxlib.$(A) $(INSTALLDIR)
+
+ clean:
+ rm -f *.cm* *.$(O) *.$(A)
diff --git a/lang/ocaml/patches/patch-otherlibs_labltk_jpf_Makefile b/lang/ocaml/patches/patch-otherlibs_labltk_jpf_Makefile
new file mode 100644
index 00000000000..8d5c2521d6b
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_jpf_Makefile
@@ -0,0 +1,18 @@
+$NetBSD: patch-otherlibs_labltk_jpf_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/jpf/Makefile.orig 2011-07-27 14:17:02.000000000 +0000
++++ otherlibs/labltk/jpf/Makefile
+@@ -37,10 +37,10 @@ jpflib.cmxa: $(OBJSX)
+ $(CAMLOPTLIBR) -o jpflib.cmxa $(OBJSX)
+
+ install:
+- cp $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) jpflib.cma $(INSTALLDIR)
++ $(BSD_INSTALL_DATA) $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) jpflib.cma $(INSTALLDIR)
+
+ installopt:
+- cp jpflib.cmxa jpflib.$(A) $(OBJS:.cmo=.cmx) $(INSTALLDIR)
++ $(BSD_INSTALL_DATA) jpflib.cmxa jpflib.$(A) $(OBJS:.cmo=.cmx) $(INSTALLDIR)
+
+ clean:
+ rm -f *.cm* *.$(O) *.$(A) *~ *test
diff --git a/lang/ocaml/patches/patch-otherlibs_labltk_labltk_Makefile b/lang/ocaml/patches/patch-otherlibs_labltk_labltk_Makefile
new file mode 100644
index 00000000000..a8a055bdb32
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_labltk_Makefile
@@ -0,0 +1,23 @@
+$NetBSD: patch-otherlibs_labltk_labltk_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/labltk/Makefile.orig 2011-07-27 14:17:02.000000000 +0000
++++ otherlibs/labltk/labltk/Makefile
+@@ -32,13 +32,13 @@ labltkobjs: $(LABLTKOBJS)
+ labltkobjsx: $(LABLTKOBJSX)
+
+ install:
+- if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
+- cp $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
++ if test -d $(INSTALLDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALLDIR); fi
++ $(BSD_INSTALL_DATA) $(LABLTKOBJS:.cmo=.cmi) $(WIDGETOBJS:.cmo=.mli) $(INSTALLDIR)
+ chmod 644 $(INSTALLDIR)/*.cmi
+
+ installopt:
+- @if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
+- cp $(LABLTKOBJSX) $(INSTALLDIR)
++ @if test -d $(INSTALLDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALLDIR); fi
++ $(BSD_INSTALL_DATA) $(LABLTKOBJSX) $(INSTALLDIR)
+ chmod 644 $(INSTALLDIR)/*.cmx
+
+ clean:
diff --git a/lang/ocaml/patches/patch-bh b/lang/ocaml/patches/patch-otherlibs_labltk_lib_Makefile
index 9a1f236b7f8..9d1e69bdcae 100644
--- a/lang/ocaml/patches/patch-bh
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_lib_Makefile
@@ -1,9 +1,10 @@
-$NetBSD: patch-bh,v 1.4 2010/08/19 08:06:53 asau Exp $
+$NetBSD: patch-otherlibs_labltk_lib_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- otherlibs/labltk/lib/Makefile.orig 2010-06-08 04:54:09.000000000 +0400
-+++ otherlibs/labltk/lib/Makefile 2010-08-12 14:39:56.000000000 +0400
-@@ -58,26 +58,21 @@
- @echo 'exec $(INSTALLDIR)/$(LIBNAME)top$(EXE) -I $(INSTALLDIR) $$*' >> $@
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/lib/Makefile.orig 2012-05-24 16:17:19.000000000 +0000
++++ otherlibs/labltk/lib/Makefile
+@@ -80,26 +80,21 @@ $(LIBNAME): Makefile $(TOPDIR)/config/Ma
+ @echo 'exec $(INSTALLDIR)/$(LIBNAME)top$(EXE) -I $(INSTALLDIR) "$$@"' >> $@
install-script: $(LIBNAME)
- cp $(LIBNAME) $(BINDIR)
diff --git a/lang/ocaml/patches/patch-otherlibs_labltk_support_Makefile b/lang/ocaml/patches/patch-otherlibs_labltk_support_Makefile
new file mode 100644
index 00000000000..e79a5fa6441
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_labltk_support_Makefile
@@ -0,0 +1,31 @@
+$NetBSD: patch-otherlibs_labltk_support_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/labltk/support/Makefile.orig 2011-09-15 13:38:45.000000000 +0000
++++ otherlibs/labltk/support/Makefile
+@@ -42,19 +42,17 @@ PUBMLI=fileevent.mli protocol.mli textva
+ PUB= $(PUBMLI) $(PUBMLI:.mli=.cmi) tkthread.mli tkthread.cmi tkthread.cmo
+
+ install:
+- if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
+- cp $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
++ if test -d $(INSTALLDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALLDIR); fi
++ $(BSD_INSTALL_DATA) $(PUB) lib$(LIBNAME).$(A) $(INSTALLDIR)
+ cd $(INSTALLDIR); $(RANLIB) lib$(LIBNAME).$(A)
+- cd $(INSTALLDIR); chmod 644 $(PUB) lib$(LIBNAME).$(A)
+ if test -f dll$(LIBNAME)$(EXT_DLL); then \
+- cp dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
++ $(BSD_INSTALL_DATA) dll$(LIBNAME)$(EXT_DLL) $(STUBLIBDIR)/; fi
+
+ installopt:
+- @if test -d $(INSTALLDIR); then : ; else mkdir $(INSTALLDIR); fi
+- cp $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
++ @if test -d $(INSTALLDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALLDIR); fi
++ $(BSD_INSTALL_DATA) $(PUBMLI:.mli=.cmx) $(INSTALLDIR)
+ if test -f tkthread.$(O); then \
+- cp tkthread.cmx tkthread.$(O) $(INSTALLDIR); \
+- chmod 644 $(INSTALLDIR)/tkthread.cmx $(INSTALLDIR)/tkthread.$(O); \
++ $(BSD_INSTALL_DATA) tkthread.cmx tkthread.$(O) $(INSTALLDIR); \
+ fi
+
+ clean:
diff --git a/lang/ocaml/patches/patch-bo b/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile
index c3f56ccb7e6..e3e1f97f5e3 100644
--- a/lang/ocaml/patches/patch-bo
+++ b/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile
@@ -1,8 +1,9 @@
-$NetBSD: patch-bo,v 1.3 2010/08/19 08:06:53 asau Exp $
+$NetBSD: patch-otherlibs_systhreads_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- otherlibs/systhreads/Makefile.orig 2010-04-27 11:55:08.000000000 +0400
-+++ otherlibs/systhreads/Makefile 2010-08-12 14:42:34.000000000 +0400
-@@ -70,19 +70,19 @@
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/systhreads/Makefile.orig 2012-06-08 11:35:37.000000000 +0000
++++ otherlibs/systhreads/Makefile
+@@ -70,19 +70,19 @@ clean: partialclean
rm -f *.o *.a *.so
install:
diff --git a/lang/ocaml/patches/patch-otherlibs_threads_Makefile b/lang/ocaml/patches/patch-otherlibs_threads_Makefile
new file mode 100644
index 00000000000..b22a4700738
--- /dev/null
+++ b/lang/ocaml/patches/patch-otherlibs_threads_Makefile
@@ -0,0 +1,23 @@
+$NetBSD: patch-otherlibs_threads_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- otherlibs/threads/Makefile.orig 2012-04-19 13:12:23.000000000 +0000
++++ otherlibs/threads/Makefile
+@@ -97,12 +97,12 @@ clean: partialclean
+ rm -f pervasives.mli marshal.mli unix.mli
+
+ install:
+- if test -f dllvmthreads.so; then cp dllvmthreads.so $(STUBLIBDIR)/.; fi
+- mkdir -p $(LIBDIR)/vmthreads
+- cp libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
++ if test -f dllvmthreads.so; then $(BSD_INSTALL_DATA) dllvmthreads.so $(STUBLIBDIR)/.; fi
++ $(BSD_INSTALL_DATA_DIR) -p $(LIBDIR)/vmthreads
++ $(BSD_INSTALL_DATA) libvmthreads.a $(LIBDIR)/vmthreads/libvmthreads.a
+ cd $(LIBDIR)/vmthreads; $(RANLIB) libvmthreads.a
+- cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
+- cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)/vmthreads
++ $(BSD_INSTALL_DATA) thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/vmthreads
++ $(BSD_INSTALL_DATA) thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)/vmthreads
+
+ installopt:
+
diff --git a/lang/ocaml/patches/patch-br b/lang/ocaml/patches/patch-stdlib_Makefile
index 1ebf5180fa3..fabc6693f3c 100644
--- a/lang/ocaml/patches/patch-br
+++ b/lang/ocaml/patches/patch-stdlib_Makefile
@@ -1,13 +1,14 @@
-$NetBSD: patch-br,v 1.4 2009/09/07 21:48:14 tonio Exp $
+$NetBSD: patch-stdlib_Makefile,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- stdlib/Makefile.orig 2008-07-24 07:18:31.000000000 +0200
+Use BSD_INSTALL_* instead of mkdir and cp
+--- stdlib/Makefile.orig 2011-07-27 14:17:02.000000000 +0000
+++ stdlib/Makefile
@@ -25,7 +25,7 @@ allopt-prof: stdlib.p.cmxa std_exit.p.cm
installopt: installopt-default installopt-$(PROFILING)
installopt-default:
- cp stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
-+ ${BSD_INSTALL_DATA} stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
++ $(BSD_INSTALL_DATA) stdlib.cmxa stdlib.a std_exit.o *.cmx $(LIBDIR)
cd $(LIBDIR); $(RANLIB) stdlib.a
installopt-noprof:
@@ -16,7 +17,7 @@ $NetBSD: patch-br,v 1.4 2009/09/07 21:48:14 tonio Exp $
installopt-prof:
- cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
-+ ${BSD_INSTALL_DATA} stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
++ $(BSD_INSTALL_DATA) stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(LIBDIR)
cd $(LIBDIR); $(RANLIB) stdlib.p.a
stdlib.p.cmxa: $(OBJS:.cmo=.p.cmx)
diff --git a/lang/ocaml/patches/patch-stdlib_Makefile.shared b/lang/ocaml/patches/patch-stdlib_Makefile.shared
new file mode 100644
index 00000000000..7b20504780c
--- /dev/null
+++ b/lang/ocaml/patches/patch-stdlib_Makefile.shared
@@ -0,0 +1,14 @@
+$NetBSD: patch-stdlib_Makefile.shared,v 1.1 2012/10/08 15:05:33 jaapb Exp $
+
+Use BSD_INSTALL_* instead of mkdir and cp
+--- stdlib/Makefile.shared.orig 2012-04-19 13:12:23.000000000 +0000
++++ stdlib/Makefile.shared
+@@ -41,7 +41,7 @@ OTHERS=array.cmo list.cmo char.cmo strin
+ all: stdlib.cma std_exit.cmo camlheader camlheader_ur
+
+ install: install-$(RUNTIMED)
+- cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur \
++ $(BSD_INSTALL_DATA) stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur \
+ $(LIBDIR)
+
+ install-noruntimed:
diff --git a/lang/ocaml/patches/patch-bs b/lang/ocaml/patches/patch-tools_Makefile.shared
index 66594bd3c51..73dc783a178 100644
--- a/lang/ocaml/patches/patch-bs
+++ b/lang/ocaml/patches/patch-tools_Makefile.shared
@@ -1,8 +1,9 @@
-$NetBSD: patch-bs,v 1.8 2012/03/04 09:06:46 asau Exp $
+$NetBSD: patch-tools_Makefile.shared,v 1.1 2012/10/08 15:05:33 jaapb Exp $
---- tools/Makefile.shared.orig 2010-10-15 19:36:55.000000000 +0400
-+++ tools/Makefile.shared 2012-03-04 07:13:54.000000000 +0400
-@@ -52,9 +52,9 @@
+Use BSD_INSTALL_* instead of mkdir and cp
+--- tools/Makefile.shared.orig 2012-05-31 12:41:49.000000000 +0000
++++ tools/Makefile.shared
+@@ -53,9 +53,9 @@ clean::
rm -f ocamldep.opt
install::
@@ -14,20 +15,26 @@ $NetBSD: patch-bs,v 1.8 2012/03/04 09:06:46 asau Exp $
# The profiler
-@@ -70,9 +70,9 @@
- $(CAMLC) $(LINKFLAGS) -o ocamlcp warnings.cmo main_args.cmo ocamlcp.cmo
+@@ -77,13 +77,13 @@ ocamloptp: ocamloptp.cmo
+ opt:: profiling.cmx
install::
- cp ocamlprof $(BINDIR)/ocamlprof$(EXE)
- cp ocamlcp $(BINDIR)/ocamlcp$(EXE)
+- cp ocamloptp $(BINDIR)/ocamloptp$(EXE)
- cp profiling.cmi profiling.cmo $(LIBDIR)
+ $(BSD_INSTALL_SCRIPT) ocamlprof $(BINDIR)/ocamlprof$(EXE)
+ $(BSD_INSTALL_SCRIPT) ocamlcp $(BINDIR)/ocamlcp$(EXE)
++ $(BSD_INSTALL_SCRIPT) ocamloptp $(BINDIR)/ocamloptp$(EXE)
+ $(BSD_INSTALL_DATA) profiling.cmi profiling.cmo $(LIBDIR)
+ installopt::
+- cp profiling.cmx profiling.o $(LIBDIR)
++ $(BSD_INSTALL_DATA) profiling.cmx profiling.o $(LIBDIR)
+
clean::
- rm -f ocamlprof ocamlcp
-@@ -93,7 +93,7 @@
+ rm -f ocamlprof ocamlcp ocamloptp
+@@ -104,7 +104,7 @@ myocamlbuild_config.ml: ../config/Makefi
cp ../myocamlbuild_config.ml .
install::
@@ -36,16 +43,7 @@ $NetBSD: patch-bs,v 1.8 2012/03/04 09:06:46 asau Exp $
clean::
rm -f ocamlmklib
-@@ -117,7 +117,7 @@
- # To make custom toplevels (see Makefile/Makefile.nt)
-
- install::
-- cp ocamlmktop $(BINDIR)/ # no $(EXE) here, ocamlmktop is a script
-+ $(BSD_INSTALL_SCRIPT) ocamlmktop $(BINDIR)/ # no $(EXE) here, ocamlmktop is a script
-
- clean::
- rm -f ocamlmktop
-@@ -234,8 +234,8 @@
+@@ -280,8 +280,8 @@ objinfo: objinfo_helper$(EXE) $(OBJINFO)
$(CAMLC) -o objinfo $(OBJINFO)
install::