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@
This commit is contained in:
bket 2018-04-26 21:34:23 +00:00
parent 679c80ca0b
commit 3d0dc3deb3
16 changed files with 140 additions and 74 deletions

11
net/unison/2.4x/Makefile Normal file
View File

@ -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 <bsd.port.mk>

2
net/unison/2.4x/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (unison-2.48.15.tar.gz) = 2DfbASwkH4/0Bdu5a/0EnirXc4n8LVv78gjyOpvfSuI=
SIZE (unison-2.48.15.tar.gz) = 1911724

View File

@ -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.

View File

@ -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

View File

@ -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/

View File

@ -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

7
net/unison/2.5x/Makefile Normal file
View File

@ -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 <bsd.port.mk>

2
net/unison/2.5x/distinfo Normal file
View File

@ -0,0 +1,2 @@
SHA256 (unison-2.51.2.tar.gz) = ou/L6rZRvm32nMmyUwEaB5Vey5H7QHohlxlFEZeEnV4=
SIZE (unison-2.51.2.tar.gz) = 1398790

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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 <giovanni@openbsd.org>
# 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 <bsd.port.mk>
.include <bsd.port.subdir.mk>

61
net/unison/Makefile.inc Normal file
View File

@ -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 <bket@openbsd.org>
# 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

View File

@ -1,2 +0,0 @@
SHA256 (v2.48.15v3.tar.gz) = 2DfbASwkH4/0Bdu5a/0EnirXc4n8LVv78gjyOpvfSuI=
SIZE (v2.48.15v3.tar.gz) = 1911724