<pre style='margin:0'>
Perry E. Metzger (pmetzger) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/0c68154e8b71366705a3df02376b0934eb1f7fae">https://github.com/macports/macports-ports/commit/0c68154e8b71366705a3df02376b0934eb1f7fae</a></p>
<pre style="white-space: pre; background: #F8F8F8"><span style='display:block; white-space:pre;color:#808000;'>commit 0c68154e8b71366705a3df02376b0934eb1f7fae
</span>Author: barracuda156 <vital.had@gmail.com>
AuthorDate: Fri Oct 20 05:20:47 2023 +0800
<span style='display:block; white-space:pre;color:#404040;'> ocaml-dune: update to 3.11.1, fix for old systems
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Fixes: https://trac.macports.org/ticket/68463
</span>---
_resources/port1.0/group/ocaml-1.1.tcl | 8 ++++++-
ocaml/ocaml-dune/Portfile | 18 +++++++++++----
...tch-copyfile_stubs.c-define-COPYFILE_CLONE.diff | 27 ++++++++++++++++++++++
3 files changed, 48 insertions(+), 5 deletions(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/_resources/port1.0/group/ocaml-1.1.tcl b/_resources/port1.0/group/ocaml-1.1.tcl
</span><span style='display:block; white-space:pre;color:#808080;'>index 5230a8a1ad3..6c3fdc35016 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/_resources/port1.0/group/ocaml-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/_resources/port1.0/group/ocaml-1.1.tcl
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -404,7 +404,13 @@ commands dune.build \
</span> options dune.build.target
default dune.build.cmd {${prefix}/bin/dune}
<span style='display:block; white-space:pre;background:#ffe0e0;'>-default dune.build.env {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# See: https://github.com/ocaml/dune/issues/8941
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+global os.major
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default dune.build.env DUNE_CONFIG__COPY_FILE=portable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+} else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ default dune.build.env {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span> default dune.build.dir {${build.dir}}
default dune.build.nice {${build.nice}}
default dune.build.target {@install}
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/ocaml/ocaml-dune/Portfile b/ocaml/ocaml-dune/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index 9ad29fc584c..7da925310a7 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/ocaml/ocaml-dune/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/ocaml/ocaml-dune/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -5,7 +5,7 @@ PortGroup github 1.0
</span> PortGroup ocaml 1.1
name ocaml-dune
<span style='display:block; white-space:pre;background:#ffe0e0;'>-github.setup ocaml dune 3.11.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.setup ocaml dune 3.11.1
</span> categories ocaml devel
license MIT
maintainers {landonf @landonf} openmaintainer
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -13,9 +13,10 @@ maintainers {landonf @landonf} openmaintainer
</span> description Composable build system for OCaml
long_description Dune is a build system for OCaml and Reason.
<span style='display:block; white-space:pre;background:#ffe0e0;'>-checksums rmd160 5c9f8b6672079dcd2dc4423736fb4a8ebc2571b0 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- sha256 6b5e064d8df30ed62a12666d426235b90e886cba353005a550e44a3382c04e48 \
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>- size 2750451
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 653c1ffd89f9c424a4fe0ad007d6b13c0a79e4a0 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 c7d9ec062598ee0fd98d45ed3d7f41200240fe8a781ca926103a6a58b6d5662f \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 2753844
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+github.tarball_from archive
</span>
if { ${subport} eq ${name} } {
depends_lib port:ocaml-findlib
<span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -28,9 +29,18 @@ if { ${subport} eq ${name} } {
</span> --mandir ${prefix}/share/man \
--sbindir ${prefix}/sbin
<span style='display:block; white-space:pre;background:#e0ffe0;'>+ # See: https://github.com/ocaml/dune/issues/8941
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {${os.major} < 11} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ build.cmd-prepend \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ DUNE_CONFIG__COPY_FILE=portable
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span> build.target release
}
<span style='display:block; white-space:pre;background:#e0ffe0;'>+# See: https://trac.macports.org/ticket/68463
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# Fix suggested by upstream: https://github.com/ocaml/dune/issues/8941
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+patchfiles-append patch-copyfile_stubs.c-define-COPYFILE_CLONE.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span> subport ocaml-dune-configurator {
# https://github.com/ocaml/dune/issues/6156
post-extract {
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/ocaml/ocaml-dune/files/patch-copyfile_stubs.c-define-COPYFILE_CLONE.diff b/ocaml/ocaml-dune/files/patch-copyfile_stubs.c-define-COPYFILE_CLONE.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..16eb0b6e0db
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/ocaml/ocaml-dune/files/patch-copyfile_stubs.c-define-COPYFILE_CLONE.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,27 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From 6120c556f8de5cc837832fe0d46b4fd4f88618ba Mon Sep 17 00:00:00 2001
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+From: barracuda156 <vital.had@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Date: Fri, 20 Oct 2023 04:54:18 +0800
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Subject: [PATCH] copyfile_stubs.c: define COPYFILE_CLONE in case it is
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ undefined
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Credit to Ali Caglayan <alizter@gmail.com>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+Picked from https://github.com/ocaml/dune/pull/8942/commits/89671ada56e24af7654a5b57b9089501342a2e62
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+---
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ otherlibs/stdune/src/copyfile_stubs.c | 4 ++++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ 1 file changed, 4 insertions(+)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+diff --git otherlibs/stdune/src/copyfile_stubs.c otherlibs/stdune/src/copyfile_stubs.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+index 09c9a1b14..6824c572f 100644
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- otherlibs/stdune/src/copyfile_stubs.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ otherlibs/stdune/src/copyfile_stubs.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -15,6 +15,10 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <string.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <sys/syslimits.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifndef COPYFILE_CLONE
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define COPYFILE_CLONE (1<<24)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CAMLprim value stdune_copyfile(value v_from, value v_to) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ CAMLparam2(v_from, v_to);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ caml_unix_check_path(v_from, "copyfile");
</span></pre><pre style='margin:0'>
</pre>