x11/dbus for Tcl 8 and 9

Stuart Cassoff <[email protected]>
Newsgroups gmane.os.openbsd.ports
Message-ID <[email protected]>
A loadable lib type port.

The original package (name) now installs for Tcl 8 and 9.
The tcl8 FLAVOR provides all the necessary files except for the
examples, which are shebanged to Tcl 9.

So users who want only the build for Tcl 8 can still have a
complete package, except for examples.



Update to 4.2.
Build for Tcl 8 and 9.



diff -Nurp /usr/ports/x11/dbus-tcl/Makefile ./Makefile
--- /usr/ports/x11/dbus-tcl/Makefile	Fri Dec 20 10:04:49 2024
+++ ./Makefile	Fri Aug  7 12:22:11 2026
@@ -1,9 +1,10 @@
-COMMENT =	dbus bindings for Tcl
+COMMENT =	dbus bindings for Tcl ${MODTCL_COMMENT}
 
-V =		4.1
+V =		4.2
 
 DISTNAME =	dbus-${V}
 PKGNAME =	dbus-tcl-${V}
+
 CATEGORIES =	x11
 HOMEPAGE =	https://chiselapp.com/user/schelte/repository/dbus/
 MAINTAINER =	Stuart Cassoff <[email protected]>
@@ -12,9 +13,10 @@ MAINTAINER =	Stuart Cassoff <[email protected]
 PERMIT_PACKAGE =Yes
 
 WANTLIB =	dbus-1
+
 SITES =		${HOMEPAGE:=uv/}
+
 MODULES =	lang/tcl
-MODTCL_VERSION =8.6
 
 BUILD_DEPENDS =	${MODTCL_BUILD_DEPENDS} \
 		devel/tcllib
@@ -27,29 +29,46 @@ FAKE_FLAGS =	INSTALL_PROGRAM='$${INSTALL_DATA}' \
 		PACKAGE_TARNAME=dbus-tcl \
 		pkglibdir='$$(libdir)/tcl/$$(PACKAGE_NAME)'
 
-TEST_FLAGS =	TCLSH_PROG='${LOCALBASE}/bin/dbus-run-session ${MODTCL_BIN}'
+TEST_FLAGS =	TCLSH_PROG='${LOCALBASE}/bin/dbus-run-session ${MODTCL_BIN}' \
+		TESTFLAGS='${TESTFLAGS}'
 
 SEPARATE_BUILD =Yes
 CONFIGURE_STYLE=gnu
 
-CONFIGURE_ARGS+=--with-tcl=${MODTCL_LIBDIR} \
+CONFIGURE_ARGS=	--with-tcl=${MODTCL_LIBDIR} \
 		--mandir='$${prefix}/man'
 
-WRKDIST =	${WRKDIR}/dbus-${V}
+WRKDIST =	${WRKDIR}/dbus${V}
+
 TEST_TARGET =	test
-SUBST_VARS =	VER
 
+SUBST_VARS =	VER MODTCL_EXTLIB MODTCL_EXT8 MODTCL_EXT9
+
 VER =		${V:S/.//g}
 
-# Skip tests that need a system bus, which might not be present.
-TEST_FLAGS +=	TESTFLAGS='-skip alias-1.[67]'
+# Use TESTFLAGS to control the Dbus-tcl tests
+TESTFLAGS =
 
+FLAVORS = tcl8
+FLAVOR ?=
+
+.if ${FLAVOR:Mtcl8}
+MODTCL_VERSION =	8.6
+.else
+MODTCL_VERSION =	9
+INSTALL_TARGET =	all install-lib-binaries
+RUN_DEPENDS +=		x11/dbus-tcl,tcl8
+.endif
+
+.if ! ${FLAVOR:Mtcl8}
 pre-configure:
 	@${MODTCL_TCLSH_ADJ} ${WRKSRC}/demos/{dbusmon,qdbus}.tcl
 
 post-install:
+	rm -f ${WRKINST}${MODTCL_TCLDIR}/dbus-tcl/pkgIndex.tcl
 	${INSTALL_DATA_DIR} ${PREFIX}/share/examples/dbus-tcl
 	${INSTALL_SCRIPT} ${WRKSRC}/demos/{dbusmon,qdbus}.tcl \
 		${PREFIX}/share/examples/dbus-tcl
+.endif
 
 .include <bsd.port.mk>
diff -Nurp /usr/ports/x11/dbus-tcl/distinfo ./distinfo
--- /usr/ports/x11/dbus-tcl/distinfo	Fri Dec 20 10:04:49 2024
+++ ./distinfo	Thu Aug  6 21:38:00 2026
@@ -1,2 +1,2 @@
-SHA256 (dbus-4.1.tar.gz) = LelROA5bSJUmoFTa6MPObjfILZMqaf+oFuZLOqiwVtY=
-SIZE (dbus-4.1.tar.gz) = 160629
+SHA256 (dbus-4.2.tar.gz) = HKS73z++8BejukweMipEjFuwZQgMGozXqXTrVOX41+I=
+SIZE (dbus-4.2.tar.gz) = 163701
diff -Nurp /usr/ports/x11/dbus-tcl/pkg/PLIST ./pkg/PLIST
--- /usr/ports/x11/dbus-tcl/pkg/PLIST	Tue Jul 26 09:10:44 2022
+++ ./pkg/PLIST	Fri Aug  7 08:10:01 2026
@@ -1,11 +1,12 @@
-lib/tcl/dbus-tcl/
-@so lib/tcl/dbus-tcl/libdbus${VER}.so
-lib/tcl/dbus-tcl/pkgIndex.tcl
-@man man/mann/dbus.n
-share/doc/dbus-tcl/
-share/doc/dbus-tcl/dbus.html
-share/doc/dbus-tcl/license.terms
-share/doc/pkg-readmes/${PKGSTEM}
-share/examples/dbus-tcl/
-share/examples/dbus-tcl/dbusmon.tcl
-share/examples/dbus-tcl/qdbus.tcl
+@option no-default-conflict
+${MODTCL_EXT8}lib/tcl/dbus-tcl/
+@so lib/tcl/dbus-tcl/lib${MODTCL_EXTLIB}dbus${VER}.so
+${MODTCL_EXT8}lib/tcl/dbus-tcl/pkgIndex.tcl
+${MODTCL_EXT8}@man man/mann/dbus.n
+${MODTCL_EXT8}share/doc/dbus-tcl/
+${MODTCL_EXT8}share/doc/dbus-tcl/dbus.html
+${MODTCL_EXT8}share/doc/dbus-tcl/license.terms
+${MODTCL_EXT8}share/doc/pkg-readmes/${PKGSTEM}
+${MODTCL_EXT9}share/examples/dbus-tcl/
+${MODTCL_EXT9}share/examples/dbus-tcl/dbusmon.tcl
+${MODTCL_EXT9}share/examples/dbus-tcl/qdbus.tcl
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.