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.0 KiB
Makefile

# Created by: Hye-Shik Chang
# $FreeBSD$
PORTNAME= sqlite3
PORTVERSION= ${PYTHON_PORTVERSION}
PORTREVISION= 7
CATEGORIES= databases python
MASTER_SITES= PYTHON/ftp/python/${PORTVERSION}
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
DISTNAME= Python-${PORTVERSION}
DIST_SUBDIR= python
MAINTAINER= python@FreeBSD.org
COMMENT= Standard Python binding to the SQLite3 library (Python ${PYTHON_VER})
LICENSE= PSFL
LICENSE_FILE= ${WRKDIR}/Python-${PORTVERSION}/LICENSE
LIB_DEPENDS= libsqlite3.so:databases/sqlite3
PORTSCOUT= ignore:1
USES= compiler:c11 python tar:xz
USE_PYTHON= autoplist distutils allflavors
DISTINFO_FILE= ${PORTSDIR}/lang/python${PYTHON_SUFFIX}/distinfo
WRKSRC= ${WRKDIR}/Python-${PORTVERSION}/Modules
PYDISTUTILS_INSTALLARGS+= --install-lib ${PYTHON_LIBDIR}/lib-dynload
.include <bsd.port.pre.mk>
post-extract:
.if ${PYTHON_REL} < 3000
@${CP} ${FILESDIR}/setup.py ${WRKSRC}
.else
@${CP} ${FILESDIR}/setup3.py ${WRKSRC}/setup.py
.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHON_LIBDIR}/lib-dynload/_sqlite3*.so
.include <bsd.port.post.mk>