Changeset View
Changeset View
Standalone View
Standalone View
security/py-cryptography/Makefile
Show All 29 Lines | |||||
CFLAGS+= -I${OPENSSLINC} | CFLAGS+= -I${OPENSSLINC} | ||||
LDFLAGS+= -L${OPENSSLLIB} | LDFLAGS+= -L${OPENSSLLIB} | ||||
TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} | TEST_ENV= PYTHONPATH=${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} | ||||
.include <bsd.port.pre.mk> | .include <bsd.port.pre.mk> | ||||
# OpenSSL 1.0.2t got some curve matching parameter code backported before it | |||||
# has reached its End-of-Life and security/py-cryptography already had some | |||||
# code to handle this case, but it assumed OpenSSL 1.1.0+ . | |||||
# | |||||
# This has been fixed in 3.0-23-g241f8450 of security/py-cryptography and to be | |||||
# clear: It isn't a security fix but rather a workaround to handle unnamed but | |||||
# really named curves with OpenSSL 1.0.2t/u . | |||||
# We need to keep old py-cryptography and py-openssl for 11.x release | |||||
# due to outdated OpenSSL version in base | |||||
# Apply LibreSSL upstream patch that conflicts with above patch for 2.9.2 | |||||
EXTRA_PATCHES= ${PATCHDIR}/extra-patch-Fix-build-with-LibreSSL-3.3.2-5988 | |||||
.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42 | .if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42 | ||||
post-patch: | post-patch: | ||||
@${REINPLACE_CMD} -e 's|"-Wno-error=sign-conversion"||' \ | @${REINPLACE_CMD} -e 's|"-Wno-error=sign-conversion"||' \ | ||||
${WRKSRC}/src/_cffi_src/build_openssl.py | ${WRKSRC}/src/_cffi_src/build_openssl.py | ||||
.endif | .endif | ||||
post-install: | post-install: | ||||
${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cryptography/hazmat/bindings/*.so | ${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cryptography/hazmat/bindings/*.so | ||||
do-test: | do-test: | ||||
@cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -q -v -rs -o addopts= | @cd ${WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -q -v -rs -o addopts= | ||||
.include <bsd.port.post.mk> | .include <bsd.port.post.mk> |