git: 7e264485651e - main - net/unison: Update to 2.53.8

From: Guido Falsi <madpilot_at_FreeBSD.org>
Date: Wed, 05 Nov 2025 20:52:56 UTC
The branch main has been updated by madpilot:

URL: https://cgit.FreeBSD.org/ports/commit/?id=7e264485651ef980f26a90d1945c2793198899b4

commit 7e264485651ef980f26a90d1945c2793198899b4
Author:     Guido Falsi <madpilot@FreeBSD.org>
AuthorDate: 2025-11-05 20:52:07 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2025-11-05 20:52:07 +0000

    net/unison: Update to 2.53.8
    
    With this release unison added an install target.
    
    This install target always installs the text only executable as
    unison, and the UI as unison-gui. The port is modified to follow
    suit.
    
    pkg-message has been modified to document this change when upgrading,
    and an entry is added to UPDATING.
---
 UPDATING                              | 15 ++++++++++++
 net/unison/Makefile                   | 44 ++++++++++++++---------------------
 net/unison/distinfo                   |  6 ++---
 net/unison/files/patch-Makefile.OCaml | 21 -----------------
 net/unison/files/unison.desktop.in    |  2 +-
 net/unison/pkg-message                | 11 ++++++---
 net/unison/pkg-message.nox11          |  7 ------
 net/unison/pkg-plist                  |  2 +-
 8 files changed, 45 insertions(+), 63 deletions(-)

diff --git a/UPDATING b/UPDATING
index 3280cc68707c..1e210022df94 100644
--- a/UPDATING
+++ b/UPDATING
@@ -5,6 +5,21 @@ they are unavoidable.
 You should get into the habit of checking this file for changes each time
 you update your ports collection, before attempting any port upgrades.
 
+20251105:
+  AFFECTS: users of net/unison
+  AUTHOR: madpilot@FreeBSD.org
+
+  With the update to version 2.53.8 the port uses upstream install target.
+  This causes the installed unison binary to always me the command line
+  version, even when the port is compiled with xorg support. The UI binary
+  is installed as unison-gui.
+
+  The unison.desktop file provided with the port is adjusted to launch the
+  new unison-gui binary.
+
+  Please verify any local scripts using the unison binaries are adapted to
+  this change.
+
 20251019:
   AFFECTS: users of security/clamav
   AUTHOR: yasu@FreeBSD.org
diff --git a/net/unison/Makefile b/net/unison/Makefile
index c725bfbcbeb4..04ddde6951cc 100644
--- a/net/unison/Makefile
+++ b/net/unison/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	unison
-PORTVERSION=	2.53.7
+PORTVERSION=	2.53.8
 DISTVERSIONPREFIX=	v
 CATEGORIES=	net
 
@@ -8,7 +8,7 @@ COMMENT=	User-level file synchronization tool
 WWW=		https://www.cis.upenn.edu/~bcpierce/unison/
 
 LICENSE=	GPLv3+
-LICENSE_FILE=	${WRKSRC}/COPYING
+LICENSE_FILE=	${WRKSRC}/src/COPYING
 
 FLAVORS=	x11 nox11
 FLAVOR?=	${FLAVORS:[1]}
@@ -23,14 +23,14 @@ x11_LIB_DEPENDS=	libfontconfig.so:x11-fonts/fontconfig \
 			libharfbuzz.so:print/harfbuzz
 x11_CONFLICTS_INSTALL=	unison-nox11
 
-USES=		gmake localbase ocaml:build
+USES=		localbase ocaml:build pkgconfig
 USE_GITHUB=	yes
 GH_ACCOUNT=	bcpierce00
 
 MAKE_ENV=	CLIBS="${LIBS:S/^-/-ccopt -/}" \
 		COFLAGS="${CFLAGS:C/ *(-[^ ]*) */ -ccopt \"\1 \"/gW}"
-WRKSRC_SUBDIR=	src
 PLIST_SUB=	PORTVERSION=${PORTVERSION}
+ALL_TARGET=	manpage
 
 OPTIONS_DEFINE=		DOCS FSMONITOR
 OPTIONS_DEFAULT?=	FSMONITOR
