From 4ae1d1646cfcda6d7aeb0ed67c18e14ea0d863d4 Mon Sep 17 00:00:00 2001 From: chrisz Date: Fri, 17 Oct 2014 06:22:08 +0000 Subject: [PATCH] =?UTF-8?q?Somehow=20I=20missed=20to=20cvs=20add=20the=20p?= =?UTF-8?q?kg=20and=20patches=20directories.=20Thanks=20to=20Bj=C3=B6rn=20?= =?UTF-8?q?Ketelaars=20for=20telling=20me.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- net/unison/Makefile.inc | 0 net/unison/patches/patch-ubase_util_ml | 18 ++++++++++++++++++ net/unison/patches/patch-uicommon_ml | 26 ++++++++++++++++++++++++++ net/unison/pkg/DESCR | 8 ++++++++ net/unison/pkg/PLIST | 9 +++++++++ net/unison/pkg/README | 12 ++++++++++++ 6 files changed, 73 insertions(+) delete mode 100644 net/unison/Makefile.inc create mode 100644 net/unison/patches/patch-ubase_util_ml create mode 100644 net/unison/patches/patch-uicommon_ml create mode 100644 net/unison/pkg/DESCR create mode 100644 net/unison/pkg/PLIST create mode 100644 net/unison/pkg/README diff --git a/net/unison/Makefile.inc b/net/unison/Makefile.inc deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/net/unison/patches/patch-ubase_util_ml b/net/unison/patches/patch-ubase_util_ml new file mode 100644 index 00000000000..09c4cc845a9 --- /dev/null +++ b/net/unison/patches/patch-ubase_util_ml @@ -0,0 +1,18 @@ +$OpenBSD: patch-ubase_util_ml,v 1.1 2014/10/17 06:22:08 chrisz Exp $ + +The Uprintf module is broken since OCaml 4.02. +The OCaml stdlib provides a similar function since 3.09. +Use this function instead. + +--- ubase/util.ml.orig Fri Sep 19 12:38:42 2014 ++++ ubase/util.ml Fri Sep 19 12:39:27 2014 +@@ -62,7 +62,8 @@ let set_infos s = + if s <> !infos then begin clear_infos (); infos := s; show_infos () end + + let msg f = +- clear_infos (); Uprintf.eprintf (fun () -> flush stderr; show_infos ()) f ++ clear_infos (); ++ Printf.kfprintf (fun _ -> flush stderr; show_infos ()) stderr f + + let msg : ('a, out_channel, unit) format -> 'a = msg + diff --git a/net/unison/patches/patch-uicommon_ml b/net/unison/patches/patch-uicommon_ml new file mode 100644 index 00000000000..b6224b10f63 --- /dev/null +++ b/net/unison/patches/patch-uicommon_ml @@ -0,0 +1,26 @@ +$OpenBSD: patch-uicommon_ml,v 1.1 2014/10/17 06:22:08 chrisz Exp $ + +Don't discard backtraces for uncaught exceptions. + +--- uicommon.ml.orig Tue Sep 23 11:23:39 2014 ++++ uicommon.ml Tue Sep 23 11:37:20 2014 +@@ -309,7 +309,8 @@ let reconItem2string oldPath theRI status = + let (r1, action, r2, path) = reconItem2stringList oldPath theRI in + Format.sprintf "%s %s %s %s %s" r1 (action2niceString action) r2 status path + +-let exn2string = function ++let exn2string exn = ++ let s = match exn with + Sys.Break -> "Terminated!" + | Util.Fatal(s) -> Printf.sprintf "Fatal error: %s" s + | Util.Transient(s) -> Printf.sprintf "Error: %s" s +@@ -323,6 +324,9 @@ let exn2string = function + | _ -> "") + | Invalid_argument s -> Printf.sprintf "Invalid argument: %s" s + | other -> Printf.sprintf "Uncaught exception %s" (Printexc.to_string other) ++ in ++ s ^ ++ if Printexc.backtrace_status () then "\n" ^ Printexc.get_backtrace () else "" + + (* precondition: uc = File (Updates(_, ..) on both sides *) + let showDiffs ri printer errprinter id = diff --git a/net/unison/pkg/DESCR b/net/unison/pkg/DESCR new file mode 100644 index 00000000000..d55c9d37b4d --- /dev/null +++ b/net/unison/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 a/net/unison/pkg/PLIST b/net/unison/pkg/PLIST new file mode 100644 index 00000000000..87de124036f --- /dev/null +++ b/net/unison/pkg/PLIST @@ -0,0 +1,9 @@ +@comment $OpenBSD: PLIST,v 1.4 2014/10/17 06:22:08 chrisz Exp $ +@pkgpath net/unison/stable${FLAVOR_COMMA} +@pkgpath net/unison/snapshot${FLAVOR_COMMA} +@bin bin/unison +share/doc/pkg-readmes/${FULLPKGNAME} +share/doc/unison/ +share/doc/unison/BUGS.txt +share/doc/unison/NEWS +share/doc/unison/README diff --git a/net/unison/pkg/README b/net/unison/pkg/README new file mode 100644 index 00000000000..99026c0e7a7 --- /dev/null +++ b/net/unison/pkg/README @@ -0,0 +1,12 @@ +$OpenBSD: README,v 1.1 2014/10/17 06:22:08 chrisz Exp $ + ++----------------------------------------------------------------------- +| Running ${FULLPKGNAME} 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. +One way to work around this limitation of unison is to use +the OPAM OCaml package and compiler manager to sync the +OCaml versions on your machines.