pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

unison-snapshot: Optionally build fsmonitor



Module Name:	pkgsrc-wip
Committed By:	Greg Troxel <gdt%lexort.com@localhost>
Pushed By:	gdt
Date:		Fri Dec 20 18:57:01 2024 -0500
Changeset:	5e874c091a97b23b81314db9f56f76af3ee7bab0

Modified Files:
	unison-snapshot/Makefile
	unison-snapshot/PLIST
	unison-snapshot/distinfo
	unison-snapshot/options.mk

Log Message:
unison-snapshot: Optionally build fsmonitor

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=5e874c091a97b23b81314db9f56f76af3ee7bab0

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 unison-snapshot/Makefile   | 21 +++++++++++----------
 unison-snapshot/PLIST      |  1 +
 unison-snapshot/distinfo   |  7 +++----
 unison-snapshot/options.mk | 21 ++++++++++++++++++---
 4 files changed, 33 insertions(+), 17 deletions(-)

diffs:
diff --git a/unison-snapshot/Makefile b/unison-snapshot/Makefile
index 062ecc2088..d90553bd2d 100644
--- a/unison-snapshot/Makefile
+++ b/unison-snapshot/Makefile
@@ -1,11 +1,12 @@
 # $NetBSD: Makefile,v 1.166 2024/11/23 13:59:40 wiz Exp $
 
-# master after 2.53.7
-DISTNAME=	unison-2.53.7.51
+# master after 2.53.7.
+# This is the fix-linotify branch for now.
+DISTNAME=	unison-2.53.7.51.1
 #PKGREVISION=	0
 CATEGORIES=	net
 MASTER_SITES=	${MASTER_SITE_GITHUB:=bcpierce00/}
-GITHUB_TAG=	8db0681d52140512f6154cac01596b276415ad13
+GITHUB_TAG=	865862b3de4013ec2c7952ad218091201c5bce3f
 
 MAINTAINER=	gdt%NetBSD.org@localhost
 HOMEPAGE=	https://github.com/bcpierce00/unison
@@ -13,13 +14,19 @@ HOMEPAGE=	https://github.com/bcpierce00/unison
 COMMENT=	File-synchronization tool
 LICENSE=	gnu-gpl-v3
 
-USE_TOOLS+=	bash
+USE_TOOLS+=	bash pkg-config
 # \todo Explain
 MAKE_FLAGS+=	CFLAGS=""
 ALL_ENV+=	PREFIX=${PREFIX}
 ALL_ENV+=	MANDIR=${PREFIX}/${PKGMANDIR}
 MAKE_ENV+=	HOME=${WRKDIR:Q}
 
+# Upstream installs this if unison-fsmonitor is not built, but it's
+# deprecated, and that makes PLIST handling harder, so just get rid of it.
+# (Upstream probably will soon.)
+post-extract:
+	cd ${WRKSRC} && rm -f src/fsmonitor.py
+
 .include "../../lang/ocaml/ocaml.mk"
 
 # Unison will use ocamlopt if possible, and otherwise ocamlc, but
@@ -36,10 +43,6 @@ MAKE_FLAGS+=	NATIVE=false
 .include "options.mk"
 .include "../../mk/bsd.prefs.mk"
 
-# \todo
-#   add fsmonitor option, needing python and libinotify, or forcing it off
-#   for now, it is statically forced off, pending upstream fix
-
 # Unison does not install non-man docs
 INSTALLATION_DIRS+=	share/doc/unison
 
@@ -48,8 +51,6 @@ post-install:
 	${INSTALL_MAN} ${WRKSRC}/CONTRIBUTING.md ${DESTDIR}${PREFIX}/share/doc/unison
 	${INSTALL_MAN} ${WRKSRC}/INSTALL.md ${DESTDIR}${PREFIX}/share/doc/unison
 	${INSTALL_MAN} ${WRKSRC}/NEWS.md ${DESTDIR}${PREFIX}/share/doc/unison
-	# \todo See fsmonitor above.
-	${RM} ${DESTDIR}${PREFIX}/bin/fsmonitor.py
 
 TEST_TARGET=		test
 