@@ -44,11 +44,10 @@ DOCS_USE=	TEX=dvipsk:build,latex:build
 FSMONITOR_LIB_DEPENDS=	libinotify.so:devel/libinotify
 
 .if ${FLAVOR} == nox11
-ALL_TARGET=	tui
-PKGMESSAGE=	${PKGDIR}/pkg-message.nox11
+ALL_TARGET+=	tui
 PLIST_SUB+=	X11="@comment "
 .else
-ALL_TARGET=	tui guimaybe
+ALL_TARGET+=	tui gui
 SUB_FILES=	${PORTNAME}.desktop
 USE_GNOME=	atk cairo gdkpixbuf glib20 gtk30 pango
 USES+=		gettext-runtime gnome
@@ -68,32 +67,23 @@ ALL_TARGET+=	fsmonitor
 .endif
 
 post-build:
-	cd ${WRKSRC} && HOME=${WRKSRC} ./unison -selftest -ui text -batch
-	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC}/../man
-.if ${PORT_OPTIONS:MDOCS}
-	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC}/../doc unison-manual.pdf
-.endif
+	cd ${WRKSRC}/src && HOME=${WRKSRC}/src ./unison -selftest -ui text -batch
 .if ${FLAVOR} == x11
-	cd ${WRKSRC}/win32rc && ${LOCALBASE}/bin/icotool -x U.ico
+	cd ${WRKSRC}/src/win32rc && ${LOCALBASE}/bin/icotool -x U.ico
 .endif
 
-do-install:
-.if ${FLAVOR} == nox11
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin
-.else
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-gui ${STAGEDIR}${PREFIX}/bin/${PORTNAME}
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/${PORTNAME}-text
+post-build-DOCS-on:
+	${SETENV} ${MAKE_ENV} ${MAKE_CMD} -C ${WRKSRC}/doc unison-manual.pdf
+
+post-install:
+.if ${FLAVOR} != nox11
 	${INSTALL_DATA} ${WRKDIR}/${PORTNAME}.desktop ${STAGEDIR}${DESKTOPDIR}
-	${INSTALL_DATA} ${WRKSRC}/win32rc/U_4_48x48x32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
+	${INSTALL_DATA} ${WRKSRC}/src/win32rc/U_4_48x48x32.png ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.png
 .endif
-	${INSTALL_MAN} ${WRKSRC}/../man/${PORTNAME}.1 ${STAGEDIR}${PREFIX}/share/man/man1
 
-do-install-DOCS-on:
+post-install-DOCS-on:
 	@${MKDIR} ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC}/.. && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
-	cd ${WRKSRC}/../doc && ${INSTALL_DATA} unison-manual.pdf ${STAGEDIR}${DOCSDIR}
-
-do-install-FSMONITOR-on:
-	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME}-fsmonitor ${STAGEDIR}${PREFIX}/bin
+	cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${STAGEDIR}${DOCSDIR}
+	cd ${WRKSRC}/doc && ${INSTALL_DATA} unison-manual.pdf ${STAGEDIR}${DOCSDIR}
 
 .include <bsd.port.mk>
