summaryrefslogtreecommitdiff
path: root/lang/ocaml/patches
diff options
context:
space:
mode:
Diffstat (limited to 'lang/ocaml/patches')
-rw-r--r--lang/ocaml/patches/patch-aa8
-rw-r--r--lang/ocaml/patches/patch-ac125
-rw-r--r--lang/ocaml/patches/patch-ah79
-rw-r--r--lang/ocaml/patches/patch-aj13
-rw-r--r--lang/ocaml/patches/patch-ak49
-rw-r--r--lang/ocaml/patches/patch-al35
-rw-r--r--lang/ocaml/patches/patch-am40
-rw-r--r--lang/ocaml/patches/patch-an24
-rw-r--r--lang/ocaml/patches/patch-ao38
-rw-r--r--lang/ocaml/patches/patch-ap24
-rw-r--r--lang/ocaml/patches/patch-aq31
-rw-r--r--lang/ocaml/patches/patch-ar18
-rw-r--r--lang/ocaml/patches/patch-at41
-rw-r--r--lang/ocaml/patches/patch-au12
-rw-r--r--lang/ocaml/patches/patch-av6
-rw-r--r--lang/ocaml/patches/patch-aw31
-rw-r--r--lang/ocaml/patches/patch-ba18
-rw-r--r--lang/ocaml/patches/patch-be14
-rw-r--r--lang/ocaml/patches/patch-bf14
-rw-r--r--lang/ocaml/patches/patch-bk13
-rw-r--r--lang/ocaml/patches/patch-bn10
-rw-r--r--lang/ocaml/patches/patch-bo17
-rw-r--r--lang/ocaml/patches/patch-bp28
-rw-r--r--lang/ocaml/patches/patch-br26
-rw-r--r--lang/ocaml/patches/patch-bs62
-rw-r--r--lang/ocaml/patches/patch-bt63
-rw-r--r--lang/ocaml/patches/patch-bu21
-rw-r--r--lang/ocaml/patches/patch-bv15
28 files changed, 516 insertions, 359 deletions
diff --git a/lang/ocaml/patches/patch-aa b/lang/ocaml/patches/patch-aa
index 69f8af25d4f..1ede31ba943 100644
--- a/lang/ocaml/patches/patch-aa
+++ b/lang/ocaml/patches/patch-aa
@@ -1,8 +1,8 @@
-$NetBSD: patch-aa,v 1.3 2004/04/22 09:18:36 tron Exp $
+$NetBSD: patch-aa,v 1.4 2005/02/04 21:35:51 adrianp Exp $
---- asmcomp/i386/emit.mlp.orig Mon Jul 22 18:37:50 2002
-+++ asmcomp/i386/emit.mlp Thu Apr 22 10:34:38 2004
-@@ -734,7 +734,7 @@
+--- asmcomp/i386/emit.mlp.orig 2004-10-10 22:25:58.000000000 +0100
++++ asmcomp/i386/emit.mlp 2004-10-10 22:26:21.000000000 +0100
+@@ -771,7 +771,7 @@
` movl %esp, %ebp\n`;
` pushl %ecx\n`;
` pushl %edx\n`;
diff --git a/lang/ocaml/patches/patch-ac b/lang/ocaml/patches/patch-ac
index 071e6c27e16..24fbeacf619 100644
--- a/lang/ocaml/patches/patch-ac
+++ b/lang/ocaml/patches/patch-ac
@@ -1,69 +1,8 @@
-$NetBSD: patch-ac,v 1.3 2004/04/22 09:18:36 tron Exp $
+$NetBSD: patch-ac,v 1.4 2005/02/04 21:35:51 adrianp Exp $
---- asmcomp/power/emit.mlp.orig Mon Jul 22 18:37:53 2002
-+++ asmcomp/power/emit.mlp Thu Apr 22 10:34:38 2004
-@@ -65,7 +65,7 @@
-
- let emit_symbol =
- match Config.system with
-- "aix" | "elf" -> (fun s -> Emitaux.emit_symbol '.' s)
-+ "aix" | "elf" | "bsd" -> (fun s -> Emitaux.emit_symbol '.' s)
- | "rhapsody" -> (fun s -> emit_char '_'; Emitaux.emit_symbol '$' s)
- | _ -> assert false
-
-@@ -78,7 +78,7 @@
- let label_prefix =
- match Config.system with
- "aix" -> "L.."
-- | "elf" -> ".L"
-+ | "elf" | "bsd" -> ".L"
- | "rhapsody" -> "L"
- | _ -> assert false
-
-@@ -90,21 +90,21 @@
- let data_space =
- match Config.system with
- "aix" -> " .csect .data[RW]\n"
-- | "elf" -> " .section \".data\"\n"
-+ | "elf" | "bsd" -> " .section \".data\"\n"
- | "rhapsody" -> " .data\n"
- | _ -> assert false
-
- let code_space =
- match Config.system with
- "aix" -> " .csect .text[PR]\n"
-- | "elf" -> " .section \".text\"\n"
-+ | "elf" | "bsd" -> " .section \".text\"\n"
- | "rhapsody" -> " .text\n"
- | _ -> assert false
-
- let rodata_space =
- match Config.system with
- "aix" -> " .csect .data[RW]\n" (* ?? *)
-- | "elf" -> " .section \".rodata\"\n"
-+ | "elf" | "bsd" -> " .section \".rodata\"\n"
- | "rhapsody" -> " .const\n"
- | _ -> assert false
-
-@@ -157,7 +157,7 @@
-
- let emit_upper emit_fun arg =
- match Config.system with
-- "elf" ->
-+ "elf" | "bsd" ->
- emit_fun arg; emit_string "@ha"
- | "rhapsody" ->
- emit_string "ha16("; emit_fun arg; emit_string ")"
-@@ -165,7 +165,7 @@
-
- let emit_lower emit_fun arg =
- match Config.system with
-- "elf" ->
-+ "elf" | "bsd" ->
- emit_fun arg; emit_string "@l"
- | "rhapsody" ->
- emit_string "lo16("; emit_fun arg; emit_string ")"
-@@ -935,6 +935,30 @@
+--- asmcomp/power/emit.mlp.orig 2004-10-14 15:39:35.000000000 +0100
++++ asmcomp/power/emit.mlp 2004-10-14 15:41:11.000000000 +0100
+@@ -793,6 +793,30 @@
emit_instr i None;
emit_all i.next
@@ -72,47 +11,25 @@ $NetBSD: patch-ac,v 1.3 2004/04/22 09:18:36 tron Exp $
+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`;
++ ` 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 =
-@@ -951,10 +975,11 @@
- ` .csect {emit_symbol fundecl.fun_name}[DS]\n`;
- `{emit_symbol fundecl.fun_name}:\n`;
- ` .long .{emit_symbol fundecl.fun_name}, TOC[tc0], 0\n`
-- | "elf" ->
-+ | "elf" | "bsd" ->
- ` .type {emit_symbol fundecl.fun_name}, @function\n`
- | _ -> ()
- end;
-+ if !Clflags.gprofile then emit_profile();
- emit_string code_space;
- ` .align 2\n`;
- `{emit_codesymbol fundecl.fun_name}:\n`;
-@@ -996,7 +1021,7 @@
-
- let declare_global_data s =
- ` .globl {emit_symbol s}\n`;
-- if Config.system = "elf" then
-+ if Config.system = "elf" || Config.system = "bsd" then
- ` .type {emit_symbol s}, @object\n`
-
- let emit_item = function
diff --git a/lang/ocaml/patches/patch-ah b/lang/ocaml/patches/patch-ah
index 7b753271d3e..8541238447e 100644
--- a/lang/ocaml/patches/patch-ah
+++ b/lang/ocaml/patches/patch-ah
@@ -1,8 +1,10 @@
-$NetBSD: patch-ah,v 1.6 2004/04/23 03:06:02 danw Exp $
+$NetBSD: patch-ah,v 1.7 2005/02/04 21:35:51 adrianp Exp $
---- asmrun/power-bsd.S.orig Thu Apr 22 21:34:41 2004
-+++ asmrun/power-bsd.S
-@@ -15,2 +15,31 @@
+--- asmrun/power-bsd.S.orig 2004-10-14 15:48:54.000000000 +0100
++++ asmrun/power-bsd.S 2004-10-14 15:55:11.000000000 +0100
+@@ -13,6 +13,35 @@
+
+ /* $Id: patch-ah,v 1.7 2005/02/04 21:35:51 adrianp Exp $ */
+#if defined(PROFILING)
+#define PROFILE_CAML \
@@ -34,34 +36,61 @@ $NetBSD: patch-ah,v 1.6 2004/04/23 03:06:02 danw Exp $
+#endif
+
#define Addrglobal(reg,glob) \
-@@ -32,2 +61,3 @@
+ addis reg, 0, glob@ha; \
+ addi reg, reg, glob@l
+@@ -30,6 +59,7 @@
+ .globl caml_call_gc
+ .type caml_call_gc, @function
caml_call_gc:
-+ PROFILE_CAML
++ PROFILE_CAML
/* Set up stack frame */
-@@ -184,2 +214,3 @@ caml_call_gc:
+ stwu 1, -0x1A0(1)
+ /* 0x1A0 = 4*32 (int regs) + 8*32 (float regs) + 32 (space for C call) */
+@@ -182,6 +212,7 @@
+ .globl caml_c_call
+ .type caml_c_call, @function
caml_c_call:
-+ PROFILE_CAML
++ PROFILE_CAML
/* Save return address */
-@@ -212,2 +243,3 @@ caml_c_call:
- raise_caml_exception:
-+ PROFILE_C
+ mflr 25
+ /* Get ready to call C function (address in 11) */
+@@ -210,6 +241,7 @@
+ .globl caml_raise_exception
+ .type caml_raise_exception, @function
+ caml_raise_exception:
++ PROFILE_CAML
/* Reload Caml global registers */
-@@ -232,2 +264,3 @@ raise_caml_exception:
+ Loadglobal(1, caml_exception_pointer, 11)
+ Loadglobal(31, caml_young_ptr, 11)
+@@ -230,6 +262,7 @@
+ .globl caml_start_program
+ .type caml_start_program, @function
caml_start_program:
-+ PROFILE_C
++ PROFILE_CAML
Addrglobal(12, caml_program)
-@@ -382,2 +415,3 @@ caml_start_program:
- callback_exn:
-+ PROFILE_C
+
+ /* Code shared between caml_start_program and caml_callback */
+@@ -380,6 +413,7 @@
+ .globl caml_callback_exn
+ .type caml_callback_exn, @function
+ caml_callback_exn:
++ PROFILE_CAML
/* Initial shuffling of arguments */
-@@ -392,2 +426,3 @@ callback_exn:
- callback2_exn:
-+ PROFILE_C
mr 0, 3 /* Closure */
-@@ -402,2 +437,3 @@ callback2_exn:
- callback3_exn:
-+ PROFILE_C
+ mr 3, 4 /* Argument */
+@@ -390,6 +424,7 @@
+ .globl caml_callback2_exn
+ .type caml_callback2_exn, @function
+ caml_callback2_exn:
++ PROFILE_CAML
+ mr 0, 3 /* Closure */
+ mr 3, 4 /* First argument */
+ mr 4, 5 /* Second argument */
+@@ -400,6 +435,7 @@
+ .globl caml_callback3_exn
+ .type caml_callback3_exn, @function
+ caml_callback3_exn:
++ PROFILE_CAML
mr 0, 3 /* Closure */
-@@ -420,2 +456 @@ system__frametable:
- .short 0 /* no roots here */
--
+ mr 3, 4 /* First argument */
+ mr 4, 5 /* Second argument */
diff --git a/lang/ocaml/patches/patch-aj b/lang/ocaml/patches/patch-aj
index 17834af6dc5..d96640913a8 100644
--- a/lang/ocaml/patches/patch-aj
+++ b/lang/ocaml/patches/patch-aj
@@ -1,8 +1,8 @@
-$NetBSD: patch-aj,v 1.3 2004/04/22 09:18:37 tron Exp $
+$NetBSD: patch-aj,v 1.4 2005/02/04 21:35:51 adrianp Exp $
---- byterun/Makefile.orig Thu Apr 18 09:27:36 2002
-+++ byterun/Makefile Thu Apr 22 10:34:37 2004
-@@ -48,10 +48,10 @@
+--- byterun/Makefile.orig 2004-07-16 17:11:33.000000000 +0100
++++ byterun/Makefile 2004-10-15 16:08:41.000000000 +0100
+@@ -48,14 +48,14 @@
prims.o libcamlrund.a $(BYTECCLIBS)
install:
@@ -16,3 +16,8 @@ $NetBSD: patch-aj,v 1.3 2004/04/22 09:18:37 tron Exp $
for i in $(PUBLIC_INCLUDES); do \
sed -f ../tools/cleanup-header $$i > $(LIBDIR)/caml/$$i; \
done
+- cp ld.conf $(LIBDIR)/ld.conf
++ ${BSD_INSTALL_DATA} ld.conf $(LIBDIR)/ld.conf
+
+ ld.conf:
+ echo "$(STUBLIBDIR)" >ld.conf
diff --git a/lang/ocaml/patches/patch-ak b/lang/ocaml/patches/patch-ak
index f7e0bb7c5c7..eeb3ee06520 100644
--- a/lang/ocaml/patches/patch-ak
+++ b/lang/ocaml/patches/patch-ak
@@ -1,27 +1,32 @@
-$NetBSD: patch-ak,v 1.2 2004/04/22 09:18:37 tron Exp $
+$NetBSD: patch-ak,v 1.3 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/etc/Makefile.orig Fri Jul 19 16:53:45 2002
-+++ camlp4/etc/Makefile Thu Apr 22 10:34:37 2004
-@@ -52,14 +52,14 @@
+--- camlp4/etc/Makefile.orig 2004-10-14 16:00:16.000000000 +0100
++++ camlp4/etc/Makefile 2004-10-14 16:05:43.000000000 +0100
+@@ -68,18 +68,19 @@
get_promote:
install:
-- -$(MKDIR) $(LIBDIR)/camlp4 $(BINDIR)
-- cp $(OBJS) $(LIBDIR)/camlp4/.
-- cp $(INTF) $(LIBDIR)/camlp4/.
-- cp lib.sml $(LIBDIR)/camlp4/.
-- cp camlp4o$(EXE) $(BINDIR)/.
-- if test -f $(COPT); then cp $(COPT) $(BINDIR)/.; fi
-- cp mkcamlp4.sh $(BINDIR)/mkcamlp4
-- chmod a+x $(BINDIR)/mkcamlp4
-+ -${BSD_INSTALL_DATA_DIR} $(LIBDIR)/camlp4
-+ -${BSD_INSTALL_PROGRAM_DIR} $(BINDIR)
-+ ${BSD_INSTALL_DATA} $(OBJS) $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_DATA} $(INTF) $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_DATA} lib.sml $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_SCRIPT} camlp4o$(EXE) $(BINDIR)/.
-+ if test -f $(COPT); then ${BSD_INSTALL_PROGRAM} $(COPT) $(BINDIR)/.; fi
-+ ${BSD_INSTALL_SCRIPT} mkcamlp4.sh $(BINDIR)/mkcamlp4
+- -$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)"
+- cp $(OBJS) "$(LIBDIR)/camlp4/."
+- cp $(INTF) "$(LIBDIR)/camlp4/."
+- cp camlp4o$(EXE) "$(BINDIR)/."
++ -${BSD_INSTALL_DATA_DIR} "$(LIBDIR)/camlp4"
++ -${BSD_INSTALL_PROGRAM_DIR} "$(BINDIR)"
++ ${BSD_INSTALL_DATA} $(OBJS) "$(LIBDIR)/camlp4/."
++ ${BSD_INSTALL_DATA} $(INTF) "$(LIBDIR)/camlp4/."
++ ${BSD_INSTALL_SCRIPT} camlp4o$(EXE) "$(BINDIR)/."
+ if test -f camlp4o.opt; then \
+- cp camlp4o.opt "$(BINDIR)/camlp4o.opt$(EXE)"; \
+- cp $(OBJSX) "$(LIBDIR)/camlp4/."; \
++ ${BSD_INSTALL_SCRIPT} camlp4o.opt "$(BINDIR)/camlp4o.opt$(EXE)"; \
++ ${BSD_INSTALL_DATA} $(OBJSX) "$(LIBDIR)/camlp4/."; \
+ for file in $(OBJSX); do \
+- cp "`echo $$file | sed -e 's/\.cmx$$/.$(O)/'`" "$(LIBDIR)/camlp4/."; \
++ ${BSD_INSTALL_DATA} "`echo $$file | sed -e 's/\.cmx$$/.$(O)/'`" "$(LIBDIR)/camlp4/."; \
+ done ; \
+ fi
+- cp mkcamlp4.sh "$(BINDIR)/mkcamlp4"
++ ${BSD_INSTALL_SCRIPT} mkcamlp4.sh "$(BINDIR)/mkcamlp4"
+ chmod a+x "$(BINDIR)/mkcamlp4"
- pa_lisp.cmo: pa_lispr.cmo
- pa_ocamllex.cmo: pa_o.cmo
+ pr_extend.cmo: pa_extfun.cmo
diff --git a/lang/ocaml/patches/patch-al b/lang/ocaml/patches/patch-al
index 4fabf5e248d..e7baa297b54 100644
--- a/lang/ocaml/patches/patch-al
+++ b/lang/ocaml/patches/patch-al
@@ -1,19 +1,15 @@
-$NetBSD: patch-al,v 1.3 2004/04/22 09:18:37 tron Exp $
+$NetBSD: patch-al,v 1.4 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/camlp4/Makefile.orig Mon Aug 5 15:50:25 2002
-+++ camlp4/camlp4/Makefile Thu Apr 22 10:34:37 2004
-@@ -62,11 +62,19 @@
- done
-
+--- camlp4/camlp4/Makefile.orig 2004-10-14 16:06:37.000000000 +0100
++++ camlp4/camlp4/Makefile 2004-10-14 16:10:46.000000000 +0100
+@@ -71,18 +71,26 @@
install:
-- -$(MKDIR) $(BINDIR)
-- -$(MKDIR) $(LIBDIR)/camlp4
-- cp $(CAMLP4) $(BINDIR)/.
-- cp mLast.mli quotation.mli ast2pt.mli pcaml.mli spretty.mli $(LIBDIR)/camlp4/.
-- cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi $(LIBDIR)/camlp4/.
+ -$(MKDIR) "$(BINDIR)"
+ -$(MKDIR) "$(LIBDIR)/camlp4"
+- cp $(CAMLP4) "$(BINDIR)/."
+- cp mLast.mli quotation.mli ast2pt.mli pcaml.mli spretty.mli "$(LIBDIR)/camlp4/."
+- cp mLast.cmi quotation.cmi ast2pt.cmi pcaml.cmi spretty.cmi "$(LIBDIR)/camlp4/."
- cp camlp4.cma $(LIBDIR)/camlp4/.
-+ -${BSD_INSTALL_PROGRAM_DIR} $(BINDIR)
-+ -${BSD_INSTALL_DATA_DIR} $(LIBDIR)/camlp4
+ ${BSD_INSTALL_SCRIPT} $(CAMLP4) $(BINDIR)/.
+ ${BSD_INSTALL_DATA} mLast.mli $(LIBDIR)/camlp4/
+ ${BSD_INSTALL_DATA} quotation.mli $(LIBDIR)/camlp4/
@@ -26,5 +22,16 @@ $NetBSD: patch-al,v 1.3 2004/04/22 09:18:37 tron Exp $
+ ${BSD_INSTALL_DATA} pcaml.cmi $(LIBDIR)/camlp4/
+ ${BSD_INSTALL_DATA} spretty.cmi $(LIBDIR)/camlp4/
+ ${BSD_INSTALL_DATA} camlp4.cma $(LIBDIR)/camlp4/
+ for f in camlp4.$(A) camlp4.p.$(A) ; do \
+ if test -f $$f ; then \
+- cp $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \
++ ${BSD_INSTALL_DATA} $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \
+ fi ; \
+ done
+ for f in camlp4.cmxa camlp4.p.cmxa ; do \
+ if test -f $$f ; then \
+- cp $$f "$(LIBDIR)/camlp4/." ; \
++ ${BSD_INSTALL_DATA} $$f "$(LIBDIR)/camlp4/." ; \
+ fi ; \
+ done
- include .depend
diff --git a/lang/ocaml/patches/patch-am b/lang/ocaml/patches/patch-am
index c0f709183d1..1f7be0b3d11 100644
--- a/lang/ocaml/patches/patch-am
+++ b/lang/ocaml/patches/patch-am
@@ -1,25 +1,29 @@
-$NetBSD: patch-am,v 1.2 2004/04/22 09:18:37 tron Exp $
+$NetBSD: patch-am,v 1.3 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/lib/Makefile.orig Fri Jul 19 16:53:47 2002
-+++ camlp4/lib/Makefile Thu Apr 22 10:34:37 2004
-@@ -36,15 +36,15 @@
+--- camlp4/lib/Makefile.orig 2004-10-14 16:11:43.000000000 +0100
++++ camlp4/lib/Makefile 2004-10-14 16:14:08.000000000 +0100
+@@ -42,19 +42,19 @@
done
install:
-- -$(MKDIR) $(LIBDIR)/camlp4
-- cp $(TARGET) *.mli $(LIBDIR)/camlp4/.
-- cp *.cmi $(LIBDIR)/camlp4/.
+- -$(MKDIR) "$(LIBDIR)/camlp4"
+- cp $(TARGET) *.mli "$(LIBDIR)/camlp4/."
+- cp *.cmi "$(LIBDIR)/camlp4/."
+ -${BSD_INSTALL_DATA_DIR} $(LIBDIR)/camlp4
-+ ${BSD_INSTALL_DATA} $(TARGET) *.mli $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_DATA} *.cmi $(LIBDIR)/camlp4/.
- if test -f $(TARGET:.cma=.cmxa); then $(MAKE) installopt LIBDIR=$(LIBDIR); fi
++ ${BSD_INSTALL_DATA} $(TARGET) *.mli "$(LIBDIR)/camlp4/."
++ ${BSD_INSTALL_DATA} *.cmi "$(LIBDIR)/camlp4/."
+ test -f $(TARGET:.cma=.cmxa) && $(MAKE) installopt LIBDIR="$(LIBDIR)" || true
installopt:
-- cp $(TARGET:.cma=.cmxa) *.cmx $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_DATA} $(TARGET:.cma=.cmxa) *.cmx $(LIBDIR)/camlp4/.
- if test -f $(TARGET:.cma=.lib); then \
-- cp $(TARGET:.cma=.lib) $(LIBDIR)/camlp4/.; \
-+ ${BSD_INSTALL_DATA} $(TARGET:.cma=.lib) $(LIBDIR)/camlp4/.; \
- else \
- tar cf - $(TARGET:.cma=.a) | (cd $(LIBDIR)/camlp4/.; tar xf -); \
- fi
+ for f in $(TARGET:.cma=.cmxa) $(TARGET:.cma=.p.cmxa) *.cmx ; do \
+- test -f $$f && cp $$f "$(LIBDIR)/camlp4/." || true ; \
++ test -f $$f && ${BSD_INSTALL_DATA} $$f "$(LIBDIR)/camlp4/." || true ; \
+ done
+ # Special treatment for this one: some versions of make don't like $(A) in $(TARGET:.cma=.$(A))
+ target="`echo $(TARGET) | sed -e 's/\.cma$$/.$(A)/'`" ; \
+ if test -f $$target ; then \
+- cp $$target "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$target ) \
++ ${BSD_INSTALL_DATA} $$target "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$target ) \
+ fi
+
+ include .depend
diff --git a/lang/ocaml/patches/patch-an b/lang/ocaml/patches/patch-an
index 9df4d46b84f..66831b382e0 100644
--- a/lang/ocaml/patches/patch-an
+++ b/lang/ocaml/patches/patch-an
@@ -1,15 +1,15 @@
-$NetBSD: patch-an,v 1.1 2004/04/22 09:18:38 tron Exp $
+$NetBSD: patch-an,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/man/Makefile.orig Fri Jul 19 16:53:49 2002
-+++ camlp4/man/Makefile Thu Apr 22 10:34:37 2004
-@@ -14,8 +14,8 @@
- get_promote:
+--- camlp4/man/Makefile.orig 2003-07-03 17:14:49.000000000 +0100
++++ camlp4/man/Makefile 2004-10-12 22:28:52.000000000 +0100
+@@ -16,8 +16,8 @@
install:
-- -$(MKDIR) $(MANDIR)/man1
-- -cp $(TARGET) $(MANDIR)/man1/.
-+ -${BSD_INSTALL_MAN_DIR} $(MANDIR)/man1
-+ -${BSD_INSTALL_MAN} $(TARGET) $(MANDIR)/man1/.
- -cd $(MANDIR)/man1; rm -f camlp4o.1; ln -s $(TARGET) camlp4o.1
- -cd $(MANDIR)/man1; rm -f camlp4r.1; ln -s $(TARGET) camlp4r.1
- -cd $(MANDIR)/man1; rm -f mkcamlp4.1; ln -s $(TARGET) mkcamlp4.1
+ 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-ao b/lang/ocaml/patches/patch-ao
index bdba1553373..2748838c32f 100644
--- a/lang/ocaml/patches/patch-ao
+++ b/lang/ocaml/patches/patch-ao
@@ -1,20 +1,28 @@
-$NetBSD: patch-ao,v 1.2 2004/04/22 09:18:38 tron Exp $
+$NetBSD: patch-ao,v 1.3 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/meta/Makefile.orig Fri Jul 19 16:53:49 2002
-+++ camlp4/meta/Makefile Thu Apr 22 10:34:37 2004
-@@ -42,10 +42,11 @@
+--- camlp4/meta/Makefile.orig 2004-10-14 16:17:42.000000000 +0100
++++ camlp4/meta/Makefile 2004-10-14 16:19:48.000000000 +0100
+@@ -43,15 +43,16 @@
done
install:
-- -$(MKDIR) $(LIBDIR)/camlp4 $(BINDIR)
-- cp $(OBJS) $(LIBDIR)/camlp4/.
-- cp pa_ifdef.cmi pa_extend.cmi $(LIBDIR)/camlp4/.
-- cp camlp4r$(EXE) $(BINDIR)/.
-+ -${BSD_INSTALL_DATA_DIR} $(LIBDIR)/camlp4
-+ -${BSD_INSTALL_PROGRAM_DIR} $(BINDIR)
-+ ${BSD_INSTALL_DATA} $(OBJS) $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_DATA} pa_ifdef.cmi pa_extend.cmi $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_SCRIPT} camlp4r$(EXE) $(BINDIR)/.
- if test -f $(COPT); then cp $(COPT) $(BINDIR)/.; fi
+- -$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)"
+- cp $(OBJS) "$(LIBDIR)/camlp4/."
+- cp pa_macro.cmi pa_extend.cmi "$(LIBDIR)/camlp4/."
+- cp camlp4r$(EXE) "$(BINDIR)/."
++ -${BSD_INSTALL_DATA_DIR} "$(LIBDIR)/camlp4"
++ -${BSD_INSTALL_PROGRAM_DIR} "$(BINDIR)"
++ ${BSD_INSTALL_DATA} $(OBJS) "$(LIBDIR)/camlp4/."
++ ${BSD_INSTALL_DATA} pa_macro.cmi pa_extend.cmi "$(LIBDIR)/camlp4/."
++ ${BSD_INSTALL_SCRIPT} camlp4r$(EXE) "$(BINDIR)/."
+ if test -f camlp4r.opt; then \
+- cp camlp4r.opt "$(BINDIR)/camlp4r.opt$(EXE)" ;\
+- cp $(OBJSX) "$(LIBDIR)/camlp4/."; \
++ ${BSD_INSTALL_SCRIPT} camlp4r.opt "$(BINDIR)/camlp4r.opt$(EXE)" ;\
++ ${BSD_INSTALL_DATA} $(OBJSX) "$(LIBDIR)/camlp4/."; \
+ for file in $(OBJSX); do \
+- cp "`echo $$file | sed -e 's/\.cmx$$/.$(O)/'`" "$(LIBDIR)/camlp4/."; \
++ ${BSD_INSTALL_DATA} "`echo $$file | sed -e 's/\.cmx$$/.$(O)/'`" "$(LIBDIR)/camlp4/."; \
+ done ; \
+ fi
- include .depend
diff --git a/lang/ocaml/patches/patch-ap b/lang/ocaml/patches/patch-ap
index 4f92706076c..043869ccf9d 100644
--- a/lang/ocaml/patches/patch-ap
+++ b/lang/ocaml/patches/patch-ap
@@ -1,17 +1,17 @@
-$NetBSD: patch-ap,v 1.1 2004/04/22 09:18:38 tron Exp $
+$NetBSD: patch-ap,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/ocpp/Makefile.orig Sun Jan 20 16:12:28 2002
-+++ camlp4/ocpp/Makefile Thu Apr 22 10:34:37 2004
-@@ -24,8 +24,9 @@
- rm -f *.cm[ioa] *.pp[io] *.o *.out *.bak .*.bak crc.ml ocpp$(EXE)
+--- camlp4/ocpp/Makefile.orig 2004-10-14 16:20:22.000000000 +0100
++++ camlp4/ocpp/Makefile 2004-10-14 16:21:32.000000000 +0100
+@@ -18,8 +18,9 @@
+ rm -f *.cm[ioa] *.pp[io] *.o *.out *.bak .*.bak ocpp$(EXE)
install:
-- -$(MKDIR) $(LIBDIR)/camlp4 $(BINDIR)
-- cp $(OBJS) $(LIBDIR)/camlp4/.
-- cp ocpp$(EXE) $(BINDIR)/.
-+ -${BSD_INSTALL_DATA_DIR} $(LIBDIR)/camlp4
-+ -${BSD_INSTALL_PROGRAM_DIR} $(BINDIR)
-+ ${BSD_INSTALL_DATA} $(OBJS) $(LIBDIR)/camlp4/.
-+ ${BSD_INSTALL_SCRIPT} ocpp$(EXE) $(BINDIR)/.
+- -$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)"
+- cp $(OBJS) "$(LIBDIR)/camlp4/."
+- cp ocpp$(EXE) "$(BINDIR)/."
++ -${BSD_INSTALL_DATA_DIR} "$(LIBDIR)/camlp4"
++ -${BSD_INSTALL_DATA_DIR} "$(BINDIR)"
++ ${BSD_INSTALL_DATA} $(OBJS) "$(LIBDIR)/camlp4/."
++ ${BSD_INSTALL_SCRIPT} ocpp$(EXE) "$(BINDIR)/."
depend:
diff --git a/lang/ocaml/patches/patch-aq b/lang/ocaml/patches/patch-aq
index a1f19046c79..7304df87d4e 100644
--- a/lang/ocaml/patches/patch-aq
+++ b/lang/ocaml/patches/patch-aq
@@ -1,15 +1,26 @@
-$NetBSD: patch-aq,v 1.1 2004/04/22 09:18:38 tron Exp $
+$NetBSD: patch-aq,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/odyl/Makefile.orig Fri Jul 19 16:53:56 2002
-+++ camlp4/odyl/Makefile Thu Apr 22 10:34:37 2004
-@@ -51,7 +51,8 @@
+--- camlp4/odyl/Makefile.orig 2004-10-15 15:13:11.000000000 +0100
++++ camlp4/odyl/Makefile 2004-10-15 15:14:30.000000000 +0100
+@@ -66,16 +66,17 @@
compare:
install:
-- -$(MKDIR) $(LIBDIR)/camlp4 $(BINDIR)
-- cp odyl.cmo odyl.cma $(LIBDIR)/camlp4/.
-+ -${BSD_INSTALL_DATA_DIR} $(LIBDIR)/camlp4
-+ -${BSD_INSTALL_DATA_DIR} $(BINDIR)
-+ ${BSD_INSTALL_DATA} odyl.cmo odyl.cma $(LIBDIR)/camlp4/.
+- -$(MKDIR) "$(LIBDIR)/camlp4" "$(BINDIR)"
+- cp odyl.cmo odyl.cma odyl_main.cmi $(LIBDIR)/camlp4/.
++ -${BSD_INSTALL_DATA_DIR} "$(LIBDIR)/camlp4"
++ -${BSD_INSTALL_DATA_DIR} "$(BINDIR)"
++ ${BSD_INSTALL_DATA} odyl.cmo odyl.cma odyl_main.cmi $(LIBDIR)/camlp4/.
+ for f in odyl.$(A) odyl.p.$(A) ; do \
+ if test -f $$f ; then \
+- cp $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \
++ ${BSD_INSTALL_DATA} $$f "$(LIBDIR)/camlp4/." && ( cd "$(LIBDIR)/camlp4/." && $(RANLIB) $$f ) ; \
+ fi ; \
+ done
+ for f in odyl.cmx odyl.o odyl.p.cmx odyl.p.o odyl.cmxa odyl.p.cmxa ; do \
+ if test -f $$f ; then \
+- cp $$f "$(LIBDIR)/camlp4/." ; \
++ ${BSD_INSTALL_DATA} $$f "$(LIBDIR)/camlp4/." ; \
+ fi ; \
+ done
- include .depend
diff --git a/lang/ocaml/patches/patch-ar b/lang/ocaml/patches/patch-ar
index 6bbe7ad9fe6..7b2c61ac088 100644
--- a/lang/ocaml/patches/patch-ar
+++ b/lang/ocaml/patches/patch-ar
@@ -1,16 +1,14 @@
-$NetBSD: patch-ar,v 1.1 2004/04/22 09:18:38 tron Exp $
+$NetBSD: patch-ar,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- camlp4/top/Makefile.orig Fri Jul 19 16:53:56 2002
-+++ camlp4/top/Makefile Thu Apr 22 10:34:37 2004
-@@ -42,7 +42,9 @@
+--- camlp4/top/Makefile.orig 2004-10-15 15:15:30.000000000 +0100
++++ camlp4/top/Makefile 2004-10-15 15:16:24.000000000 +0100
+@@ -42,7 +42,7 @@
get_promote:
install:
-- -$(MKDIR) $(LIBDIR)/camlp4
-- cp $(TARGET) $(LIBDIR)/camlp4/.
-+ -${BSD_INSTALL_DATA_DIR} $(LIBDIR)/camlp4
-+ for i in $(TARGET); do \
-+ ${BSD_INSTALL_DATA} $$i $(LIBDIR)/camlp4/ ; \
-+ done
+- -$(MKDIR) "$(LIBDIR)/camlp4"
+- cp $(TARGET) "$(LIBDIR)/camlp4/."
++ -${BSD_INSTALL_DATA_DIR} "$(LIBDIR)/camlp4"
++ ${BSD_INSTALL_DATA} $(TARGET) "$(LIBDIR)/camlp4/."
include .depend
diff --git a/lang/ocaml/patches/patch-at b/lang/ocaml/patches/patch-at
index cdc92f277cc..f00f3856994 100644
--- a/lang/ocaml/patches/patch-at
+++ b/lang/ocaml/patches/patch-at
@@ -1,39 +1,24 @@
-$NetBSD: patch-at,v 1.3 2005/01/24 21:18:16 tv Exp $
+$NetBSD: patch-at,v 1.4 2005/02/04 21:35:51 adrianp Exp $
---- configure.orig 2002-08-07 08:45:00.000000000 -0400
-+++ configure
-@@ -522,12 +522,14 @@ case "$host" in
+--- configure.orig Tue Jan 25 20:13:20 2005
++++ configure Tue Jan 25 20:16:11 2005
+@@ -573,6 +573,7 @@
i[3456]86-*-solaris*) arch=i386; system=solaris;;
i[3456]86-*-beos*) arch=i386; system=beos;;
i[3456]86-*-cygwin*) arch=i386; system=cygwin;;
+ i[3456]86-*-interix3*) arch=i386; system=interix3;;
mips-*-irix6*) arch=mips; system=irix;;
hppa1.1-*-hpux*) arch=hppa; system=hpux;;
- hppa1.1-*-nextstep*) arch=hppa; system=nextstep;;
- rs6000-*-aix*) arch=power; model=rs6000; system=aix;;
- powerpc-*-aix*) arch=power; model=ppc; system=aix;;
- powerpc-*-linux*) arch=power; model=ppc; system=elf;;
-+ powerpc-*-netbsd*) arch=power; model=ppc; system=bsd;;
- powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;;
- powerpc-*-darwin*) arch=power; model=ppc; system=rhapsody;;
- arm*-*-linux*) arch=arm; system=linux;;
-@@ -591,6 +593,7 @@ case "$arch,$model,$system" in
- power,rs6000,aix) asflags='-u -m pwr -w'; asppflags="$asflags";;
- power,ppc,aix) asflags='-u -m ppc -w'; asppflags="$asflags";;
- power,*,elf) aspp='gcc'; asppflags='-c';;
-+ power,*,bsd) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
- power,*,rhapsody) ;;
- arm,*,linux) aspp='gcc'; asppflags='-c -DSYS_$(SYSTEM)';;
- ia64,*,linux) asflags=-xexplicit
-@@ -601,6 +604,7 @@ case "$arch,$model,$system" in
- alpha,*,digital) profiling='prof';;
- i386,*,linux_elf) profiling='prof';;
- i386,*,bsd_elf) profiling='prof';;
+ hppa2.0*-*-hpux*) arch=hppa; system=hpux;;
+@@ -657,6 +658,7 @@
+ profiling='prof'
+ case "$nativecc" in gcc*) ;; *) cc_profile='-xpg';; esac;;
+ amd64,*,linux) profiling='prof';;
+ power,*,bsd) profiling='prof';;
*) profiling='noprof';;
esac
-@@ -1044,6 +1048,7 @@ fi
+@@ -1113,6 +1115,7 @@
x11_include="not found"
x11_link="not found"
@@ -41,11 +26,11 @@ $NetBSD: patch-at,v 1.3 2005/01/24 21:18:16 tv Exp $
for dir in \
$x11_include_dir \
\
-@@ -1152,6 +1157,7 @@ do
+@@ -1159,6 +1162,7 @@
break
fi
done
+fi
-
- if test "$x11_include" = "not found" || test "$x11_link" = "not found"
+ if test "$x11_include" = "not found"; then
+ x11_try_lib_dir=''
diff --git a/lang/ocaml/patches/patch-au b/lang/ocaml/patches/patch-au
index c40ff48c566..0c3003caea1 100644
--- a/lang/ocaml/patches/patch-au
+++ b/lang/ocaml/patches/patch-au
@@ -1,13 +1,13 @@
-$NetBSD: patch-au,v 1.1 2004/04/22 09:18:39 tron Exp $
+$NetBSD: patch-au,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- debugger/Makefile.orig Sat Apr 27 16:45:32 2002
-+++ debugger/Makefile Thu Apr 22 10:34:37 2004
-@@ -79,7 +79,7 @@
- $(CAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) $(OTHEROBJS) $(OBJS)
+--- debugger/Makefile.orig 2004-10-15 15:22:45.000000000 +0100
++++ debugger/Makefile 2004-10-15 15:23:10.000000000 +0100
+@@ -81,7 +81,7 @@
+ $(CAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) -linkall $(OTHEROBJS) $(OBJS)
install:
- cp ocamldebug$(EXE) $(BINDIR)/ocamldebug$(EXE)
-+ ${BSD_INSTALL_PROGRAM} 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-av b/lang/ocaml/patches/patch-av
index 610f1723ef8..e306236386b 100644
--- a/lang/ocaml/patches/patch-av
+++ b/lang/ocaml/patches/patch-av
@@ -1,7 +1,7 @@
-$NetBSD: patch-av,v 1.1 2004/04/22 09:18:40 tron Exp $
+$NetBSD: patch-av,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- man/Makefile.orig Wed Apr 24 11:09:35 2002
-+++ man/Makefile Thu Apr 22 10:34:37 2004
+--- 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)
diff --git a/lang/ocaml/patches/patch-aw b/lang/ocaml/patches/patch-aw
index 932f20cfadd..917a7344aa6 100644
--- a/lang/ocaml/patches/patch-aw
+++ b/lang/ocaml/patches/patch-aw
@@ -1,24 +1,25 @@
-$NetBSD: patch-aw,v 1.1 2004/04/22 09:18:40 tron Exp $
+$NetBSD: patch-aw,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- ocamldoc/Makefile.orig Mon Aug 19 15:28:20 2002
-+++ ocamldoc/Makefile Thu Apr 22 10:34:37 2004
-@@ -272,23 +272,23 @@
+--- ocamldoc/Makefile.orig 2004-10-15 15:32:30.000000000 +0100
++++ ocamldoc/Makefile 2004-10-15 15:38:04.000000000 +0100
+@@ -252,24 +252,24 @@
# Installation targets
######################
install: dummy
- if test -d $(INSTALL_BINDIR); then : ; else $(MKDIR) $(INSTALL_BINDIR); fi
- if test -d $(INSTALL_LIBDIR); then : ; else $(MKDIR) $(INSTALL_LIBDIR); fi
-- $(CP) $(OCAMLDOC) $(INSTALL_BINDIR)
-- $(CP) ocamldoc.sty ocamldoc.hva *.cmi $(GENERATORS) $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
+- if test -d $(INSTALL_CUSTOMDIR); then : ; else $(MKDIR) $(INSTALL_CUSTOMDIR); fi
+- $(CP) $(OCAMLDOC)$(EXE) $(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE)
+- $(CP) ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
- $(CP) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
-- if test -d $(INSTALL_MANODIR); then : ; else $(MKDIR) $(INSTALL_MANODIR); fi
-- $(CP) stdlib_man/* $(INSTALL_MANODIR)
+ 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
-+ ${BSD_INSTALL_PROGRAM} $(OCAMLDOC) $(INSTALL_BINDIR)
-+ ${BSD_INSTALL_DATA} ocamldoc.sty ocamldoc.hva *.cmi $(GENERATORS) $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
++ if test -d $(INSTALL_CUSTOMDIR); then : ; else ${BSD_INSTALL_DATA_DIR} $(INSTALL_CUSTOMDIR); fi
++ ${BSD_INSTALL_PROGRAM} $(OCAMLDOC)$(EXE) $(INSTALL_BINDIR)/$(OCAMLDOC)$(EXE)
++ ${BSD_INSTALL_DATA} ocamldoc.hva *.cmi $(OCAMLDOC_LIBCMA) $(INSTALL_LIBDIR)
+ ${BSD_INSTALL_DATA} $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR)
-+ if test -d $(INSTALL_MANODIR); then : ; else ${BSD_INSTALL_MAN_DIR} $(INSTALL_MANODIR); fi
+ if test -d $(INSTALL_MANODIR); then : ; else $(MKDIR) $(INSTALL_MANODIR); fi
+- $(CP) stdlib_man/* $(INSTALL_MANODIR)
+ ${BSD_INSTALL_MAN} stdlib_man/* $(INSTALL_MANODIR)
installopt:
@@ -27,13 +28,13 @@ $NetBSD: patch-aw,v 1.1 2004/04/22 09:18:40 tron Exp $
installopt_really:
- if test -d $(INSTALL_BINDIR); then : ; else $(MKDIR) $(INSTALL_BINDIR); fi
- if test -d $(INSTALL_LIBDIR); then : ; else $(MKDIR) $(INSTALL_LIBDIR); fi
-- $(CP) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)
-- $(CP) ocamldoc.sty ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
+- $(CP) $(OCAMLDOC_OPT) $(INSTALL_BINDIR)/$(OCAMLDOC_OPT)$(EXE)
+- $(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
-+ ${BSD_INSTALL_PROGRAM} $(OCAMLDOC_OPT) $(INSTALL_BINDIR)
-+ ${BSD_INSTALL_DATA} ocamldoc.sty ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR)
++ ${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)
# Testing :
diff --git a/lang/ocaml/patches/patch-ba b/lang/ocaml/patches/patch-ba
index c7303822f2a..f1d801418be 100644
--- a/lang/ocaml/patches/patch-ba
+++ b/lang/ocaml/patches/patch-ba
@@ -1,21 +1,21 @@
-$NetBSD: patch-ba,v 1.2 2004/12/24 17:16:04 jmmv Exp $
+$NetBSD: patch-ba,v 1.3 2005/02/04 21:35:51 adrianp Exp $
---- otherlibs/graph/Makefile.orig 2002-06-27 13:36:01.000000000 +0200
-+++ otherlibs/graph/Makefile
-@@ -19,9 +19,9 @@ include ../../config/Makefile
+--- otherlibs/graph/Makefile.orig 2003-08-05 14:39:33.000000000 +0100
++++ otherlibs/graph/Makefile 2005-01-13 16:14:53.000000000 +0000
+@@ -19,9 +19,9 @@
CC=$(BYTECC)
CFLAGS=-I../../byterun $(X11_INCLUDES) -O $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS)
-CAMLC=../../ocamlcomp.sh
-CAMLOPT=../../ocamlcompopt.sh
-MKLIB=../../boot/ocamlrun ../../tools/ocamlmklib
-+CAMLC=ocamlc
-+CAMLOPT=ocamlopt
-+MKLIB=ocamlmklib
++CAMLC=${PREFIX}/bin/ocamlc
++CAMLOPT=${PREFIX}/bin/ocamlopt
++MKLIB=${PREFIX}/bin/ocamlrun ${PREFIX}/bin/ocamlmklib
COMPFLAGS=-warn-error A
OBJS=open.o draw.o fill.o color.o text.o \
-@@ -50,13 +50,13 @@ clean: partialclean
+@@ -50,13 +50,13 @@
rm -f *.a *.so *.o
install:
@@ -28,7 +28,7 @@ $NetBSD: patch-ba,v 1.2 2004/12/24 17:16:04 jmmv Exp $
+ ${BSD_INSTALL_DATA} graphics.cm[ia] graphicsX11.cmi graphics.mli graphicsX11.mli $(LIBDIR)
installopt:
-- cp graphics.cmxa graphics.a $(LIBDIR)
+- cp graphics.cmx graphics.cmxa graphics.a $(LIBDIR)
+ ${BSD_INSTALL_DATA} graphics.cmxa graphics.a $(LIBDIR)
cd $(LIBDIR); $(RANLIB) graphics.a
diff --git a/lang/ocaml/patches/patch-be b/lang/ocaml/patches/patch-be
index ed342201362..e14cb6142d5 100644
--- a/lang/ocaml/patches/patch-be
+++ b/lang/ocaml/patches/patch-be
@@ -1,8 +1,8 @@
-$NetBSD: patch-be,v 1.1 2004/04/22 09:18:42 tron Exp $
+$NetBSD: patch-be,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- otherlibs/labltk/frx/Makefile.orig Fri Apr 26 14:16:00 2002
-+++ otherlibs/labltk/frx/Makefile Thu Apr 22 10:34:37 2004
-@@ -20,7 +20,7 @@
+--- otherlibs/labltk/frx/Makefile.orig 2002-04-26 13:16:00.000000000 +0100
++++ otherlibs/labltk/frx/Makefile 2004-10-12 22:25:37.000000000 +0100
+@@ -20,10 +20,10 @@
$(CAMLOPTLIBR) -o frxlib.cmxa $(OBJSX)
install: frxlib.cma
@@ -10,4 +10,8 @@ $NetBSD: patch-be,v 1.1 2004/04/22 09:18:42 tron Exp $
+ ${BSD_INSTALL_DATA} *.cmi *.mli frxlib.cma $(INSTALLDIR)
installopt: frxlib.cmxa
- cp frxlib.cmxa frxlib.a $(INSTALLDIR)
+- 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
index ea76f0c5b23..943ee8abd38 100644
--- a/lang/ocaml/patches/patch-bf
+++ b/lang/ocaml/patches/patch-bf
@@ -1,8 +1,8 @@
-$NetBSD: patch-bf,v 1.1 2004/04/22 09:18:42 tron Exp $
+$NetBSD: patch-bf,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- otherlibs/labltk/jpf/Makefile.orig Fri Apr 26 14:16:11 2002
-+++ otherlibs/labltk/jpf/Makefile Thu Apr 22 10:34:37 2004
-@@ -21,7 +21,7 @@
+--- otherlibs/labltk/jpf/Makefile.orig 2002-04-26 13:16:11.000000000 +0100
++++ otherlibs/labltk/jpf/Makefile 2004-10-12 22:23:05.000000000 +0100
+@@ -21,10 +21,10 @@
$(CAMLOPTLIBR) -o jpflib.cmxa $(OBJSX)
install: jpflib.cma
@@ -10,4 +10,8 @@ $NetBSD: patch-bf,v 1.1 2004/04/22 09:18:42 tron Exp $
+ ${BSD_INSTALL_DATA} $(OBJS:.cmo=.cmi) $(OBJS:.cmo=.mli) jpflib.cma $(INSTALLDIR)
installopt: jpflib.cmxa
- cp jpflib.cmxa jpflib.a $(OBJS:.cmo=.cmx) $(INSTALLDIR)
+- 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-bk b/lang/ocaml/patches/patch-bk
index 550967f1f22..15a157dee63 100644
--- a/lang/ocaml/patches/patch-bk
+++ b/lang/ocaml/patches/patch-bk
@@ -1,8 +1,8 @@
-$NetBSD: patch-bk,v 1.1 2004/04/22 09:18:44 tron Exp $
+$NetBSD: patch-bk,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- otherlibs/labltk/tkanim/Makefile.orig Thu Jun 27 13:36:01 2002
-+++ otherlibs/labltk/tkanim/Makefile Thu Apr 22 10:34:37 2004
-@@ -52,9 +52,9 @@
+--- otherlibs/labltk/tkanim/Makefile.orig 2003-04-28 08:49:10.000000000 +0100
++++ otherlibs/labltk/tkanim/Makefile 2004-10-12 18:26:13.000000000 +0100
+@@ -56,13 +56,13 @@
install: tkanim.cma
@@ -14,3 +14,8 @@ $NetBSD: patch-bk,v 1.1 2004/04/22 09:18:44 tron Exp $
fi
installopt: tkanim.cmxa
+- cp tkanim.cmxa tkanim.a $(INSTALLDIR)
++ ${BSD_INSTALL_DATA} tkanim.cmxa tkanim.a $(INSTALLDIR)
+
+ depend: tkanim.ml
+ $(CAMLDEP) *.mli *.ml > .depend
diff --git a/lang/ocaml/patches/patch-bn b/lang/ocaml/patches/patch-bn
index a263156bca7..18ef8a0af6d 100644
--- a/lang/ocaml/patches/patch-bn
+++ b/lang/ocaml/patches/patch-bn
@@ -1,9 +1,9 @@
-$NetBSD: patch-bn,v 1.1 2004/04/22 09:18:45 tron Exp $
+$NetBSD: patch-bn,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- otherlibs/str/Makefile.orig Thu Jun 27 13:36:02 2002
-+++ otherlibs/str/Makefile Thu Apr 22 10:34:37 2004
-@@ -53,13 +53,13 @@
- cd $(REGEXLIB); if test -f Makefile; then $(MAKE) distclean; else exit 0; fi
+--- otherlibs/str/Makefile.orig 2004-10-12 18:13:50.000000000 +0100
++++ otherlibs/str/Makefile 2004-10-12 18:15:22.000000000 +0100
+@@ -48,13 +48,13 @@
+ rm -f *.a *.so *.o
install:
- if test -f dllstr.so; then cp dllstr.so $(STUBLIBDIR)/dllstr.so; fi
diff --git a/lang/ocaml/patches/patch-bo b/lang/ocaml/patches/patch-bo
index 6a72ad96e8f..92d9406273b 100644
--- a/lang/ocaml/patches/patch-bo
+++ b/lang/ocaml/patches/patch-bo
@@ -1,8 +1,8 @@
-$NetBSD: patch-bo,v 1.1 2004/04/22 09:18:45 tron Exp $
+$NetBSD: patch-bo,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- otherlibs/systhreads/Makefile.orig Thu Jun 27 13:36:02 2002
-+++ otherlibs/systhreads/Makefile Thu Apr 22 10:34:37 2004
-@@ -70,13 +70,13 @@
+--- otherlibs/systhreads/Makefile.orig 2003-08-21 14:52:07.000000000 +0100
++++ otherlibs/systhreads/Makefile 2004-10-12 22:21:43.000000000 +0100
+@@ -70,18 +70,18 @@
rm -f $(GENFILES)
install:
@@ -20,4 +20,11 @@ $NetBSD: patch-bo,v 1.1 2004/04/22 09:18:45 tron Exp $
+ ${BSD_INSTALL_DATA} thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
installopt:
- cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
+- cp libthreadsnat.a $(LIBDIR)/libthreadsnat.a
++ ${BSD_INSTALL_DATA} libthreadsnat.a $(LIBDIR)/libthreadsnat.a
+ cd $(LIBDIR); $(RANLIB) libthreadsnat.a
+- cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
++ ${BSD_INSTALL_DATA} $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(LIBDIR)/threads
+ cd $(LIBDIR)/threads; $(RANLIB) threads.a
+
+ .SUFFIXES: .ml .mli .cmo .cmi .cmx
diff --git a/lang/ocaml/patches/patch-bp b/lang/ocaml/patches/patch-bp
index 2be2593e61a..0f4476524ed 100644
--- a/lang/ocaml/patches/patch-bp
+++ b/lang/ocaml/patches/patch-bp
@@ -1,22 +1,22 @@
-$NetBSD: patch-bp,v 1.1 2004/04/22 09:18:46 tron Exp $
+$NetBSD: patch-bp,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- otherlibs/threads/Makefile.orig Mon Jul 8 09:30:08 2002
-+++ otherlibs/threads/Makefile Thu Apr 22 10:34:37 2004
+--- otherlibs/threads/Makefile.orig 2004-10-12 18:17:28.000000000 +0100
++++ otherlibs/threads/Makefile 2004-10-12 18:21:14.000000000 +0100
@@ -99,12 +99,12 @@
rm -f pervasives.mli marshal.mli unix.mli
install:
-- if test -f dllthreads.so; then cp dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
-- cp libthreads.a $(LIBDIR)/libthreads.a
-+ if test -f dllthreads.so; then ${BSD_INSTALL_DATA} dllthreads.so $(STUBLIBDIR)/dllthreads.so; fi
-+ ${BSD_INSTALL_DATA} libthreads.a $(LIBDIR)/libthreads.a
- cd $(LIBDIR); $(RANLIB) libthreads.a
-- if test -d $(LIBDIR)/threads; then : ; else mkdir $(LIBDIR)/threads; fi
-- cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/threads
-- cp thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
-+ if test -d $(LIBDIR)/threads; then : ; else ${BSD_INSTALL_DATA_DIR} $(LIBDIR)/threads; fi
-+ ${BSD_INSTALL_DATA} thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi threads.cma stdlib.cma unix.cma $(LIBDIR)/threads
-+ ${BSD_INSTALL_DATA} thread.mli mutex.mli condition.mli event.mli threadUnix.mli $(LIBDIR)
+- 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-br b/lang/ocaml/patches/patch-br
index 049536976fb..f5e0f6d4f6f 100644
--- a/lang/ocaml/patches/patch-br
+++ b/lang/ocaml/patches/patch-br
@@ -1,9 +1,9 @@
-$NetBSD: patch-br,v 1.1 2004/04/22 09:18:46 tron Exp $
+$NetBSD: patch-br,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- stdlib/Makefile.orig Wed Jun 5 14:08:38 2002
-+++ stdlib/Makefile Thu Apr 22 10:34:37 2004
-@@ -47,7 +47,7 @@
- allopt-prof: stdlib.p.cmxa std_exit.p.cmx
+--- stdlib/Makefile.orig 2004-10-15 15:40:41.000000000 +0100
++++ stdlib/Makefile 2004-10-15 15:41:45.000000000 +0100
+@@ -47,13 +47,13 @@
+ rm -f std_exit.p.cmi
install:
- cp stdlib.cma std_exit.cmo *.cmi *.mli *.ml camlheader camlheader_ur \
@@ -11,3 +11,19 @@ $NetBSD: patch-br,v 1.1 2004/04/22 09:18:46 tron Exp $
$(LIBDIR)
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)
+ cd $(LIBDIR); $(RANLIB) stdlib.a
+
+ installopt-noprof:
+@@ -64,7 +64,7 @@
+ rm -f $(LIBDIR)/std_exit.p.o; ln -s std_exit.o $(LIBDIR)/std_exit.p.o
+
+ 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)
+ cd $(LIBDIR); $(RANLIB) stdlib.p.a
+
+ stdlib.cma: $(OBJS)
diff --git a/lang/ocaml/patches/patch-bs b/lang/ocaml/patches/patch-bs
index 251146928ab..a640a8f5070 100644
--- a/lang/ocaml/patches/patch-bs
+++ b/lang/ocaml/patches/patch-bs
@@ -1,13 +1,65 @@
-$NetBSD: patch-bs,v 1.1 2004/04/22 09:18:47 tron Exp $
+$NetBSD: patch-bs,v 1.2 2005/02/04 21:35:51 adrianp Exp $
---- tools/Makefile.orig Mon Apr 22 12:06:59 2002
-+++ tools/Makefile Thu Apr 22 10:34:37 2004
-@@ -44,7 +44,7 @@
- rm -f ocamldep
+--- tools/Makefile.orig 2003-04-02 02:17:58.000000000 +0100
++++ tools/Makefile 2004-10-12 22:57:30.000000000 +0100
+@@ -48,9 +48,9 @@
+ rm -f ocamldep.opt
install::
- cp ocamldep $(BINDIR)/ocamldep$(EXE)
+ ${BSD_INSTALL_SCRIPT} ocamldep $(BINDIR)/ocamldep$(EXE)
+ if test -f ocamldep.opt; \
+- then cp ocamldep.opt $(BINDIR)/ocamldep.opt$(EXE); else :; fi
++ then ${BSD_INSTALL_PROGRAM} ocamldep.opt $(BINDIR)/ocamldep.opt$(EXE); else :; fi
# The profiler
+@@ -66,9 +66,9 @@
+ $(CAMLC) $(LINKFLAGS) -o ocamlcp main_args.cmo ocamlcp.cmo
+
+ install::
+- cp ocamlprof $(BINDIR)/ocamlprof$(EXE)
+- cp ocamlcp $(BINDIR)/ocamlcp$(EXE)
+- cp profiling.cmi profiling.cmo $(LIBDIR)
++ ${BSD_INSTALL_SCRIPT} ocamlprof $(BINDIR)/ocamlprof$(EXE)
++ ${BSD_INSTALL_SCRIPT} ocamlcp $(BINDIR)/ocamlcp$(EXE)
++ ${BSD_INSTALL_DATA} profiling.cmi profiling.cmo $(LIBDIR)
+
+ clean::
+ rm -f ocamlprof ocamlcp
+@@ -80,7 +80,7 @@
+ chmod +x ocamlmktop
+
+ install::
+- cp ocamlmktop $(BINDIR)/ocamlmktop
++ ${BSD_INSTALL_SCRIPT} ocamlmktop $(BINDIR)/ocamlmktop
+
+ clean::
+ rm -f ocamlmktop
+@@ -91,7 +91,7 @@
+ $(CAMLC) $(LINKFLAGS) -o ocamlmklib ocamlmklib.cmo
+
+ install::
+- cp ocamlmklib $(BINDIR)/ocamlmklib
++ ${BSD_INSTALL_SCRIPT} ocamlmklib $(BINDIR)/ocamlmklib
+
+ clean::
+ rm -f ocamlmklib
+@@ -139,7 +139,7 @@
+ $(CAMLLEX) lexer301.mll
+
+ install::
+- cp scrapelabels $(LIBDIR)
++ ${BSD_INSTALL_DATA} scrapelabels $(LIBDIR)
+
+ clean::
+ rm -f scrapelabels lexer301.ml
+@@ -155,7 +155,7 @@
+ $(ADDLABELS_IMPORTS) addlabels.ml
+
+ install::
+- cp addlabels $(LIBDIR)
++ ${BSD_INSTALL_DATA} addlabels $(LIBDIR)
+
+ clean::
+ rm -f addlabels
diff --git a/lang/ocaml/patches/patch-bt b/lang/ocaml/patches/patch-bt
new file mode 100644
index 00000000000..a7ad90019cd
--- /dev/null
+++ b/lang/ocaml/patches/patch-bt
@@ -0,0 +1,63 @@
+$NetBSD: patch-bt,v 1.1 2005/02/04 21:35:51 adrianp Exp $
+
+--- Makefile.orig 2004-10-15 15:43:57.000000000 +0100
++++ Makefile 2004-10-15 15:48:30.000000000 +0100
+@@ -232,24 +232,24 @@
+
+ # Installation
+ install: FORCE
+- 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 $(MANDIR)/man$(MANEXT); then : ; else $(MKDIR) $(MANDIR)/man$(MANEXT); 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 ${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 $(LIBDIR)
++ ${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
+ for i in $(OTHERLIBRARIES); do \
+@@ -264,16 +264,16 @@
+ # 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
new file mode 100644
index 00000000000..3e810767fe1
--- /dev/null
+++ b/lang/ocaml/patches/patch-bu
@@ -0,0 +1,21 @@
+$NetBSD: patch-bu,v 1.1 2005/02/04 21:35:51 adrianp Exp $
+
+--- asmrun/Makefile.orig 2004-10-15 15:49:45.000000000 +0100
++++ asmrun/Makefile 2004-10-15 15:52:40.000000000 +0100
+@@ -58,14 +58,14 @@
+ 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-bv b/lang/ocaml/patches/patch-bv
new file mode 100644
index 00000000000..c65525d020a
--- /dev/null
+++ b/lang/ocaml/patches/patch-bv
@@ -0,0 +1,15 @@
+$NetBSD: patch-bv,v 1.1 2005/02/04 21:35:51 adrianp Exp $
+
+--- camlp4/compile/Makefile.orig 2004-10-15 15:53:25.000000000 +0100
++++ camlp4/compile/Makefile 2004-10-15 15:55:06.000000000 +0100
+@@ -29,8 +29,8 @@
+ OTOP=$(OTOP) EXE=$(EXE) ./compile.sh $(COMP_OPT) $(SRC) > $D_fast.ml
+
+ install:
+- if test -f camlp4$D.fast.opt; then cp camlp4$D.fast.opt $(BINDIR)/camlp4$D.opt$(EXE); fi
+- for TARG in pa_$D_fast.cmi pa_$D_fast.cmo pa_$D_fast.cmx ; do if test -f $$TARG; then cp $$TARG "$(LIBDIR)/camlp4/."; fi; done
++ if test -f camlp4$D.fast.opt; then ${BSD_INSTALL_PROGRAM} camlp4$D.fast.opt $(BINDIR)/camlp4$D.opt$(EXE); fi
++ for TARG in pa_$D_fast.cmi pa_$D_fast.cmo pa_$D_fast.cmx ; do if test -f $$TARG; then ${BSD_INSTALL_DATA} $$TARG "$(LIBDIR)/camlp4/."; fi; done
+
+ clean::
+ rm -f *.cm* *.pp[io] *.o *.bak .*.bak *.out *.opt