From 3d0dc3deb3016450f06bee9ba0e14f9d4c63a874 Mon Sep 17 00:00:00 2001 From: bket Date: Thu, 26 Apr 2018 21:34:23 +0000 Subject: [PATCH] Update to unison-2.51.2. This version is not compatible with older versions, so retain 2.48.15 by splitting into 2.4x and 2.5x subdirectories and using "@option is-branch". Initial diff has been looked at by kn@ (looks OK port- and build-wise on amd64) and giovanni@ (OK). Issues found by sthen@ (thanks!) and fixed by me. Take MAINTAINER (as discussed with giovanni@). OK sthen@ --- net/unison/2.4x/Makefile | 11 +++ net/unison/2.4x/distinfo | 2 + .../patches/patch-bytearray_stubs_c | 2 +- net/unison/{ => 2.4x}/patches/patch-test_ml | 2 +- net/unison/{ => 2.4x}/pkg/DESCR | 0 net/unison/{ => 2.4x}/pkg/PLIST | 5 +- net/unison/{ => 2.4x}/pkg/README | 2 +- net/unison/2.5x/Makefile | 7 ++ net/unison/2.5x/distinfo | 2 + net/unison/2.5x/patches/patch-uicommon_ml | 14 ++++ net/unison/2.5x/pkg/DESCR | 8 ++ net/unison/2.5x/pkg/PLIST | 9 +++ net/unison/2.5x/pkg/README | 12 +++ net/unison/Makefile | 75 ++----------------- net/unison/Makefile.inc | 61 +++++++++++++++ net/unison/distinfo | 2 - 16 files changed, 140 insertions(+), 74 deletions(-) create mode 100644 net/unison/2.4x/Makefile create mode 100644 net/unison/2.4x/distinfo rename net/unison/{ => 2.4x}/patches/patch-bytearray_stubs_c (94%) rename net/unison/{ => 2.4x}/patches/patch-test_ml (84%) rename net/unison/{ => 2.4x}/pkg/DESCR (100%) rename net/unison/{ => 2.4x}/pkg/PLIST (63%) rename net/unison/{ => 2.4x}/pkg/README (89%) create mode 100644 net/unison/2.5x/Makefile create mode 100644 net/unison/2.5x/distinfo create mode 100644 net/unison/2.5x/patches/patch-uicommon_ml create mode 100644 net/unison/2.5x/pkg/DESCR create mode 100644 net/unison/2.5x/pkg/PLIST create mode 100644 net/unison/2.5x/pkg/README create mode 100644 net/unison/Makefile.inc delete mode 100644 net/unison/distinfo diff --git a/net/unison/2.4x/Makefile b/net/unison/2.4x/Makefile new file mode 100644 index 00000000000..f63e8bbbdbe --- /dev/null +++ b/net/unison/2.4x/Makefile @@ -0,0 +1,11 @@ +# $OpenBSD: Makefile,v 1.1 2018/04/26 21:34:23 bket Exp $ + +VER= 2.48.15 +REV= v3 +REVISION= 0 +GH_TAGNAME= v${VER}${REV} +DISTNAME= ${GH_PROJECT}-${VER} + +WRKDIST= ${WRKDIR}/${PKGNAME}${REV}/src + +.include diff --git a/net/unison/2.4x/distinfo b/net/unison/2.4x/distinfo new file mode 100644 index 00000000000..fa7c97b7980 --- /dev/null +++ b/net/unison/2.4x/distinfo @@ -0,0 +1,2 @@ +SHA256 (unison-2.48.15.tar.gz) = 2DfbASwkH4/0Bdu5a/0EnirXc4n8LVv78gjyOpvfSuI= +SIZE (unison-2.48.15.tar.gz) = 1911724 diff --git a/net/unison/patches/patch-bytearray_stubs_c b/net/unison/2.4x/patches/patch-bytearray_stubs_c similarity index 94% rename from net/unison/patches/patch-bytearray_stubs_c rename to net/unison/2.4x/patches/patch-bytearray_stubs_c index 3820f5a5f74..156eae59f5b 100644 --- a/net/unison/patches/patch-bytearray_stubs_c +++ b/net/unison/2.4x/patches/patch-bytearray_stubs_c @@ -1,4 +1,4 @@ -$OpenBSD: patch-bytearray_stubs_c,v 1.1 2017/03/13 22:25:14 giovanni Exp $ +$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. diff --git a/net/unison/patches/patch-test_ml b/net/unison/2.4x/patches/patch-test_ml similarity index 84% rename from net/unison/patches/patch-test_ml rename to net/unison/2.4x/patches/patch-test_ml index 3eddf5c6a52..54c77d12b22 100644 --- a/net/unison/patches/patch-test_ml +++ b/net/unison/2.4x/patches/patch-test_ml @@ -1,4 +1,4 @@ -$OpenBSD: patch-test_ml,v 1.1 2017/12/21 15:31:48 giovanni Exp $ +$OpenBSD: patch-test_ml,v 1.1 2018/04/26 21:34:23 bket Exp $ Index: test.ml --- test.ml.orig diff --git a/net/unison/pkg/DESCR b/net/unison/2.4x/pkg/DESCR similarity index 100% rename from net/unison/pkg/DESCR rename to net/unison/2.4x/pkg/DESCR diff --git a/net/unison/pkg/PLIST b/net/unison/2.4x/pkg/PLIST similarity index 63% rename from net/unison/pkg/PLIST rename to net/unison/2.4x/pkg/PLIST index 87de124036f..80860de701f 100644 --- a/net/unison/pkg/PLIST +++ b/net/unison/2.4x/pkg/PLIST @@ -1,6 +1,9 @@ -@comment $OpenBSD: PLIST,v 1.4 2014/10/17 06:22:08 chrisz Exp $ +@comment $OpenBSD: PLIST,v 1.1 2018/04/26 21:34:23 bket Exp $ @pkgpath net/unison/stable${FLAVOR_COMMA} @pkgpath net/unison/snapshot${FLAVOR_COMMA} +@pkgpath net/unison${FLAVOR_COMMA} +@option is-branch +@conflict unison-* @bin bin/unison share/doc/pkg-readmes/${FULLPKGNAME} share/doc/unison/ diff --git a/net/unison/pkg/README b/net/unison/2.4x/pkg/README similarity index 89% rename from net/unison/pkg/README rename to net/unison/2.4x/pkg/README index 99026c0e7a7..ad53a06eafa 100644 --- a/net/unison/pkg/README +++ b/net/unison/2.4x/pkg/README @@ -1,4 +1,4 @@ -$OpenBSD: README,v 1.1 2014/10/17 06:22:08 chrisz Exp $ +$OpenBSD: README,v 1.1 2018/04/26 21:34:23 bket Exp $ +----------------------------------------------------------------------- | Running ${FULLPKGNAME} on OpenBSD diff --git a/net/unison/2.5x/Makefile b/net/unison/2.5x/Makefile new file mode 100644 index 00000000000..3a23db69823 --- /dev/null +++ b/net/unison/2.5x/Makefile @@ -0,0 +1,7 @@ +# $OpenBSD: Makefile,v 1.1 2018/04/26 21:34:23 bket Exp $ + +GH_TAGNAME= v2.51.2 + +WRKDIST= ${WRKDIR}/${PKGNAME}/src + +.include diff --git a/net/unison/2.5x/distinfo b/net/unison/2.5x/distinfo new file mode 100644 index 00000000000..395d7568172 --- /dev/null +++ b/net/unison/2.5x/distinfo @@ -0,0 +1,2 @@ +SHA256 (unison-2.51.2.tar.gz) = ou/L6rZRvm32nMmyUwEaB5Vey5H7QHohlxlFEZeEnV4= +SIZE (unison-2.51.2.tar.gz) = 1398790 diff --git a/net/unison/2.5x/patches/patch-uicommon_ml b/net/unison/2.5x/patches/patch-uicommon_ml new file mode 100644 index 00000000000..cab5a5b44ae --- /dev/null +++ b/net/unison/2.5x/patches/patch-uicommon_ml @@ -0,0 +1,14 @@ +$OpenBSD: patch-uicommon_ml,v 1.1 2018/04/26 21:34:23 bket Exp $ + +Index: uicommon.ml +--- uicommon.ml.orig ++++ uicommon.ml +@@ -494,7 +494,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 diff --git a/net/unison/2.5x/pkg/DESCR b/net/unison/2.5x/pkg/DESCR new file mode 100644 index 00000000000..d55c9d37b4d --- /dev/null +++ b/net/unison/2.5x/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/2.5x/pkg/PLIST b/net/unison/2.5x/pkg/PLIST new file mode 100644 index 00000000000..0001b1f061a --- /dev/null +++ b/net/unison/2.5x/pkg/PLIST @@ -0,0 +1,9 @@ +@comment $OpenBSD: PLIST,v 1.1 2018/04/26 21:34:23 bket Exp $ +@option is-branch +@conflict unison-* +@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/2.5x/pkg/README b/net/unison/2.5x/pkg/README new file mode 100644 index 00000000000..ad53a06eafa --- /dev/null +++ b/net/unison/2.5x/pkg/README @@ -0,0 +1,12 @@ +$OpenBSD: README,v 1.1 2018/04/26 21:34:23 bket 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. diff --git a/net/unison/Makefile b/net/unison/Makefile index fa7c3849768..4a82b1449e5 100644 --- a/net/unison/Makefile +++ b/net/unison/Makefile @@ -1,70 +1,9 @@ -# $OpenBSD: Makefile,v 1.14 2017/12/21 15:31:48 giovanni Exp $ +# $OpenBSD: Makefile,v 1.15 2018/04/26 21:34:23 bket Exp $ -COMMENT= multi-platform file synchronization tool -CATEGORIES= net +SUBDIR = +SUBDIR += 2.4x +SUBDIR += 2.4x,no_x11 +SUBDIR += 2.5x +SUBDIR += 2.5x,no_x11 -REV= v3 -VER= 2.48.15 -GH_ACCOUNT= bcpierce00 -GH_PROJECT= unison -GH_TAGNAME= v${VER}${REV} -DISTNAME= ${GH_TAGNAME} -PKGNAME= ${GH_PROJECT}-${VER} - -HOMEPAGE= http://www.cis.upenn.edu/~bcpierce/unison/ -MAINTAINER= Giovanni Bechis - -# GPLv3 -PERMIT_PACKAGE_CDROM= Yes - -WANTLIB= c curses m pthread util - -MODULES= lang/ocaml - -USE_GMAKE= Yes - -FLAVORS= no_x11 -FLAVOR?= - -FLAVOR_COMMA= ${FLAVOR_EXT:S/-/,/g} -SUBST_VARS= FLAVOR_COMMA - -.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 fontconfig freetype -WANTLIB += gio-2.0 glib-2.0 gobject-2.0 intl pango-1.0 -WANTLIB += pangocairo-1.0 pangoft2-1.0 gdk_pixbuf-2.0 -WANTLIB += gdk-x11-2.0 gtk-x11-2.0 atk-1.0 cairo z -.endif - -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= - -TEST_TARGET= selftest -PORTHOME= ${WRKDIR} - -# Avoid multiple all:: entries and use the real target entry. -ALL_TARGET= unison - -DOCS= BUGS.txt NEWS README - -WRKDIST= ${WRKDIR}/${PKGNAME}${REV}/src - -# 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 +.include diff --git a/net/unison/Makefile.inc b/net/unison/Makefile.inc new file mode 100644 index 00000000000..0f64848f461 --- /dev/null +++ b/net/unison/Makefile.inc @@ -0,0 +1,61 @@ +# $OpenBSD: Makefile.inc,v 1.27 2018/04/26 21:34:23 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 + +# GPLv3 +PERMIT_PACKAGE_CDROM= 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+= intl pango-1.0 pangocairo-1.0 pangoft2-1.0 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} + +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 diff --git a/net/unison/distinfo b/net/unison/distinfo deleted file mode 100644 index 11311a330dd..00000000000 --- a/net/unison/distinfo +++ /dev/null @@ -1,2 +0,0 @@ -SHA256 (v2.48.15v3.tar.gz) = 2DfbASwkH4/0Bdu5a/0EnirXc4n8LVv78gjyOpvfSuI= -SIZE (v2.48.15v3.tar.gz) = 1911724