git: 12f0c8603e2c - main - devel/talloc243: Repocopy from devel/talloc242
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 26 Aug 2025 16:45:38 UTC
The branch main has been updated by 0mp:
URL: https://cgit.FreeBSD.org/ports/commit/?id=12f0c8603e2c480aeb74c0d21fd50fa552588e0b
commit 12f0c8603e2c480aeb74c0d21fd50fa552588e0b
Author: Mateusz Piotrowski <0mp@FreeBSD.org>
AuthorDate: 2025-08-26 14:21:37 +0000
Commit: Mateusz Piotrowski <0mp@FreeBSD.org>
CommitDate: 2025-08-26 16:44:03 +0000
devel/talloc243: Repocopy from devel/talloc242
PR: 287985
Reported by: Andrej Ebert <andrej@ebert.su>
Sponsored by: Klara, Inc.
---
devel/talloc243/Makefile | 70 ++++++++++++++++++++++
devel/talloc243/distinfo | 3 +
.../patch-buildtools_wafsamba_samba__autoconf.py | 35 +++++++++++
.../patch-buildtools_wafsamba_samba__install.py | 11 ++++
.../files/patch-buildtools_wafsamba_wscript | 15 +++++
devel/talloc243/files/patch-lib_replace_wscript | 11 ++++
devel/talloc243/files/patch-talloc.c | 20 +++++++
devel/talloc243/files/patch-wscript | 18 ++++++
devel/talloc243/pkg-descr | 2 +
devel/talloc243/pkg-plist | 10 ++++
10 files changed, 195 insertions(+)
diff --git a/devel/talloc243/Makefile b/devel/talloc243/Makefile
new file mode 100644
index 000000000000..456bd27bd165
--- /dev/null
+++ b/devel/talloc243/Makefile
@@ -0,0 +1,70 @@
+PORTNAME= talloc
+DISTVERSION= 2.4.2
+PORTREVISION= 2
+CATEGORIES= devel
+MASTER_SITES= SAMBA
+PKGNAMESUFFIX= 242
+
+MAINTAINER= samba@FreeBSD.org
+COMMENT= Hierarchical pool based memory allocator
+WWW= https://talloc.samba.org/
+
+LICENSE= LGPL3
+
+USES= compiler pkgconfig shebangfix waf
+USE_LDCONFIG= yes
+SHEBANG_GLOB= *.py
+WAF_CMD= buildtools/bin/waf
+CONFIGURE_LOG= bin/config.log
+
+PKGCONFIGDIR?= ${PREFIX}/libdata/pkgconfig
+PLIST_SUB+= PKGCONFIGDIR=${PKGCONFIGDIR:S;^${PREFIX}/;;}
+
+CONFIGURE_ARGS+= --disable-rpath \
+ --disable-rpath-install \
+ --bundled-libraries=NONE \
+ --builtin-libraries=replace \
+ --without-gettext
+CONFIGURE_ENV= PYTHONHASHSEED=1
+MAKE_ENV= PYTHONHASHSEED=1
+
+CONFLICTS_INSTALL= talloc
+
+OPTIONS_DEFINE= DEBUG MANPAGES PYTHON
+OPTIONS_DEFAULT= MANPAGES PYTHON
+OPTIONS_SUB= yes
+
+DEBUG_CFLAGS= -g -ggdb3 -O0
+DEBUG_CONFIGURE_ON= --verbose --enable-debug
+DEBUG_MAKE_ARGS= --verbose
+
+PYTHON_USES= gettext-runtime python
+PYTHON_USES_OFF= python:build,test
+PYTHON_CONFIGURE_OFF= --disable-python
+
+MANPAGES_BUILD_DEPENDS= ${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \
+ xsltproc:textproc/libxslt
+MANPAGES_CONFIGURE_ENV_OFF= XSLTPROC="false"
+
+# No fancy color error messages
+CFLAGS+= ${CFLAGS_${CHOSEN_COMPILER_TYPE}}
+CFLAGS_clang= -fno-color-diagnostics
+CONFIGURE_ENV+= NOCOLOR=yes
+MAKE_ENV+= NOCOLOR=yes
+# Some symbols in talloc'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
+
+post-patch:
+ @${REINPLACE_CMD} -e 's|%%PKGCONFIGDIR%%|${PKGCONFIGDIR}|g' \
+ ${BUILD_WRKSRC}/wscript
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libtalloc.so.2
+
+post-install-PYTHON-on:
+ ${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libpytalloc-util*.so
+ ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/talloc*.so
+
+.include <bsd.port.mk>
diff --git a/devel/talloc243/distinfo b/devel/talloc243/distinfo
new file mode 100644
index 000000000000..21db59527faa
--- /dev/null
+++ b/devel/talloc243/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1737641773
+SHA256 (talloc-2.4.2.tar.gz) = 85ecf9e465e20f98f9950a52e9a411e14320bc555fa257d87697b7e7a9b1d8a6
+SIZE (talloc-2.4.2.tar.gz) = 679750
diff --git a/devel/talloc243/files/patch-buildtools_wafsamba_samba__autoconf.py b/devel/talloc243/files/patch-buildtools_wafsamba_samba__autoconf.py
new file mode 100644
index 000000000000..42607c1b5813
--- /dev/null
+++ b/devel/talloc243/files/patch-buildtools_wafsamba_samba__autoconf.py
@@ -0,0 +1,35 @@
+--- buildtools/wafsamba/samba_autoconf.py.orig 2019-09-03 13:59:55 UTC
++++ buildtools/wafsamba/samba_autoconf.py
+@@ -573,7 +573,7 @@ def library_flags(self, libs):
+
+
+ @conf
+-def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False):
++def CHECK_LIB(conf, libs, mandatory=False, empty_decl=True, set_target=True, shlib=False, msg=None):
+ '''check if a set of libraries exist as system libraries
+
+ returns the sublist of libs that do exist as a syslib or []
+@@ -593,11 +593,14 @@ int foo()
+ ret.append(lib)
+ continue
+
++ if msg is None:
++ msg = 'Checking for library %s' % lib
++
+ (ccflags, ldflags, cpppath) = library_flags(conf, lib)
+ if shlib:
+- res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
++ res = conf.check(features='c cshlib', fragment=fragment, lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg)
+ else:
+- res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False)
++ res = conf.check(lib=lib, uselib_store=lib, cflags=ccflags, ldflags=ldflags, uselib=lib.upper(), mandatory=False, msg=msg)
+
+ if not res:
+ if mandatory:
+@@ -944,5 +947,5 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(conf):
+ conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
+
+ if (conf.env.undefined_ignore_ldflags == [] and
+- conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'])):
++ conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'] + conf.env.WERROR_CFLAGS)):
+ conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
diff --git a/devel/talloc243/files/patch-buildtools_wafsamba_samba__install.py b/devel/talloc243/files/patch-buildtools_wafsamba_samba__install.py
new file mode 100644
index 000000000000..5a85a034aea7
--- /dev/null
+++ b/devel/talloc243/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/talloc243/files/patch-buildtools_wafsamba_wscript b/devel/talloc243/files/patch-buildtools_wafsamba_wscript
new file mode 100644
index 000000000000..3d4b6a56e345
--- /dev/null
+++ b/devel/talloc243/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/talloc243/files/patch-lib_replace_wscript b/devel/talloc243/files/patch-lib_replace_wscript
new file mode 100644
index 000000000000..d476cec47cfb
--- /dev/null
+++ b/devel/talloc243/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/talloc243/files/patch-talloc.c b/devel/talloc243/files/patch-talloc.c
new file mode 100644
index 000000000000..2add4433b724
--- /dev/null
+++ b/devel/talloc243/files/patch-talloc.c
@@ -0,0 +1,20 @@
+--- talloc.c.orig 2019-03-21 10:12:32 UTC
++++ talloc.c
+@@ -396,6 +396,9 @@ void talloc_lib_init(void) __attribute__
+ void talloc_lib_init(void)
+ {
+ uint32_t random_value;
++#if defined(HAVE_ARC4RANDOM)
++ random_value = arc4random();
++#else
+ #if defined(HAVE_GETAUXVAL) && defined(AT_RANDOM)
+ uint8_t *p;
+ /*
+@@ -429,6 +432,7 @@ void talloc_lib_init(void)
+ */
+ random_value = ((uintptr_t)talloc_lib_init & 0xFFFFFFFF);
+ }
++#endif /* HAVE_ARC4RANDOM */
+ talloc_magic = random_value & ~TALLOC_FLAG_MASK;
+ }
+ #else
diff --git a/devel/talloc243/files/patch-wscript b/devel/talloc243/files/patch-wscript
new file mode 100644
index 000000000000..8097c806c2a4
--- /dev/null
+++ b/devel/talloc243/files/patch-wscript
@@ -0,0 +1,18 @@
+--- wscript.orig 2019-03-21 10:12:32 UTC
++++ wscript
+@@ -45,13 +45,14 @@ def configure(conf):
+ conf.env.TALLOC_COMPAT1 = False
+ if conf.env.standalone_talloc:
+ conf.env.TALLOC_COMPAT1 = Options.options.TALLOC_COMPAT1
+- conf.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++ conf.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%'
+ conf.env.TALLOC_VERSION = VERSION
+
+ conf.CHECK_XSLTPROC_MANPAGES()
+
+ conf.CHECK_HEADERS('sys/auxv.h')
+ conf.CHECK_FUNCS('getauxval')
++ conf.CHECK_FUNCS('arc4random')
+
+ conf.SAMBA_CONFIG_H()
+
diff --git a/devel/talloc243/pkg-descr b/devel/talloc243/pkg-descr
new file mode 100644
index 000000000000..70543e3f9210
--- /dev/null
+++ b/devel/talloc243/pkg-descr
@@ -0,0 +1,2 @@
+A hierarchical pool based memory allocator with destructors. It uses
+reference counting to determine when memory should be freed.
diff --git a/devel/talloc243/pkg-plist b/devel/talloc243/pkg-plist
new file mode 100644
index 000000000000..aa22a5d358d7
--- /dev/null
+++ b/devel/talloc243/pkg-plist
@@ -0,0 +1,10 @@
+%%PYTHON%%include/pytalloc.h
+include/talloc.h
+%%PYTHON%%lib/libpytalloc-util%%PYTHON_TAG%%.so
+%%PYTHON%%lib/libpytalloc-util%%PYTHON_TAG%%.so.2
+lib/libtalloc.so
+lib/libtalloc.so.2
+%%PYTHON%%%%PYTHON_SITELIBDIR%%/talloc%%PYTHON_TAG%%.so
+%%PYTHON%%%%PKGCONFIGDIR%%/pytalloc-util%%PYTHON_TAG%%.pc
+%%PKGCONFIGDIR%%/talloc.pc
+%%MANPAGES%%share/man/man3/talloc.3.gz