git: e578dba5068b - main - devel/tevent0174: new port for new version of samba 4.24.9

From: Xavier Beaudouin <kiwi_at_FreeBSD.org>
Date: Thu, 03 Dec 2026 08:56:42 UTC
The branch main has been updated by kiwi:

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

commit e578dba5068b1bf08f0d2566496d17fd45e4e28f
Author:     Xavier Beaudouin <kiwi@FreeBSD.org>
AuthorDate: 2026-12-03 08:49:39 +0000
Commit:     Xavier Beaudouin <kiwi@FreeBSD.org>
CommitDate: 2026-12-03 08:56:34 +0000

    devel/tevent0174: new port for new version of samba 4.24.9
    
    Sponsored by:   Klara, Inc.
---
 devel/Makefile                                     |  1 +
 devel/tevent0174/Makefile                          | 69 ++++++++++++++++++++++
 devel/tevent0174/distinfo                          |  3 +
 .../patch-buildtools_wafsamba_samba__install.py    | 11 ++++
 .../files/patch-buildtools_wafsamba_wscript        | 15 +++++
 devel/tevent0174/files/patch-lib_replace_wscript   | 11 ++++
 devel/tevent0174/files/patch-wscript               | 11 ++++
 devel/tevent0174/pkg-descr                         |  6 ++
 devel/tevent0174/pkg-plist                         |  7 +++
 9 files changed, 134 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index ede7dc9faf55..43da468d7c52 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -8916,6 +8916,7 @@
     SUBDIR += tevent016
     SUBDIR += tevent017
     SUBDIR += tevent0172
+    SUBDIR += tevent0174
     SUBDIR += tex-kpathsea
     SUBDIR += tex-libtexlua
     SUBDIR += tex-libtexluajit
