Index | Thread | Search

From:
Jeremie Courreges-Anglas <jca@wxcvbn.org>
Subject:
Re: UPDATE net/unison-2.53.4
To:
Bjorn Ketelaars <bket@openbsd.org>
Cc:
ports@openbsd.org
Date:
Tue, 20 Feb 2024 11:30:14 +0100

Download raw body.

Thread
On Mon, Feb 19 2024, Bjorn Ketelaars <bket@openbsd.org> wrote:
> Diff below updates net/unison to 2.53.4, which includes bug fixes, minor
> improvements and clean-ups. Release notes:
> https://github.com/bcpierce00/unison/releases/tag/v2.53.4.
>
> Change in the build system is that the gtk3 flavor of unison is
> renamed to unison-gui. This is undone in the diff below by setting the
> correct binary and renaming it in the do-install phase. I'm not sure
> if this is the way to go, or if there is a better way to do this.

If lablgtk3 is installed then both unison and unison-gui are built, with
or without FLAVOR=no_x11.  The problem is you're *adding* to MAKE_FLAGS
instead of *setting* ALL_TARGET=gui/tui.

Now that the build system lets you build both, it would be interesting
to use MULTI_PACKAGES, with a -gui subpackage shipping just the
unison-gui program and carrying the gtk3 dep.  With proper @pkgpaths the
upgrade path would be mostly transparent for users (gotta retrain their
fingers to type unison-gui when needed).

Additionally no_x11 could stay as a PSEUDO_FLAVOR so that people can
build and install the tui program/package without having lablgtk3
installed.

> Run tested on amd64.
>
> Comments / OK?
>
>
> diff --git Makefile Makefile
> index d240adb9879..d9b47062baf 100644
> --- Makefile
> +++ Makefile
> @@ -6,8 +6,7 @@ COMMENT =	multi-platform file synchronization tool
>  
>  GH_ACCOUNT =	bcpierce00
>  GH_PROJECT =	unison
> -GH_TAGNAME =	v2.53.3
> -REVISION =	2
> +GH_TAGNAME =	v2.53.4
>  
>  CATEGORIES =	net
>  
> @@ -16,7 +15,7 @@ MAINTAINER =	Bjorn Ketelaars <bket@openbsd.org>
>  # GPLv3
>  PERMIT_PACKAGE =	Yes
>  
> -WANTLIB =		c m util
> +WANTLIB =		c m pthread util
>  
>  MODULES =		lang/ocaml
>  MODOCAML_RUNDEP =	if-not-native
> @@ -32,7 +31,8 @@ FLAVORS =	no_x11
>  FLAVOR ?=
>  
>  .if ${FLAVOR:Mno_x11}
> -MAKE_FLAGS +=	UISTYLE=text
> +MAKE_FLAGS +=	tui
> +PROG =		unison
>  .else
>  WANTLIB +=	atk-1.0 cairo cairo-gobject fontconfig freetype gdk-3
>  WANTLIB +=	gdk_pixbuf-2.0 gio-2.0 glib-2.0 gobject-2.0 gtk-3 harfbuzz
> @@ -40,7 +40,8 @@ WANTLIB +=	intl pango-1.0 pangocairo-1.0
>  BUILD_DEPENDS +=	x11/lablgtk3
>  LIB_DEPENDS +=		x11/gtk+3
>  RUN_DEPENDS +=		devel/desktop-file-utils
> -MAKE_FLAGS +=		UISTYLE=gtk3
> +MAKE_FLAGS +=		gui
> +PROG =			unison-gui
>  .endif
>  
>  FLAVOR_COMMA =	${FLAVOR_EXT:S/-/,/g}
> @@ -49,10 +50,9 @@ SUBST_VARS =	FLAVOR_COMMA
>  PORTHOME =	${WRKDIR}
>  DOCS =		NEWS.md README.md
>  
> -# 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}/src/unison ${PREFIX}/bin
> +	${INSTALL_SCRIPT} ${WRKSRC}/src/${PROG} ${PREFIX}/bin/unison
>  	${INSTALL_MAN} ${WRKSRC}/man/unison.1 ${PREFIX}/man/man1
>  	${INSTALL_DATA_DIR} ${PREFIX}/share/doc/unison
>  	@cd ${WRKSRC} && ${INSTALL_DATA} ${DOCS} ${PREFIX}/share/doc/unison
> diff --git distinfo distinfo
> index df466e43a6d..aaf7e3e2284 100644
> --- distinfo
> +++ distinfo
> @@ -1,2 +1,2 @@
> -SHA256 (unison-2.53.3.tar.gz) = quoE/FvHbc/oYnaDyWWe5MGU1PmSzIqqFbuygg/I3kY=
> -SIZE (unison-2.53.3.tar.gz) = 1415490
> +SHA256 (unison-2.53.4.tar.gz) = 0Z5CkwE1gdvE0Umu+Js0x2Ih78vYc8eqUZPeSJrduFo=
> +SIZE (unison-2.53.4.tar.gz) = 1407429
>

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE