Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 23 Jul 2019 22:16:35 +0000 (UTC)
From:      "Timur I. Bakeyev" <timur@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r507255 - in head/databases/ldb15: . files
Message-ID:  <201907232216.x6NMGZ4O056960@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: timur
Date: Tue Jul 23 22:16:35 2019
New Revision: 507255
URL: https://svnweb.freebsd.org/changeset/ports/507255

Log:
  Forgot to commit the ldb15 out of the sudden...

Added:
  head/databases/ldb15/files/patch-buildtools_wafsamba_samba__autoconf.py   (contents, props changed)
  head/databases/ldb15/files/patch-buildtools_wafsamba_samba__install.py   (contents, props changed)
  head/databases/ldb15/files/patch-buildtools_wafsamba_wscript   (contents, props changed)
  head/databases/ldb15/files/patch-ldb__mdb_ldb_mdb.c   (contents, props changed)
  head/databases/ldb15/files/patch-ldb_key_value__ldb_kv_cache.c   (contents, props changed)
  head/databases/ldb15/files/patch-lib_replace_wscript   (contents, props changed)
  head/databases/ldb15/files/patch-wscript   (contents, props changed)
Deleted:
  head/databases/ldb15/files/patch-buildtools__wafsamba__samba_autoconf.py
  head/databases/ldb15/files/patch-buildtools__wafsamba__samba_install.py
  head/databases/ldb15/files/patch-buildtools__wafsamba__samba_python.py
  head/databases/ldb15/files/patch-buildtools__wafsamba__wscript
  head/databases/ldb15/files/patch-ldb_cache.c
  head/databases/ldb15/files/patch-ldb_mod_op_test.c
  head/databases/ldb15/files/patch-lib__replace__wscript
  head/databases/ldb15/files/patch-mdb_ldb__mdb.c
  head/databases/ldb15/files/patch-third_party__waf__wafadmin__Tools__cc.py
Modified:
  head/databases/ldb15/Makefile
  head/databases/ldb15/distinfo

Modified: head/databases/ldb15/Makefile
==============================================================================
--- head/databases/ldb15/Makefile	Tue Jul 23 22:14:20 2019	(r507254)
+++ head/databases/ldb15/Makefile	Tue Jul 23 22:16:35 2019	(r507255)
@@ -1,12 +1,12 @@
 # $FreeBSD$
 
 PORTNAME=		ldb
-PORTVERSION=		1.4.4
-PORTREVISION=		1
+PORTVERSION=		1.5.5
+PORTREVISION=		0
 PORTEPOCH=		0
 CATEGORIES=		databases
 MASTER_SITES=		SAMBA
-PKGNAMESUFFIX=		14
+PKGNAMESUFFIX?=		15
 
 MAINTAINER=		timur@FreeBSD.org
 COMMENT=		LDAP-like embedded database