diff --git a/devel/tevent0174/Makefile b/devel/tevent0174/Makefile
new file mode 100644
index 000000000000..45c851e168ac
--- /dev/null
+++ b/devel/tevent0174/Makefile
@@ -0,0 +1,69 @@
+PORTNAME=	tevent
+DISTVERSION=	0.17.4
+PORTREVISION=	0
+CATEGORIES=	devel
+MASTER_SITES=	SAMBA
+PKGNAMESUFFIX=	0174
+
+MAINTAINER=	samba@FreeBSD.org
+COMMENT=	Talloc based event loop library
+WWW=		https://tevent.samba.org/
+
+LICENSE=	LGPL3
+
+BUILD_DEPENDS=	talloc250>=2.5.0:devel/talloc250
+RUN_DEPENDS=	talloc250>=2.5.0:devel/talloc250
+
+USES=		compiler pkgconfig shebangfix waf
+USE_LDCONFIG=	yes
+WAF_CMD=	buildtools/bin/waf
+SHEBANG_GLOB=	*.py
+CONFIGURE_LOG=	bin/config.log
+
+PKGCONFIGDIR?=	${PREFIX}/libdata/pkgconfig
+
+CONFIGURE_ARGS=	--builtin-libraries=replace \
+		--bundled-libraries=!talloc,cmocka \
+		--disable-rpath \
+		--disable-rpath-install \
+		--without-gettext
+CONFIGURE_ENV=	PYTHONHASHSEED=1
+MAKE_ENV=	PYTHONHASHSEED=1
+# Some symbols in tevent's linker version scripts are not defined, but since the
+# scripts are generated dynamically, suppress errors with lld >= 17 due to these
+# undefined symbols.
+LDFLAGS+=	-Wl,--undefined-version
+
+CONFLICTS_INSTALL=	tevent tevent[0-9]*
+
+PLIST_SUB=	PKGCONFIGDIR=${PKGCONFIGDIR:S;^${PREFIX}/;;}
+
+OPTIONS_DEFINE=		DEBUG PYTHON
+OPTIONS_DEFAULT=	PYTHON
+OPTIONS_SUB=		yes
+
+DEBUG_CONFIGURE_ON=	--enable-debug \
+			--verbose
+DEBUG_MAKE_ARGS=	--verbose
+DEBUG_CFLAGS=		-g -ggdb3 -O0
+
+PYTHON_USES=		gettext-runtime python
+PYTHON_USES_OFF=	python:build,test
+PYTHON_USE=		PYTHON=py3kplist
+PYTHON_CONFIGURE_OFF=	--disable-python
+
+post-patch:
+	@${REINPLACE_CMD} -e 's|%%PKGCONFIGDIR%%|${PKGCONFIGDIR}|g' \
+		${BUILD_WRKSRC}/wscript
+
+post-install:
+	${RM} ${STAGEDIR}${PREFIX}/lib/tevent/libcmocka-tevent.so
+	${RM} ${STAGEDIR}${PREFIX}/lib/tevent/libpytalloc-util.cpython-${PYTHON_SUFFIX}-tevent.so
+	${RMDIR} ${STAGEDIR}${PREFIX}/lib/tevent
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtevent.so
+
+post-install-PYTHON-on:
+	${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_tevent*.so
+	${PYTHON_CMD} -m compileall -d ${PYTHON_SITELIBDIR} ${STAGEDIR}${PYTHON_SITELIBDIR}
+
+.include <bsd.port.mk>
diff --git a/devel/tevent0174/distinfo b/devel/tevent0174/distinfo
new file mode 100644
index 000000000000..355010198d46
--- /dev/null
+++ b/devel/tevent0174/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1796269891
+SHA256 (tevent-0.17.4.tar.gz) = ffe5eff04c26fba4f710942635a4e520f9000c96cf1ad0c7cab16a516d93c852
+SIZE (tevent-0.17.4.tar.gz) = 913976
diff --git a/devel/tevent0174/files/patch-buildtools_wafsamba_samba__install.py b/devel/tevent0174/files/patch-buildtools_wafsamba_samba__install.py
new file mode 100644
index 000000000000..5a85a034aea7
--- /dev/null
+++ b/devel/tevent0174/files/patch-buildtools_wafsamba_samba__install.py
@@ -0,0 +1,11 @@
+--- buildtools/wafsamba/samba_install.py.orig	2019-03-21 10:12:32 UTC
++++ buildtools/wafsamba/samba_install.py
+@@ -115,7 +115,7 @@ def install_library(self):
+                 inst_name    = bld.make_libname(t.target)
+         elif self.vnum:
+             vnum_base    = self.vnum.split('.')[0]
+-            install_name = bld.make_libname(target_name, version=self.vnum)
++            install_name = bld.make_libname(target_name, version=vnum_base)
+             install_link = bld.make_libname(target_name, version=vnum_base)
+             inst_name    = bld.make_libname(t.target)
+             if not self.private_library or not t.env.SONAME_ST:
diff --git a/devel/tevent0174/files/patch-buildtools_wafsamba_wscript b/devel/tevent0174/files/patch-buildtools_wafsamba_wscript
new file mode 100644
index 000000000000..3d4b6a56e345
--- /dev/null
+++ b/devel/tevent0174/files/patch-buildtools_wafsamba_wscript
@@ -0,0 +1,15 @@
+--- buildtools/wafsamba/wscript.orig	2019-03-21 10:12:32 UTC
++++ buildtools/wafsamba/wscript
+@@ -82,10 +82,10 @@ def options(opt):
+ 
+     opt.add_option('--with-libiconv',
+                    help='additional directory to search for libiconv',
+-                   action='store', dest='iconv_open', default='/usr/local',
++                   action='store', dest='iconv_open', default=None,
+                    match = ['Checking for library iconv', 'Checking for iconv_open', 'Checking for header iconv.h'])
+     opt.add_option('--without-gettext',
+-                   help=("Disable use of gettext"),
++                   help=("disable use of gettext"),
+                    action="store_true", dest='disable_gettext', default=False)
+ 
+     gr = opt.option_group('developer options')
diff --git a/devel/tevent0174/files/patch-lib_replace_wscript b/devel/tevent0174/files/patch-lib_replace_wscript
new file mode 100644
index 000000000000..d476cec47cfb
--- /dev/null
+++ b/devel/tevent0174/files/patch-lib_replace_wscript
@@ -0,0 +1,11 @@
+--- lib/replace/wscript.orig	2019-03-21 10:12:32 UTC
++++ lib/replace/wscript
+@@ -119,7 +119,7 @@ def configure(conf):
+     conf.CHECK_HEADERS('sys/atomic.h stdatomic.h')
+     conf.CHECK_HEADERS('libgen.h')
+ 
+-    if conf.CHECK_CFLAGS('-Wno-format-truncation'):
++    if conf.CHECK_CFLAGS(['-Wno-format-truncation'] + conf.env.WERROR_CFLAGS):
+         conf.define('HAVE_WNO_FORMAT_TRUNCATION', '1')
+ 
+     if conf.CHECK_CFLAGS('-Wno-unused-function'):
diff --git a/devel/tevent0174/files/patch-wscript b/devel/tevent0174/files/patch-wscript
new file mode 100644
index 000000000000..b17d04a3f874
--- /dev/null
+++ b/devel/tevent0174/files/patch-wscript
@@ -0,0 +1,11 @@
+--- wscript.orig	2017-07-22 22:25:22 UTC
++++ wscript
+@@ -88,7 +88,7 @@ def build(bld):
+         SRC += ' tevent_port.c'
+ 
+     if bld.env.standalone_tevent:
+-        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++        bld.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%'
+         private_library = False
+     else:
+         private_library = True
diff --git a/devel/tevent0174/pkg-descr b/devel/tevent0174/pkg-descr
new file mode 100644
index 000000000000..0b31d18127a1
--- /dev/null
+++ b/devel/tevent0174/pkg-descr
@@ -0,0 +1,6 @@
+tevent is a simple library that can handle the main event loop for an
+application. It supports three kinds of events: timed events, file
+descriptors becoming readable or writable and signals.
+
+Talloc is used for memory management, both internally and for private
+data provided by users of the library.
diff --git a/devel/tevent0174/pkg-plist b/devel/tevent0174/pkg-plist
new file mode 100644
index 000000000000..a7591ca87d25
--- /dev/null
+++ b/devel/tevent0174/pkg-plist
@@ -0,0 +1,7 @@
+include/tevent.h
+lib/libtevent.so
+lib/libtevent.so.0
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/__pycache__/tevent.cpython-%%PYTHON_SUFFIX%%.pyc
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/_tevent%%PYTHON_TAG%%.so
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/tevent.py
+%%PKGCONFIGDIR%%/tevent.pc