git: c826fcf07d91 - main - x11-toolkits/vte3: introduce FRIBIDI, GNUTLS, GTK4 options

From: Alexey Dokuchaev <danfe_at_FreeBSD.org>
Date: Tue, 22 Aug 2023 17:11:36 UTC
The branch main has been updated by danfe:

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

commit c826fcf07d91dc7a3b0cf42709c5db69c421a122
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2023-08-22 17:06:58 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2023-08-22 17:06:58 +0000

    x11-toolkits/vte3: introduce FRIBIDI, GNUTLS, GTK4 options
    
    Keep them enabled by default to ensure featureful package.
---
 x11-toolkits/vte3/Makefile  | 23 ++++++++++++++++-------
 x11-toolkits/vte3/pkg-plist | 38 +++++++++++++++++++-------------------
 2 files changed, 35 insertions(+), 26 deletions(-)

diff --git a/x11-toolkits/vte3/Makefile b/x11-toolkits/vte3/Makefile
index b22dfce01b9c..d759e50b527e 100644
--- a/x11-toolkits/vte3/Makefile
+++ b/x11-toolkits/vte3/Makefile
@@ -16,9 +16,7 @@ WWW=		https://wiki.gnome.org/Apps/Terminal/VTE
 LICENSE=	LGPL21
 
 BUILD_DEPENDS=	bash:shells/bash
-LIB_DEPENDS=	libgnutls.so:security/gnutls \
-		libfribidi.so:converters/fribidi \
-		libpcre2-8.so:devel/pcre2 \
+LIB_DEPENDS=	libpcre2-8.so:devel/pcre2 \
 		libicuuc.so:devel/icu
 
 PORTSCOUT=	limitw:1,even
@@ -26,22 +24,33 @@ PORTSCOUT=	limitw:1,even
 USES=		compiler:c++11-lang gettext gnome localbase meson \
 		pkgconfig python tar:xz vala:build
 USE_LDCONFIG=	yes
-USE_GNOME=	cairo gdkpixbuf2 gtk30 gtk40 introspection:build
+USE_GNOME=	cairo gdkpixbuf2 gtk30 introspection:build
 
 MESON_ARGS=	-Da11y=true \
 		-Dgir=true \
-		-Dfribidi=true \
 		-Dgtk3=true \
-		-Dgtk4=true \
 		-Dicu=true \
 		-D_systemd=false \
 		-Dvapi=true
 
-# shlib version numbers comes from gtk3/4 meson options not from PYTHON_VER
+# shlib version numbers come from gtk3/4 meson options, not from PYTHON_VER
 PLIST_SUB=	VERSION=2.91 VER3=3.91
 
 BINARY_ALIAS=	python3=${PYTHON_CMD}
 
+OPTIONS_DEFINE=	FRIBIDI GNUTLS GTK4
+OPTIONS_DEFAULT=FRIBIDI GNUTLS GTK4
+OPTIONS_SUB=	yes
+
+FRIBIDI_LIB_DEPENDS=	libfribidi.so:converters/fribidi
+FRIBIDI_MESON_OFF=	-Dfribidi=false
+
+GNUTLS_LIB_DEPENDS=	libgnutls.so:security/gnutls
+GNUTLS_MESON_OFF=	-Dgnutls=false
+
+GTK4_USE=		GNOME=gtk40
+GTK4_MESON_ON=		-Dgtk4=true
+
 .include <bsd.port.pre.mk>
 
 .if ${CHOSEN_COMPILER_TYPE} == clang && ${OPSYS} == FreeBSD && ${OSVERSION} < 1300109
diff --git a/x11-toolkits/vte3/pkg-plist b/x11-toolkits/vte3/pkg-plist
index 2b4309e00e08..2323aac7f8fb 100644
--- a/x11-toolkits/vte3/pkg-plist
+++ b/x11-toolkits/vte3/pkg-plist
@@ -1,18 +1,18 @@
 bin/vte-%%VERSION%%
-bin/vte-%%VERSION%%-gtk4
+%%GTK4%%bin/vte-%%VERSION%%-gtk4
 etc/profile.d/vte.csh
 etc/profile.d/vte.sh