@@ -18,13 +18,14 @@ IGNORE_NONTHREAD_PYTHON=needs port lang/python${PYTHON
 BUILD_DEPENDS=		${LDB_DEPENDS}
 RUN_DEPENDS=		${LDB_DEPENDS}
 
-LDB_DEPENDS=		talloc>=2.1.14:devel/talloc \
-			tevent>=0.9.37:devel/tevent \
-			tdb>=1.3.16:databases/tdb \
-			cmocka>=1.1.1:sysutils/cmocka \
+LDB_DEPENDS=		talloc>=2.2.0:devel/talloc \
+			tevent>=0.10.0:devel/tevent \
+			tdb>=1.4.0:databases/tdb \
+			lmdb>=0.9.23:databases/lmdb \
+			cmocka>=1.1.3:sysutils/cmocka \
 			popt>=0:devel/popt
 
-CONFLICTS_INSTALL=	ldb-1.1.* ldb1[23]-1.*
+CONFLICTS_INSTALL=	ldb-1.1.* ldb1[2-46]-1.*
 
 #FLAVORS=		default nopython
 #nopython_PKGNAMESUFFIX=	-nopython
@@ -51,10 +52,12 @@ CONFIGURE_ARGS+=	--bundled-libraries=!talloc,!tevent,!
 OPTIONS_DEFINE=		MANPAGES DEBUG
 MANPAGES_DESC=		Build and install manpages (requires textproc/docbook-xsl)
 
-.include <bsd.port.options.mk>
-
+DEBUG_CONFIGURE_ON=	--verbose --enable-debug
+DEBUG_MAKE_ARGS=	--verbose
 DEBUG_FLAGS=		-g -ggdb3 -O0
 
+.include <bsd.port.options.mk>
+
 LDB_BINS=		bin/ldbedit \
 			bin/ldbmodify \
 			bin/ldbadd \
@@ -64,6 +67,9 @@ LDB_BINS=		bin/ldbedit \
 
 LDB_LIBS=		lib/libldb.so \
 			lib/libldb.so.1 \
+			lib/ldb/libldb-tdb-int.so \
+			lib/ldb/libldb-tdb-err-map.so \
+			lib/ldb/libldb-mdb-int.so \
 			lib/ldb/libldb-key-value.so \
 			lib/ldb/libldb-cmdline.so \
 			lib/shared-modules/ldb/skel.so \
@@ -71,19 +77,12 @@ LDB_LIBS=		lib/libldb.so \
 			lib/shared-modules/ldb/sample.so \
 			lib/shared-modules/ldb/rdn_name.so \
 			lib/shared-modules/ldb/paged_searches.so \
-			lib/shared-modules/ldb/paged_results.so \
+			lib/shared-modules/ldb/mdb.so \
 			lib/shared-modules/ldb/ldb.so \
 			lib/shared-modules/ldb/ldap.so \
 			lib/shared-modules/ldb/asq.so \
 			lib/shared-modules/ldb/tdb.so
 
-# Only for 64-bit architectures
-.if ${ARCH} != armv6 && ${ARCH} != armv7 && ${ARCH} != i386 && ${ARCH} != mips && ${ARCH} != powerpc && ${ARCH} != powerpcspe
-LDB_DEPENDS+=		lmdb>=0.9.16:databases/lmdb
-LDB_LIBS+=		lib/ldb/libldb-mdb-int.so \
-			lib/shared-modules/ldb/mdb.so
-.endif
-
 PLIST_FILES=		include/ldb_version.h \
 			include/ldb_handlers.h \
 			include/ldb_errors.h \
@@ -94,10 +93,10 @@ PLIST_FILES=		include/ldb_version.h \
 			${PKGCONFIGDIR}/ldb.pc
 
 .if defined(NO_PYTHON)
-USES+=			python:2.7,build
+USES+=			python:2.7+,build,test
 CONFIGURE_ARGS+=	--disable-python
 .else
-USES+=			python:2.7
+USES+=			python:3.4+
 
 PLIST_FILES+=		include/pyldb.h \
 			lib/libpyldb-util.so \
@@ -105,35 +104,8 @@ PLIST_FILES+=		include/pyldb.h \
 			${PYTHON_SITELIBDIR}/ldb.so \
 			${PYTHON_SITELIBDIR}/_ldb_text.py \
 			${PKGCONFIGDIR}/pyldb-util.pc
-# XXX: This is a gross hack to make port use both Python 2.7+ and 3.3+
-# This is not officially supported, use at your own risk
-.if defined(WITH_SAMBA4_PYTHON3) && ${WITH_SAMBA4_PYTHON3:M3\.[0-9]}
-SAMBA4_PYTHON3_VERSION=	${WITH_SAMBA4_PYTHON3}
-SAMBA4_PYTHON3=		python${SAMBA4_PYTHON3_VERSION}
-SAMBA4_PYTHON3_VER=	${SAMBA4_PYTHON3_VERSION:C/\.//}
-.if !exists(${PORTSDIR}/lang/python${SAMBA4_PYTHON3_VER})
-.error			unsupported or unknown Python version ${SAMBA4_PYTHON3_VERSION}
 .endif
-BUILD_DEPENDS+=		${SAMBA4_PYTHON3}:lang/python${SAMBA4_PYTHON3_VER}
-RUN_DEPENDS+=		${SAMBA4_PYTHON3}:lang/python${SAMBA4_PYTHON3_VER}
-# cpython-36m
-SAMBA4_PYTHON3_SO_ABI!=	[ ! -f "${LOCALBASE}/bin/${SAMBA4_PYTHON3}" ] || ${LOCALBASE}/bin/${SAMBA4_PYTHON3} -c 'import sysconfig; print(sysconfig.get_config_var("SOABI") or "")' 2>/dev/null
-SAMBA4_PYTHON3_SITELIBDIR=lib/python${SAMBA4_PYTHON3_VERSION}/site-packages
 
-CONFIGURE_ENV+=		PYTHON3_SO_ABI_FLAG=.${SAMBA4_PYTHON3_SO_ABI}
-CONFIGURE_ARGS+=	--extra-python=${LOCALBASE}/bin/${SAMBA4_PYTHON3}
-
-PLIST_SUB+=		SAMBA4_PYTHON3_SO_ABI=${SAMBA4_PYTHON3_SO_ABI} \
-			SAMBA4_PYTHON3_SITELIBDIR=${SAMBA4_PYTHON3_SITELIBDIR}
-
-PLIST_FILES+=		lib/libpyldb-util.${SAMBA4_PYTHON3_SO_ABI}.so \
-			lib/libpyldb-util.${SAMBA4_PYTHON3_SO_ABI}.so.1 \
-			${SAMBA4_PYTHON3_SITELIBDIR}/ldb.${SAMBA4_PYTHON3_SO_ABI}.so \
-			${SAMBA4_PYTHON3_SITELIBDIR}/_ldb_text.py  \
-			${PKGCONFIGDIR}/pyldb-util.${SAMBA4_PYTHON3_SO_ABI}.pc
-.endif
-.endif
-
 .include <bsd.port.pre.mk>
 
 .if ! ${PORT_OPTIONS:MMANPAGES}
@@ -142,6 +114,8 @@ CONFIGURE_ENV+=		XSLTPROC="true"
 BUILD_DEPENDS+=		${LOCALBASE}/share/xsl/docbook/manpages/docbook.xsl:textproc/docbook-xsl \
 			xsltproc:textproc/libxslt
 .endif
+CONFIGURE_ENV+=		CFLAGS=-I${LOCALBASE}/include LDFLAGS=-L${LOCALBASE}/lib
+
 # No fancy color error messages
 .if ${COMPILER_TYPE} == "clang"
 CFLAGS+=		-fno-color-diagnostics
@@ -149,7 +123,6 @@ CFLAGS+=		-fno-color-diagnostics
 CONFIGURE_ENV+=		NOCOLOR=yes
 MAKE_ENV+=		NOCOLOR=yes
 
-
 LDB_MAN1=		man/man1/ldbadd.1.gz \
 			man/man1/ldbdel.1.gz \
 			man/man1/ldbedit.1.gz \
@@ -182,15 +155,11 @@ pre-build-MANPAGES-off:
 
 post-install:
 .for lib in ${LDB_BINS} ${LDB_LIBS}
-			${STRIP_CMD} ${STAGEDIR}${PREFIX}/${lib}
+		${STRIP_CMD} ${STAGEDIR}${PREFIX}/${lib}
 .endfor
 .if !defined(NO_PYTHON)
-		${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libpyldb-util.so
-		${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ldb.so
-.	if defined(SAMBA4_PYTHON3)
-		${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libpyldb-util.${SAMBA4_PYTHON3_SO_ABI}.so
-		${STRIP_CMD} ${STAGEDIR}${PREFIX}/${SAMBA4_PYTHON3_SITELIBDIR}/ldb.${SAMBA4_PYTHON3_SO_ABI}.so
-.	endif
+	${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libpyldb-util.so
+	${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/ldb.so
 .endif
 
 .include <bsd.port.post.mk>

Modified: head/databases/ldb15/distinfo
==============================================================================
--- head/databases/ldb15/distinfo	Tue Jul 23 22:14:20 2019	(r507254)
+++ head/databases/ldb15/distinfo	Tue Jul 23 22:16:35 2019	(r507255)
@@ -1,3 +1,3 @@
-TIMESTAMP = 1550182694
-SHA256 (ldb-1.4.4.tar.gz) = d658f257ef380feca109240c5898f70081cd0c7f41064704e2aad152af24f8f5
-SIZE (ldb-1.4.4.tar.gz) = 1428851
+TIMESTAMP = 1563828880
+SHA256 (ldb-1.5.5.tar.gz) = 199f5861aa863f538ec66d5fa95ecc13254a2030c53daf0e47363fa9ba235c68
+SIZE (ldb-1.5.5.tar.gz) = 1629070

Added: head/databases/ldb15/files/patch-buildtools_wafsamba_samba__autoconf.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ldb15/files/patch-buildtools_wafsamba_samba__autoconf.py	Tue Jul 23 22:16:35 2019	(r507255)
@@ -0,0 +1,36 @@
+--- buildtools/wafsamba/samba_autoconf.py.orig	2019-03-21 10:12:32 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:
+@@ -925,6 +928,5 @@ def SAMBA_CHECK_UNDEFINED_SYMBOL_FLAGS(c
+         conf.env.undefined_ldflags = conf.ADD_LDFLAGS('-Wl,-no-undefined', testflags=True)
+ 
+     if not sys.platform.startswith("openbsd") and conf.env.undefined_ignore_ldflags == []:
+-        if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup']):
++        if conf.CHECK_LDFLAGS(['-undefined', 'dynamic_lookup'] + conf.env.WERROR_CFLAGS):
+             conf.env.undefined_ignore_ldflags = ['-undefined', 'dynamic_lookup']
+-

Added: head/databases/ldb15/files/patch-buildtools_wafsamba_samba__install.py
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ldb15/files/patch-buildtools_wafsamba_samba__install.py	Tue Jul 23 22:16:35 2019	(r507255)
@@ -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:

Added: head/databases/ldb15/files/patch-buildtools_wafsamba_wscript
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ldb15/files/patch-buildtools_wafsamba_wscript	Tue Jul 23 22:16:35 2019	(r507255)
@@ -0,0 +1,22 @@
+--- buildtools/wafsamba/wscript.orig	2017-04-28 11:57:26 UTC
++++ buildtools/wafsamba/wscript
+@@ -74,12 +74,17 @@ def set_options(opt):
+                    help=("private library directory [PREFIX/lib/%s]" % Utils.g_module.APPNAME),
+                    action="store", dest='PRIVATELIBDIR', default=None)
+ 
++    opt.add_option('--with-openldap',
++                   help='additional directory to search for OpenLDAP libs',
++                   action='store', dest='ldap_open', default=None,
++                   match = ['Checking for library lber', 'Checking for library ldap'])
++
+     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')

Added: head/databases/ldb15/files/patch-ldb__mdb_ldb_mdb.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ldb15/files/patch-ldb__mdb_ldb_mdb.c	Tue Jul 23 22:16:35 2019	(r507255)
@@ -0,0 +1,11 @@
+--- ldb_mdb/ldb_mdb.c.orig	2019-06-13 03:07:34 UTC
++++ ldb_mdb/ldb_mdb.c
+@@ -183,7 +183,7 @@ static int lmdb_store(struct ldb_kv_priv
+ 
+ 	if (flags == TDB_INSERT) {
+ 		mdb_flags = MDB_NOOVERWRITE;
+-	} else if ((flags == TDB_MODIFY)) {
++	} else if (flags == TDB_MODIFY) {
+ 		/*
+ 		 * Modifying a record, ensure that it exists.
+ 		 * This mimics the TDB semantics

Added: head/databases/ldb15/files/patch-ldb_key_value__ldb_kv_cache.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ldb15/files/patch-ldb_key_value__ldb_kv_cache.c	Tue Jul 23 22:16:35 2019	(r507255)
@@ -0,0 +1,13 @@
+--- ldb_key_value/ldb_kv_cache.c.orig	2019-01-14 23:24:45 UTC
++++ ldb_key_value/ldb_kv_cache.c
+@@ -90,7 +90,9 @@ static int ldb_schema_attribute_compare(
+ {
+ 	const struct ldb_schema_attribute *sa1 = (const struct ldb_schema_attribute *)p1;
+ 	const struct ldb_schema_attribute *sa2 = (const struct ldb_schema_attribute *)p2;
+-	return ldb_attr_cmp(sa1->name, sa2->name);
++	int res = ldb_attr_cmp(sa1->name, sa2->name);
++
++	return (res) ? res : (sa1->flags > sa2->flags) ? 1 : (sa1->flags < sa2->flags) ? -1 : 0;
+ }
+ 
+ /*

Added: head/databases/ldb15/files/patch-lib_replace_wscript
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ldb15/files/patch-lib_replace_wscript	Tue Jul 23 22:16:35 2019	(r507255)
@@ -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'):

Added: head/databases/ldb15/files/patch-wscript
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/databases/ldb15/files/patch-wscript	Tue Jul 23 22:16:35 2019	(r507255)
@@ -0,0 +1,33 @@
+--- wscript.orig	2019-02-26 17:12:23 UTC
++++ wscript
+@@ -218,7 +218,7 @@ def build(bld):
+     if bld.env.standalone_ldb:
+         if not 'PACKAGE_VERSION' in bld.env:
+             bld.env.PACKAGE_VERSION = VERSION
+-        bld.env.PKGCONFIGDIR = '${LIBDIR}/pkgconfig'
++        bld.env.PKGCONFIGDIR = '%%PKGCONFIGDIR%%'
+         private_library = False
+     else:
+         private_library = True
+@@ -511,11 +511,6 @@ def build(bld):
+                          deps='cmocka ldb',
+                          install=False)
+ 
+-        bld.SAMBA_BINARY('ldb_match_test',
+-                         source='tests/ldb_match_test.c',
+-                         deps='cmocka ldb',
+-                         install=False)
+-
+         if bld.CONFIG_SET('HAVE_LMDB'):
+             bld.SAMBA_BINARY('ldb_mdb_mod_op_test',
+                              source='tests/ldb_mod_op_test.c',
+@@ -583,8 +578,7 @@ def test(ctx):
+                  # we don't want to run ldb_lmdb_size_test (which proves we can
+                  # fit > 4G of data into the DB), it would fill up the disk on
+                  # many of our test instances
+-                 'ldb_mdb_kv_ops_test',
+-                 'ldb_match_test']
++                 'ldb_mdb_kv_ops_test']
+ 
+     for test_exe in test_exes:
+             cmd = os.path.join(Context.g_module.out, test_exe)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201907232216.x6NMGZ4O056960>