About two years ago we split net/unison up in two versions. Rationale
was that the newer version (2.5x) is not compatible with the older
version (2.4x).
The old version has not seen any activity in the last 2 years and
upstream has made clear that no one participating in development has
expressed an interest in supporting old branches and no fixes to 2.48
will be forthcoming.
With the above in mind I would like to remove net/unison/2.4x from
ports, and move net/unison/2.5x to net/unison.
Diff below has been tested by successfully updating 2.48.15 to 2.51.3.
OK?
Index: Makefile
===================================================================
RCS file: /cvs/ports/net/Makefile,v
retrieving revision 1.1235
diff -u -p -r1.1235 Makefile
--- Makefile 30 Dec 2020 21:38:58 -0000 1.1235
+++ Makefile 4 Jan 2021 15:37:31 -0000
@@ -762,6 +762,7 @@
SUBDIR += uhttpmock
SUBDIR += unifi
SUBDIR += unison
+ SUBDIR += unison,no_x11
SUBDIR += unworkable
SUBDIR += usockets
SUBDIR += utox
Index: unison/Makefile
===================================================================
RCS file: /cvs/ports/net/unison/Makefile,v
retrieving revision 1.15
diff -u -p -r1.15 Makefile
--- unison/Makefile 26 Apr 2018 21:34:23 -0000 1.15
+++ unison/Makefile 4 Jan 2021 15:37:36 -0000
@@ -1,9 +1,68 @@
# $OpenBSD: Makefile,v 1.15 2018/04/26 21:34:23 bket Exp $
-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.51.3
+REVISION= 1
+
+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
+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= BUGS.txt 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
+
+.include <bsd.port.mk>
Index: unison/Makefile.inc
===================================================================
RCS file: unison/Makefile.inc
diff -N unison/Makefile.inc
--- unison/Makefile.inc 3 Nov 2020 19:45:30 -0000 1.31
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,64 +0,0 @@
-# $OpenBSD: Makefile.inc,v 1.31 2020/11/03 19:45:30 bket Exp $
-
-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
-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= BUGS.txt 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
Index: unison/distinfo
===================================================================
RCS file: unison/distinfo
diff -N unison/distinfo
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ unison/distinfo 4 Jan 2021 15:37:36 -0000
@@ -0,0 +1,2 @@
+SHA256 (unison-2.51.3.tar.gz) = DCh9F/UnKUQLK9wo7fTRmy1epYaZg9eOeA1QHFhmkUs=
+SIZE (unison-2.51.3.tar.gz) = 1370060
Index: unison/2.4x/Makefile
===================================================================
RCS file: unison/2.4x/Makefile
diff -N unison/2.4x/Makefile
--- unison/2.4x/Makefile 3 Jan 2021 19:59:15 -0000 1.12
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,11 +0,0 @@
-# $OpenBSD: Makefile,v 1.12 2021/01/03 19:59:15 bket Exp $
-
-VER= 2.48.15
-REV= v4
-REVISION= 5
-GH_TAGNAME= v${VER}${REV}
-PKGNAME= unison-${VER}${REV:S/^v/pl/}
-
-PORTROACH= limit:^2\.4
-
-.include <bsd.port.mk>
Index: unison/2.4x/distinfo
===================================================================
RCS file: unison/2.4x/distinfo
diff -N unison/2.4x/distinfo
--- unison/2.4x/distinfo 4 Mar 2019 12:51:16 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-SHA256 (unison-2.48.15v4.tar.gz) = +MfpgmNLvh7WUQ/ls2tsXFXAbK792v3Z7cCIEjBf3uw=
-SIZE (unison-2.48.15v4.tar.gz) = 1911781
Index: unison/2.4x/patches/patch-bytearray_stubs_c
===================================================================
RCS file: unison/2.4x/patches/patch-bytearray_stubs_c
diff -N unison/2.4x/patches/patch-bytearray_stubs_c
--- unison/2.4x/patches/patch-bytearray_stubs_c 26 Apr 2018 21:34:23 -0000
1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,41 +0,0 @@
-$OpenBSD: patch-bytearray_stubs_c,v 1.1 2018/04/26 21:34:23 bket Exp $
-
-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;
Index: unison/2.4x/patches/patch-files_ml
===================================================================
RCS file: unison/2.4x/patches/patch-files_ml
diff -N unison/2.4x/patches/patch-files_ml
--- unison/2.4x/patches/patch-files_ml 18 Sep 2019 17:49:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-files_ml,v 1.1 2019/09/18 17:49:36 chrisz Exp $
-
-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
Index: unison/2.4x/patches/patch-recon_ml
===================================================================
RCS file: unison/2.4x/patches/patch-recon_ml
diff -N unison/2.4x/patches/patch-recon_ml
--- unison/2.4x/patches/patch-recon_ml 18 Sep 2019 17:49:36 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,16 +0,0 @@
-$OpenBSD: patch-recon_ml,v 1.1 2019/09/18 17:49:36 chrisz Exp $
-
-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
Index: unison/2.4x/patches/patch-system_system_generic_ml
===================================================================
RCS file: unison/2.4x/patches/patch-system_system_generic_ml
diff -N unison/2.4x/patches/patch-system_system_generic_ml
--- unison/2.4x/patches/patch-system_system_generic_ml 18 Sep 2019 17:49:36
-0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-system_system_generic_ml,v 1.1 2019/09/18 17:49:36 chrisz Exp $
-
-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
Index: unison/2.4x/patches/patch-test_ml
===================================================================
RCS file: unison/2.4x/patches/patch-test_ml
diff -N unison/2.4x/patches/patch-test_ml
--- unison/2.4x/patches/patch-test_ml 26 Apr 2018 21:34:23 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-test_ml,v 1.1 2018/04/26 21:34:23 bket Exp $
-
-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();
Index: unison/2.4x/patches/patch-uigtk2_ml
===================================================================
RCS file: unison/2.4x/patches/patch-uigtk2_ml
diff -N unison/2.4x/patches/patch-uigtk2_ml
--- unison/2.4x/patches/patch-uigtk2_ml 4 Mar 2019 12:51:16 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-uigtk2_ml,v 1.1 2019/03/04 12:51:16 chrisz Exp $
-
-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 =
Index: unison/2.4x/pkg/DESCR
===================================================================
RCS file: unison/2.4x/pkg/DESCR
diff -N unison/2.4x/pkg/DESCR
--- unison/2.4x/pkg/DESCR 26 Apr 2018 21:34:23 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -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
Index: unison/2.4x/pkg/PLIST
===================================================================
RCS file: unison/2.4x/pkg/PLIST
diff -N unison/2.4x/pkg/PLIST
--- unison/2.4x/pkg/PLIST 3 Nov 2020 19:45:30 -0000 1.3
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.3 2020/11/03 19:45:30 bket Exp $
-@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
Index: unison/2.4x/pkg/README
===================================================================
RCS file: unison/2.4x/pkg/README
diff -N unison/2.4x/pkg/README
--- unison/2.4x/pkg/README 3 Jan 2021 19:59:15 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-$OpenBSD: README,v 1.5 2021/01/03 19:59:15 bket Exp $
-
-+-----------------------------------------------------------------------
-| 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'.
Index: unison/2.5x/Makefile
===================================================================
RCS file: unison/2.5x/Makefile
diff -N unison/2.5x/Makefile
--- unison/2.5x/Makefile 3 Jan 2021 19:59:15 -0000 1.10
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,6 +0,0 @@
-# $OpenBSD: Makefile,v 1.10 2021/01/03 19:59:15 bket Exp $
-
-GH_TAGNAME= v2.51.3
-REVISION= 0
-
-.include <bsd.port.mk>
Index: unison/2.5x/distinfo
===================================================================
RCS file: unison/2.5x/distinfo
diff -N unison/2.5x/distinfo
--- unison/2.5x/distinfo 3 Nov 2020 19:45:30 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,2 +0,0 @@
-SHA256 (unison-2.51.3.tar.gz) = DCh9F/UnKUQLK9wo7fTRmy1epYaZg9eOeA1QHFhmkUs=
-SIZE (unison-2.51.3.tar.gz) = 1370060
Index: unison/2.5x/patches/patch-uicommon_ml
===================================================================
RCS file: unison/2.5x/patches/patch-uicommon_ml
diff -N unison/2.5x/patches/patch-uicommon_ml
--- unison/2.5x/patches/patch-uicommon_ml 3 Nov 2020 19:45:30 -0000
1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,14 +0,0 @@
-$OpenBSD: patch-uicommon_ml,v 1.2 2020/11/03 19:45:30 bket Exp $
-
-Index: uicommon.ml
---- uicommon.ml.orig
-+++ uicommon.ml
-@@ -506,7 +506,7 @@ let promptForRoots getFirstRoot getSecondRoot =
- (* ---- *)
-
- let makeTempDir pattern =
-- let ic = Unix.open_process_in (Printf.sprintf "(mktemp --tmpdir -d
%s.XXXXXX || mktemp -d -t %s) 2>/dev/null" pattern pattern) in
-+ let ic = Unix.open_process_in (Printf.sprintf "(mktemp --tmpdir -d
%s.XXXXXX || mktemp -d -t %s.XXXXXX) 2>/dev/null" pattern pattern) in
- let path = input_line ic in
- ignore (Unix.close_process_in ic);
- path
Index: unison/2.5x/pkg/DESCR
===================================================================
RCS file: unison/2.5x/pkg/DESCR
diff -N unison/2.5x/pkg/DESCR
--- unison/2.5x/pkg/DESCR 26 Apr 2018 21:34:23 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -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
Index: unison/2.5x/pkg/PLIST
===================================================================
RCS file: unison/2.5x/pkg/PLIST
diff -N unison/2.5x/pkg/PLIST
--- unison/2.5x/pkg/PLIST 4 Sep 2018 12:46:19 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,9 +0,0 @@
-@comment $OpenBSD: PLIST,v 1.2 2018/09/04 12:46:19 espie Exp $
-@option is-branch
-@conflict unison-*
-@bin bin/unison
-share/doc/pkg-readmes/${PKGSTEM}
-share/doc/unison/
-share/doc/unison/BUGS.txt
-share/doc/unison/NEWS
-share/doc/unison/README
Index: unison/2.5x/pkg/README
===================================================================
RCS file: unison/2.5x/pkg/README
diff -N unison/2.5x/pkg/README
--- unison/2.5x/pkg/README 3 Jan 2021 19:59:15 -0000 1.5
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,29 +0,0 @@
-$OpenBSD: README,v 1.5 2021/01/03 19:59:15 bket Exp $
-
-+-----------------------------------------------------------------------
-| 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'.
Index: unison/patches/patch-uicommon_ml
===================================================================
RCS file: unison/patches/patch-uicommon_ml
diff -N unison/patches/patch-uicommon_ml
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ unison/patches/patch-uicommon_ml 4 Jan 2021 15:37:44 -0000
@@ -0,0 +1,14 @@
+$OpenBSD: patch-uicommon_ml,v 1.2 2020/11/03 19:45:30 bket Exp $
+
+Index: uicommon.ml
+--- uicommon.ml.orig
++++ uicommon.ml
+@@ -506,7 +506,7 @@ let promptForRoots getFirstRoot getSecondRoot =
+ (* ---- *)
+
+ let makeTempDir pattern =
+- let ic = Unix.open_process_in (Printf.sprintf "(mktemp --tmpdir -d
%s.XXXXXX || mktemp -d -t %s) 2>/dev/null" pattern pattern) in
++ let ic = Unix.open_process_in (Printf.sprintf "(mktemp --tmpdir -d
%s.XXXXXX || mktemp -d -t %s.XXXXXX) 2>/dev/null" pattern pattern) in
+ let path = input_line ic in
+ ignore (Unix.close_process_in ic);
+ path
Index: unison/pkg/DESCR
===================================================================
RCS file: unison/pkg/DESCR
diff -N unison/pkg/DESCR
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ unison/pkg/DESCR 4 Jan 2021 15:37:44 -0000
@@ -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
Index: unison/pkg/PLIST
===================================================================
RCS file: unison/pkg/PLIST
diff -N unison/pkg/PLIST
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ unison/pkg/PLIST 4 Jan 2021 15:37:44 -0000
@@ -0,0 +1,12 @@
+@comment $OpenBSD: PLIST,v 1.2 2018/09/04 12:46:19 espie Exp $
+@pkgpath net/unison/2.4x${FLAVOR_COMMA}
+@pkgpath net/unison/2.5x${FLAVOR_COMMA}
+@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
Index: unison/pkg/README
===================================================================
RCS file: unison/pkg/README
diff -N unison/pkg/README
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ unison/pkg/README 4 Jan 2021 15:37:44 -0000
@@ -0,0 +1,29 @@
+$OpenBSD: README,v 1.4 2019/09/22 18:29:54 chrisz Exp $
+
++-----------------------------------------------------------------------
+| 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'.