Hi, TL;DR: Diff to unbreak lang/haxe by building the OCaml deps with the port. Works, ok's and/or comments appreciated. The following provides details about this large diff and justification.
Long version: My mistake when initially importing haxe was assuming that the prebuilt, bundled OCaml dependencies would be bytecode which they are not which is why things fell apart immediately. OCaml has made a switch from individual ports to relying primarily on opam for the ecosystem (see [1]). Rather than re-adding ports like devel/ocaml-extlib, the best way forward for haxe seems to be to build the OCaml build dependencies with the port. This is what I've done and the diff below is the result. It build and runs the hello world example [2] and passes 'make port-lib-depends-check' and portcheck (except for one line > 80; see below). My experience with OCaml is limited. That's why feedback would be appreciated. Or ok's, if it looks acceptable. Here the key points to understand the diff: - OCaml deps are only built, and the long MAKE_FLAGS line provides all built packages to OCAMLPATH (> 80 characters). - OCaml sources are pulled from a bundle that I keep on Github [3]. This and other submodules (haxelib and hx3compat) are pulled in with MASTER_SITES{0,1,2} following the example in emulators/ppsspp by bentley@. - ocaml-sha uses the deprecated jbuilder at this point. When jbuilder is removed eventually, it seems that switching to dune is as simple as running 'dune upgrade' to use dune instead. - The port applies patches to the symlinked ocamldeps directory, which works fine, but 'make update-patches' doesn't work in it. I created the diffs manually ('diff -upa' + manual filename and header), and it appears this will be needed if changes to patches of the OCaml dependencies need to be made in the future. - post-extract follows the emulators/ppsspp example, too. - do-build first builds the OCaml dependencies in the required order, then haxe. The mv(1) commands change directory names so that they can be recognized as the proper modules in OCAMLPATH. - The META file for xml-light is created the same was as in its opam file. - The META file for ptmap (in $FILESDIR/ptmap-META) is taken from what is installed by opam(1) because the repo doesn't include a META file or a recipe for it. - BDEP shells/bash needed for the bootstrap for obuild. - The patches are all pretty straightforward. Many are to workaround the deprecated Pervasives lib, and to add verbosity (dune is silent by default). ok's and/or comments welcome! [1] https://marc.info/?l=openbsd-ports-cvs&m=155397217912244&q=mbox [2] https://haxe.org/manual/introduction-hello-world.html [3] https://github.com/rfht/haxe-ocamldeps Index: Makefile =================================================================== RCS file: /cvs/ports/lang/haxe/Makefile,v retrieving revision 1.2 diff -u -p -r1.2 Makefile --- Makefile 19 Jan 2020 18:52:55 -0000 1.2 +++ Makefile 20 Feb 2020 17:20:59 -0000 @@ -1,33 +1,50 @@ # $OpenBSD: Makefile,v 1.2 2020/01/19 18:52:55 thfr Exp $ -BROKEN = OCaml dependencies need to be built instead of bundled - COMMENT = toolkit for the Haxe programming language V = 4.0.5 DISTNAME = haxe-${V} +REVISION = 0 + +GH_ACCOUNT = HaxeFoundation +GH_PROJECT = haxe +GH_TAGNAME = ${V} + +XML_LIGHT_V = 2.4 +HAXELIB = 4b27f91d8a4ff279d9903091680fee2c93a0d574 +HX3COMPAT = f1f18201e5c0479cb5adf5f6028788b37f37b730 + +MASTER_SITES0 = https://github.com/rfht/haxe-ocamldeps/releases/download/${V}/ +MASTER_SITES1 = https://github.com/HaxeFoundation/haxelib/archive/ +MASTER_SITES2 = https://github.com/haxefoundation/hx3compat/archive/ + +DISTFILES = ${DISTNAME}${EXTRACT_SUFX} \ + haxe-ocamldeps-${V}.tar.gz:0 \ + ${HAXELIB}.tar.gz:1 \ + ${HX3COMPAT}.tar.gz:2 + CATEGORIES = lang devel HOMEPAGE = https://haxe.org MAINTAINER = Thomas Frohwein <t...@openbsd.org> # GPLv2+ (Haxe compiler), MIT (standard lib and Neko virtual machine) +# OCaml build deps: LGPL 2.1, BSD-2-clause, ISC, MIT PERMIT_PACKAGE = Yes WANTLIB += c gc m neko pcre pthread z -MASTER_SITES = https://thfr.info/distfiles/ -EXTRACT_SUFX = .tar.xz - MODULES = lang/ocaml -BUILD_DEPENDS = devel/ocaml-ocamlbuild \ +BUILD_DEPENDS = devel/ocaml-cppo \ lang/nekovm \ lang/ocaml-camlp5 \ + shells/bash \ sysutils/findlib LIB_DEPENDS = devel/boehm-gc \ devel/pcre \ lang/nekovm -MAKE_FLAGS = OCAMLPATH=${WRKSRC}/ocamldeps +MAKE_FLAGS += OCAMLPATH=${WRKSRC}/ocamldeps/ppx_derivers/_build/install/default/lib:${WRKSRC}/ocamldeps/ocaml-migrate-parsetree/_build/install/default/lib:${WRKSRC}/ocamldeps/gen/_build/install/default/lib:${WRKSRC}/ocamldeps/ppx_tools_versioned/_build/install/default/lib:${WRKSRC}/ocamldeps/ocaml-extlib:${WRKSRC}/ocamldeps/sedlex/_build/install/default/lib:${WRKSRC}/ocamldeps:${WRKSRC}/ocamldeps/ptmap/dist/build:${WRKSRC}/ocamldeps/ocaml-sha/_build/install/default/lib \ + PATH=${PATH}:${WRKSRC}/ocamldeps:${WRKSRC}/ocamldeps/obuild/dist/build/obuild USE_GMAKE = Yes @@ -35,7 +52,47 @@ USE_GMAKE = Yes # unit, and cpp unit tests. Unit tests require graphical browser. NO_TEST = Yes +post-extract: + rmdir ${WRKSRC}/extra/haxelib_src + ln -s ${WRKDIR}/haxelib-${HAXELIB} ${WRKSRC}/extra/haxelib_src + rmdir ${WRKSRC}/extra/haxelib_src/hx3compat + ln -s ${WRKDIR}/hx3compat-${HX3COMPAT} ${WRKSRC}/extra/haxelib_src/hx3compat + ln -s ${WRKDIR}/haxe-ocamldeps ${WRKSRC}/ocamldeps + do-gen: ${SUBST_CMD} ${WRKSRC}/src/compiler/main.ml + +do-build: + cd ${WRKSRC}/ocamldeps/obuild; OCAML_COLOR=never ./bootstrap + for odep in \ + ppx_derivers\ + gen\ + ocaml-migrate-parsetree\ + ppx_tools_versioned\ + ocaml-sha\ + ptmap\ + ; do \ + cd ${WRKSRC}/ocamldeps/$$odep ; \ + env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + -f ${MAKE_FILE} ${ALL_TARGET} \ + ; done + cd ${WRKSRC}/ocamldeps/sedlex; \ + env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + -f ${MAKE_FILE} build + cd ${WRKSRC}/ocamldeps/ocaml-extlib; \ + env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + -f ${MAKE_FILE} minimal=1 build + cd ${WRKSRC}/ocamldeps/xml-light; \ + env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + -f ${MAKE_FILE} all opt + mv ${WRKSRC}/ocamldeps/ocaml-extlib/{src,extlib} + cd ${WRKSRC}/ocamldeps ; \ + cp xml-light/META{.in,} ; \ + sed -itmp "s|@VERSION@|${XML_LIGHT_V}|g" xml-light/META + mv ${WRKSRC}/ocamldeps/ptmap/dist/build/{lib-,}ptmap + cp ${FILESDIR}/ptmap-META ${WRKSRC}/ocamldeps/ptmap/dist/build/ptmap/META + cd ${WRKSRC} ; \ + env -i ${MAKE_ENV} ${MAKE_PROGRAM} ${MAKE_FLAGS} \ + -f ${MAKE_FILE} ${ALL_TARGET} .include <bsd.port.mk> Index: distinfo =================================================================== RCS file: /cvs/ports/lang/haxe/distinfo,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 distinfo --- distinfo 18 Jan 2020 00:31:05 -0000 1.1.1.1 +++ distinfo 20 Feb 2020 17:20:59 -0000 @@ -1,2 +1,8 @@ -SHA256 (haxe-4.0.5.tar.xz) = Mu7HjucW0JsxsvEgRAyqPtFhIMmS/3pyY/GSJZ9l17I= -SIZE (haxe-4.0.5.tar.xz) = 38784960 +SHA256 (4b27f91d8a4ff279d9903091680fee2c93a0d574.tar.gz) = +oVPPxJp3gvVUC7rrz8yHwJ/IoN17OyHe70uaHNPu04= +SHA256 (f1f18201e5c0479cb5adf5f6028788b37f37b730.tar.gz) = 0QDeX2BsGFMDce7YOrrMHCCCZtslz+L6w4d0MDU6by4= +SHA256 (haxe-4.0.5.tar.gz) = dQVhmdxcX0wAt+Sc/F8k2sqzZz1zdC+Y4VK9zB2RclY= +SHA256 (haxe-ocamldeps-4.0.5.tar.gz) = iavf+krDMtSXtVD8Gi63lpopgRK+5KhLlPyvxhmb86M= +SIZE (4b27f91d8a4ff279d9903091680fee2c93a0d574.tar.gz) = 356940 +SIZE (f1f18201e5c0479cb5adf5f6028788b37f37b730.tar.gz) = 26695 +SIZE (haxe-4.0.5.tar.gz) = 8423912 +SIZE (haxe-ocamldeps-4.0.5.tar.gz) = 2077910 Index: files/ptmap-META =================================================================== RCS file: files/ptmap-META diff -N files/ptmap-META --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/ptmap-META 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,6 @@ +version = "1.0" +requires = "" +archive(byte) = "ptmap.cma" +archive(byte,plugin) = "ptmap.cma" +archive(native) = "ptmap.cmxa" +archive(native,plugin) = "ptmap.cmxs" Index: patches/patch-libs_extc_process_stubs_c =================================================================== RCS file: /cvs/ports/lang/haxe/patches/patch-libs_extc_process_stubs_c,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-libs_extc_process_stubs_c --- patches/patch-libs_extc_process_stubs_c 18 Jan 2020 00:31:05 -0000 1.1.1.1 +++ patches/patch-libs_extc_process_stubs_c 20 Feb 2020 17:20:59 -0000 @@ -1,5 +1,7 @@ $OpenBSD: patch-libs_extc_process_stubs_c,v 1.1.1.1 2020/01/18 00:31:05 thfr Exp $ +include OpenBSD in ifdef + Index: libs/extc/process_stubs.c --- libs/extc/process_stubs.c.orig +++ libs/extc/process_stubs.c Index: patches/patch-libs_extlib-leftovers_uTF8_ml =================================================================== RCS file: /cvs/ports/lang/haxe/patches/patch-libs_extlib-leftovers_uTF8_ml,v retrieving revision 1.1.1.1 diff -u -p -r1.1.1.1 patch-libs_extlib-leftovers_uTF8_ml --- patches/patch-libs_extlib-leftovers_uTF8_ml 18 Jan 2020 00:31:05 -0000 1.1.1.1 +++ patches/patch-libs_extlib-leftovers_uTF8_ml 20 Feb 2020 17:20:59 -0000 @@ -1,5 +1,7 @@ $OpenBSD: patch-libs_extlib-leftovers_uTF8_ml,v 1.1.1.1 2020/01/18 00:31:05 thfr Exp $ +Switch old Pervasives to Stdlib + Index: libs/extlib-leftovers/uTF8.ml --- libs/extlib-leftovers/uTF8.ml.orig +++ libs/extlib-leftovers/uTF8.ml Index: patches/patch-ocamldeps_gen_Makefile =================================================================== RCS file: patches/patch-ocamldeps_gen_Makefile diff -N patches/patch-ocamldeps_gen_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_gen_Makefile 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Make dune build verbose + +Index: ocamldeps/gen/Makefile +--- ocamldeps/gen/Makefile.orig ++++ ocamldeps/gen/Makefile +@@ -2,7 +2,7 @@ + all: build test + + build: +- @dune build @install ++ @dune build @install --verbose + + test: + @dune runtest --no-buffer --force Index: patches/patch-ocamldeps_gen_src_dune =================================================================== RCS file: patches/patch-ocamldeps_gen_src_dune diff -N patches/patch-ocamldeps_gen_src_dune --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_gen_src_dune 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +remove unneeded tests with otherwise add qtest dependency + +Index: ocamldeps/gen/src/dune +--- ocamldeps/gen/src/dune.orig ++++ ocamldeps/gen/src/dune +@@ -14,6 +14,5 @@ + (flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels) + (ocamlopt_flags :standard (:include flambda.flags)) + (libraries bytes) +- (inline_tests (backend qtest.lib)) + ) + Index: patches/patch-ocamldeps_gen_src_gen_ml =================================================================== RCS file: patches/patch-ocamldeps_gen_src_gen_ml diff -N patches/patch-ocamldeps_gen_src_gen_ml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_gen_src_gen_ml 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,159 @@ +$OpenBSD$ + +don't use deprecated modules Pervasives + +Index: ocamldeps/gen/src/gen.ml +--- ocamldeps/gen/src/gen.ml.orig ++++ ocamldeps/gen/src/gen.ml +@@ -668,7 +668,7 @@ let eq ?(eq=(=)) gen1 gen2 = + eq (of_list l1)(of_list l2) = (l1 = l2)) + *) + +-let lexico ?(cmp=Pervasives.compare) gen1 gen2 = ++let lexico ?(cmp=Stdlib.compare) gen1 gen2 = + let rec lexico () = + match gen1(), gen2() with + | None, None -> 0 +@@ -684,7 +684,7 @@ let compare ?cmp gen1 gen2 = lexico ?cmp gen1 gen2 + (*$Q + (Q.pair (Q.list Q.small_int)(Q.list Q.small_int)) (fun (l1,l2) -> \ + let sign x = if x < 0 then -1 else if x=0 then 0 else 1 in \ +- sign (compare (of_list l1)(of_list l2)) = sign (Pervasives.compare l1 l2)) ++ sign (compare (of_list l1)(of_list l2)) = sign (Stdlib.compare l1 l2)) + *) + + let rec find p e = match e () with +@@ -838,17 +838,17 @@ let merge next_gen = + + (*$T + merge (of_list [of_list [1;3;5]; of_list [2;4;6]; of_list [7;8;9]]) \ +- |> to_list |> List.sort Pervasives.compare = [1;2;3;4;5;6;7;8;9] ++ |> to_list |> List.sort Stdlib.compare = [1;2;3;4;5;6;7;8;9] + *) + + (*$R + let e = of_list [1--3; 4--6; 7--9] in + let e' = merge e in + OUnit.assert_equal [1;2;3;4;5;6;7;8;9] +- (to_list e' |> List.sort Pervasives.compare); ++ (to_list e' |> List.sort Stdlib.compare); + *) + +-let intersection ?(cmp=Pervasives.compare) gen1 gen2 = ++let intersection ?(cmp=Stdlib.compare) gen1 gen2 = + let x1 = ref (gen1 ()) in + let x2 = ref (gen2 ()) in + let rec next () = +@@ -869,7 +869,7 @@ let intersection ?(cmp=Pervasives.compare) gen1 gen2 = + |> to_list = [1;2;4;8] + *) + +-let sorted_merge ?(cmp=Pervasives.compare) gen1 gen2 = ++let sorted_merge ?(cmp=Stdlib.compare) gen1 gen2 = + let x1 = ref (gen1 ()) in + let x2 = ref (gen2 ()) in + fun () -> +@@ -937,7 +937,7 @@ module Heap = struct + x + end + +-let sorted_merge_n ?(cmp=Pervasives.compare) l = ++let sorted_merge_n ?(cmp=Stdlib.compare) l = + (* make a heap of (value, generator) *) + let cmp (v1,_) (v2,_) = cmp v1 v2 in + let heap = Heap.empty ~cmp in +@@ -1169,7 +1169,7 @@ let product gena genb = + + (*$T + product (1--3) (of_list ["a"; "b"]) |> to_list \ +- |> List.sort Pervasives.compare = \ ++ |> List.sort Stdlib.compare = \ + [1, "a"; 1, "b"; 2, "a"; 2, "b"; 3, "a"; 3, "b"] + *) + +@@ -1177,7 +1177,7 @@ let product gena genb = + let printer = pi2list in + let e = Gen.product (1--3) (4--5) in + OUnit.assert_equal ~printer [1,4; 1,5; 2,4; 2,5; 3,4; 3,5] +- (List.sort Pervasives.compare (Gen.to_list e)); ++ (List.sort Stdlib.compare (Gen.to_list e)); + *) + + (* Group equal consecutive elements together. *) +@@ -1232,7 +1232,7 @@ let uniq ?(eq=(=)) gen = + [0;1;0;2;3;4;5;10] + *) + +-let sort ?(cmp=Pervasives.compare) gen = ++let sort ?(cmp=Stdlib.compare) gen = + (* build heap *) + let h = Heap.empty ~cmp in + iter (Heap.insert h) gen; +@@ -1248,7 +1248,7 @@ let sort ?(cmp=Pervasives.compare) gen = + + (* NOTE: using a set is not really possible, because once we have built the + set there is no simple way to iterate on it *) +-let sort_uniq ?(cmp=Pervasives.compare) gen = ++let sort_uniq ?(cmp=Stdlib.compare) gen = + uniq ~eq:(fun x y -> cmp x y = 0) (sort ~cmp gen) + + (*$T +@@ -1350,7 +1350,7 @@ let permutations g = + next (make_machine (List.length l) l) + + (*$T permutations +- permutations (1--3) |> to_list |> List.sort Pervasives.compare = \ ++ permutations (1--3) |> to_list |> List.sort Stdlib.compare = \ + [[1;2;3]; [1;3;2]; [2;1;3]; [2;3;1]; [3;1;2]; [3;2;1]] + permutations empty |> to_list = [[]] + permutations (singleton 1) |> to_list = [[1]] +@@ -1434,7 +1434,7 @@ let permutations_heap g = + else next {elts = a; n=n; is=[0]} + + (*$T permutations_heap +- permutations_heap (1--3) |> to_list |> List.sort Pervasives.compare = \ ++ permutations_heap (1--3) |> to_list |> List.sort Stdlib.compare = \ + [[|1;2;3|]; [|1;3;2|]; [|2;1;3|]; [|2;3;1|]; [|3;1;2|]; [|3;2;1|]] + permutations_heap empty |> to_list = [] + permutations_heap (singleton 1) |> to_list = [[|1|]] +@@ -1480,8 +1480,8 @@ let combinations n g = + next (make_state n l) + + (*$T +- combinations 2 (1--4) |> map (List.sort Pervasives.compare) \ +- |> to_list |> List.sort Pervasives.compare = \ ++ combinations 2 (1--4) |> map (List.sort Stdlib.compare) \ ++ |> to_list |> List.sort Stdlib.compare = \ + [[1;2]; [1;3]; [1;4]; [2;3]; [2;4]; [3;4]] + combinations 0 (1--4) |> to_list = [[]] + combinations 1 (singleton 1) |> to_list = [[1]] +@@ -1521,12 +1521,12 @@ let power_set g = + next (make_state l) + + (*$T +- power_set (1--3) |> map (List.sort Pervasives.compare) \ +- |> to_list |> List.sort Pervasives.compare = \ ++ power_set (1--3) |> map (List.sort Stdlib.compare) \ ++ |> to_list |> List.sort Stdlib.compare = \ + [[]; [1]; [1;2]; [1;2;3]; [1;3]; [2]; [2;3]; [3]] + power_set empty |> to_list = [[]] +- power_set (singleton 1) |> map (List.sort Pervasives.compare) \ +- |> to_list |> List.sort Pervasives.compare = [[]; [1]] ++ power_set (singleton 1) |> map (List.sort Stdlib.compare) \ ++ |> to_list |> List.sort Stdlib.compare = [[]; [1]] + *) + + (** {3 Conversion} *) +@@ -1843,10 +1843,10 @@ module Restart = struct + + let uniq ?eq e () = uniq ?eq (e ()) + +- let sort ?(cmp=Pervasives.compare) enum = ++ let sort ?(cmp=Stdlib.compare) enum = + fun () -> sort ~cmp (enum ()) + +- let sort_uniq ?(cmp=Pervasives.compare) e = ++ let sort_uniq ?(cmp=Stdlib.compare) e = + let e' = sort ~cmp e in + uniq ~eq:(fun x y -> cmp x y = 0) e' + Index: patches/patch-ocamldeps_ocaml-migrate-parsetree_Makefile =================================================================== RCS file: patches/patch-ocamldeps_ocaml-migrate-parsetree_Makefile diff -N patches/patch-ocamldeps_ocaml-migrate-parsetree_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_ocaml-migrate-parsetree_Makefile 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Make dune build verbose + +Index: ocamldeps/ocaml-migrate-parsetree/Makefile +--- ocamldeps/ocaml-migrate-parsetree/Makefile.orig ++++ ocamldeps/ocaml-migrate-parsetree/Makefile +@@ -7,7 +7,7 @@ INSTALL_ARGS := $(if $(PREFIX),--prefix $(PREFIX),) + + .PHONY: all + all: +- dune build @install ++ dune build @install --verbose + + .PHONY: install + install: Index: patches/patch-ocamldeps_ocaml-sha_Makefile =================================================================== RCS file: patches/patch-ocamldeps_ocaml-sha_Makefile diff -N patches/patch-ocamldeps_ocaml-sha_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_ocaml-sha_Makefile 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +Make jbuilder verbose + +Index: ocamldeps/ocaml-sha/Makefile +--- ocamldeps/ocaml-sha/Makefile.orig ++++ ocamldeps/ocaml-sha/Makefile +@@ -1,5 +1,5 @@ + all: +- jbuilder build --dev @install ++ jbuilder build --dev @install --verbose + + test: + jbuilder runtest Index: patches/patch-ocamldeps_ocaml-sha_bitfn_h =================================================================== RCS file: patches/patch-ocamldeps_ocaml-sha_bitfn_h diff -N patches/patch-ocamldeps_ocaml-sha_bitfn_h --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_ocaml-sha_bitfn_h 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,23 @@ +$OpenBSD$ + +fix conflict with endian.h + +Index: ocamldeps/ocaml-sha/bitfn.h +--- ocamldeps/ocaml-sha/bitfn.h.orig ++++ ocamldeps/ocaml-sha/bitfn.h +@@ -40,6 +40,7 @@ static inline uint64_t ror64(uint64_t word, unsigned i + return (word >> shift) | (word << (64 - shift)); + } + ++/* + #if (defined(__i386__) || defined(__x86_64__)) && !defined(NO_INLINE_ASM) + static inline unsigned int swap32(unsigned int a) + { +@@ -66,6 +67,7 @@ static inline uint64_t swap64(uint64_t a) + (((uint64_t) swap32((unsigned int) a)) << 32); + } + #endif ++*/ + + /* big endian to cpu */ + #ifdef __APPLE__ Index: patches/patch-ocamldeps_ocaml-sha_sha1_ml =================================================================== RCS file: patches/patch-ocamldeps_ocaml-sha_sha1_ml diff -N patches/patch-ocamldeps_ocaml-sha_sha1_ml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_ocaml-sha_sha1_ml 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +replace deprecated lib Pervasives + +Index: ocamldeps/ocaml-sha/sha1.ml +--- ocamldeps/ocaml-sha/sha1.ml.orig ++++ ocamldeps/ocaml-sha/sha1.ml +@@ -62,7 +62,7 @@ let channel chan len = + while (!left == -1 || !left > 0) && not !eof + do + let len = if !left < 0 then blksize else (min !left blksize) in +- let readed = Pervasives.input chan buf 0 len in ++ let readed = Stdlib.input chan buf 0 len in + if readed = 0 then + eof := true + else ( Index: patches/patch-ocamldeps_ocaml-sha_sha256_ml =================================================================== RCS file: patches/patch-ocamldeps_ocaml-sha_sha256_ml diff -N patches/patch-ocamldeps_ocaml-sha_sha256_ml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_ocaml-sha_sha256_ml 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +replace deprecated lib Pervasives + +Index: ocamldeps/ocaml-sha/sha256.ml +--- ocamldeps/ocaml-sha/sha256.ml.orig ++++ ocamldeps/ocaml-sha/sha256.ml +@@ -66,7 +66,7 @@ let channel chan len = + while (!left == -1 || !left > 0) && not !eof + do + let len = if !left < 0 then blksize else (min !left blksize) in +- let readed = Pervasives.input chan buf 0 len in ++ let readed = Stdlib.input chan buf 0 len in + if readed = 0 then + eof := true + else ( Index: patches/patch-ocamldeps_ppx_derivers_Makefile =================================================================== RCS file: patches/patch-ocamldeps_ppx_derivers_Makefile diff -N patches/patch-ocamldeps_ppx_derivers_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_ppx_derivers_Makefile 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Make dune build verbose + +Index: ocamldeps/ppx_derivers/Makefile +--- ocamldeps/ppx_derivers/Makefile.orig ++++ ocamldeps/ppx_derivers/Makefile +@@ -2,7 +2,7 @@ INSTALL_ARGS := $(if $(PREFIX),--prefix $(PREFIX),) + + .PHONY: all + all: +- dune build ++ dune build --verbose + + .PHONY: install + install: Index: patches/patch-ocamldeps_ppx_tools_versioned_Makefile =================================================================== RCS file: patches/patch-ocamldeps_ppx_tools_versioned_Makefile diff -N patches/patch-ocamldeps_ppx_tools_versioned_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_ppx_tools_versioned_Makefile 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Make dune build verbose + +Index: ocamldeps/ppx_tools_versioned/Makefile +--- ocamldeps/ppx_tools_versioned/Makefile.orig ++++ ocamldeps/ppx_tools_versioned/Makefile +@@ -1,7 +1,7 @@ + INSTALL_ARGS := $(if $(PREFIX),--prefix $(PREFIX),) + + all: +- dune build ++ dune build --verbose + + install: + dune install $(INSTALL_ARGS) Index: patches/patch-ocamldeps_sedlex_Makefile =================================================================== RCS file: patches/patch-ocamldeps_sedlex_Makefile diff -N patches/patch-ocamldeps_sedlex_Makefile --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_sedlex_Makefile 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +Make dune build verbose + +Index: ocamldeps/sedlex/Makefile +--- ocamldeps/sedlex/Makefile.orig ++++ ocamldeps/sedlex/Makefile +@@ -7,7 +7,7 @@ INSTALL_ARGS := $(if $(PREFIX),--prefix $(PREFIX),) + .PHONY: build install uninstall clean doc test all + + build: +- dune build @install ++ dune build @install --verbose + + install: + dune install $(INSTALL_ARGS) Index: patches/patch-ocamldeps_sedlex_src_generator_gen_unicode_ml_inc =================================================================== RCS file: patches/patch-ocamldeps_sedlex_src_generator_gen_unicode_ml_inc diff -N patches/patch-ocamldeps_sedlex_src_generator_gen_unicode_ml_inc --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_sedlex_src_generator_gen_unicode_ml_inc 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,24 @@ +$OpenBSD$ + +replace deprecated lib Pervasives + +Index: ocamldeps/sedlex/src/generator/gen_unicode.ml.inc +--- ocamldeps/sedlex/src/generator/gen_unicode.ml.inc.orig ++++ ocamldeps/sedlex/src/generator/gen_unicode.ml.inc +@@ -77,14 +77,14 @@ let split list n = + + let print_elements ch hashtbl = + let cats = +- List.sort_uniq Pervasives.compare ++ List.sort_uniq Stdlib.compare + (Hashtbl.fold (fun cat _ l -> cat::l) hashtbl []) + in + let len = List.length cats in + List.iter (fun c -> + let entries = + List.map (fun (b,e) -> Printf.sprintf "0x%x, 0x%x" b e) +- (List.sort_uniq Pervasives.compare ++ (List.sort_uniq Stdlib.compare + (Hashtbl.find_all hashtbl c)) + in + let entries = Index: patches/patch-ocamldeps_sedlex_src_lib_dune =================================================================== RCS file: patches/patch-ocamldeps_sedlex_src_lib_dune diff -N patches/patch-ocamldeps_sedlex_src_lib_dune --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-ocamldeps_sedlex_src_lib_dune 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,14 @@ +$OpenBSD$ + +remove uchar library which isn't needed for the build + +Index: ocamldeps/sedlex/src/lib/dune +--- ocamldeps/sedlex/src/lib/dune.orig ++++ ocamldeps/sedlex/src/lib/dune +@@ -2,5 +2,5 @@ + (name sedlex) + (public_name sedlex) + (wrapped false) +- (libraries gen uchar) ++ (libraries gen) + (flags :standard -w +A-4-9 -safe-string)) Index: patches/patch-sha512_ml =================================================================== RCS file: patches/patch-sha512_ml diff -N patches/patch-sha512_ml --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-sha512_ml 20 Feb 2020 17:20:59 -0000 @@ -0,0 +1,16 @@ +$OpenBSD$ + +change deprecated lib Pervasive + +Index: ocamldeps/ocaml-sha/sha512.ml +--- ocamldeps/ocaml-sha/sha512.ml.orig ++++ ocamldeps/ocaml-sha/sha512.ml +@@ -66,7 +66,7 @@ let channel chan len = + while (!left == -1 || !left > 0) && not !eof + do + let len = if !left < 0 then blksize else (min !left blksize) in +- let readed = Pervasives.input chan buf 0 len in ++ let readed = Stdlib.input chan buf 0 len in + if readed = 0 then + eof := true + else (