Tue May 11 10:57:34 2021 UTC ()
Re-enable building databases/ldb without ldap support.


(hauke)
diff -r1.21 -r1.22 pkgsrc/databases/ldb/Makefile
diff -r1.12 -r1.13 pkgsrc/databases/ldb/distinfo
diff -r1.3 -r1.4 pkgsrc/databases/ldb/options.mk
diff -r0 -r1.1 pkgsrc/databases/ldb/patches/patch-wscript

cvs diff -r1.21 -r1.22 pkgsrc/databases/ldb/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/ldb/Makefile 2021/04/14 19:07:49 1.21
+++ pkgsrc/databases/ldb/Makefile 2021/05/11 10:57:34 1.22
@@ -1,17 +1,18 @@ @@ -1,17 +1,18 @@
1# $NetBSD: Makefile,v 1.21 2021/04/14 19:07:49 adam Exp $ 1# $NetBSD: Makefile,v 1.22 2021/05/11 10:57:34 hauke Exp $
2 2
3# Before updating, make sure net/samba4 supports the newer version. 3# Before updating, make sure net/samba4 supports the newer version.
4DISTNAME= ldb-2.3.0 4DISTNAME= ldb-2.3.0
 5PKGREVISION= 1
5CATEGORIES= databases 6CATEGORIES= databases
6MASTER_SITES= http://www.samba.org/ftp/ldb/ 7MASTER_SITES= http://www.samba.org/ftp/ldb/
7 8
8MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
9HOMEPAGE= https://ldb.samba.org/ 10HOMEPAGE= https://ldb.samba.org/
10COMMENT= LDAP-like embedded database 11COMMENT= LDAP-like embedded database
11LICENSE= gnu-gpl-v3 12LICENSE= gnu-gpl-v3
12 13
13BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt 14BUILD_DEPENDS+= libxslt-[0-9]*:../../textproc/libxslt
14BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl 15BUILD_DEPENDS+= docbook-xsl-[0-9]*:../../textproc/docbook-xsl
15 16
16PYTHON_VERSIONS_INCOMPATIBLE= 27 17PYTHON_VERSIONS_INCOMPATIBLE= 27
17 18

cvs diff -r1.12 -r1.13 pkgsrc/databases/ldb/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/ldb/distinfo 2021/04/14 19:07:49 1.12
+++ pkgsrc/databases/ldb/distinfo 2021/05/11 10:57:34 1.13
@@ -1,9 +1,10 @@ @@ -1,9 +1,10 @@
1$NetBSD: distinfo,v 1.12 2021/04/14 19:07:49 adam Exp $ 1$NetBSD: distinfo,v 1.13 2021/05/11 10:57:34 hauke Exp $
2 2
3SHA1 (ldb-2.3.0.tar.gz) = 71c12e1c5914172c450c992dae3b90c1f01b2419 3SHA1 (ldb-2.3.0.tar.gz) = 71c12e1c5914172c450c992dae3b90c1f01b2419
4RMD160 (ldb-2.3.0.tar.gz) = b4a58a8a118420a334ecf94a6262684321fa7752 4RMD160 (ldb-2.3.0.tar.gz) = b4a58a8a118420a334ecf94a6262684321fa7752
5SHA512 (ldb-2.3.0.tar.gz) = 7e389c0b4700a809893276d69216436ebd6d30e1f52407e4a08a1113cf14e151aed74300d8c36765c91c8f3195d8054b13a28cbdfcab031f88fd1d353e415348 5SHA512 (ldb-2.3.0.tar.gz) = 7e389c0b4700a809893276d69216436ebd6d30e1f52407e4a08a1113cf14e151aed74300d8c36765c91c8f3195d8054b13a28cbdfcab031f88fd1d353e415348
6Size (ldb-2.3.0.tar.gz) = 1686378 bytes 6Size (ldb-2.3.0.tar.gz) = 1686378 bytes
7SHA1 (patch-buildtools_wafsamba_samba__conftests.py) = 813c639e404e3b301444decae318c702c87f0cc1 7SHA1 (patch-buildtools_wafsamba_samba__conftests.py) = 813c639e404e3b301444decae318c702c87f0cc1
8SHA1 (patch-buildtools_wafsamba_samba__install.py) = d801340617da325e3bb70a90350e45cc8e383c2d 8SHA1 (patch-buildtools_wafsamba_samba__install.py) = d801340617da325e3bb70a90350e45cc8e383c2d
9SHA1 (patch-buildtools_wafsamba_samba__utils.py) = 0a587421870c1974175fadbb02dde215f35938f2 9SHA1 (patch-buildtools_wafsamba_samba__utils.py) = 0a587421870c1974175fadbb02dde215f35938f2
 10SHA1 (patch-wscript) = ad5dd815e97e29e5c19e5f45165cac490d01492d

