On Sat 12/03/2022 20:51, Bjorn Ketelaars wrote:
> unison-2.52.0 has been released, which introduces a new wire protocol, a
> new archive format, and feature negotiation. In particular, once two
> machines have been upgraded to unison-2.52.0 or later, it is possible to
> use unison compiled with different ocaml versions. Summary of changes
> can be found at
> https://github.com/bcpierce00/unison/blob/v2.52.0/NEWS.md.
>
> This release is compatible with:
> - unison 2.52 or newer. You do not have to pay any attention to OCaml
> compiler versions
> - unison 2.51 if both versions are compiled with same OCaml compiler
> version
> - unison 2.48 if both versions are compiled with same OCaml compiler
> version
>
> More information on migration can be found at
> https://github.com/bcpierce00/unison/wiki/2.52-Migration-Guide.
>
> Diff below updates unison, and removes ports of the 2.4x- and
> 2.5x-branch.
>
> All tests pass, and run tested on amd64 against unison-2.51.5 and
> unison-2.52.0.
>
> OK?
Ping...
Diff enclosed again for your convenience
diff --git 2.4x/Makefile 2.4x/Makefile
deleted file mode 100644
index 306c1ed8167..00000000000
--- 2.4x/Makefile
+++ /dev/null
@@ -1,11 +0,0 @@
-VER= 2.48.15
-REV= v4
-REVISION= 9
-GH_TAGNAME= v${VER}${REV}
-PKGNAME= unison-${VER}${REV:S/^v/pl/}
-
-PORTROACH= limit:^2\.4
-
-DOCS= BUGS.txt
-
-.include <bsd.port.mk>
diff --git 2.4x/distinfo 2.4x/distinfo
deleted file mode 100644
index bfef528235a..00000000000
--- 2.4x/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (unison-2.48.15v4.tar.gz) = +MfpgmNLvh7WUQ/ls2tsXFXAbK792v3Z7cCIEjBf3uw=
-SIZE (unison-2.48.15v4.tar.gz) = 1911781
diff --git 2.4x/patches/patch-bytearray_stubs_c
2.4x/patches/patch-bytearray_stubs_c
deleted file mode 100644
index 0a6fb0791bf..00000000000
--- 2.4x/patches/patch-bytearray_stubs_c
+++ /dev/null
@@ -1,39 +0,0 @@
-Fix rare SIGSEGV when transferring large replicas.
-Fix a theoretical integer overflow.
-
-References:
-https://github.com/bcpierce00/unison/commit/c1ddff13aa96b124680cce61673129aeb563dbf7
-https://github.com/bcpierce00/unison/commit/f59663d67f4593a5bc1e554058fe6864751e805e
-
-Thanks to Alex Markley and OCaml developers
---- bytearray_stubs.c.orig Mon May 23 18:40:05 2016
-+++ bytearray_stubs.c Sun Mar 12 20:41:53 2017
-@@ -5,6 +5,7 @@
-
- #include "caml/intext.h"
- #include "caml/bigarray.h"
-+#include "caml/memory.h"
-
- CAMLprim value ml_marshal_to_bigarray(value v, value flags)
- {
-@@ -21,15 +22,18 @@ CAMLprim value ml_marshal_to_bigarray(value v, value f
-
- CAMLprim value ml_unmarshal_from_bigarray(value b, value ofs)
- {
-+ CAMLparam1(b); /* Holds [b] live until unmarshalling completes. */
-+ value result;
- struct caml_bigarray *b_arr = Bigarray_val(b);
-- return input_value_from_block (Array_data (b_arr, ofs),
-+ result = input_value_from_block (Array_data (b_arr, ofs),
- b_arr->dim[0] - Long_val(ofs));
-+ CAMLreturn(result);
- }
-
- CAMLprim value ml_blit_string_to_bigarray
- (value s, value i, value a, value j, value l)
- {
-- char *src = String_val(s) + Int_val(i);
-+ char *src = String_val(s) + Long_val(i);
- char *dest = Array_data(Bigarray_val(a), j);
- memcpy(dest, src, Long_val(l));
- return Val_unit;
diff --git 2.4x/patches/patch-files_ml 2.4x/patches/patch-files_ml
deleted file mode 100644
index 8332d9e4312..00000000000
--- 2.4x/patches/patch-files_ml
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: files.ml
---- files.ml.orig
-+++ files.ml
-@@ -722,7 +722,7 @@ let get_files_in_directory dir =
- with End_of_file ->
- dirh.System.closedir ()
- end;
-- Sort.list (<) !files
-+ List.sort String.compare !files
-
- let ls dir pattern =
- Util.convertUnixErrorsToTransient
diff --git 2.4x/patches/patch-recon_ml 2.4x/patches/patch-recon_ml
deleted file mode 100644
index 8aa6d5a6d28..00000000000
--- 2.4x/patches/patch-recon_ml
+++ /dev/null
@@ -1,14 +0,0 @@
-Index: recon.ml
---- recon.ml.orig
-+++ recon.ml
-@@ -651,9 +651,7 @@ let rec reconcile
-
- (* Sorts the paths so that they will be displayed in order
*)
- let sortPaths pathUpdatesList =
-- Sort.list
-- (fun (p1, _) (p2, _) -> Path.compare p1 p2 <= 0)
-- pathUpdatesList
-+ List.sort Path.compare pathUpdatesList
-
- let rec enterPath p1 p2 t =
- match Path.deconstruct p1, Path.deconstruct p2 with
diff --git 2.4x/patches/patch-system_system_generic_ml
2.4x/patches/patch-system_system_generic_ml
deleted file mode 100644
index c0e74c7cf66..00000000000
--- 2.4x/patches/patch-system_system_generic_ml
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: system/system_generic.ml
---- system/system_generic.ml.orig
-+++ system/system_generic.ml
-@@ -47,7 +47,7 @@ let open_out_gen = open_out_gen
- let chmod = Unix.chmod
- let chown = Unix.chown
- let utimes = Unix.utimes
--let link = Unix.link
-+let link source dest = Unix.link source dest
- let openfile = Unix.openfile
- let opendir f =
- let h = Unix.opendir f in
diff --git 2.4x/patches/patch-test_ml 2.4x/patches/patch-test_ml
deleted file mode 100644
index 709cedef588..00000000000
--- 2.4x/patches/patch-test_ml
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: test.ml
---- test.ml.orig
-+++ test.ml
-@@ -370,8 +370,6 @@ let test() =
- check "4" R2 (Dir ["x", File "foo"]);
- );
-
-- (raise (Util.Fatal "Skipping some tests -- remove me!\n") : unit);
--
- if bothRootsLocal then
- runtest "backups 1 (local)" ["backup = Name *"] (fun() ->
- put R1 (Dir []); put R2 (Dir []); sync();
diff --git 2.4x/patches/patch-uigtk2_ml 2.4x/patches/patch-uigtk2_ml
deleted file mode 100644
index 67236bbae9b..00000000000
--- 2.4x/patches/patch-uigtk2_ml
+++ /dev/null
@@ -1,12 +0,0 @@
-Index: uigtk2.ml
---- uigtk2.ml.orig
-+++ uigtk2.ml
-@@ -94,7 +94,7 @@ let icon =
- let icon =
- let p = GdkPixbuf.create ~width:48 ~height:48 ~has_alpha:true () in
- Gpointer.blit
-- (Gpointer.region_of_string Pixmaps.icon_data) (GdkPixbuf.get_pixels p);
-+ (Gpointer.region_of_bytes Pixmaps.icon_data) (GdkPixbuf.get_pixels p);
- p
-
- let leftPtrWatch =
diff --git 2.4x/patches/patch-uutil_ml 2.4x/patches/patch-uutil_ml
deleted file mode 100644
index 101ef8bede7..00000000000
--- 2.4x/patches/patch-uutil_ml
+++ /dev/null
@@ -1,16 +0,0 @@
-ocaml 4.12 compat
-
-Index: uutil.ml
---- uutil.ml.orig
-+++ uutil.ml
-@@ -34,9 +34,7 @@ let myNameAndVersion = myName ^ " " ^ myVersion
-
- let hash2 x y = (17 * x + 257 * y) land 0x3FFFFFFF
-
--external hash_param : int -> int -> 'a -> int = "caml_hash_univ_param"
"noalloc"
--
--let hash x = hash_param 10 100 x
-+let hash = Hashtbl.hash
-
-
(*****************************************************************************)
- (* File sizes
*)
diff --git 2.4x/pkg/DESCR 2.4x/pkg/DESCR
deleted file mode 100644
index d55c9d37b4d..00000000000
--- 2.4x/pkg/DESCR
+++ /dev/null
@@ -1,8 +0,0 @@
-Unison is a file-synchronization tool for Unix and Windows. It allows
-two replicas of a collection of files and directories to be stored on
-different hosts (or different disks on the same host), modified
-separately, and then brought up to date by propagating the changes in
-each replica to the other.
-
-Flavors:
- no_x11 - build without X support
diff --git 2.4x/pkg/PLIST 2.4x/pkg/PLIST
deleted file mode 100644
index 4dec94d3e98..00000000000
--- 2.4x/pkg/PLIST
+++ /dev/null
@@ -1,11 +0,0 @@
-@option is-branch
-@conflict unison-*
-@pkgpath net/unison/stable${FLAVOR_COMMA}
-@pkgpath net/unison/snapshot${FLAVOR_COMMA}
-@pkgpath net/unison${FLAVOR_COMMA}
-@bin bin/unison
-share/doc/pkg-readmes/${PKGSTEM}
-share/doc/unison/
-share/doc/unison/BUGS.txt
-share/doc/unison/NEWS
-share/doc/unison/README
diff --git 2.4x/pkg/README 2.4x/pkg/README
deleted file mode 100644
index 71178de8682..00000000000
--- 2.4x/pkg/README
+++ /dev/null
@@ -1,27 +0,0 @@
-+-----------------------------------------------------------------------
-| Running ${PKGSTEM} on OpenBSD
-+-----------------------------------------------------------------------
-
-Unison uses native OCaml marshalling in its prococol. This
-means that unison might not work when the OCaml versions of
-two instances are out of sync. Assuming that both ends are
-OpenBSD and under control by the user, pkg_add(1) can be used
-to sync unison and ocaml.
-
-Another way to work around this limitation of unison is to use
-the OPAM OCaml package manager to build unison with the same
-version of the OCaml compiler on all machines:
-
-doas pkg_add opam
-export OPAMROOT=~/opam_unison
-opam init --no-setup --compiler ocaml-base-compiler.4.09.0
-opam install unison lablgtk # To build without the gui, remove lablgtk
-$(opam var bin)/unison
-
-Common issue
-=============
-Unison sometimes reports chown() failures that are actually
-failures to change group ownership. This can occur when a user
-does not belong to the specified group and is the owner of the
-file, or is not the superuser. Issue can be addressed by setting
-the option 'group' to 'false'.
diff --git 2.5x/Makefile 2.5x/Makefile
deleted file mode 100644
index 6cbe06fa43f..00000000000
--- 2.5x/Makefile
+++ /dev/null
@@ -1,3 +0,0 @@
-GH_TAGNAME= v2.51.5
-
-.include <bsd.port.mk>
diff --git 2.5x/distinfo 2.5x/distinfo
deleted file mode 100644
index abbb4a7f896..00000000000
--- 2.5x/distinfo
+++ /dev/null
@@ -1,2 +0,0 @@
-SHA256 (unison-2.51.5.tar.gz) = fodjcZkuv4kLYPMt+ICpinX+jEfAa3sq4q02vkgBPoM=
-SIZE (unison-2.51.5.tar.gz) = 1385407
diff --git 2.5x/pkg/DESCR 2.5x/pkg/DESCR
deleted file mode 100644
index d55c9d37b4d..00000000000
--- 2.5x/pkg/DESCR
+++ /dev/null
@@ -1,8 +0,0 @@
-Unison is a file-synchronization tool for Unix and Windows. It allows
-two replicas of a collection of files and directories to be stored on
-different hosts (or different disks on the same host), modified
-separately, and then brought up to date by propagating the changes in
-each replica to the other.
-
-Flavors:
- no_x11 - build without X support
diff --git 2.5x/pkg/PLIST 2.5x/pkg/PLIST
deleted file mode 100644
index 964d847170d..00000000000
--- 2.5x/pkg/PLIST
+++ /dev/null
@@ -1,7 +0,0 @@
-@option is-branch
-@conflict unison-*
-@bin bin/unison
-share/doc/pkg-readmes/${PKGSTEM}
-share/doc/unison/
-share/doc/unison/NEWS
-share/doc/unison/README
diff --git 2.5x/pkg/README 2.5x/pkg/README
deleted file mode 100644
index 71178de8682..00000000000
--- 2.5x/pkg/README
+++ /dev/null
@@ -1,27 +0,0 @@
-+-----------------------------------------------------------------------
-| Running ${PKGSTEM} on OpenBSD
-+-----------------------------------------------------------------------
-
-Unison uses native OCaml marshalling in its prococol. This
-means that unison might not work when the OCaml versions of
-two instances are out of sync. Assuming that both ends are
-OpenBSD and under control by the user, pkg_add(1) can be used
-to sync unison and ocaml.
-
-Another way to work around this limitation of unison is to use
-the OPAM OCaml package manager to build unison with the same
-version of the OCaml compiler on all machines:
-
-doas pkg_add opam
-export OPAMROOT=~/opam_unison
-opam init --no-setup --compiler ocaml-base-compiler.4.09.0
-opam install unison lablgtk # To build without the gui, remove lablgtk
-$(opam var bin)/unison
-
-Common issue
-=============
-Unison sometimes reports chown() failures that are actually
-failures to change group ownership. This can occur when a user
-does not belong to the specified group and is the owner of the
-file, or is not the superuser. Issue can be addressed by setting
-the option 'group' to 'false'.
diff --git Makefile Makefile
index f904bfe434c..f1253315569 100644
--- Makefile
+++ Makefile
@@ -1,7 +1,64 @@
-SUBDIR =
-SUBDIR += 2.4x
-SUBDIR += 2.4x,no_x11
-SUBDIR += 2.5x
-SUBDIR += 2.5x,no_x11
+COMMENT = multi-platform file synchronization tool
-.include <bsd.port.subdir.mk>
+GH_ACCOUNT = bcpierce00
+GH_PROJECT = unison
+GH_TAGNAME = v2.52.0
+
+CATEGORIES = net
+
+HOMEPAGE = https://www.cis.upenn.edu/~bcpierce/unison/
+
+MAINTAINER = Bjorn Ketelaars <[email protected]>
+
+# GPLv3
+PERMIT_PACKAGE = Yes
+
+WANTLIB = c m util
+
+MODULES = lang/ocaml
+MODOCAML_RUNDEP = if-not-native
+
+TEST_DEPENDS = emacs->=24:editors/emacs
+
+USE_GMAKE = Yes
+
+# CFLAGS _must_ be empty. This is an OCaml compiler.
+MAKE_FLAGS = NATIVE=${MODOCAML_NATIVE:S/Yes/true/:S/No/false/} \
+ OCAMLOPT=ocamlopt.opt \
+ CFLAGS=
+
+FLAVORS = no_x11
+FLAVOR ?=
+
+.if ${FLAVOR:Mno_x11}
+MAKE_FLAGS += UISTYLE=text
+.else
+WANTLIB += X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
+WANTLIB += Xrandr Xrender atk-1.0 cairo fontconfig freetype gdk-x11-2.0
+WANTLIB += gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
+WANTLIB += harfbuzz intl pango-1.0 pangocairo-1.0 pangoft2-1.0
+WANTLIB += z
+BUILD_DEPENDS += x11/lablgtk2
+LIB_DEPENDS += x11/gtk+2
+MAKE_FLAGS += UISTYLE=gtk2
+.endif
+
+FLAVOR_COMMA = ${FLAVOR_EXT:S/-/,/g}
+SUBST_VARS = FLAVOR_COMMA
+
+# Avoid multiple all:: entries and use the real target entry.
+ALL_TARGET = unison
+TEST_TARGET = selftest
+
+PORTHOME = ${WRKDIR}
+WRKDIST = ${WRKDIR}/${DISTNAME}/src
+DOCS = NEWS.md README.md
+
+# Avoid the nightmare of their Makefile install target.
+# Do not use INSTALL_PROGRAM, as the bytecode version must not be stripped!
+do-install:
+ ${INSTALL_SCRIPT} ${WRKSRC}/unison ${PREFIX}/bin
+ ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/unison
+ @cd ${WRKSRC}/.. && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/unison
+
+.include <bsd.port.mk>
diff --git Makefile.inc Makefile.inc
deleted file mode 100644
index e6195c96705..00000000000
--- Makefile.inc
+++ /dev/null
@@ -1,64 +0,0 @@
-COMMENT= multi-platform file synchronization tool
-
-GH_ACCOUNT= bcpierce00
-GH_PROJECT= unison
-
-CATEGORIES= net
-
-HOMEPAGE= https://www.cis.upenn.edu/~bcpierce/unison/
-
-MAINTAINER= Bjorn Ketelaars <[email protected]>
-
-# GPLv3
-PERMIT_PACKAGE= Yes
-
-WANTLIB= c m util
-
-MODULES= lang/ocaml
-MODOCAML_RUNDEP= if-not-native
-
-TEST_DEPENDS+= emacs->=24:editors/emacs
-
-# CFLAGS _must_ be empty. This is an OCaml compiler.
-MAKE_FLAGS= NATIVE=${MODOCAML_NATIVE:S/Yes/true/:S/No/false/} \
- OCAMLOPT=ocamlopt.opt \
- CFLAGS=
-
-USE_GMAKE= Yes
-
-FLAVORS= no_x11
-FLAVOR?=
-
-.if ${FLAVOR:Mno_x11}
-MAKE_FLAGS+= UISTYLE=text
-.else
-BUILD_DEPENDS+= x11/lablgtk2
-LIB_DEPENDS+= x11/gtk+2
-MAKE_FLAGS+= UISTYLE=gtk2
-WANTLIB+= X11 Xcomposite Xcursor Xdamage Xext Xfixes Xi Xinerama
-WANTLIB+= Xrandr Xrender atk-1.0 cairo fontconfig freetype gdk-x11-2.0
-WANTLIB+= gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-x11-2.0
-WANTLIB+= harfbuzz intl pango-1.0 pangocairo-1.0 pangoft2-1.0
-WANTLIB+= z
-.endif
-
-FLAVOR_COMMA= ${FLAVOR_EXT:S/-/,/g}
-SUBST_VARS= FLAVOR_COMMA
-
-# Avoid multiple all:: entries and use the real target entry.
-ALL_TARGET= unison
-
-TEST_TARGET= selftest
-
-PORTHOME= ${WRKDIR}
-
-WRKDIST= ${WRKDIR}/${DISTNAME}/src
-
-DOCS+= NEWS README
-
-# Avoid the nightmare of their Makefile install target.
-# Do not use INSTALL_PROGRAM, as the bytecode version must not be stripped!
-do-install:
- ${INSTALL_SCRIPT} ${WRKSRC}/unison ${PREFIX}/bin
- ${INSTALL_DATA_DIR} ${PREFIX}/share/doc/unison
- @cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/unison
diff --git distinfo distinfo
new file mode 100644
index 00000000000..f275d6b9478
--- /dev/null
+++ distinfo
@@ -0,0 +1,2 @@
+SHA256 (unison-2.52.0.tar.gz) = oROJlxISkVMo/mkQHJJzexdmRZXEMY68uNo2flumNUA=
+SIZE (unison-2.52.0.tar.gz) = 1354200
diff --git pkg/DESCR pkg/DESCR
new file mode 100644
index 00000000000..d55c9d37b4d
--- /dev/null
+++ pkg/DESCR
@@ -0,0 +1,8 @@
+Unison is a file-synchronization tool for Unix and Windows. It allows
+two replicas of a collection of files and directories to be stored on
+different hosts (or different disks on the same host), modified
+separately, and then brought up to date by propagating the changes in
+each replica to the other.
+
+Flavors:
+ no_x11 - build without X support
diff --git pkg/PLIST pkg/PLIST
new file mode 100644
index 00000000000..5d1ac297288
--- /dev/null
+++ pkg/PLIST
@@ -0,0 +1,9 @@
+@pkgpath net/unison/2.4x${FLAVOR_COMMA}
+@pkgpath net/unison/2.5x${FLAVOR_COMMA}
+@pkgpath net/unison/snapshot${FLAVOR_COMMA}
+@pkgpath net/unison/stable${FLAVOR_COMMA}
+@bin bin/unison
+share/doc/pkg-readmes/${PKGSTEM}
+share/doc/unison/
+share/doc/unison/NEWS.md
+share/doc/unison/README.md
diff --git pkg/README pkg/README
new file mode 100644
index 00000000000..71178de8682
--- /dev/null
+++ pkg/README
@@ -0,0 +1,27 @@
++-----------------------------------------------------------------------
+| Running ${PKGSTEM} on OpenBSD
++-----------------------------------------------------------------------
+
+Unison uses native OCaml marshalling in its prococol. This
+means that unison might not work when the OCaml versions of
+two instances are out of sync. Assuming that both ends are
+OpenBSD and under control by the user, pkg_add(1) can be used
+to sync unison and ocaml.
+
+Another way to work around this limitation of unison is to use
+the OPAM OCaml package manager to build unison with the same
+version of the OCaml compiler on all machines:
+
+doas pkg_add opam
+export OPAMROOT=~/opam_unison
+opam init --no-setup --compiler ocaml-base-compiler.4.09.0
+opam install unison lablgtk # To build without the gui, remove lablgtk
+$(opam var bin)/unison
+
+Common issue
+=============
+Unison sometimes reports chown() failures that are actually
+failures to change group ownership. This can occur when a user
+does not belong to the specified group and is the owner of the
+file, or is not the superuser. Issue can be addressed by setting
+the option 'group' to 'false'.