freebsd-ports/net/py-ldap0/Makefile
Kai Knoblich 9cb5898561 Relax hardcoded paths to fix build with Python 3.8.7
Since r558913 Python 3.8 incorporates BPO-42604 [1] which changed the
shared libs naming scheme.  This means "EXT_SUFFIX" is now derived from
SOABI and yields with Python 3.8 to ".cpython-38.so" instead of ".so".

The affected ports strip the libaries in the "post-install" target via
hardcoded path(s) and the build fails at the end because the new extension
is not expected at this place.

Remedy the issue by adding wildcards to these paths.  This should also
prepare the ports for future Python releases, which will use the new shared
libs naming scheme.

[1] https://bugs.python.org/issue42604

PR:		252057
Reported by:	John Kennedy
Reviewed by:	fluffy, koobs
Approved by:	koobs (python)
2020-12-24 13:46:01 +00:00

44 lines
1.1 KiB
Makefile

# $FreeBSD$
PORTNAME= ldap0
PORTVERSION= 1.1.3
CATEGORIES= net python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= girgen@FreeBSD.org
COMMENT= Module package for implementing LDAP clients
LICENSE= PSFL
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pyasn1>=0.4.5:devel/py-pyasn1@${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
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>