cvs diff -r1.3 -r1.4 pkgsrc/databases/ldb/options.mk (expand / switch to unified diff)

--- pkgsrc/databases/ldb/options.mk 2020/05/19 00:21:01 1.3
+++ pkgsrc/databases/ldb/options.mk 2021/05/11 10:57:34 1.4
@@ -1,21 +1,21 @@ @@ -1,21 +1,21 @@
1# $NetBSD: options.mk,v 1.3 2020/05/19 00:21:01 gutteridge Exp $ 1# $NetBSD: options.mk,v 1.4 2021/05/11 10:57:34 hauke Exp $
2 2
3PKG_OPTIONS_VAR= PKG_OPTIONS.ldb 3PKG_OPTIONS_VAR= PKG_OPTIONS.ldb
4PKG_SUPPORTED_OPTIONS= ldap 4PKG_SUPPORTED_OPTIONS= ldap
5PKG_SUGGESTED_OPTIONS= ldap 5PKG_SUGGESTED_OPTIONS= ldap
6 6
7.include "../../mk/bsd.options.mk" 7.include "../../mk/bsd.options.mk"
8 8
9PLIST_VARS+= ldap 9PLIST_VARS+= ldap
10 10
11.if !empty(PKG_OPTIONS:Mldap) 11.if !empty(PKG_OPTIONS:Mldap)
12. include "../../databases/openldap-client/buildlink3.mk" 12. include "../../databases/openldap-client/buildlink3.mk"
13PLIST.ldap= yes 13PLIST.ldap= yes
14.else 14.else
15# No official way to configure without ldap 15# No official way to configure without ldap
16CFG_CACHE= ${WRKSRC}/bin/c4che/default_cache.py 16WSCRIPT= ${WRKSRC}/wscript
17post-configure: 17pre-configure:
18 ${MV} ${CFG_CACHE} ${CFG_CACHE}.orig 18 ${MV} ${WSCRIPT} ${WSCRIPT}.old
19 ${SED} -E -e 's/(ENABLE_LDAP_BACKEND =) True/\1 False/g' \ 19 ${SED} -E -e 's/(ENABLE_LDAP_BACKEND =) True/\1 False/g' \
20 ${CFG_CACHE}.orig > ${CFG_CACHE} 20 ${WSCRIPT}.old > ${WSCRIPT}
21.endif 21.endif

File Added: pkgsrc/databases/ldb/patches/patch-wscript
$NetBSD: patch-wscript,v 1.1 2021/05/11 10:57:34 hauke Exp $

Since the build system does not provide an ldap switch, we patch this script
from options.mk with sed(1) to disable building with ldap support

Changes make sure not to build any ldap dependencies when that is what we want.

--- wscript.orig	2020-07-09 12:04:50.000000000 +0000
+++ wscript
@@ -148,6 +148,8 @@ def configure(conf):
         # we need this for the ldap backend
         if conf.CHECK_FUNCS_IN('ber_flush ldap_open ldap_initialize', 'lber ldap', headers='lber.h ldap.h'):
             conf.env.ENABLE_LDAP_BACKEND = True
+        else:
+            conf.env.ENABLE_LDAP_BACKEND = False
 
         # we don't want any libraries or modules to rely on runtime
         # resolution of symbols
@@ -534,6 +536,7 @@ def build(bld):
             bld.SAMBA_BINARY('lldb_ldap_test',
                              source='tests/lldb_ldap.c',
                              deps='cmocka talloc lber ldap ldb',
+                             enabled=bld.env.ENABLE_LDAP_BACKEND,
                              install=False)
 
         if bld.CONFIG_SET('HAVE_LMDB'):
@@ -640,7 +643,7 @@ def test(ctx):
 
     # if LIB_LDAP and LIB_LBER defined, then we can test ldb_ldap backend
     # behavior regression for bz#14413
-    if env.LIB_LDAP and env.LIB_LBER:
+    if bld.env.ENABLE_LDAP_BACKEND and env.LIB_LDAP and env.LIB_LBER:
         test_exes += ["lldb_ldap_test"]
 
     if env.HAVE_LMDB: