diff --git a/common/shlibs b/common/shlibs index f77a133b4e..600fb8d3d6 100644 --- a/common/shlibs +++ b/common/shlibs @@ -2778,7 +2778,8 @@ libply-boot-client.so.4 plymouth-0.9.2_1 libmilter.so.1.0.2 libmilter-1.0.2_1 libopendkim.so.10 opendkim-2.10.3_1 libtevent.so.0 tevent-0.9.28_1 -libldb.so.1 ldb-1.1.26_1 +libldb.so.2 ldb-2.2.0_1 +libpyldb-util.so.2 libpyldb-util-2.2.0_1 libpath_utils.so.1 ding-libs-0.5.0_1 libdhash.so.1 ding-libs-0.5.0_1 libcollection.so.4 ding-libs-0.5.0_1 diff --git a/srcpkgs/ldb-python3 b/srcpkgs/ldb-python3 new file mode 120000 index 0000000000..59d203f674 --- /dev/null +++ b/srcpkgs/ldb-python3 @@ -0,0 +1 @@ +ldb \ No newline at end of file diff --git a/srcpkgs/ldb/patches/disable-compile-error-test.patch b/srcpkgs/ldb/patches/disable-compile-error-test.patch new file mode 100644 index 0000000000..bbb497567f --- /dev/null +++ b/srcpkgs/ldb/patches/disable-compile-error-test.patch @@ -0,0 +1,21 @@ +--- tests/ldb_match_test.c ++++ tests/ldb_match_test.c +@@ -32,6 +32,8 @@ + * This allows test applications to use custom definitions of C standard + * library functions and types. + */ ++// fails to compile on musl, so limit to glibc ++#ifdef __GLIBC__ + #include + #include + #include +@@ -189,3 +191,9 @@ + + return cmocka_run_group_tests(tests, NULL, NULL); + } ++#else ++int main(int argc, const char **argv) ++{ ++ return 0; ++} ++#endif diff --git a/srcpkgs/ldb/template b/srcpkgs/ldb/template index fd0c68e64a..ada2f20522 100644 --- a/srcpkgs/ldb/template +++ b/srcpkgs/ldb/template @@ -1,29 +1,56 @@ # Template file for 'ldb' pkgname=ldb -version=1.5.1 +version=2.2.0 revision=1 -build_style=gnu-configure -configure_args="--with-modulesdir=/usr/lib/ldb/modules" -hostmakedepends="python pkg-config docbook-xsl libxslt" -makedepends="tdb-devel tevent-devel popt-devel talloc-devel lmdb-devel" +build_style=waf3 +build_helper="qemu" +configure_script="buildtools/bin/waf" +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" +makedepends="python3-devel tdb-devel tevent-devel talloc-devel + popt-devel lmdb-devel libxslt gettext-devel cmocka-devel" checkdepends="cmocka-devel" short_desc="LDAP-like database from samba" maintainer="Yuusha Spacewolf " license="LGPL-3.0-or-later" homepage="https://www.samba.org/ldb/" distfiles="https://www.samba.org/ftp/pub/ldb/ldb-${version}.tar.gz" -checksum=232e54b87c53210a6861424ad411b04dbfa0f2ca4bc463aefea188158e0cc963 - -nocross="see srcpkgs/tdb (cross-32bit.answers)." +checksum=134bb51769709af59f30bf468e454d1377a8096acd4e80dcb42fd264f558bd5f # 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 +export PYTHON_CONFIG="${XBPS_CROSS_BASE}/usr/bin/python3-config" + +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 +} + +ldb-python3_package() { + short_desc+=" - Python3 bindings" + pkg_install() { + vmove ${py3_lib} + } +} + +libpyldb-util_package() { + short_desc+=" - Python3 utility library" + pkg_install() { + vmove "usr/lib/libpyldb-util.so.*" + } +} + ldb-devel_package() { short_desc+=" - development files" - depends="${makedepends} ${sourcepkg}>=${version}_${revision}" + depends="${sourcepkg}>=${version}_${revision} + libpyldb-util>=${version}_${revision}" pkg_install() { vmove usr/include vmove usr/lib/pkgconfig diff --git a/srcpkgs/libpyldb-util b/srcpkgs/libpyldb-util new file mode 120000 index 0000000000..59d203f674 --- /dev/null +++ b/srcpkgs/libpyldb-util @@ -0,0 +1 @@ +ldb \ No newline at end of file