-include/vte-%%VERSION%%-gtk4/vte/vte.h
-include/vte-%%VERSION%%-gtk4/vte/vtedeprecated.h
-include/vte-%%VERSION%%-gtk4/vte/vteenums.h
-include/vte-%%VERSION%%-gtk4/vte/vteglobals.h
-include/vte-%%VERSION%%-gtk4/vte/vtemacros.h
-include/vte-%%VERSION%%-gtk4/vte/vtepty.h
-include/vte-%%VERSION%%-gtk4/vte/vteregex.h
-include/vte-%%VERSION%%-gtk4/vte/vteterminal.h
-include/vte-%%VERSION%%-gtk4/vte/vtetypebuiltins-gtk4.h
-include/vte-%%VERSION%%-gtk4/vte/vtetypebuiltins.h
-include/vte-%%VERSION%%-gtk4/vte/vteversion.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vte.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vtedeprecated.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vteenums.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vteglobals.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vtemacros.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vtepty.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vteregex.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vteterminal.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vtetypebuiltins-gtk4.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vtetypebuiltins.h
+%%GTK4%%include/vte-%%VERSION%%-gtk4/vte/vteversion.h
 include/vte-%%VERSION%%/vte/vte.h
 include/vte-%%VERSION%%/vte/vtedeprecated.h
 include/vte-%%VERSION%%/vte/vteenums.h
@@ -25,17 +25,17 @@ include/vte-%%VERSION%%/vte/vtetypebuiltins-gtk3.h
 include/vte-%%VERSION%%/vte/vtetypebuiltins.h
 include/vte-%%VERSION%%/vte/vteversion.h
 lib/girepository-1.0/Vte-%%VERSION%%.typelib
-lib/girepository-1.0/Vte-%%VER3%%.typelib
-lib/libvte-%%VERSION%%-gtk4.so
-lib/libvte-%%VERSION%%-gtk4.so.0
+%%GTK4%%lib/girepository-1.0/Vte-%%VER3%%.typelib
+%%GTK4%%lib/libvte-%%VERSION%%-gtk4.so
+%%GTK4%%lib/libvte-%%VERSION%%-gtk4.so.0
 lib/libvte-%%VERSION%%.so
 lib/libvte-%%VERSION%%.so.0
 lib/libvte-%%VERSION%%.so.0.7000.2
-libdata/pkgconfig/vte-%%VERSION%%-gtk4.pc
+%%GTK4%%libdata/pkgconfig/vte-%%VERSION%%-gtk4.pc
 libdata/pkgconfig/vte-%%VERSION%%.pc
 libexec/vte-urlencode-cwd
 share/gir-1.0/Vte-%%VERSION%%.gir
-share/gir-1.0/Vte-%%VER3%%.gir
+%%GTK4%%share/gir-1.0/Vte-%%VER3%%.gir
 share/glade/catalogs/vte-%%VERSION%%.xml
 share/glade/pixmaps/hicolor/16x16/actions/widget-vte-terminal.png
 share/glade/pixmaps/hicolor/22x22/actions/widget-vte-terminal.png
@@ -137,7 +137,7 @@ share/locale/xh/LC_MESSAGES/vte-%%VERSION%%.mo
 share/locale/zh_CN/LC_MESSAGES/vte-%%VERSION%%.mo
 share/locale/zh_HK/LC_MESSAGES/vte-%%VERSION%%.mo
 share/locale/zh_TW/LC_MESSAGES/vte-%%VERSION%%.mo
-share/vala/vapi/vte-%%VERSION%%-gtk4.deps
-share/vala/vapi/vte-%%VERSION%%-gtk4.vapi
+%%GTK4%%share/vala/vapi/vte-%%VERSION%%-gtk4.deps
+%%GTK4%%share/vala/vapi/vte-%%VERSION%%-gtk4.vapi
 share/vala/vapi/vte-%%VERSION%%.deps
 share/vala/vapi/vte-%%VERSION%%.vapi