ldb: update to 2.9.0.

This commit is contained in:
Otto Modinos 2024-05-20 18:20:57 +03:00 committed by Andrew Benson
parent ce8d6c275e
commit e08638d889
2 changed files with 104 additions and 14 deletions

View File

@ -0,0 +1,89 @@
diff --git a/lib/replace/replace.c b/lib/replace/replace.c
index 0652cb4..02b6ebf 100644
--- a/lib/replace/replace.c
+++ b/lib/replace/replace.c
@@ -559,41 +559,6 @@ long long int rep_strtoll(const char *str, char **endptr, int base)
#endif /* HAVE_STRTOLL */
-#ifndef HAVE_STRTOULL
-unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
-{
-#ifdef HAVE_STRTOUQ
- return strtouq(str, endptr, base);
-#elif defined(HAVE___STRTOULL)
- return __strtoull(str, endptr, base);
-#elif SIZEOF_LONG == SIZEOF_LONG_LONG
- return (unsigned long long int) strtoul(str, endptr, base);
-#else
-# error "You need a strtoull function"
-#endif
-}
-#else
-#ifdef HAVE_BSD_STRTOLL
-#undef strtoull
-unsigned long long int rep_strtoull(const char *str, char **endptr, int base)
-{
- int saved_errno = errno;
- unsigned long long int nb = strtoull(str, endptr, base);
- /* With glibc EINVAL is only returned if base is not ok */
- if (errno == EINVAL) {
- if (base == 0 || (base >1 && base <37)) {
- /* Base was ok so it's because we were not
- * able to make the conversion.
- * Let's reset errno.
- */
- errno = saved_errno;
- }
- }
- return nb;
-}
-#endif /* HAVE_BSD_STRTOLL */
-#endif /* HAVE_STRTOULL */
-
#ifndef HAVE_SETENV
int rep_setenv(const char *name, const char *value, int overwrite)
{
diff --git a/lib/replace/replace.h b/lib/replace/replace.h
index a8910e2..854b1a7 100644
--- a/lib/replace/replace.h
+++ b/lib/replace/replace.h
@@ -394,16 +394,6 @@ long long int rep_strtoll(const char *str, char **endptr, int base);
#endif
#endif
-#ifndef HAVE_STRTOULL
-#define strtoull rep_strtoull
-unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
-#else
-#ifdef HAVE_BSD_STRTOLL /* yes, it's not HAVE_BSD_STRTOULL */
-#define strtoull rep_strtoull
-unsigned long long int rep_strtoull(const char *str, char **endptr, int base);
-#endif
-#endif
-
#ifndef HAVE_FTRUNCATE
#define ftruncate rep_ftruncate
int rep_ftruncate(int,off_t);
diff --git a/lib/replace/wscript b/lib/replace/wscript
index 4c774d9..a1dc6d0 100644
--- a/lib/replace/wscript
+++ b/lib/replace/wscript
@@ -411,7 +411,7 @@ def configure(conf):
conf.CHECK_FUNCS('initgroups pread pwrite strndup strcasestr strsep')
conf.CHECK_FUNCS('strtok_r mkdtemp dup2 dprintf vdprintf isatty chown lchown')
conf.CHECK_FUNCS('link readlink symlink realpath snprintf vsnprintf')
- conf.CHECK_FUNCS('asprintf vasprintf setenv unsetenv strnlen strtoull __strtoull')
+ conf.CHECK_FUNCS('asprintf vasprintf setenv unsetenv strnlen')
conf.CHECK_FUNCS('strtouq strtoll __strtoll strtoq memalign posix_memalign')
conf.CHECK_FUNCS('fmemopen')
@@ -866,7 +866,7 @@ REPLACEMENT_FUNCTIONS = {
'memmove', 'strdup', 'setlinebuf', 'vsyslog', 'strnlen',
'strndup', 'waitpid', 'seteuid', 'setegid', 'chroot',
'mkstemp', 'mkdtemp', 'pread', 'pwrite', 'strcasestr',
- 'strsep', 'strtok_r', 'strtoll', 'strtoull', 'setenv', 'unsetenv',
+ 'strsep', 'strtok_r', 'strtoll', 'setenv', 'unsetenv',
'utime', 'utimes', 'dup2', 'chown', 'link', 'readlink',
'symlink', 'lchown', 'realpath', 'memmem', 'vdprintf',
'dprintf', 'get_current_dir_name', 'copy_file_range',

View File

@ -1,7 +1,7 @@
# Template file for 'ldb'
pkgname=ldb
version=2.3.2
revision=3
version=2.9.0
revision=1
build_style=waf3
build_helper="qemu"
configure_script="buildtools/bin/waf"
@ -9,28 +9,29 @@ configure_args="--sysconfdir=/etc --localstatedir=/var
--disable-rpath --disable-rpath-install --without-gettext
--builtin-libraries=replace --bundled-libraries=NONE
--with-modulesdir=/usr/lib/ldb/modules"
hostmakedepends="pkg-config docbook2x tdb-python3 tevent-python3 python3-setuptools"
makedepends="python3-devel tdb-devel tevent-devel talloc-devel
popt-devel lmdb-devel libxslt gettext-devel cmocka-devel"
hostmakedepends="pkg-config docbook-xsl libxslt tdb-python3 tevent-python3"
makedepends="python3-devel tdb-devel tevent-devel talloc-devel popt-devel
lmdb-devel cmocka-devel"
checkdepends="cmocka-devel"
short_desc="LDAP-like database from samba"
maintainer="Yuusha Spacewolf <xyuusha@paranoici.org>"
license="LGPL-3.0-or-later"
homepage="https://www.samba.org/ldb/"
distfiles="https://download.samba.org/pub/ldb/ldb-${version}.tar.gz"
checksum=1416c949dc4326e41c0d8a5ecf8ef784f8c0b6e9d3dad8fa971e84ad56227603
# workaround for cmocka's broken uintptr_t definition on musl
if [ "$XBPS_TARGET_WORDSIZE" = "64" -a "$XBPS_TARGET_LIBC" = "musl" ]; then
CFLAGS+=" -D__WORDSIZE=64"
fi
checksum=105aaff71ad881a7faeb582fd416ae28221b6fde338fff82828065062c2507a5
make_check=extended # testsuite takes a long time
export PYTHON_CONFIG="${XBPS_CROSS_BASE}/usr/bin/python3-config"
export PYTHONHASHSEED=1
post_patch() {
# Avoid Python shlib extension noise in libpyldb-util.so
vsed -e "/env.pyext_PATTERN/s/dct\['SO'\]/'.so'/" \
-i third_party/waf/waflib/Tools/python.py
# Look for properly named python support libraries
vsed -i third_party/waf/waflib/Tools/python.py \
-e "s|env.pyext_PATTERN = .*$|env.pyext_PATTERN = '%s.so'|"
}
do_check() {
${configure_script} test ${makejobs}
}
ldb-python3_package() {