aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkoobs <koobs@FreeBSD.org>2020-01-13 10:49:03 +0800
committerkoobs <koobs@FreeBSD.org>2020-01-13 10:49:03 +0800
commite3656e7f21a618459608e5746c4b231b76376d16 (patch)
tree4d7d75e8943833e851fa5a63ad54c5546e727661
parentfc7cd32de84ea8984e61a7a439b513ef4f89dfd0 (diff)
downloadfreebsd-ports-gnome-e3656e7f21a618459608e5746c4b231b76376d16.tar.gz
freebsd-ports-gnome-e3656e7f21a618459608e5746c4b231b76376d16.tar.zst
freebsd-ports-gnome-e3656e7f21a618459608e5746c4b231b76376d16.zip
net/ldap0: Update to 0.6.8 [1]
Note: ldap0 is Python 3.x only since 0.3.0 While I'm here, level up ports compliance and fix ports issues: - Match COMMENT to setup.py:description - Match *_DEPENDS (and versions) to setup.py:*_requires - Add TEST_* variables and test (QA) target [1][2] - Replace setup.py INCLUDES patch with setuptools build_ext commands which honour environment variables - Strip extension/library - Patch setup.cfg to remove unconditional debug builds - Update pkg-descr formatting and WWW url (to match setup.py:homepage) [1] It's possible to make the unconditional requirement to HAVE_SASL, ie: a requirement to have a SASL enabled openldap client, optional, by conditionally adding --undef HAVE_SASL to PYDISTUTILS_BUILDARGS depending on WANT_OPENLDAP_SASL, but the ldap0 tests unconditionally run a number of unconditional sasl based tests. These tests should be made to skip (not fail) if SASL is not available, and the port made to support non-SASL based configuration. TODO: Upstream test improvements. [2] WANT_OPENLDAP_SASL currently only results in the openldap-client being SASL enabled, but doesn't affect the openldap-server port. There's no way at present to require/force a SASL enabled openldap-server port, which doesn't enable the SASL option by default either. A slave port (openldap24-sasl-server, matching client slave port) that enables the SASL option would be great. portlint: OK (looks fine.) testport: OK (poudriere: 12amd64, Python 3.7) maketest: OK (Ran 248 tests: (skipped=12, expected failures=3)) PR: 242043 [1] Submitted by: <geraud gcu info> [1] Approved by: portmgr (maintainer timeout: > 1 months, blanket: ports compliance)
-rw-r--r--net/py-ldap0/Makefile35
-rw-r--r--net/py-ldap0/distinfo6
-rw-r--r--net/py-ldap0/files/patch-setup.cfg10
-rw-r--r--net/py-ldap0/files/patch-setup.py11
-rw-r--r--net/py-ldap0/pkg-descr16
5 files changed, 49 insertions, 29 deletions
diff --git a/net/py-ldap0/Makefile b/net/py-ldap0/Makefile
index da0389a5277f..72c50d80d12b 100644
--- a/net/py-ldap0/Makefile
+++ b/net/py-ldap0/Makefile
@@ -1,25 +1,44 @@
# $FreeBSD$
PORTNAME= ldap0
-PORTVERSION= 0.0.60
-PORTREVISION= 1
+PORTVERSION= 0.6.8
CATEGORIES= net python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= girgen@FreeBSD.org
-COMMENT= Python module package for implementing LDAP clients
+COMMENT= Module package for implementing LDAP clients
LICENSE= PSFL
-RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyasn1-modules>=0.2.1:devel/py-pyasn1-modules@${PY_FLAVOR}
+RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyasn1>=0.4.5:devel/py-pyasn1-modules@${PY_FLAVOR} \
+ ${PYTHON_PKGNAMEPREFIX}pyasn1-modules>=0.2.5:devel/py-pyasn1-modules@${PY_FLAVOR}
+# OpenLDAP needs SASL option enabled
+# Cyrus needs PLAIN / CRAM-MD5 / DIGEST-MD5 enabled
+TEST_DEPENDS= ${LOCALBASE}/libexec/slapd:net/openldap24-server
-MAKE_ENV+= INCLUDES=${LOCALBASE}/include
-WANT_OPENLDAP_SASL=yes
-
-USES= python:2.7
+USES= localbase python:3.6+
USE_LOCALE= en_US.UTF-8
USE_OPENLDAP= yes
USE_PYTHON= autoplist distutils
+WANT_OPENLDAP_SASL= yes
+
+PYDISTUTILS_BUILD_TARGET= build_ext
+PYDISTUTILS_BUILDARGS+= --inplace
+
+# Add LOGLEVEL=DEBUG to debug tests
+TEST_ENV= LDAPNOINIT=1 \
+ SLAPD=${LOCALBASE}/libexec/slapd \
+ SCHEMA=${LOCALBASE}/etc/openldap/schema \
+ BIN=${LOCALBASE}/bin \
+ SBIN=${LOCALBASE}/sbin \
+ TMP=${WRKDIR}
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_libldap0.so
+
+do-test:
+ @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
+
.include <bsd.port.mk>
diff --git a/net/py-ldap0/distinfo b/net/py-ldap0/distinfo
index 8d591b2c9e3e..9f1505d52e0c 100644
--- a/net/py-ldap0/distinfo
+++ b/net/py-ldap0/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1525015315
-SHA256 (ldap0-0.0.60.tar.gz) = a6f02941dda63249e8c7c68947d0c7fb47efaa59ca085396a3ddedadb90a65fe
-SIZE (ldap0-0.0.60.tar.gz) = 219348
+TIMESTAMP = 1578802932
+SHA256 (ldap0-0.6.8.tar.gz) = 2490ae871180d21b42bfc073ee8b73f1493fe700ae02dff87a7388e7414fb8b4
+SIZE (ldap0-0.6.8.tar.gz) = 233543
diff --git a/net/py-ldap0/files/patch-setup.cfg b/net/py-ldap0/files/patch-setup.cfg
new file mode 100644
index 000000000000..ac7d768e4791
--- /dev/null
+++ b/net/py-ldap0/files/patch-setup.cfg
@@ -0,0 +1,10 @@
+--- setup.cfg.orig 2020-01-12 07:58:53 UTC
++++ setup.cfg
+@@ -1,6 +1,6 @@
+ [_libldap0]
+ defines = HAVE_SASL HAVE_TLS HAVE_LIBLDAP_R
+-extra_compile_args = -Wall -O1 -g -DPYMALLOC_DEBUG
++extra_compile_args = -Wall
+ extra_objects =
+ libs = ldap_r
+
diff --git a/net/py-ldap0/files/patch-setup.py b/net/py-ldap0/files/patch-setup.py
deleted file mode 100644
index 6f31242362c8..000000000000
--- a/net/py-ldap0/files/patch-setup.py
+++ /dev/null
@@ -1,11 +0,0 @@
---- setup.py.orig 2018-02-06 13:04:47 UTC
-+++ setup.py
-@@ -22,7 +22,7 @@ class OpenLDAP2BuildConfig:
-
- def __init__(self, meta_defines):
- self.library_dirs = []
-- self.include_dirs = []
-+ self.include_dirs = [os.environ['INCLUDES']]
- self.extra_compile_args = []
- self.extra_link_args = []
- self.extra_objects = []
diff --git a/net/py-ldap0/pkg-descr b/net/py-ldap0/pkg-descr
index db6aedf38bb4..b2199c1f7fd4 100644
--- a/net/py-ldap0/pkg-descr
+++ b/net/py-ldap0/pkg-descr
@@ -1,11 +1,13 @@
ldap0 provides an object-oriented API to access LDAP directory servers from
Python programs. Mainly it wraps the OpenLDAP 2.x libs for that purpose.
+
Additionally the package contains Python modules:
-- parsing and producing LDIF
-- handle LDAPURLs
-- parse and handle LDAPv3 subschema
-- LDAPv3 extended operations and controls
-- automatic tests with OpenLDAP server This package is a non-compatible fork of
- python-ldap and therefore uses the separate module name-space 'ldap0'.
-WWW: https://pypi.org/project/ldap0/#description
+ - parsing and producing LDIF
+ - handle LDAPURLs
+ - parse and handle LDAPv3 subschema
+ - LDAPv3 extended operations and controls
+ - automatic tests with OpenLDAP server This package is a non-compatible for
+ of python-ldap and therefore uses the separate module name-space 'ldap0'.
+
+WWW: https://gitlab.com/ae-dir/python-ldap0