Fri Mar 27 16:34:58 2020 UTC ()
py-ldap: add build fixes

This package requires cyrus-sasl to build. Separately, it had a test(1)
invocation that's non-portable.


(gutteridge)
diff -r1.84 -r1.85 pkgsrc/databases/py-ldap/Makefile
diff -r1.43 -r1.44 pkgsrc/databases/py-ldap/distinfo
diff -r0 -r1.1 pkgsrc/databases/py-ldap/patches/patch-Makefile

cvs diff -r1.84 -r1.85 pkgsrc/databases/py-ldap/Makefile (expand / switch to unified diff)

--- pkgsrc/databases/py-ldap/Makefile 2020/01/18 21:49:04 1.84
+++ pkgsrc/databases/py-ldap/Makefile 2020/03/27 16:34:57 1.85
@@ -1,24 +1,25 @@ @@ -1,24 +1,25 @@
1# $NetBSD: Makefile,v 1.84 2020/01/18 21:49:04 jperkin Exp $ 1# $NetBSD: Makefile,v 1.85 2020/03/27 16:34:57 gutteridge Exp $
2 2
3DISTNAME= python-ldap-3.2.0 3DISTNAME= python-ldap-3.2.0
4PKGNAME= ${DISTNAME:S/python/${PYPKGPREFIX}/} 4PKGNAME= ${DISTNAME:S/python/${PYPKGPREFIX}/}
5PKGREVISION= 1 5PKGREVISION= 2
6CATEGORIES= databases python 6CATEGORIES= databases python
7MASTER_SITES= ${MASTER_SITE_PYPI:=p/python-ldap/} 7MASTER_SITES= ${MASTER_SITE_PYPI:=p/python-ldap/}
8 8
9MAINTAINER= pkgsrc-users@NetBSD.org 9MAINTAINER= pkgsrc-users@NetBSD.org
10HOMEPAGE= https://www.python-ldap.org/ 10HOMEPAGE= https://www.python-ldap.org/
11COMMENT= LDAP client API for Python 11COMMENT= LDAP client API for Python
12LICENSE= python-software-foundation 12LICENSE= python-software-foundation
13 13
14DEPENDS+= ${PYPKGPREFIX}-asn1>=0.3.7:../../security/py-asn1 14DEPENDS+= ${PYPKGPREFIX}-asn1>=0.3.7:../../security/py-asn1
15DEPENDS+= ${PYPKGPREFIX}-asn1-modules>=0.1.5:../../security/py-asn1-modules 15DEPENDS+= ${PYPKGPREFIX}-asn1-modules>=0.1.5:../../security/py-asn1-modules
16TEST_DEPENDS+= openldap-server-[0-9]*:../../databases/openldap-server 16TEST_DEPENDS+= openldap-server-[0-9]*:../../databases/openldap-server
17TEST_ENV+= BIN=${PREFIX}/bin 17TEST_ENV+= BIN=${PREFIX}/bin
18TEST_ENV+= SBIN=${PREFIX}/sbin 18TEST_ENV+= SBIN=${PREFIX}/sbin
19TEST_ENV+= SLAPD=${PREFIX}/libexec/slapd 19TEST_ENV+= SLAPD=${PREFIX}/libexec/slapd
20 20
21.include "../../databases/openldap-client/buildlink3.mk" 21.include "../../databases/openldap-client/buildlink3.mk"
 22.include "../../security/cyrus-sasl/buildlink3.mk"
22.include "../../security/openssl/buildlink3.mk" 23.include "../../security/openssl/buildlink3.mk"
23.include "../../lang/python/egg.mk" 24.include "../../lang/python/egg.mk"
24.include "../../mk/bsd.pkg.mk" 25.include "../../mk/bsd.pkg.mk"

cvs diff -r1.43 -r1.44 pkgsrc/databases/py-ldap/distinfo (expand / switch to unified diff)

--- pkgsrc/databases/py-ldap/distinfo 2019/04/09 11:51:20 1.43
+++ pkgsrc/databases/py-ldap/distinfo 2020/03/27 16:34:57 1.44
@@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
1$NetBSD: distinfo,v 1.43 2019/04/09 11:51:20 adam Exp $ 1$NetBSD: distinfo,v 1.44 2020/03/27 16:34:57 gutteridge Exp $
2 2
3SHA1 (python-ldap-3.2.0.tar.gz) = f0658ddeffd4c059bb804890b80c00d62b70be60 3SHA1 (python-ldap-3.2.0.tar.gz) = f0658ddeffd4c059bb804890b80c00d62b70be60
4RMD160 (python-ldap-3.2.0.tar.gz) = 846bf38cb166f478f2cf401f889ad7ecd39b05c5 4RMD160 (python-ldap-3.2.0.tar.gz) = 846bf38cb166f478f2cf401f889ad7ecd39b05c5
5SHA512 (python-ldap-3.2.0.tar.gz) = ef2833739fd57ad26d97ae5dba3bca8a47e770ff3f113d06a5bed0841f8fcbbe6cd102e75c753dfff48f5f6041f46a91c6166f3bb9ca44ef9bd643c0666c6b23 5SHA512 (python-ldap-3.2.0.tar.gz) = ef2833739fd57ad26d97ae5dba3bca8a47e770ff3f113d06a5bed0841f8fcbbe6cd102e75c753dfff48f5f6041f46a91c6166f3bb9ca44ef9bd643c0666c6b23
6Size (python-ldap-3.2.0.tar.gz) = 367645 bytes 6Size (python-ldap-3.2.0.tar.gz) = 367645 bytes
 7SHA1 (patch-Makefile) = ef130a8711a94cc070f11baf0d481bbc69ff3910

File Added: pkgsrc/databases/py-ldap/patches/patch-Makefile
$NetBSD: patch-Makefile,v 1.1 2020/03/27 16:34:57 gutteridge Exp $

Fix non-portable test expression.

--- Makefile.orig	2018-07-30 16:05:13.000000000 +0000
+++ Makefile
@@ -74,7 +74,7 @@ valgrind: build $(PYTHON_SUPP)
 	    $(PYTHON) setup.py test
 
 	@grep -A7 "blocks are definitely lost" build/valgrind.log; \
-	if [ $$? == 0 ]; then \
+	if [ $$? = 0 ]; then \
 	    echo "Found definitive leak, see build/valgrind.log"; \
 	    exit 1; \
 	fi