diff --git a/unison-snapshot/PLIST b/unison-snapshot/PLIST
index d4ff85d046..503d5c657b 100644
--- a/unison-snapshot/PLIST
+++ b/unison-snapshot/PLIST
@@ -1,5 +1,6 @@
 @comment $NetBSD: PLIST,v 1.7 2022/05/08 15:02:33 gdt Exp $
 bin/unison
+${PLIST.monitor}bin/unison-fsmonitor
 ${PLIST.gtk3}bin/unison-gui
 man/man1/unison.1
 share/doc/unison/CONTRIBUTING.md
diff --git a/unison-snapshot/distinfo b/unison-snapshot/distinfo
index 63f69cde6b..dbc5a09093 100644
--- a/unison-snapshot/distinfo
+++ b/unison-snapshot/distinfo
@@ -1,6 +1,5 @@
 $NetBSD: distinfo,v 1.40 2024/05/07 23:52:11 gdt Exp $
 
-BLAKE2s (unison-2.53.7.51-8db0681d52140512f6154cac01596b276415ad13.tar.gz) = 808870058b000adde985d19860a9957e2ae3d49e0452c120b8de9c0b53cfbda7
-SHA512 (unison-2.53.7.51-8db0681d52140512f6154cac01596b276415ad13.tar.gz) = 46a76b35f294ffea164049a5ab651009e17fafaf61a1095fad7003c69f1a62584fe5241c4cf67650397ce481a26061c431542f8c4a0a6b186bbdb188779d92f0
-Size (unison-2.53.7.51-8db0681d52140512f6154cac01596b276415ad13.tar.gz) = 1421142 bytes
-SHA1 (patch-src_make__tools.ml) = 70daaf644c1b0777845b027d5309ee1e18825cd5
+BLAKE2s (unison-2.53.7.51.1-865862b3de4013ec2c7952ad218091201c5bce3f.tar.gz) = 016a4849d8186ec03f3f9ed30922dec8e9eb4b52fee64a22a679b3743ee8b796
+SHA512 (unison-2.53.7.51.1-865862b3de4013ec2c7952ad218091201c5bce3f.tar.gz) = 8f2e79730f3157b063e112a405dd28b6539bd917d7b696f5f79794818279ec09324ccdd6c320b4f1d239ee27244fadc4302d36eca42d296954b3aa95d957352f
+Size (unison-2.53.7.51.1-865862b3de4013ec2c7952ad218091201c5bce3f.tar.gz) = 1421166 bytes
diff --git a/unison-snapshot/options.mk b/unison-snapshot/options.mk
index ad5d913b58..a2834edfc4 100644
--- a/unison-snapshot/options.mk
+++ b/unison-snapshot/options.mk
@@ -1,12 +1,18 @@
 # $NetBSD: options.mk,v 1.9 2024/05/07 23:52:11 gdt Exp $
 
 PKG_OPTIONS_VAR=	PKG_OPTIONS.unison
-PKG_SUPPORTED_OPTIONS=	lablgtk
+PKG_SUPPORTED_OPTIONS=	lablgtk libinotify
 PKG_SUGGESTED_OPTIONS=	lablgtk
 
-.include "../../mk/bsd.options.mk"
+# monitor is a PLIST var for any of the reasons why unison-fsmonitor is built
+PLIST_VARS+=	gtk3 monitor
+
+# Extend to systems as they are tested to build fsmonitor
+.if ${MACHINE_PLATFORM:MNetBSD-*}
+PKG_SUGGESTED_OPTIONS+=	libinotify
+.endif
 
-PLIST_VARS+=	gtk3
+.include "../../mk/bsd.options.mk"
 
 .if !empty(PKG_OPTIONS:Mlablgtk)
 PLIST.gtk3=	yes
@@ -14,3 +20,12 @@ DEPENDS+=	font-schumacher-misc>=1.0:../../fonts/font-schumacher-misc
 
 .include "../../x11/ocaml-lablgtk3/buildlink3.mk"
 .endif
+
+.if !empty(PKG_OPTIONS:Mlibinotify)
+PLIST.monitor=	yes
+
+.include "../../devel/libinotify/buildlink3.mk"
+.endif
+
+# \todo Probably, enable monitor on GNU/Linux.
+# \todo Probably, enable monitor on SunOS.


Home | Main Index | Thread Index | Old Index