diff options
author | jaapb <jaapb@pkgsrc.org> | 2016-05-05 08:12:01 +0000 |
---|---|---|
committer | jaapb <jaapb@pkgsrc.org> | 2016-05-05 08:12:01 +0000 |
commit | d94c6d790baaa5d8d69f9ab39188943098b7b288 (patch) | |
tree | 50e5dda272be898517cdeebeaecd82bf362bd111 /lang/ocaml/patches | |
parent | 947fb502065363a81b56b73e03095c8a2d475be8 (diff) | |
download | pkgsrc-d94c6d790baaa5d8d69f9ab39188943098b7b288.tar.gz |
Updated package to latest version, 4.03.0. Also removed some obsolete and
unneeded patches.
The list of changes is a thousand lines long, so I'm not including it
here: details can be found in the Changes file in the top directory of the
package after extraction.
Diffstat (limited to 'lang/ocaml/patches')
30 files changed, 314 insertions, 571 deletions
diff --git a/lang/ocaml/patches/patch-Makefile b/lang/ocaml/patches/patch-Makefile index d04260d0a95..baf66f793df 100644 --- a/lang/ocaml/patches/patch-Makefile +++ b/lang/ocaml/patches/patch-Makefile @@ -1,10 +1,9 @@ -$NetBSD: patch-Makefile,v 1.7 2015/12/29 23:34:52 dholland Exp $ +$NetBSD: patch-Makefile,v 1.8 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start - ---- Makefile.orig 2015-07-20 14:10:11.000000000 +0000 +--- Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ Makefile -@@ -186,8 +186,10 @@ LIBFILES=stdlib.cma std_exit.cmo *.cmi c +@@ -92,8 +92,10 @@ LIBFILES=stdlib.cma std_exit.cmo *.cmi c # Start up the system from the distribution compiler coldstart: cd byterun; $(MAKE) all @@ -15,7 +14,7 @@ Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start cp yacc/ocamlyacc$(EXE) boot/ocamlyacc$(EXE) cd stdlib; $(MAKE) COMPILER=../boot/ocamlc all cd stdlib; cp $(LIBFILES) ../boot -@@ -302,35 +304,35 @@ INSTALL_MANDIR=$(DESTDIR)$(MANDIR) +@@ -206,36 +208,36 @@ INSTALL_MANDIR=$(DESTDIR)$(MANDIR) install: if test -d $(INSTALL_BINDIR); then : ; \ @@ -35,8 +34,9 @@ Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start - cp VERSION $(INSTALL_LIBDIR)/ + else $(BSD_INSTALL_MAN_DIR) $(INSTALL_MANDIR)/man$(MANEXT); fi + $(BSD_INSTALL_DATA) VERSION $(INSTALL_LIBDIR)/ - cd $(INSTALL_LIBDIR); rm -f dllbigarray.so dllnums.so dllthreads.so \ - dllunix.so dllgraphics.so dllstr.so + cd $(INSTALL_LIBDIR); rm -f \ + dllbigarray$(EXT_DLL) dllnums$(EXT_DLL) dllthreads$(EXT_DLL) \ + dllunix$(EXT_DLL) dllgraphics$(EXT_DLL) dllstr$(EXT_DLL) cd byterun; $(MAKE) install - cp ocamlc $(INSTALL_BINDIR)/ocamlc$(EXE) - cp ocaml $(INSTALL_BINDIR)/ocaml$(EXE) @@ -65,13 +65,13 @@ Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start cd tools; $(MAKE) install -cd man; $(MAKE) install for i in $(OTHERLIBRARIES); do \ -@@ -341,16 +343,16 @@ install: - else :; fi - if test -n "$(WITH_OCAMLBUILD)"; then (cd ocamlbuild; $(MAKE) install); \ - else :; fi +@@ -243,20 +245,20 @@ install: + done + if test -n "$(WITH_OCAMLDOC)"; then (cd ocamldoc; $(MAKE) install); fi + if test -n "$(WITH_DEBUGGER)"; then (cd debugger; $(MAKE) install); fi - cp config/Makefile $(INSTALL_LIBDIR)/Makefile.config + $(BSD_INSTALL_DATA) config/Makefile $(INSTALL_LIBDIR)/Makefile.config - if test -f ocamlopt; then $(MAKE) installopt; else :; fi + if test -f ocamlopt; then $(MAKE) installopt; fi # Installation of the native-code compiler installopt: @@ -79,25 +79,46 @@ Use BSD_INSTALL_* instead of mkdir and cp; remove ocamlrun before cold start - cp ocamlopt $(INSTALL_BINDIR)/ocamlopt$(EXE) + $(BSD_INSTALL_SCRIPT) ocamlopt $(INSTALL_BINDIR)/ocamlopt$(EXE) cd stdlib; $(MAKE) installopt +- cp middle_end/*.cmi middle_end/*.cmt middle_end/*.cmti \ ++ $(BSD_INSTALL_DATA) middle_end/*.cmi middle_end/*.cmt middle_end/*.cmti \ + $(INSTALL_COMPLIBDIR) +- cp middle_end/base_types/*.cmi middle_end/base_types/*.cmt \ ++ $(BSD_INSTALL_DATA) middle_end/base_types/*.cmi middle_end/base_types/*.cmt \ + middle_end/base_types/*.cmti $(INSTALL_COMPLIBDIR) - cp asmcomp/*.cmi asmcomp/*.cmt asmcomp/*.cmti $(INSTALL_COMPLIBDIR) - cp compilerlibs/ocamloptcomp.cma $(OPTSTART) $(INSTALL_COMPLIBDIR) + $(BSD_INSTALL_DATA) asmcomp/*.cmi asmcomp/*.cmt asmcomp/*.cmti $(INSTALL_COMPLIBDIR) + $(BSD_INSTALL_DATA) compilerlibs/ocamloptcomp.cma $(OPTSTART) $(INSTALL_COMPLIBDIR) if test -n "$(WITH_OCAMLDOC)"; then (cd ocamldoc; $(MAKE) installopt); \ else :; fi - if test -n "$(WITH_OCAMLBUILD)"; then (cd ocamlbuild; $(MAKE) installopt); \ -@@ -361,10 +363,10 @@ installopt: + for i in $(OTHERLIBRARIES); \ +@@ -265,21 +267,21 @@ installopt: cd tools; $(MAKE) installopt installoptopt: - cp ocamlc.opt $(INSTALL_BINDIR)/ocamlc.opt$(EXE) - cp ocamlopt.opt $(INSTALL_BINDIR)/ocamlopt.opt$(EXE) - cp lex/ocamllex.opt $(INSTALL_BINDIR)/ocamllex.opt$(EXE) -- cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \ +- cp utils/*.cmx parsing/*.cmx typing/*.cmx bytecomp/*.cmx \ + $(BSD_INSTALL_PROGRAM) ocamlc.opt $(INSTALL_BINDIR)/ocamlc.opt$(EXE) + $(BSD_INSTALL_PROGRAM) ocamlopt.opt $(INSTALL_BINDIR)/ocamlopt.opt$(EXE) + $(BSD_INSTALL_PROGRAM) lex/ocamllex.opt $(INSTALL_BINDIR)/ocamllex.opt$(EXE) ++ $(BSD_INSTALL_DATA) utils/*.cmx parsing/*.cmx typing/*.cmx bytecomp/*.cmx \ + driver/*.cmx asmcomp/*.cmx $(INSTALL_COMPLIBDIR) +- cp compilerlibs/ocamlcommon.cmxa compilerlibs/ocamlcommon.a \ + $(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) \ + $(OPTSTART:.cmo=.cmx) $(OPTSTART:.cmo=.o) \ + $(INSTALL_COMPLIBDIR) + if test -f ocamlnat ; then \ +- cp ocamlnat $(INSTALL_BINDIR)/ocamlnat$(EXE); \ +- cp toplevel/opttopdirs.cmi $(INSTALL_LIBDIR); \ +- cp compilerlibs/ocamlopttoplevel.cmxa \ ++ $(BSD_INSTALL_PROGRAM) ocamlnat $(INSTALL_BINDIR)/ocamlnat$(EXE); \ ++ $(BSD_INSTALL_DATA) toplevel/opttopdirs.cmi $(INSTALL_LIBDIR); \ ++ $(BSD_INSTALL_DATA) compilerlibs/ocamlopttoplevel.cmxa \ + compilerlibs/ocamlopttoplevel.a \ + $(OPTTOPLEVELSTART:.cmo=.cmx) $(OPTTOPLEVELSTART:.cmo=.o) \ + $(INSTALL_COMPLIBDIR); \ diff --git a/lang/ocaml/patches/patch-asmcomp_power_emit.mlp b/lang/ocaml/patches/patch-asmcomp_power_emit.mlp deleted file mode 100644 index 8d3aeadc2b3..00000000000 --- a/lang/ocaml/patches/patch-asmcomp_power_emit.mlp +++ /dev/null @@ -1,37 +0,0 @@ -$NetBSD: patch-asmcomp_power_emit.mlp,v 1.2 2015/12/29 23:34:52 dholland 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 index edc18a8c0c8..cd209bb5fd2 100644 --- a/lang/ocaml/patches/patch-asmrun_Makefile +++ b/lang/ocaml/patches/patch-asmrun_Makefile @@ -1,33 +1,47 @@ -$NetBSD: patch-asmrun_Makefile,v 1.5 2015/12/29 23:34:52 dholland Exp $ +$NetBSD: patch-asmrun_Makefile,v 1.6 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp - ---- asmrun/Makefile.orig 2015-05-19 09:48:34.000000000 +0000 +--- asmrun/Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ asmrun/Makefile -@@ -79,7 +79,7 @@ INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR) - install: install-default install-$(RUNTIMED) install-$(PROFILING) install-$(SHARED) +@@ -92,25 +92,25 @@ libasmrun_shared.so: $(PICOBJS) + INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR) - install-default: + install:: - cp libasmrun.a $(INSTALL_LIBDIR)/libasmrun.a + $(BSD_INSTALL_DATA) libasmrun.a $(INSTALL_LIBDIR)/libasmrun.a cd $(INSTALL_LIBDIR); $(RANLIB) libasmrun.a .PHONY: install-default -@@ -87,7 +87,7 @@ install-noruntimed: - .PHONY: install-noruntimed - - install-runtimed: + ifeq "$(RUNTIMED)" "runtimed" + install:: - cp libasmrund.a $(INSTALL_LIBDIR)/libasmrund.a + $(BSD_INSTALL_DATA) libasmrund.a $(INSTALL_LIBDIR)/libasmrund.a cd $(INSTALL_LIBDIR); $(RANLIB) libasmrund.a - .PHONY: install-runtimed + endif -@@ -97,7 +97,7 @@ install-noprof: - .PHONY: install-noprof + ifeq "$(RUNTIMEI)" "true" + install:: +- cp libasmruni.a $(INSTALL_LIBDIR)/libasmruni.a ++ $(BSD_INSTALL_DATA) libasmruni.a $(INSTALL_LIBDIR)/libasmruni.a + cd $(INSTALL_LIBDIR); $(RANLIB) libasmruni.a + endif - install-prof: + ifeq "$(PROFILING)" "prof" + install:: - cp libasmrunp.a $(INSTALL_LIBDIR)/libasmrunp.a + $(BSD_INSTALL_DATA) libasmrunp.a $(INSTALL_LIBDIR)/libasmrunp.a cd $(INSTALL_LIBDIR); $(RANLIB) libasmrunp.a - .PHONY: install-prof + else + install:: +@@ -120,9 +120,9 @@ endif + + ifeq "$(SHARED)" "shared" + install:: +- cp libasmrun_pic.a $(INSTALL_LIBDIR)/libasmrun_pic.a ++ $(BSD_INSTALL_DATA) libasmrun_pic.a $(INSTALL_LIBDIR)/libasmrun_pic.a + cd $(INSTALL_LIBDIR); $(RANLIB) libasmrunp.a +- cp libasmrun_shared.so $(INSTALL_LIBDIR)/libasmrun_shared.so ++ $(BSD_INSTALL_LIB) libasmrun_shared.so $(INSTALL_LIBDIR)/libasmrun_shared.so + endif + main.c: ../byterun/main.c diff --git a/lang/ocaml/patches/patch-asmrun_arm.S b/lang/ocaml/patches/patch-asmrun_arm.S deleted file mode 100644 index 88eaf1f9435..00000000000 --- a/lang/ocaml/patches/patch-asmrun_arm.S +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-asmrun_arm.S,v 1.3 2015/12/29 23:34:52 dholland Exp $ - -pkgsrc_runtime flag - ---- asmrun/arm.S.orig 2014-11-20 13:12:25.000000000 +0000 -+++ asmrun/arm.S -@@ -44,7 +44,7 @@ - cmp \reg, #0 - beq \lbl - .endm --#elif defined(SYS_freebsd) -+#elif defined(SYS_freebsd) || defined(SYS_netbsd) - .arch armv6 - .arm - diff --git a/lang/ocaml/patches/patch-asmrun_power-bsd.S b/lang/ocaml/patches/patch-asmrun_power-bsd.S deleted file mode 100644 index f985d781565..00000000000 --- a/lang/ocaml/patches/patch-asmrun_power-bsd.S +++ /dev/null @@ -1,98 +0,0 @@ -$NetBSD: patch-asmrun_power-bsd.S,v 1.3 2015/12/29 23:34:52 dholland Exp $ - -Add profiling to power architecture - - --- asmrun/power-bsd.S.orig 2014-08-19 13:37:35.000000000 +0000 -+++ asmrun/power-bsd.S -@@ -11,6 +11,35 @@ - /* */ - /***********************************************************************/ - -+#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) \ - addis reg, 0, glob@ha; \ - addi reg, reg, glob@l -@@ -31,6 +60,7 @@ caml_system__code_begin: - .globl caml_call_gc - .type caml_call_gc, @function - caml_call_gc: -+ PROFILE_CAML - /* Set up stack frame */ - stwu 1, -0x1A0(1) - /* 0x1A0 = 4*32 (int regs) + 8*32 (float regs) + 32 (space for C call) */ -@@ -183,6 +213,7 @@ caml_call_gc: - .globl caml_c_call - .type caml_c_call, @function - caml_c_call: -+ PROFILE_CAML - /* Save return address */ - mflr 25 - /* Get ready to call C function (address in 11) */ -@@ -253,6 +284,7 @@ caml_reraise_exn: - .globl caml_raise_exception - .type caml_raise_exception, @function - caml_raise_exception: -+ PROFILE_C - Loadglobal(0, caml_backtrace_active, 11) - cmpwi 0, 0 - bne .L121 -@@ -287,6 +319,7 @@ caml_raise_exception: - .globl caml_start_program - .type caml_start_program, @function - caml_start_program: -+ PROFILE_C - Addrglobal(12, caml_program) - - /* Code shared between caml_start_program and caml_callback */ -@@ -437,6 +470,7 @@ caml_start_program: - .globl caml_callback_exn - .type caml_callback_exn, @function - caml_callback_exn: -+ PROFILE_C - /* Initial shuffling of arguments */ - mr 0, 3 /* Closure */ - mr 3, 4 /* Argument */ -@@ -447,6 +481,7 @@ caml_callback_exn: - .globl caml_callback2_exn - .type caml_callback2_exn, @function - caml_callback2_exn: -+ PROFILE_C - mr 0, 3 /* Closure */ - mr 3, 4 /* First argument */ - mr 4, 5 /* Second argument */ -@@ -457,6 +492,7 @@ caml_callback2_exn: - .globl caml_callback3_exn - .type caml_callback3_exn, @function - caml_callback3_exn: -+ PROFILE_C - mr 0, 3 /* Closure */ - mr 3, 4 /* First argument */ - mr 4, 5 /* Second argument */ diff --git a/lang/ocaml/patches/patch-asmrun_signals_osdep.h b/lang/ocaml/patches/patch-asmrun_signals_osdep.h index 57a38d0e9ea..704f65299bd 100644 --- a/lang/ocaml/patches/patch-asmrun_signals_osdep.h +++ b/lang/ocaml/patches/patch-asmrun_signals_osdep.h @@ -1,14 +1,13 @@ -$NetBSD: patch-asmrun_signals_osdep.h,v 1.7 2015/12/29 23:34:52 dholland Exp $ +$NetBSD: patch-asmrun_signals_osdep.h,v 1.8 2016/05/05 08:12:01 jaapb Exp $ Use correct data structures for power architecture; also do signal handling correctly for i386 and amd64/NetBSD. First hunk taken from upstream tracker at: http://caml.inria.fr/mantis/view.php?id=6772 - ---- asmrun/signals_osdep.h.orig 2015-05-06 15:18:50.000000000 +0000 +--- asmrun/signals_osdep.h.orig 2016-04-01 12:53:41.000000000 +0000 +++ asmrun/signals_osdep.h -@@ -135,6 +135,23 @@ +@@ -137,6 +137,23 @@ #define CONTEXT_YOUNG_PTR (context->sc_r15) #define CONTEXT_FAULTING_ADDRESS ((char *) info->si_addr) @@ -32,25 +31,12 @@ First hunk taken from upstream tracker at: /****************** I386, Linux */ #elif defined(TARGET_i386) && defined(SYS_linux_elf) -@@ -277,12 +294,21 @@ - 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]) -+ #define CONTEXT_SP (context->sc_frame.fixreg[1]) -+#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]) - #define CONTEXT_SP (context->regs->gpr[1]) -+#endif /* __NetBSD__ */ +@@ -305,7 +322,7 @@ /****************** PowerPC, BSD */ +-#elif defined(TARGET_power) && (defined(SYS_bsd) || defined(SYS_bsd_elf)) ++#elif defined(TARGET_power) && (defined(SYS_bsd) || defined(SYS_bsd_elf) || defined(SYS_netbsd)) + + #define DECLARE_SIGNAL_HANDLER(name) \ + static void name(int sig, int code, struct sigcontext * context) diff --git a/lang/ocaml/patches/patch-byterun_Makefile b/lang/ocaml/patches/patch-byterun_Makefile index bcb2887e1ec..83f0f4511e3 100644 --- a/lang/ocaml/patches/patch-byterun_Makefile +++ b/lang/ocaml/patches/patch-byterun_Makefile @@ -1,24 +1,25 @@ -$NetBSD: patch-byterun_Makefile,v 1.4 2015/12/29 23:34:52 dholland Exp $ +$NetBSD: patch-byterun_Makefile,v 1.5 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp - ---- byterun/Makefile.orig 2015-05-10 05:45:57.000000000 +0000 +--- byterun/Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ byterun/Makefile -@@ -13,7 +13,7 @@ +@@ -15,7 +15,7 @@ include Makefile.common -CFLAGS=-DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR) +CFLAGS+=-DCAML_NAME_SPACE $(BYTECCCOMPOPTS) $(IFLEXDIR) DFLAGS=-DCAML_NAME_SPACE -g -DDEBUG $(BYTECCCOMPOPTS) $(IFLEXDIR) + IFLAGS=$(CFLAGS) -DCAML_INSTR - OBJS=$(COMMONOBJS) $(UNIX_OR_WIN32).o main.o -@@ -57,7 +57,7 @@ install-noshared: +@@ -68,8 +68,8 @@ install-noshared: .PHONY: install-noshared install-shared: -- cp libcamlrun_shared.so $(INSTALL_LIBDIR)/libcamlrun_shared.so -+ $(BSD_INSTALL_PROGRAM) libcamlrun_shared.so $(INSTALL_LIBDIR)/libcamlrun_shared.so - cp libcamlrun_pic.a $(INSTALL_LIBDIR)/libcamlrun_pic.a - cd $(INSTALL_LIBDIR); $(RANLIB) libcamlrun_pic.a +- cp libcamlrun_shared.so "$(INSTALL_LIBDIR)/libcamlrun_shared.so" +- cp libcamlrun_pic.a "$(INSTALL_LIBDIR)/libcamlrun_pic.a" ++ $(BSD_INSTALL_LIB) libcamlrun_shared.so "$(INSTALL_LIBDIR)/libcamlrun_shared.so" ++ $(BSD_INSTALL_DATA) libcamlrun_pic.a "$(INSTALL_LIBDIR)/libcamlrun_pic.a" + cd "$(INSTALL_LIBDIR)"; $(RANLIB) libcamlrun_pic.a .PHONY: install-shared + diff --git a/lang/ocaml/patches/patch-byterun_caml_mlvalues.h b/lang/ocaml/patches/patch-byterun_caml_mlvalues.h deleted file mode 100644 index eb704bd86ef..00000000000 --- a/lang/ocaml/patches/patch-byterun_caml_mlvalues.h +++ /dev/null @@ -1,15 +0,0 @@ -$NetBSD: patch-byterun_caml_mlvalues.h,v 1.2 2015/12/29 23:34:52 dholland Exp $ - -Avoid undefined behavior. - ---- byterun/caml/mlvalues.h.orig 2015-09-03 12:17:44.000000000 +0000 -+++ byterun/caml/mlvalues.h -@@ -68,7 +68,7 @@ typedef uintnat mark_t; - - /* Conversion macro names are always of the form "to_from". */ - /* Example: Val_long as in "Val from long" or "Val of long". */ --#define Val_long(x) (((intnat)(x) << 1) + 1) -+#define Val_long(x) ((intnat)(x) * 2 + 1) - #define Long_val(x) ((x) >> 1) - #define Max_long (((intnat)1 << (8 * sizeof(value) - 2)) - 1) - #define Min_long (-((intnat)1 << (8 * sizeof(value) - 2))) diff --git a/lang/ocaml/patches/patch-config_auto__aux_gethostbyaddr.c b/lang/ocaml/patches/patch-config_auto__aux_gethostbyaddr.c deleted file mode 100644 index 1cc92b9b491..00000000000 --- a/lang/ocaml/patches/patch-config_auto__aux_gethostbyaddr.c +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-config_auto__aux_gethostbyaddr.c,v 1.3 2015/12/29 23:34:52 dholland Exp $ - -Fix gethostbyaddr support for NetBSD - ---- config/auto-aux/gethostbyaddr.c.orig 2012-10-15 13:50:56.000000000 -0400 -+++ config/auto-aux/gethostbyaddr.c 2013-12-21 11:16:25.000000000 -0500 -@@ -19,6 +19,10 @@ - #include <sys/types.h> - #include <netdb.h> - -+#ifdef __NetBSD__ -+#error "the test does not handle missing prototypes" -+#endif -+ - int main(int argc, char ** argv) - { - #if NUM_ARGS == 7 diff --git a/lang/ocaml/patches/patch-config_auto__aux_gethostbyname.c b/lang/ocaml/patches/patch-config_auto__aux_gethostbyname.c deleted file mode 100644 index 815f85ccf06..00000000000 --- a/lang/ocaml/patches/patch-config_auto__aux_gethostbyname.c +++ /dev/null @@ -1,17 +0,0 @@ -$NetBSD: patch-config_auto__aux_gethostbyname.c,v 1.3 2015/12/29 23:34:53 dholland Exp $ - -Fix gethostbyname support for NetBSD - ---- config/auto-aux/gethostbyname.c.orig 2012-10-15 13:50:56.000000000 -0400 -+++ config/auto-aux/gethostbyname.c 2013-12-21 11:16:39.000000000 -0500 -@@ -19,6 +19,10 @@ - #include <sys/types.h> - #include <netdb.h> - -+#ifdef __NetBSD__ -+#error "the test does not handle missing prototypes" -+#endif -+ - int main(int argc, char ** argv) - { - #if NUM_ARGS == 5 diff --git a/lang/ocaml/patches/patch-configure b/lang/ocaml/patches/patch-configure index f3bf3c47051..7dbe2956e34 100644 --- a/lang/ocaml/patches/patch-configure +++ b/lang/ocaml/patches/patch-configure @@ -1,107 +1,29 @@ -$NetBSD: patch-configure,v 1.13 2016/02/29 13:53:58 jperkin Exp $ +$NetBSD: patch-configure,v 1.14 2016/05/05 08:12:01 jaapb Exp $ Several configure changes to work on and detect NetBSD (and some other OSes) See also: <http://caml.inria.fr/mantis/view.php?id=6900> - ---- configure.orig 2015-05-12 14:46:37.000000000 +0000 +--- configure.orig 2016-04-01 12:53:41.000000000 +0000 +++ configure -@@ -328,11 +328,11 @@ TOOLCHAIN="cc" - case "$bytecc,$target" in - cc,*-*-nextstep*) - # GNU C extensions disabled, but __GNUC__ still defined! -- bytecccompopts="-fno-defer-pop $gcc_warnings -U__GNUC__ -posix" -+ bytecccompopts="$gcc_warnings -U__GNUC__ -posix" - bytecclinkopts="-posix";; - *,*-*-rhapsody*) - # Almost the same as NeXTStep -- bytecccompopts="-fno-defer-pop $gcc_warnings -DSHRINKED_GNUC" -+ bytecccompopts="$gcc_warnings -DSHRINKED_GNUC" - mathlib="";; - *,*-*-darwin*) - bytecccompopts="$gcc_warnings" -@@ -344,15 +344,15 @@ case "$bytecc,$target" in - echo "# define ARCH_CODE32" >> m.h - echo "#endif" >> m.h;; - *,*-*-haiku*) -- bytecccompopts="-fno-defer-pop $gcc_warnings" -+ bytecccompopts="$gcc_warnings" - # No -lm library - mathlib="";; - *,*-*-beos*) -- bytecccompopts="-fno-defer-pop $gcc_warnings" -+ bytecccompopts="$gcc_warnings" - # No -lm library - mathlib="";; - *gcc,alpha*-*-osf*) -- bytecccompopts="-fno-defer-pop $gcc_warnings" -+ bytecccompopts="$gcc_warnings" - if cc="$bytecc" sh ./hasgot -mieee; then - bytecccompopts="-mieee $bytecccompopts"; - fi -@@ -380,7 +380,7 @@ case "$bytecc,$target" in - bytecccompopts="-DUMK";; - *gcc*,powerpc-*-aix*) - # Avoid name-space pollution by requiring Unix98-conformant includes -- bytecccompopts="-fno-defer-pop $gcc_warnings -D_XOPEN_SOURCE=500";; -+ bytecccompopts="$gcc_warnings -D_XOPEN_SOURCE=500";; - *,powerpc-*-aix*) - bytecccompopts="-D_XOPEN_SOURCE=500";; - *gcc*,*-*-cygwin*) -@@ -389,7 +389,7 @@ case "$bytecc,$target" in - x86_64-*) flavor=cygwin64;; - *) err "unknown cygwin variant";; - esac -- bytecccompopts="-fno-defer-pop $gcc_warnings -U_WIN32" -+ bytecccompopts="$gcc_warnings -U_WIN32" - dllccompopts="-U_WIN32 -DCAML_DLL" - if test $with_sharedlibs = yes; then - flexlink="flexlink -chain $flavor -merge-manifest -stack 16777216" -@@ -410,7 +410,7 @@ case "$bytecc,$target" in - exe=".exe" - ostype="Cygwin";; - *gcc*,*-*-mingw*) -- bytecccompopts="-fno-defer-pop $gcc_warnings" -+ bytecccompopts="$gcc_warnings" - dllccompopt="-DCAML_DLL" - if test $with_sharedlibs = yes; then - case "$target" in -@@ -434,14 +434,14 @@ case "$bytecc,$target" in - SO="dll" - ;; - *gcc*,x86_64-*-linux*) -- bytecccompopts="-fno-defer-pop $gcc_warnings" -+ bytecccompopts="$gcc_warnings" - # Tell gcc that we can use 32-bit code addresses for threaded code - # unless we are compiled for a shared library (-fPIC option) - echo "#ifndef __PIC__" >> m.h - echo "# define ARCH_CODE32" >> m.h - echo "#endif" >> m.h;; - *gcc*) -- bytecccompopts="-fno-defer-pop $gcc_warnings";; -+ bytecccompopts="$gcc_warnings";; - esac - - # Configure compiler to use in further tests -@@ -688,7 +688,7 @@ if test $with_sharedlibs = "yes"; then - mksharedlib="$flexlink" +@@ -671,7 +671,7 @@ if test $with_sharedlibs = "yes"; then mkmaindll="$flexlink -maindll" shared_libraries_supported=true;; -- *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*) -+ *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*|*-*-openbsd*|*-*-netbsd*|*-*-dragonfly|*-*-gnu*|*-*-haiku*) + *-*-linux-gnu|*-*-linux|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\ +- |*-*-openbsd*|*-*-netbsd*|*-*-gnu*|*-*-haiku*) ++ |*-*-openbsd*|*-*-netbsd*|*-*-dragonfly|*-*-gnu*|*-*-haiku*) sharedcccompopts="-fPIC" mksharedlib="$bytecc -shared" bytecclinkopts="$bytecclinkopts -Wl,-E" -@@ -743,7 +743,7 @@ if test $with_sharedlibs = "yes"; then +@@ -726,7 +726,7 @@ if test $with_sharedlibs = "yes"; then byteccrpath="-Wl,-rpath," mksharedlibrpath="-rpath " shared_libraries_supported=true;; - i[3456]86-*-darwin[89].*) + i[3456]86-*-darwin*) - mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress -read_only_relocs suppress" + mksharedlib="$bytecc -bundle -flat_namespace -undefined suppress \ + -read_only_relocs suppress" bytecccompopts="$dl_defs $bytecccompopts" - dl_needs_underscore=false -@@ -783,11 +783,7 @@ if test $with_sharedlibs = "yes"; then +@@ -768,11 +768,7 @@ if test $with_sharedlibs = "yes"; then i[3456]86-*-linux*) natdynlink=true;; i[3456]86-*-gnu*) natdynlink=true;; x86_64-*-linux*) natdynlink=true;; @@ -112,9 +34,9 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> - fi;; + i[3456]86-*-darwin*) natdynlink=true;; x86_64-*-darwin*) natdynlink=true;; + s390x*-*-linux*) natdynlink=true;; powerpc*-*-linux*) natdynlink=true;; - sparc*-*-linux*) natdynlink=true;; -@@ -799,6 +795,9 @@ if test $with_sharedlibs = "yes"; then +@@ -785,6 +781,9 @@ if test $with_sharedlibs = "yes"; then x86_64-*-openbsd*) natdynlink=true;; i[3456]86-*-netbsd*) natdynlink=true;; x86_64-*-netbsd*) natdynlink=true;; @@ -124,7 +46,7 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> i386-*-gnu0.3) natdynlink=true;; i[3456]86-*-haiku*) natdynlink=true;; arm*-*-linux*) natdynlink=true;; -@@ -827,6 +826,7 @@ case "$target" in +@@ -814,6 +813,7 @@ case "$target" in sparc*-*-gnu*) arch=sparc; system=gnu;; i[3456]86-*-linux*) arch=i386; system=linux_`sh ./runtest elf.c`;; i[3456]86-*-*bsd*) arch=i386; system=bsd_`sh ./runtest elf.c`;; @@ -132,7 +54,7 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> i[3456]86-*-nextstep*) arch=i386; system=nextstep;; i[3456]86-*-solaris*) if $arch64; then arch=amd64; system=solaris -@@ -836,6 +836,7 @@ case "$target" in +@@ -823,6 +823,7 @@ case "$target" in i[3456]86-*-haiku*) arch=i386; system=beos;; i[3456]86-*-beos*) arch=i386; system=beos;; i[3456]86-*-cygwin*) arch=i386; system=cygwin;; @@ -140,15 +62,14 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> i[3456]86-*-darwin*) if $arch64; then arch=amd64; system=macosx else -@@ -849,6 +850,7 @@ case "$target" in - powerpc-*-rhapsody*) arch=power; model=ppc; system=rhapsody;; - powerpc-*-darwin*) arch=power; system=rhapsody - if $arch64;then model=ppc64;else model=ppc;fi;; -+ arm*-*-netbsd) arch=arm; system=netbsd;; - armv6*-*-linux-gnueabihf) arch=arm; model=armv6; system=linux_eabihf;; - arm*-*-linux-gnueabihf) arch=arm; system=linux_eabihf;; - armv7*-*-linux-gnueabi) arch=arm; model=armv7; system=linux_eabi;; -@@ -864,6 +866,8 @@ case "$target" in +@@ -848,12 +849,15 @@ case "$target" in + armv5te*-*-linux-gnueabi) arch=arm; model=armv5te; system=linux_eabi;; + armv5*-*-linux-gnueabi) arch=arm; model=armv5; system=linux_eabi;; + arm*-*-linux-gnueabi) arch=arm; system=linux_eabi;; ++ arm*-*-netbsd*) arch=arm; system=netbsd;; + arm*-*-openbsd*) arch=arm; system=bsd;; + zaurus*-*-openbsd*) arch=arm; system=bsd;; + 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;; @@ -157,25 +78,16 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> x86_64-*-openbsd*) arch=amd64; system=openbsd;; x86_64-*-darwin*) arch=amd64; system=macosx;; x86_64-*-mingw*) arch=amd64; system=mingw;; -@@ -903,7 +907,7 @@ case "$arch,$nativecc,$system,$target" i - if $arch64; then partialld="ld -r -arch ppc64"; fi;; - *,gcc*,cygwin,*) nativecccompopts="$gcc_warnings -U_WIN32";; - amd64,gcc*,macosx,*) partialld="ld -r -arch x86_64";; -- amd64,gcc*,solaris,*) partialld="ld -r -m elf_x86_64";; -+ amd64,gcc*,solaris,*) partialld="ld -r -64";; - *,gcc*,*,*) nativecccompopts="$gcc_warnings";; - esac - -@@ -920,7 +924,7 @@ case "$arch,$system" in +@@ -913,7 +917,7 @@ case "$arch,$system" in amd64,solaris) as="${TOOLPREF}as --64" aspp="${TOOLPREF}gcc -m64 -c";; i386,solaris) as="${TOOLPREF}as" - aspp="/usr/ccs/bin/${TOOLPREF}as -P";; + aspp="gcc -traditional -c";; - power,elf) as="${TOOLPREF}as -u -m ppc" - aspp="${TOOLPREF}gcc -c";; - power,rhapsody) as="${TOOLPREF}as -arch $model" -@@ -961,6 +965,7 @@ case "$arch,$system" in + power,elf) if $arch64; then + as="${TOOLPREF}as -a64 -mppc64" + aspp="${TOOLPREF}gcc -m64 -c" +@@ -960,6 +964,7 @@ case "$arch,$system" in arm,linux*) profiling='prof';; power,elf) profiling='prof';; power,bsd*) profiling='prof';; @@ -183,7 +95,7 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> *) profiling='noprof';; esac -@@ -1475,6 +1480,8 @@ fi +@@ -1505,6 +1510,8 @@ fi x11_include="not found" x11_link="not found" @@ -192,7 +104,7 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> 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` -@@ -1521,6 +1528,7 @@ if test "$x11_include" = "not found"; th +@@ -1551,6 +1558,7 @@ if test "$x11_include" = "not found"; th /usr/XFree86/include/X11 \ \ /usr/include \ @@ -200,7 +112,7 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> /usr/local/include \ /usr/unsupported/include \ /usr/athena/include \ -@@ -1578,6 +1586,7 @@ if test "$x11_include" = "not found"; th +@@ -1608,6 +1616,7 @@ if test "$x11_include" = "not found"; th \ /usr/lib64 \ /usr/lib \ @@ -208,7 +120,7 @@ See also: <http://caml.inria.fr/mantis/view.php?id=6900> /usr/local/lib \ /usr/unsupported/lib \ /usr/athena/lib \ -@@ -1599,18 +1608,16 @@ if test "$x11_include" = "not found"; th +@@ -1629,18 +1638,16 @@ if test "$x11_include" = "not found"; th if test $dir = /usr/lib; then x11_link="-lX11" else diff --git a/lang/ocaml/patches/patch-debugger_Makefile.shared b/lang/ocaml/patches/patch-debugger_Makefile.shared index eade20d1199..c100b2d9428 100644 --- a/lang/ocaml/patches/patch-debugger_Makefile.shared +++ b/lang/ocaml/patches/patch-debugger_Makefile.shared @@ -1,15 +1,14 @@ -$NetBSD: patch-debugger_Makefile.shared,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-debugger_Makefile.shared,v 1.4 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp - ---- debugger/Makefile.shared.orig 2014-04-29 11:56:17.000000000 +0000 +--- debugger/Makefile.shared.orig 2016-04-01 12:53:41.000000000 +0000 +++ debugger/Makefile.shared -@@ -86,7 +86,7 @@ ocamldebug$(EXE): $(OBJS) $(OTHEROBJS) +@@ -94,7 +94,7 @@ ocamldebug$(EXE): $(OBJS) $(OTHEROBJS) $(CAMLC) $(LINKFLAGS) -o ocamldebug$(EXE) -linkall $(OTHEROBJS) $(OBJS) install: -- cp ocamldebug$(EXE) $(INSTALL_BINDIR)/ocamldebug$(EXE) -+ $(BSD_INSTALL_SCRIPT) ocamldebug$(EXE) $(INSTALL_BINDIR)/ocamldebug$(EXE) +- cp ocamldebug$(EXE) "$(INSTALL_BINDIR)/ocamldebug$(EXE)" ++ $(BSD_INSTALL_SCRIPT) ocamldebug$(EXE) "$(INSTALL_BINDIR)/ocamldebug$(EXE)" clean:: rm -f ocamldebug$(EXE) diff --git a/lang/ocaml/patches/patch-driver_compenv.ml b/lang/ocaml/patches/patch-driver_compenv.ml index d3e2fc38c23..2765a0d74e6 100644 --- a/lang/ocaml/patches/patch-driver_compenv.ml +++ b/lang/ocaml/patches/patch-driver_compenv.ml @@ -1,14 +1,14 @@ -$NetBSD: patch-driver_compenv.ml,v 1.2 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-driver_compenv.ml,v 1.3 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- driver/compenv.ml.orig 2014-08-28 16:24:52.000000000 +0000 +--- driver/compenv.ml.orig 2016-04-01 12:53:41.000000000 +0000 +++ driver/compenv.ml -@@ -185,6 +185,7 @@ let read_OCAMLPARAM ppf position = +@@ -217,6 +217,7 @@ let read_one_param ppf position name v = - | "pp" -> preprocessor := Some v - | "runtime-variant" -> runtime_variant := v -+ | "pkgsrc-runtime" -> set "pkgsrc-runtime" [ pkgsrc_runtime ] v - | "cc" -> c_compiler := Some v + | "pp" -> preprocessor := Some v + | "runtime-variant" -> runtime_variant := v ++ | "pkgsrc-runtime" -> set "pkgsrc-runtime" [ pkgsrc_runtime ] v + | "cc" -> c_compiler := Some v - (* assembly sources *) + | "clambda-checks" -> set "clambda-checks" [ clambda_checks ] v diff --git a/lang/ocaml/patches/patch-driver_main.ml b/lang/ocaml/patches/patch-driver_main.ml index 558b3352451..be696b737b6 100644 --- a/lang/ocaml/patches/patch-driver_main.ml +++ b/lang/ocaml/patches/patch-driver_main.ml @@ -1,12 +1,12 @@ -$NetBSD: patch-driver_main.ml,v 1.2 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-driver_main.ml,v 1.3 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- driver/main.ml.orig 2014-08-28 16:24:52.000000000 +0000 +--- driver/main.ml.orig 2016-04-25 13:36:01.000000000 +0000 +++ driver/main.ml -@@ -112,6 +112,7 @@ module Options = Main_args.Make_bytecomp - let _principal = set principal +@@ -129,6 +129,7 @@ module Options = Main_args.Make_bytecomp let _rectypes = set recursive_types + let _no_rectypes = unset recursive_types let _runtime_variant s = runtime_variant := s + let _pkgsrc_runtime = set pkgsrc_runtime let _safe_string = unset unsafe_string diff --git a/lang/ocaml/patches/patch-driver_main_args.ml b/lang/ocaml/patches/patch-driver_main_args.ml index d78f823ed6a..fabf6a03d84 100644 --- a/lang/ocaml/patches/patch-driver_main_args.ml +++ b/lang/ocaml/patches/patch-driver_main_args.ml @@ -1,10 +1,10 @@ -$NetBSD: patch-driver_main_args.ml,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-driver_main_args.ml,v 1.4 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- driver/main_args.ml.orig 2015-05-12 15:31:26.000000000 +0000 +--- driver/main_args.ml.orig 2016-04-25 13:36:01.000000000 +0000 +++ driver/main_args.ml -@@ -244,6 +244,10 @@ let mk_pack_opt f = +@@ -376,6 +376,10 @@ let mk_pack_opt f = "-pack", Arg.Unit f, " Package the given .cmx files into one .cmx" ;; @@ -15,15 +15,15 @@ pkgsrc_runtime flag let mk_pp f = "-pp", Arg.String f, "<command> Pipe sources through preprocessor <command>" ;; -@@ -537,6 +541,7 @@ module type Compiler_options = sig +@@ -767,6 +771,7 @@ module type Compiler_options = sig val _output_obj : unit -> unit val _output_complete_obj : unit -> unit val _pack : unit -> unit + val _pkgsrc_runtime : unit -> unit val _pp : string -> unit val _principal : unit -> unit - val _rectypes : unit -> unit -@@ -689,6 +694,7 @@ struct + val _no_principal : unit -> unit +@@ -955,6 +960,7 @@ struct mk_output_obj F._output_obj; mk_output_complete_obj F._output_complete_obj; mk_pack_byt F._pack; @@ -31,7 +31,7 @@ pkgsrc_runtime flag mk_pp F._pp; mk_ppx F._ppx; mk_principal F._principal; -@@ -807,6 +813,7 @@ struct +@@ -1108,6 +1114,7 @@ struct mk_output_complete_obj F._output_complete_obj; mk_p F._p; mk_pack_opt F._pack; diff --git a/lang/ocaml/patches/patch-driver_main_args.mli b/lang/ocaml/patches/patch-driver_main_args.mli index 7611d18845b..6ce9d55c90f 100644 --- a/lang/ocaml/patches/patch-driver_main_args.mli +++ b/lang/ocaml/patches/patch-driver_main_args.mli @@ -1,14 +1,14 @@ -$NetBSD: patch-driver_main_args.mli,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-driver_main_args.mli,v 1.4 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- driver/main_args.mli.orig 2015-05-12 15:31:26.000000000 +0000 +--- driver/main_args.mli.orig 2016-04-25 13:36:01.000000000 +0000 +++ driver/main_args.mli -@@ -70,6 +70,7 @@ module type Compiler_options = sig +@@ -82,6 +82,7 @@ module type Compiler_options = sig val _output_obj : unit -> unit val _output_complete_obj : unit -> unit val _pack : unit -> unit + val _pkgsrc_runtime : unit -> unit val _pp : string -> unit val _principal : unit -> unit - val _rectypes : unit -> unit + val _no_principal : unit -> unit diff --git a/lang/ocaml/patches/patch-driver_optmain.ml b/lang/ocaml/patches/patch-driver_optmain.ml index 34a9bcfc942..ba3960abb11 100644 --- a/lang/ocaml/patches/patch-driver_optmain.ml +++ b/lang/ocaml/patches/patch-driver_optmain.ml @@ -1,12 +1,12 @@ -$NetBSD: patch-driver_optmain.ml,v 1.2 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-driver_optmain.ml,v 1.3 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- driver/optmain.ml.orig 2014-08-28 16:24:52.000000000 +0000 +--- driver/optmain.ml.orig 2016-04-25 13:36:01.000000000 +0000 +++ driver/optmain.ml -@@ -111,6 +111,7 @@ module Options = Main_args.Make_optcomp_ - let _principal = set principal - let _rectypes = set recursive_types +@@ -203,6 +203,7 @@ module Options = Main_args.Make_optcomp_ + let _no_rectypes = clear recursive_types + let _remove_unused_arguments = set remove_unused_arguments let _runtime_variant s = runtime_variant := s + let _pkgsrc_runtime = set pkgsrc_runtime let _safe_string = clear unsafe_string diff --git a/lang/ocaml/patches/patch-ocamldoc_Makefile b/lang/ocaml/patches/patch-ocamldoc_Makefile index aebc8fd50ab..57e4d0ea12b 100644 --- a/lang/ocaml/patches/patch-ocamldoc_Makefile +++ b/lang/ocaml/patches/patch-ocamldoc_Makefile @@ -1,44 +1,44 @@ -$NetBSD: patch-ocamldoc_Makefile,v 1.3 2015/04/02 22:40:09 tnn Exp $ +$NetBSD: patch-ocamldoc_Makefile,v 1.4 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- ocamldoc/Makefile.orig 2014-10-04 10:38:53.000000000 +0000 +--- ocamldoc/Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ ocamldoc/Makefile -@@ -241,24 +241,24 @@ odoc_see_lexer.ml: odoc_see_lexer.mll +@@ -256,24 +256,24 @@ odoc_see_lexer.ml: odoc_see_lexer.mll # 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 -- if test -d $(INSTALL_CUSTOMDIR); then : ; else $(MKDIR) $(INSTALL_CUSTOMDIR); fi -- $(CP) $(OCAMLDOC) $(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 -- if test -d stdlib_man; then $(CP) stdlib_man/* $(INSTALL_MANODIR); else : ; fi -+ 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_CUSTOMDIR); then : ; else $(BSD_INSTALL_DATA_DIR) $(INSTALL_CUSTOMDIR); fi -+ $(BSD_INSTALL_SCRIPT) $(OCAMLDOC) $(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 stdlib_man; then $(BSD_INSTALL_MAN) stdlib_man/* $(INSTALL_MANODIR); else : ; fi +- if test -d "$(INSTALL_BINDIR)"; then : ; else $(MKDIR) "$(INSTALL_BINDIR)"; fi +- if test -d "$(INSTALL_LIBDIR)"; then : ; else $(MKDIR) "$(INSTALL_LIBDIR)"; fi +- if test -d "$(INSTALL_CUSTOMDIR)"; then : ; else $(MKDIR) "$(INSTALL_CUSTOMDIR)"; fi +- $(CP) $(OCAMLDOC) "$(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 +- if test -d stdlib_man; then $(CP) stdlib_man/* "$(INSTALL_MANODIR)"; else : ; fi ++ 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_CUSTOMDIR)"; then : ; else $(BSD_INSTALL_DATA_DIR) "$(INSTALL_CUSTOMDIR)"; fi ++ $(BSD_INSTALL_SCRIPT) $(OCAMLDOC) "$(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 stdlib_man; then $(BSD_INSTALL_MAN) stdlib_man/* "$(INSTALL_MANODIR)"; else : ; fi installopt: if test -f $(OCAMLDOC_OPT); then $(MAKE) installopt_really ; fi 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)/$(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)/$(OCAMLDOC_OPT)$(EXE) -+ $(BSD_INSTALL_DATA) ocamldoc.hva $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) $(INSTALL_LIBDIR) -+ $(BSD_INSTALL_DATA) $(INSTALL_MLIS) $(INSTALL_CMIS) $(INSTALL_LIBDIR) +- 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)/$(OCAMLDOC_OPT)$(EXE)" +- $(CP) ocamldoc.hva *.cmx $(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)/$(OCAMLDOC_OPT)$(EXE)" ++ $(BSD_INSTALL_DATA) ocamldoc.hva *.cmx $(OCAMLDOC_LIBA) $(OCAMLDOC_LIBCMXA) "$(INSTALL_LIBDIR)" ++ $(BSD_INSTALL_DATA) $(INSTALL_MLIS) $(INSTALL_CMIS) "$(INSTALL_LIBDIR)" # Testing : ########### diff --git a/lang/ocaml/patches/patch-otherlibs_Makefile.shared b/lang/ocaml/patches/patch-otherlibs_Makefile.shared index 8a3928bc749..f2336ee70b4 100644 --- a/lang/ocaml/patches/patch-otherlibs_Makefile.shared +++ b/lang/ocaml/patches/patch-otherlibs_Makefile.shared @@ -1,29 +1,31 @@ -$NetBSD: patch-otherlibs_Makefile.shared,v 1.4 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-otherlibs_Makefile.shared,v 1.5 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- otherlibs/Makefile.shared.orig 2014-04-29 11:56:17.000000000 +0000 +--- otherlibs/Makefile.shared.orig 2016-04-01 12:53:41.000000000 +0000 +++ otherlibs/Makefile.shared -@@ -61,16 +61,16 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI +@@ -69,18 +69,18 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI install:: if test -f dll$(CLIBNAME)$(EXT_DLL); then \ -- cp dll$(CLIBNAME)$(EXT_DLL) $(INSTALL_STUBLIBDIR)/; fi -- cp lib$(CLIBNAME).$(A) $(INSTALL_LIBDIR)/ -+ $(BSD_INSTALL_LIB) dll$(CLIBNAME)$(EXT_DLL) $(INSTALL_STUBLIBDIR)/; fi -+ $(BSD_INSTALL_DATA) lib$(CLIBNAME).$(A) $(INSTALL_LIBDIR)/ - cd $(INSTALL_LIBDIR); $(RANLIB) lib$(CLIBNAME).$(A) -- cp $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(INSTALL_LIBDIR)/ -- if test -n "$(HEADERS)"; then cp $(HEADERS) $(INSTALL_LIBDIR)/caml/; fi -+ $(BSD_INSTALL_DATA) $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) $(INSTALL_LIBDIR)/ -+ if test -n "$(HEADERS)"; then $(BSD_INSTALL_DATA) $(HEADERS) $(INSTALL_LIBDIR)/caml/; fi +- cp dll$(CLIBNAME)$(EXT_DLL) "$(INSTALL_STUBLIBDIR)/"; fi +- cp lib$(CLIBNAME).$(A) "$(INSTALL_LIBDIR)/" ++ $(BSD_INSTALL_LIB) dll$(CLIBNAME)$(EXT_DLL) "$(INSTALL_STUBLIBDIR)/"; fi ++ $(BSD_INSTALL_DATA) lib$(CLIBNAME).$(A) "$(INSTALL_LIBDIR)/" + cd "$(INSTALL_LIBDIR)"; $(RANLIB) lib$(CLIBNAME).$(A) +- cp $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) "$(INSTALL_LIBDIR)/" ++ $(BSD_INSTALL_DATA) $(LIBNAME).cma $(CMIFILES) $(CMIFILES:.cmi=.mli) "$(INSTALL_LIBDIR)/" + if test -n "$(HEADERS)"; then \ +- cp $(HEADERS) "$(INSTALL_LIBDIR)/caml/"; fi ++ $(BSD_INSTALL_DATA) $(HEADERS) "$(INSTALL_LIBDIR)/caml/"; fi installopt: -- cp $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(INSTALL_LIBDIR)/ -+ $(BSD_INSTALL_DATA) $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) $(INSTALL_LIBDIR)/ - cd $(INSTALL_LIBDIR); $(RANLIB) $(LIBNAME).a -- if test -f $(LIBNAME).cmxs; then cp $(LIBNAME).cmxs $(INSTALL_LIBDIR)/; fi -+ if test -f $(LIBNAME).cmxs; then $(BSD_INSTALL_DATA) $(LIBNAME).cmxs $(INSTALL_LIBDIR)/; fi +- cp $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) "$(INSTALL_LIBDIR)/" ++ $(BSD_INSTALL_DATA) $(CAMLOBJS_NAT) $(LIBNAME).cmxa $(LIBNAME).$(A) "$(INSTALL_LIBDIR)/" + cd "$(INSTALL_LIBDIR)"; $(RANLIB) $(LIBNAME).a + if test -f $(LIBNAME).cmxs; then \ +- cp $(LIBNAME).cmxs "$(INSTALL_LIBDIR)/"; fi ++ $(BSD_INSTALL_DATA) $(LIBNAME).cmxs "$(INSTALL_LIBDIR)/"; fi partialclean: rm -f *.cm* diff --git a/lang/ocaml/patches/patch-otherlibs_dynlink_Makefile b/lang/ocaml/patches/patch-otherlibs_dynlink_Makefile index 47d29fa02c1..bd36db1e993 100644 --- a/lang/ocaml/patches/patch-otherlibs_dynlink_Makefile +++ b/lang/ocaml/patches/patch-otherlibs_dynlink_Makefile @@ -1,22 +1,22 @@ -$NetBSD: patch-otherlibs_dynlink_Makefile,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-otherlibs_dynlink_Makefile,v 1.4 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- otherlibs/dynlink/Makefile.orig 2014-04-29 11:56:17.000000000 +0000 +--- otherlibs/dynlink/Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ otherlibs/dynlink/Makefile -@@ -74,12 +74,12 @@ extract_crc: dynlink.cma extract_crc.cmo +@@ -88,12 +88,12 @@ extract_crc: dynlink.cma extract_crc.cmo INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR) install: -- cp dynlink.cmi dynlink.cma dynlink.mli $(INSTALL_LIBDIR) -- cp extract_crc $(INSTALL_LIBDIR)/extract_crc$(EXE) -+ $(BSD_INSTALL_DATA) dynlink.cmi dynlink.cma dynlink.mli $(INSTALL_LIBDIR) -+ $(BSD_INSTALL_SCRIPT) extract_crc $(INSTALL_LIBDIR)/extract_crc$(EXE) +- cp dynlink.cmi dynlink.cma dynlink.mli "$(INSTALL_LIBDIR)" +- cp extract_crc "$(INSTALL_LIBDIR)/extract_crc$(EXE)" ++ $(BSD_INSTALL_DATA) dynlink.cmi dynlink.cma dynlink.mli "$(INSTALL_LIBDIR)" ++ $(BSD_INSTALL_SCRIPT) extract_crc "$(INSTALL_LIBDIR)/extract_crc$(EXE)" installopt: if $(NATDYNLINK); then \ -- cp $(NATOBJS) dynlink.cmxa dynlink.$(A) $(INSTALL_LIBDIR) && \ -+ $(BSD_INSTALL_DATA) $(NATOBJS) dynlink.cmxa dynlink.$(A) $(INSTALL_LIBDIR) && \ - cd $(INSTALL_LIBDIR) && $(RANLIB) dynlink.$(A); \ +- cp $(NATOBJS) dynlink.cmxa dynlink.$(A) "$(INSTALL_LIBDIR)" && \ ++ $(BSD_INSTALL_DATA) $(NATOBJS) dynlink.cmxa dynlink.$(A) "$(INSTALL_LIBDIR)" && \ + cd "$(INSTALL_LIBDIR)" && $(RANLIB) dynlink.$(A); \ fi diff --git a/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile b/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile index 02a81533241..57e4ff93938 100644 --- a/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile +++ b/lang/ocaml/patches/patch-otherlibs_systhreads_Makefile @@ -1,10 +1,10 @@ -$NetBSD: patch-otherlibs_systhreads_Makefile,v 1.4 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-otherlibs_systhreads_Makefile,v 1.5 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- otherlibs/systhreads/Makefile.orig 2014-04-29 11:56:17.000000000 +0000 +--- otherlibs/systhreads/Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ otherlibs/systhreads/Makefile -@@ -77,21 +77,21 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI +@@ -86,21 +86,21 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI install: if test -f dllthreads.so; then \ @@ -29,8 +29,8 @@ Use BSD_INSTALL_* instead of mkdir and cp - cp libthreadsnat.a $(INSTALL_LIBDIR)/libthreadsnat.a + $(BSD_INSTALL_DATA) libthreadsnat.a $(INSTALL_LIBDIR)/libthreadsnat.a cd $(INSTALL_LIBDIR); $(RANLIB) libthreadsnat.a -- cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(INSTALL_LIBDIR)/threads -+ $(BSD_INSTALL_DATA) $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a $(INSTALL_LIBDIR)/threads - cd $(INSTALL_LIBDIR)/threads; $(RANLIB) threads.a +- cp $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a \ ++ $(BSD_INSTALL_DATA) $(THREAD_OBJS:.cmo=.cmx) threads.cmxa threads.a \ + $(INSTALL_LIBDIR)/threads + cd $(INSTALL_LIBDIR)/threads && $(RANLIB) threads.a - .SUFFIXES: .ml .mli .cmo .cmi .cmx diff --git a/lang/ocaml/patches/patch-otherlibs_threads_Makefile b/lang/ocaml/patches/patch-otherlibs_threads_Makefile index fcb934d81e5..631e989d8d4 100644 --- a/lang/ocaml/patches/patch-otherlibs_threads_Makefile +++ b/lang/ocaml/patches/patch-otherlibs_threads_Makefile @@ -1,16 +1,19 @@ -$NetBSD: patch-otherlibs_threads_Makefile,v 1.6 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-otherlibs_threads_Makefile,v 1.7 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- otherlibs/threads/Makefile.orig 2015-05-12 14:46:37.000000000 +0000 +--- otherlibs/threads/Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ otherlibs/threads/Makefile -@@ -106,12 +106,12 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI +@@ -109,14 +109,14 @@ INSTALL_STUBLIBDIR=$(DESTDIR)$(STUBLIBDI install: - if test -f dllvmthreads.so; then cp dllvmthreads.so $(INSTALL_STUBLIBDIR)/.; fi + if test -f dllvmthreads.so; then \ +- cp dllvmthreads.so $(INSTALL_STUBLIBDIR)/.; \ ++ $(BSD_INSTALL_LIB) dllvmthreads.so $(INSTALL_STUBLIBDIR)/.; \ + fi - mkdir -p $(INSTALL_LIBDIR)/vmthreads - cp libvmthreads.a $(INSTALL_LIBDIR)/vmthreads/libvmthreads.a -+ $(BSD_INSTALL_DATA_DIR) $(INSTALL_LIBDIR)/vmthreads ++ $(BSD_INSTALL_DATA_DIR) -p $(INSTALL_LIBDIR)/vmthreads + $(BSD_INSTALL_DATA) libvmthreads.a $(INSTALL_LIBDIR)/vmthreads/libvmthreads.a cd $(INSTALL_LIBDIR)/vmthreads; $(RANLIB) libvmthreads.a - cp thread.cmi mutex.cmi condition.cmi event.cmi threadUnix.cmi \ diff --git a/lang/ocaml/patches/patch-stdlib_Makefile b/lang/ocaml/patches/patch-stdlib_Makefile index fcfb6dfdf37..cbc8f9e1e6d 100644 --- a/lang/ocaml/patches/patch-stdlib_Makefile +++ b/lang/ocaml/patches/patch-stdlib_Makefile @@ -1,24 +1,24 @@ -$NetBSD: patch-stdlib_Makefile,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-stdlib_Makefile,v 1.4 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- stdlib/Makefile.orig 2014-04-12 10:17:02.000000000 +0000 +--- stdlib/Makefile.orig 2016-04-01 12:53:41.000000000 +0000 +++ stdlib/Makefile -@@ -25,7 +25,7 @@ allopt-prof: stdlib.p.cmxa std_exit.p.cm +@@ -27,7 +27,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 $(INSTALL_LIBDIR) -+ $(BSD_INSTALL_DATA) stdlib.cmxa stdlib.a std_exit.o *.cmx $(INSTALL_LIBDIR) - cd $(INSTALL_LIBDIR); $(RANLIB) stdlib.a +- cp stdlib.cmxa stdlib.a std_exit.o *.cmx "$(INSTALL_LIBDIR)" ++ $(BSD_INSTALL_DATA) stdlib.cmxa stdlib.a std_exit.o *.cmx "$(INSTALL_LIBDIR)" + cd "$(INSTALL_LIBDIR)"; $(RANLIB) stdlib.a installopt-noprof: -@@ -39,7 +39,7 @@ installopt-noprof: - ln -s std_exit.o $(INSTALL_LIBDIR)/std_exit.p.o +@@ -41,7 +41,7 @@ installopt-noprof: + ln -s std_exit.o "$(INSTALL_LIBDIR)/std_exit.p.o" installopt-prof: -- cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(INSTALL_LIBDIR) -+ $(BSD_INSTALL_DATA) stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o $(INSTALL_LIBDIR) - cd $(INSTALL_LIBDIR); $(RANLIB) stdlib.p.a +- cp stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o \ ++ $(BSD_INSTALL_DATA) stdlib.p.cmxa stdlib.p.a std_exit.p.cmx std_exit.p.o \ + "$(INSTALL_LIBDIR)" + cd "$(INSTALL_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 index f46fecfb963..59929ceed86 100644 --- a/lang/ocaml/patches/patch-stdlib_Makefile.shared +++ b/lang/ocaml/patches/patch-stdlib_Makefile.shared @@ -1,26 +1,30 @@ -$NetBSD: patch-stdlib_Makefile.shared,v 1.5 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-stdlib_Makefile.shared,v 1.6 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- stdlib/Makefile.shared.orig 2015-07-20 14:10:11.000000000 +0000 +--- stdlib/Makefile.shared.orig 2016-04-01 12:53:41.000000000 +0000 +++ stdlib/Makefile.shared -@@ -45,16 +45,16 @@ all: stdlib.cma std_exit.cmo camlheader +@@ -61,19 +61,19 @@ endif INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR) - install: install-$(RUNTIMED) + install:: - cp stdlib.cma std_exit.cmo *.cmi *.cmt *.cmti *.mli *.ml \ + $(BSD_INSTALL_DATA) stdlib.cma std_exit.cmo *.cmi *.cmt *.cmti *.mli *.ml \ camlheader_ur \ - $(INSTALL_LIBDIR) -- cp target_camlheader $(INSTALL_LIBDIR)/camlheader -+ $(BSD_INSTALL_DATA) target_camlheader $(INSTALL_LIBDIR)/camlheader + "$(INSTALL_LIBDIR)" +- cp target_camlheader "$(INSTALL_LIBDIR)/camlheader" ++ $(BSD_INSTALL_DATA) target_camlheader "$(INSTALL_LIBDIR)/camlheader" - install-noruntimed: - .PHONY: install-noruntimed + ifeq "$(RUNTIMED)" "runtimed" + install:: +- cp target_camlheaderd $(INSTALL_LIBDIR) ++ $(BSD_INSTALL_DATA) target_camlheaderd $(INSTALL_LIBDIR) + endif - install-runtimed: target_camlheaderd -- cp target_camlheaderd $(INSTALL_LIBDIR)/camlheaderd -+ $(BSD_INSTALL_DATA) target_camlheaderd $(INSTALL_LIBDIR)/camlheaderd - .PHONY: install-runtimed + ifeq "$(RUNTIMEI)" "true" + install:: +- cp target_camlheaderi $(INSTALL_LIBDIR) ++ $(BSD_INSTALL_DATA) target_camlheaderi $(INSTALL_LIBDIR) + endif stdlib.cma: $(OBJS) diff --git a/lang/ocaml/patches/patch-tools_Makefile.shared b/lang/ocaml/patches/patch-tools_Makefile.shared index e4e7800091b..834091d29d4 100644 --- a/lang/ocaml/patches/patch-tools_Makefile.shared +++ b/lang/ocaml/patches/patch-tools_Makefile.shared @@ -1,57 +1,57 @@ -$NetBSD: patch-tools_Makefile.shared,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-tools_Makefile.shared,v 1.4 2016/05/05 08:12:01 jaapb Exp $ Use BSD_INSTALL_* instead of mkdir and cp ---- tools/Makefile.shared.orig 2014-05-12 10:41:21.000000000 +0000 +--- tools/Makefile.shared.orig 2016-04-01 12:53:41.000000000 +0000 +++ tools/Makefile.shared -@@ -59,9 +59,9 @@ INSTALL_BINDIR=$(DESTDIR)$(BINDIR) +@@ -66,9 +66,9 @@ INSTALL_BINDIR=$(DESTDIR)$(BINDIR) INSTALL_LIBDIR=$(DESTDIR)$(LIBDIR) install:: -- cp ocamldep $(INSTALL_BINDIR)/ocamldep$(EXE) -+ $(BSD_INSTALL_SCRIPT) ocamldep $(INSTALL_BINDIR)/ocamldep$(EXE) - if test -f ocamldep.opt; \ -- then cp ocamldep.opt $(INSTALL_BINDIR)/ocamldep.opt$(EXE); else :; fi -+ then $(BSD_INSTALL_PROGRAM) ocamldep.opt $(INSTALL_BINDIR)/ocamldep.opt$(EXE); else :; fi +- cp ocamldep "$(INSTALL_BINDIR)/ocamldep$(EXE)" ++ $(BSD_INSTALL_SCRIPT) ocamldep "$(INSTALL_BINDIR)/ocamldep$(EXE)" + if test -f ocamldep.opt; then \ +- cp ocamldep.opt "$(INSTALL_BINDIR)/ocamldep.opt$(EXE)"; else :; fi ++ $(BSD_INSTALL_PROGRAM) ocamldep.opt "$(INSTALL_BINDIR)/ocamldep.opt$(EXE)"; else :; fi # The profiler -@@ -83,13 +83,13 @@ ocamloptp: ocamloptp.cmo +@@ -95,13 +95,13 @@ ocamloptp: ocamloptp.cmo opt:: profiling.cmx install:: -- cp ocamlprof $(INSTALL_BINDIR)/ocamlprof$(EXE) -- cp ocamlcp $(INSTALL_BINDIR)/ocamlcp$(EXE) -- cp ocamloptp $(INSTALL_BINDIR)/ocamloptp$(EXE) -- cp profiling.cmi profiling.cmo $(INSTALL_LIBDIR) -+ $(BSD_INSTALL_SCRIPT) ocamlprof $(INSTALL_BINDIR)/ocamlprof$(EXE) -+ $(BSD_INSTALL_SCRIPT) ocamlcp $(INSTALL_BINDIR)/ocamlcp$(EXE) -+ $(BSD_INSTALL_SCRIPT) ocamloptp $(INSTALL_BINDIR)/ocamloptp$(EXE) -+ $(BSD_INSTALL_DATA) profiling.cmi profiling.cmo $(INSTALL_LIBDIR) +- cp ocamlprof "$(INSTALL_BINDIR)/ocamlprof$(EXE)" +- cp ocamlcp "$(INSTALL_BINDIR)/ocamlcp$(EXE)" +- cp ocamloptp "$(INSTALL_BINDIR)/ocamloptp$(EXE)" +- cp profiling.cmi profiling.cmo "$(INSTALL_LIBDIR)" ++ $(BSD_INSTALL_SCRIPT) ocamlprof "$(INSTALL_BINDIR)/ocamlprof$(EXE)" ++ $(BSD_INSTALL_SCRIPT) ocamlcp "$(INSTALL_BINDIR)/ocamlcp$(EXE)" ++ $(BSD_INSTALL_SCRIPT) ocamloptp "$(INSTALL_BINDIR)/ocamloptp$(EXE)" ++ $(BSD_INSTALL_DATA) profiling.cmi profiling.cmo "$(INSTALL_LIBDIR)" installopt:: -- cp profiling.cmx profiling.$(O) $(INSTALL_LIBDIR) -+ $(BSD_INSTALL_DATA) profiling.cmx profiling.$(O) $(INSTALL_LIBDIR) +- cp profiling.cmx profiling.$(O) "$(INSTALL_LIBDIR)" ++ $(BSD_INSTALL_DATA) profiling.cmx profiling.$(O) "$(INSTALL_LIBDIR)" clean:: rm -f ocamlprof ocamlcp ocamloptp -@@ -101,7 +101,7 @@ ocamlmklib: ocamlmklibconfig.cmo ocamlmk - $(CAMLC) $(LINKFLAGS) -o ocamlmklib ocamlmklibconfig.cmo ocamlmklib.cmo +@@ -114,7 +114,7 @@ ocamlmklib: ocamlmklibconfig.cmo ocamlmk + ocamlmklib.cmo install:: -- cp ocamlmklib $(INSTALL_BINDIR)/ocamlmklib$(EXE) -+ $(BSD_INSTALL_SCRIPT) ocamlmklib $(INSTALL_BINDIR)/ocamlmklib$(EXE) +- cp ocamlmklib "$(INSTALL_BINDIR)/ocamlmklib$(EXE)" ++ $(BSD_INSTALL_SCRIPT) ocamlmklib "$(INSTALL_BINDIR)/ocamlmklib$(EXE)" clean:: rm -f ocamlmklib -@@ -289,8 +289,8 @@ objinfo: objinfo_helper$(EXE) $(OBJINFO) +@@ -287,8 +287,8 @@ objinfo: objinfo_helper$(EXE) $(OBJINFO) $(CAMLC) -o objinfo $(OBJINFO) install:: -- cp objinfo $(INSTALL_BINDIR)/ocamlobjinfo$(EXE) -- cp objinfo_helper$(EXE) $(INSTALL_LIBDIR)/objinfo_helper$(EXE) -+ $(BSD_INSTALL_SCRIPT) objinfo $(INSTALL_BINDIR)/ocamlobjinfo$(EXE) -+ $(BSD_INSTALL_SCRIPT) objinfo_helper$(EXE) $(INSTALL_LIBDIR)/objinfo_helper$(EXE) +- cp objinfo "$(INSTALL_BINDIR)/ocamlobjinfo$(EXE)" +- cp objinfo_helper$(EXE) "$(INSTALL_LIBDIR)/objinfo_helper$(EXE)" ++ $(BSD_INSTALL_SCRIPT) objinfo "$(INSTALL_BINDIR)/ocamlobjinfo$(EXE)" ++ $(BSD_INSTALL_SCRIPT) objinfo_helper$(EXE) "$(INSTALL_LIBDIR)/objinfo_helper$(EXE)" clean:: rm -f objinfo objinfo_helper$(EXE) diff --git a/lang/ocaml/patches/patch-tools_ocamlcp.ml b/lang/ocaml/patches/patch-tools_ocamlcp.ml index b5f19dac9f9..2cf1189f3b9 100644 --- a/lang/ocaml/patches/patch-tools_ocamlcp.ml +++ b/lang/ocaml/patches/patch-tools_ocamlcp.ml @@ -1,14 +1,14 @@ -$NetBSD: patch-tools_ocamlcp.ml,v 1.2 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-tools_ocamlcp.ml,v 1.3 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- tools/ocamlcp.ml.orig 2014-08-28 16:24:52.000000000 +0000 +--- tools/ocamlcp.ml.orig 2016-04-25 13:36:01.000000000 +0000 +++ tools/ocamlcp.ml -@@ -80,6 +80,7 @@ module Options = Main_args.Make_bytecomp - let _principal = option "-principal" - let _rectypes = option "-rectypes" - let _runtime_variant s = option_with_arg "-runtime-variant" s +@@ -86,6 +86,7 @@ module Options = Main_args.Make_bytecomp + let _output_obj = option "-output-obj" + let _output_complete_obj = option "-output-complete-obj" + let _pack = option "-pack" + let _pkgsrc_runtime = option "-pkgsrc-runtime" - let _safe_string = option "-safe-string" - let _short_paths = option "-short-paths" - let _strict_sequence = option "-strict-sequence" + let _pp _s = incompatible "-pp" + let _ppx _s = incompatible "-ppx" + let _principal = option "-principal" diff --git a/lang/ocaml/patches/patch-tools_ocamlmklib b/lang/ocaml/patches/patch-tools_ocamlmklib index 76ee57d0014..fe3aebc87b9 100644 --- a/lang/ocaml/patches/patch-tools_ocamlmklib +++ b/lang/ocaml/patches/patch-tools_ocamlmklib @@ -1,18 +1,18 @@ -$NetBSD: patch-tools_ocamlmklib,v 1.5 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-tools_ocamlmklib,v 1.6 2016/05/05 08:12:01 jaapb Exp $ Add ELF mode support to ocamlmklib ---- tools/ocamlmklib.ml.orig 2014-12-27 08:44:24.000000000 +0000 +--- tools/ocamlmklib.ml.orig 2016-04-01 12:53:41.000000000 +0000 +++ tools/ocamlmklib.ml -@@ -25,6 +25,7 @@ and c_objs = ref [] (* .o, .a, . +@@ -28,6 +28,7 @@ and c_objs = ref [] (* .o, .a, . and caml_libs = ref [] (* -cclib to pass to ocamlc, ocamlopt *) and caml_opts = ref [] (* -ccopt to pass to ocamlc, ocamlopt *) and dynlink = ref supports_shared_libraries +and elfmode = ref false (* do not add C link lib path to run-time path *) and failsafe = ref false (* whether to fall back on static build only *) and c_libs = ref [] (* libs to pass to mksharedlib and ocamlc -cclib *) - and c_Lopts = ref [] (* options to pass to mksharedlib and ocamlc -cclib *) -@@ -99,8 +100,9 @@ let parse_arguments argv = + and c_Lopts = ref [] (* options to pass to mksharedlib and ocamlc -cclib *) +@@ -104,8 +105,9 @@ let parse_arguments argv = c_libs := s :: !c_libs else if starts_with s "-L" then (c_Lopts := s :: !c_Lopts; @@ -24,7 +24,7 @@ Add ELF mode support to ocamlmklib else if s = "-ocamlcflags" then ocamlc_opts := next_arg () :: !ocamlc_opts else if s = "-ocamlc" then -@@ -115,6 +117,8 @@ let parse_arguments argv = +@@ -120,6 +122,8 @@ let parse_arguments argv = output_c := next_arg() else if s = "-dllpath" || s = "-R" || s = "-rpath" then rpath := next_arg() :: !rpath @@ -33,7 +33,7 @@ Add ELF mode support to ocamlmklib else if starts_with s "-R" then rpath := chop_prefix s "-R" :: !rpath else if s = "-Wl,-rpath" then -@@ -160,6 +164,7 @@ Usage: ocamlmklib [options] <.cmo|.cma|. +@@ -165,6 +169,7 @@ Usage: ocamlmklib [options] <.cmo|.cma|. \n -custom Disable dynamic loading\ \n -g Build with debug information\ \n -dllpath <dir> Add <dir> to the run-time search path for DLLs\ diff --git a/lang/ocaml/patches/patch-tools_ocamloptp.ml b/lang/ocaml/patches/patch-tools_ocamloptp.ml index 57df5b8532f..0fd9436a274 100644 --- a/lang/ocaml/patches/patch-tools_ocamloptp.ml +++ b/lang/ocaml/patches/patch-tools_ocamloptp.ml @@ -1,14 +1,14 @@ -$NetBSD: patch-tools_ocamloptp.ml,v 1.2 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-tools_ocamloptp.ml,v 1.3 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- tools/ocamloptp.ml.orig 2014-08-28 16:24:52.000000000 +0000 +--- tools/ocamloptp.ml.orig 2016-04-25 13:36:01.000000000 +0000 +++ tools/ocamloptp.ml -@@ -82,6 +82,7 @@ module Options = Main_args.Make_optcomp_ - let _principal = option "-principal" - let _rectypes = option "-rectypes" - let _runtime_variant s = option_with_arg "-runtime-variant" s +@@ -108,6 +108,7 @@ module Options = Main_args.Make_optcomp_ + let _output_complete_obj = option "-output-complete-obj" + let _p = option "-p" + let _pack = option "-pack" + let _pkgsrc_runtime = option "-pkgsrc-runtime" - let _S = option "-S" - let _safe_string = option "-safe-string" - let _short_paths = option "-short-paths" + let _pp _s = incompatible "-pp" + let _ppx _s = incompatible "-ppx" + let _principal = option "-principal" diff --git a/lang/ocaml/patches/patch-utils_clflags.ml b/lang/ocaml/patches/patch-utils_clflags.ml index ed4d4e1985b..ae09ba3a2cf 100644 --- a/lang/ocaml/patches/patch-utils_clflags.ml +++ b/lang/ocaml/patches/patch-utils_clflags.ml @@ -1,16 +1,16 @@ -$NetBSD: patch-utils_clflags.ml,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-utils_clflags.ml,v 1.4 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- utils/clflags.ml.orig 2015-05-12 15:31:26.000000000 +0000 +--- utils/clflags.ml.orig 2016-04-01 12:53:41.000000000 +0000 +++ utils/clflags.ml -@@ -108,7 +108,8 @@ let std_include_dir () = - let shared = ref false (* -shared *) - let dlcode = ref true (* not -nodynlink *) +@@ -148,7 +148,8 @@ let pic_code = ref (match Config.archite + | "amd64" -> true + | _ -> false) -let runtime_variant = ref "";; (* -runtime-variant *) +let runtime_variant = ref "" (* -runtime-variant *) -+let pkgsrc_runtime = ref false;; (* -pkgsrc-runtime *) ++let pkgsrc_runtime = ref false;; (* -pkgsrc-runtime *) let keep_docs = ref false (* -keep-docs *) let keep_locs = ref false (* -keep-locs *) diff --git a/lang/ocaml/patches/patch-utils_clflags.mli b/lang/ocaml/patches/patch-utils_clflags.mli index 532a12ed4da..167c3f64002 100644 --- a/lang/ocaml/patches/patch-utils_clflags.mli +++ b/lang/ocaml/patches/patch-utils_clflags.mli @@ -1,12 +1,12 @@ -$NetBSD: patch-utils_clflags.mli,v 1.3 2015/12/29 23:34:53 dholland Exp $ +$NetBSD: patch-utils_clflags.mli,v 1.4 2016/05/05 08:12:01 jaapb Exp $ pkgsrc_runtime flag ---- utils/clflags.mli.orig 2015-05-12 15:31:26.000000000 +0000 +--- utils/clflags.mli.orig 2016-04-01 12:53:41.000000000 +0000 +++ utils/clflags.mli -@@ -92,6 +92,7 @@ val std_include_dir : unit -> string lis - val shared : bool ref +@@ -174,6 +174,7 @@ val shared : bool ref val dlcode : bool ref + val pic_code : bool ref val runtime_variant : string ref +val pkgsrc_runtime : bool ref val force_slash : bool ref |