1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-25 09:34:11 +00:00
freebsd-ports/math/py-cryptominisat/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

41 lines
1.0 KiB
Makefile

# $FreeBSD$
PORTNAME= cryptominisat
DISTVERSION= 5.8.0
CATEGORIES= math python
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= arrowd@FreeBSD.org
COMMENT= Bindings to CryptoMiniSat (a SAT solver)
LICENSE= MIT LGPL21
LICENSE_COMB= multi
LICENSE_FILE_LGPL21= ${WRKSRC}/../LICENSE.txt
LICENSE_FILE_MIT= ${WRKSRC}/../LICENSE.txt
LIB_DEPENDS= libcryptominisat5.so:math/cryptominisat
USES= compiler:c++11-lib python
USE_PYTHON= autoplist distutils
USE_GITHUB= yes
GH_ACCOUNT= msoos
WRKSRC_SUBDIR= python
post-patch:
${REINPLACE_CMD} -e 's|@PROJECT_VERSION@|${PORTVERSION}|' \
-e 's|$${CMAKE_C_COMPILER}|${CC}|' \
-e 's|$${CMAKE_CXX_COMPILER}|${CXX}|' \
-e 's|$${PY_C_CONFIG}||' \
-e 's|$${PY_LD_CONFIG}||' \
-e 's|$${CMS_FULL_VERSION}|${PORTVERSION}|' \
-e 's|$${APPLE}||' ${WRKSRC}/setup.py.in
${CP} ${WRKSRC}/setup.py.in ${WRKSRC}/setup.py
${CP} ${WRKSRC}/src/pycryptosat.cpp.in ${WRKSRC}/src/pycryptosat.cpp
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/pycryptosat*.so
.include <bsd.port.mk>