Wednesday, September 07, 2022

Re: current status of OCaml

On 2022/09/07 22:16, Volker Schlecht wrote:
>
> > Likewise, an upgrade to 4.14 in ports would be very welcome, and there should be no blockers.
>
> Here's a draft patch for 4.14.0 that builds and passes all tests on amd64.
>
> I did *not* try and rebuild anything else with it yet! I'm only sending this
> because I'm a bit uncertain about what I had to do in
> patches/patch-build-aux_ocaml_version_m4 ... seems OpenBSDs m4 doesn't like
> 'd' types in format strings. Is there any nicer solution for such cases?

The _nicest_ solution would be to add support to src/usr.bin/m4.
(Or you can use gnu m4 in ports ..)

> The configure.ac changes seem to have all been merged upstream, AFAICT.
>
> cu,
> Volker

> Index: Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/ocaml/Makefile,v
> retrieving revision 1.94
> diff -u -p -r1.94 Makefile
> --- Makefile 11 Mar 2022 19:29:08 -0000 1.94
> +++ Makefile 7 Sep 2022 20:10:10 -0000
> @@ -2,8 +2,7 @@ COMMENT = ML language with complete c
>
> # XXX Don't even think of updating ocaml alone.
> # Do check that the ports that depend on it still work, or repair them.
> -VERSION= 4.12.1
> -REVISION= 1
> +VERSION= 4.14.0
>
> PKGNAME = ocaml-${VERSION:C/\+//}
>
> Index: distinfo
> ===================================================================
> RCS file: /cvs/ports/lang/ocaml/distinfo,v
> retrieving revision 1.29
> diff -u -p -r1.29 distinfo
> --- distinfo 10 Dec 2021 04:10:59 -0000 1.29
> +++ distinfo 7 Sep 2022 20:10:10 -0000
> @@ -1,4 +1,4 @@
> -SHA256 (ocaml-4.12-refman-html.tar.gz) = eLtzsc6LiAUty+m1n97k/amUzCl46ll4gx8if3fagvs=
> -SHA256 (ocaml-4.12.1.tar.gz) = bWHsE6fRtS7uc1r6xhZVK1btEt2hmBxNRBBX5S2RD9c=
> -SIZE (ocaml-4.12-refman-html.tar.gz) = 1444139
> -SIZE (ocaml-4.12.1.tar.gz) = 5181551
> +SHA256 (ocaml-4.14-refman-html.tar.gz) = +dILjzxXO797/JkVVzFHK5G5vwhOndK1U50q5HNAbKc=
> +SHA256 (ocaml-4.14.0.tar.gz) = LfW0LYIJmtTrHBubd6sArlL4wZybINIM79lTc47PRYY=
> +SIZE (ocaml-4.14-refman-html.tar.gz) = 1982462
> +SIZE (ocaml-4.14.0.tar.gz) = 5492464
> Index: patches/patch-Makefile
> ===================================================================
> RCS file: /cvs/ports/lang/ocaml/patches/patch-Makefile,v
> retrieving revision 1.1
> diff -u -p -r1.1 patch-Makefile
> --- patches/patch-Makefile 24 Mar 2022 14:39:17 -0000 1.1
> +++ patches/patch-Makefile 7 Sep 2022 20:10:10 -0000
> @@ -1,9 +1,9 @@
> Index: Makefile
> --- Makefile.orig
> +++ Makefile
> -@@ -545,7 +545,9 @@ installoptopt:
> - "$(INSTALL_COMPLIBDIR)"; \
> - fi
> +@@ -586,7 +586,9 @@ ifeq "$(INSTALL_OCAMLNAT)" "true"
> + $(INSTALL_PROG) ocamlnat$(EXE) "$(INSTALL_BINDIR)"
> + endif
> cd "$(INSTALL_COMPLIBDIR)" && \
> - $(RANLIB) ocamlcommon.$(A) ocamlbytecomp.$(A) ocamloptcomp.$(A)
> + $(RANLIB) ocamlcommon.$(A) && \
> Index: patches/patch-build-aux_ocaml_version_m4
> ===================================================================
> RCS file: patches/patch-build-aux_ocaml_version_m4
> diff -N patches/patch-build-aux_ocaml_version_m4
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-build-aux_ocaml_version_m4 7 Sep 2022 20:10:10 -0000
> @@ -0,0 +1,12 @@
> +Index: build-aux/ocaml_version.m4
> +--- build-aux/ocaml_version.m4.orig
> ++++ build-aux/ocaml_version.m4
> +@@ -79,7 +79,7 @@ END_OF_VERSION_FILE
> +
> + m4_define([OCAML__VERSION_NUMBER],
> + [m4_format(
> +- [%d%02d%02d],
> ++ [%c%02c%02c],
> + OCAML__VERSION_MAJOR,
> + OCAML__VERSION_MINOR,
> + OCAML__VERSION_PATCHLEVEL)])
> Index: patches/patch-configure_ac
> ===================================================================
> RCS file: patches/patch-configure_ac
> diff -N patches/patch-configure_ac
> --- patches/patch-configure_ac 24 Mar 2022 14:39:17 -0000 1.10
> +++ /dev/null 1 Jan 1970 00:00:00 -0000
> @@ -1,45 +0,0 @@
> -Index: configure.ac
> ---- configure.ac.orig
> -+++ configure.ac
> -@@ -735,6 +735,11 @@ AS_CASE([$CC,$host],
> - )
> -
> -
> -+# Respect LDFLAGS and CFLAGS
> -+common_cflags="$common_cflags $CFLAGS"
> -+oc_ldflags="$oc_ldflags $LDFLAGS"
> -+
> -+
> - ## Program to use to install files
> - AC_PROG_INSTALL
> -
> -@@ -867,10 +872,10 @@ AS_IF([test x"$enable_shared" != "xno"],
> - [[*-*-linux*|*-*-freebsd[3-9]*|*-*-freebsd[1-9][0-9]*\
> - |*-*-openbsd*|*-*-netbsd*|*-*-dragonfly*|*-*-gnu*|*-*-haiku*]],
> - [sharedlib_cflags="-fPIC"
> -+ oc_ldflags="$oc_ldflags -Wl,-E"
> - AS_CASE([$CC,$host],
> - [gcc*,powerpc-*-linux*], [mksharedlib="$CC -shared -mbss-plt"],
> -- [mksharedlib="$CC -shared"])
> -- oc_ldflags="$oc_ldflags -Wl,-E"
> -+ [mksharedlib="$CC -shared $oc_ldflags"])
> - rpath="-Wl,-rpath,"
> - mksharedlibrpath="-Wl,-rpath,"
> - natdynlinkopts="-Wl,-E"
> -@@ -912,6 +917,7 @@ AS_IF([test x"$enable_shared" != "xno"],
> - [earm*-*-netbsd*], [natdynlink=true],
> - [aarch64-*-linux*], [natdynlink=true],
> - [aarch64-*-freebsd*], [natdynlink=true],
> -+ [aarch64-*-openbsd*], [natdynlink=true],
> - [riscv*-*-linux*], [natdynlink=true])])
> -
> - # Try to work around the Skylake/Kaby Lake processor bug.
> -@@ -1013,6 +1019,8 @@ AS_CASE([$host],
> - [arch=arm64; system=linux],
> - [aarch64-*-freebsd*],
> - [arch=arm64; system=freebsd],
> -+ [aarch64-*-openbsd*],
> -+ [arch=arm64; system=openbsd],
> - [x86_64-*-cygwin*],
> - [arch=amd64; system=cygwin],
> - [riscv64-*-linux*],

No comments:

Post a Comment