summaryrefslogtreecommitdiff
path: root/net/unison
diff options
context:
space:
mode:
Diffstat (limited to 'net/unison')
-rw-r--r--net/unison/DESCR5
-rw-r--r--net/unison/Makefile51
-rw-r--r--net/unison/PLIST8
-rw-r--r--net/unison/distinfo6
-rw-r--r--net/unison/options.mk17
-rw-r--r--net/unison/patches/patch-src_Makefile33
6 files changed, 120 insertions, 0 deletions
diff --git a/net/unison/DESCR b/net/unison/DESCR
new file mode 100644
index 00000000000..a1fcb2e5944
--- /dev/null
+++ b/net/unison/DESCR
@@ -0,0 +1,5 @@
+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.
diff --git a/net/unison/Makefile b/net/unison/Makefile
new file mode 100644
index 00000000000..d0b3d10c7fb
--- /dev/null
+++ b/net/unison/Makefile
@@ -0,0 +1,51 @@
+ # $NetBSD: Makefile,v 1.136 2022/03/13 15:07:13 gdt Exp $
+
+DISTNAME= unison-2.52.0
+#PKGREVISION= 0
+CATEGORIES= net
+MASTER_SITES= ${MASTER_SITE_GITHUB:=bcpierce00/}
+GITHUB_TAG= v${PKGVERSION_NOREV}
+
+MAINTAINER= gdt@NetBSD.org
+HOMEPAGE= https://www.cis.upenn.edu/~bcpierce/unison/
+COMMENT= File-synchronization tool
+LICENSE= gnu-gpl-v3
+
+USE_TOOLS+= gmake bash
+MAKE_FLAGS+= CFLAGS=""
+MAKE_ENV+= HOME=${WRKDIR:Q}
+
+.include "../../mk/ocaml.mk"
+
+.if (${OCAML_USE_OPT_COMPILER} == "yes")
+MAKE_FLAGS+= NATIVE=true
+.else
+MAKE_FLAGS+= NATIVE=false
+.endif
+
+# bsd.prefs.mk, included also by options, must be after ocaml to get
+# _PKGSRC_MKPIE set correctly.
+.include "options.mk"
+.include "../../mk/bsd.prefs.mk"
+
+TEST_TARGET= test
+
+INSTALLATION_DIRS= bin
+INSTALLATION_DIRS+= share/doc/unison
+
+do-install:
+ ${INSTALL_PROGRAM} ${WRKSRC}/src/unison ${DESTDIR}${PREFIX}/bin
+ ${INSTALL_MAN} ${WRKSRC}/src/CONTRIB ${DESTDIR}${PREFIX}/share/doc/unison
+ ${INSTALL_MAN} ${WRKSRC}/src/COPYING ${DESTDIR}${PREFIX}/share/doc/unison
+ ${INSTALL_MAN} ${WRKSRC}/NEWS.md ${DESTDIR}${PREFIX}/share/doc/unison
+ ${INSTALL_MAN} ${WRKSRC}/src/README ${DESTDIR}${PREFIX}/share/doc/unison
+ ${INSTALL_MAN} ${WRKSRC}/src/ROADMAP.txt ${DESTDIR}${PREFIX}/share/doc/unison
+ ${INSTALL_MAN} ${WRKSRC}/src/TODO.txt ${DESTDIR}${PREFIX}/share/doc/unison
+
+.include "../../mk/pthread.buildlink3.mk"
+.if defined(PTHREAD_TYPE) && (${PTHREAD_TYPE} != "none")
+MAKE_FLAGS+= THREADS=true
+.endif
+
+.include "../../lang/ocaml/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/net/unison/PLIST b/net/unison/PLIST
new file mode 100644
index 00000000000..d18ce076d89
--- /dev/null
+++ b/net/unison/PLIST
@@ -0,0 +1,8 @@
+@comment $NetBSD: PLIST,v 1.6 2022/03/13 15:07:13 gdt Exp $
+bin/unison
+share/doc/unison/CONTRIB
+share/doc/unison/COPYING
+share/doc/unison/NEWS.md
+share/doc/unison/README
+share/doc/unison/ROADMAP.txt
+share/doc/unison/TODO.txt
diff --git a/net/unison/distinfo b/net/unison/distinfo
new file mode 100644
index 00000000000..fb50c23dc72
--- /dev/null
+++ b/net/unison/distinfo
@@ -0,0 +1,6 @@
+$NetBSD: distinfo,v 1.32 2022/03/13 15:07:13 gdt Exp $
+
+BLAKE2s (unison-2.52.0.tar.gz) = 59129fa38b89e23e2defdb7163754153b497d828a69c5d7f6695465d002390fe
+SHA512 (unison-2.52.0.tar.gz) = 24cfb43b40a05f85164c43e8744216142db4cd74d9d09ba7178f25f794b0dcce252597fa1eb49a4133e63d891c8d23fd7472669cf9f52777bc6aa86b0a50e6f5
+Size (unison-2.52.0.tar.gz) = 1354200 bytes
+SHA1 (patch-src_Makefile) = ff73628825232b9494844c020b78d2978f753d07
diff --git a/net/unison/options.mk b/net/unison/options.mk
new file mode 100644
index 00000000000..932a2f4ad44
--- /dev/null
+++ b/net/unison/options.mk
@@ -0,0 +1,17 @@
+# $NetBSD: options.mk,v 1.6 2022/03/13 15:07:13 gdt Exp $
+
+PKG_OPTIONS_VAR= PKG_OPTIONS.unison
+PKG_SUPPORTED_OPTIONS= lablgtk
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mlablgtk)
+MAKE_FLAGS+= UISTYLE=gtk2
+
+DEPENDS+= font-schumacher-misc>=1.0:../../fonts/font-schumacher-misc
+
+BUILDLINK_API_DEPENDS.ocaml-lablgtk+= ocaml-lablgtk>=2.16.0
+.include "../../x11/ocaml-lablgtk/buildlink3.mk"
+.else
+MAKE_FLAGS+= UISTYLE=text
+.endif
diff --git a/net/unison/patches/patch-src_Makefile b/net/unison/patches/patch-src_Makefile
new file mode 100644
index 00000000000..4cddd0d26f0
--- /dev/null
+++ b/net/unison/patches/patch-src_Makefile
@@ -0,0 +1,33 @@
+$NetBSD: patch-src_Makefile,v 1.3 2022/03/13 15:07:13 gdt Exp $
+
+Correct installation procedure
+--- src/Makefile.orig 2020-10-18 12:56:47.000000000 +0000
++++ src/Makefile
+@@ -49,7 +49,7 @@ all:: INSTALL
+
+ INSTALL: $(NAME)$(EXEC_EXT)
+ # file isn't made for OS X, so check that it's there first
+- (if [ -f $(NAME) ]; then ./$(NAME) -doc install > INSTALLATION; fi)
++## (if [ -f $(NAME) ]; then ./$(NAME) -doc install > INSTALLATION; fi)
+
+ ########################################################################
+ ## Miscellaneous developer-only switches
+@@ -68,7 +68,7 @@ include Makefile.OCaml
+ ######################################################################
+ # Installation
+
+-INSTALLDIR = $(HOME)/bin/
++INSTALLDIR = ${DESTDIR}$(PREFIX)/bin/
+
+ # This has two names because on OSX the file INSTALL shadows the target 'install'!
+ install: doinstall
+@@ -86,9 +86,7 @@ doinstall: buildexecutable
+ echo "makefile variable NAME not bound"; \
+ exit 1 \
+ ; fi
+- -mv $(INSTALLDIR)/$(NAME)$(EXEC_EXT) /tmp/$(NAME)-$(shell echo $$$$)
+ cp $(NAME)$(EXEC_EXT) $(INSTALLDIR)
+- cp $(NAME)$(EXEC_EXT) $(INSTALLDIR)$(NAME)-$(MAJORVERSION)$(EXEC_EXT)
+
+ ######################################################################
+ # Demo