diff --git a/net/unison/distinfo b/net/unison/distinfo
index 1d50925c63ce..0624804c8197 100644
--- a/net/unison/distinfo
+++ b/net/unison/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1730840561
-SHA256 (bcpierce00-unison-v2.53.7_GH0.tar.gz) = a259537cef465c4806d6c1638c382620db2dd395ae42a0dd2efa3ba92712bed5
-SIZE (bcpierce00-unison-v2.53.7_GH0.tar.gz) = 1412694
+TIMESTAMP = 1762328383
+SHA256 (bcpierce00-unison-v2.53.8_GH0.tar.gz) = d0d30ea63e09fc8edf10bd8cbab238fffc8ed510d27741d06b5caa816abd58b6
+SIZE (bcpierce00-unison-v2.53.8_GH0.tar.gz) = 1448430
diff --git a/net/unison/files/patch-Makefile.OCaml b/net/unison/files/patch-Makefile.OCaml
deleted file mode 100644
index a215227ad1cc..000000000000
--- a/net/unison/files/patch-Makefile.OCaml
+++ /dev/null
@@ -1,21 +0,0 @@
---- Makefile.OCaml.orig	2024-02-18 15:03:04 UTC
-+++ Makefile.OCaml
-@@ -336,15 +336,9 @@ ifneq ($(findstring $(OSARCH),FreeBSD OpenBSD NetBSD D
- ifneq ($(findstring $(OSARCH),FreeBSD OpenBSD NetBSD DragonFly),)
-   LIBINOTIFY_LIB:=-cclib '$(shell pkg-config --libs libinotify 2> /dev/null || printf ' -linotify')'
-   LIBINOTIFY_INC:=-ccopt '$(shell pkg-config --cflags libinotify 2> /dev/null)'
--  FOUND_LIBINOTIFY := $(shell { printf '' > inotifytest__.ml ;\
--    $(CAMLC) $(CAMLCFLAGS) $(CAMLLDFLAGS) $(LIBINOTIFY_LIB) \
--      -o inotifytest__ inotifytest__.ml > /dev/null 2>&1 && printf true ; } ;\
--    rm -f inotifytest__.ml inotifytest__.cm[oix] inotifytest__.o inotifytest__ > /dev/null 2>&1)
--  ifeq ($(FOUND_LIBINOTIFY), true)
--    FSMDIR = fsmonitor/inotify
--    $(NAME_FSM)$(EXEC_EXT): CAMLCFLAGS += $(LIBINOTIFY_INC)
--    $(NAME_FSM)$(EXEC_EXT): CLIBS += $(LIBINOTIFY_LIB)
--  endif
-+  FSMDIR = fsmonitor/inotify
-+  $(NAME_FSM)$(EXEC_EXT): CAMLCFLAGS += $(LIBINOTIFY_INC)
-+  $(NAME_FSM)$(EXEC_EXT): CLIBS += $(LIBINOTIFY_LIB)
- endif
- 
- ifeq ($(OSARCH),SunOS)
diff --git a/net/unison/files/unison.desktop.in b/net/unison/files/unison.desktop.in
index 789ccaa366b6..fcecb1edd9c0 100644
--- a/net/unison/files/unison.desktop.in
+++ b/net/unison/files/unison.desktop.in
@@ -6,7 +6,7 @@ Type=Application
 Terminal=false
 StartupNotify=true
 Categories=GTK;Utility;
-Exec=unison
+Exec=unison-gui
 Icon=unison.png
 Comment=Synchronize files (directories) over different disks (hosts)
 Comment[ru]=Синхронизация файлов (каталогов) на нескольких дисках (компьютерах)
diff --git a/net/unison/pkg-message b/net/unison/pkg-message
index 1795b612e0a8..6135e10de4de 100644
--- a/net/unison/pkg-message
+++ b/net/unison/pkg-message
@@ -1,8 +1,13 @@
 [
-{ type: install
+{ type: upgrade
+  minimum_version: "2.53.7"
   message: <<EOM
-Together with a gtk-enabled version, a text-only unison-text binary
-is installed as it depends on a smaller number of libraries.
+STarting with version 2.53.8 the "unison" binary is the text only version.
+The GUI version is installed as unison-gui and no "unison-text" binary is
+installed anymore.
+
+Please make sure to update any local scripts and configurations that were
+using the old naming scheme.
 EOM
 }
 ]
diff --git a/net/unison/pkg-message.nox11 b/net/unison/pkg-message.nox11
deleted file mode 100644
index 31b179babd46..000000000000
--- a/net/unison/pkg-message.nox11
+++ /dev/null
@@ -1,7 +0,0 @@
-[
-{ type: install
-  message: <<EOM
-A text-only unison binary is installed.
-EOM
-}
-]
diff --git a/net/unison/pkg-plist b/net/unison/pkg-plist
index 69dd33226ec4..8f498db4a7de 100644
--- a/net/unison/pkg-plist
+++ b/net/unison/pkg-plist
@@ -1,7 +1,7 @@
 bin/unison
 %%FSMONITOR%%bin/unison-fsmonitor
 %%X11%%share/applications/unison.desktop
-%%X11%%bin/unison-text
+%%X11%%bin/unison-gui
 %%X11%%share/pixmaps/unison.png
 share/man/man1/unison.1.gz
 %%PORTDOCS%%%%DOCSDIR%%/NEWS.md