freebsd-ports/security/py-cryptography/Makefile
Mathieu Arnold 4376dbbb58 Use PY_FLAVOR for dependencies.
FLAVOR is the current port's flavor, it should not be used outside of
this scope.

Sponsored by:	Absolight
2018-06-20 17:05:41 +00:00

48 lines
1.5 KiB
Makefile

# Created by: Kubilay Kocak <koobs@FreeBSD.org>
# $FreeBSD$
PORTNAME= cryptography
PORTVERSION= 2.1.4
CATEGORIES= security python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= koobs@FreeBSD.org
COMMENT= Cryptographic recipes and primitives for Python developers
LICENSE= APACHE20 BSD3CLAUSE
LICENSE_COMB= dual
LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE.APACHE
LICENSE_FILE_BSD3CLAUSE= ${WRKSRC}/LICENSE.BSD
BUILD_DEPENDS= ${PYTHON_PKGNAMEPREFIX}cffi>=1.7:devel/py-cffi@${PY_FLAVOR}
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}six>=1.4.1:devel/py-six@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}asn1crypto>=0.21.0:devel/py-asn1crypto@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}cffi>=1.7:devel/py-cffi@${PY_FLAVOR} \
${PY_ENUM34} ${PY_IPADDRESS} \
${PYTHON_PKGNAMEPREFIX}idna>=2.1:dns/py-idna@${PY_FLAVOR}
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>=2.9.0:devel/py-pytest@${PY_FLAVOR} \
${PYTHON_PKGNAMEPREFIX}iso8601>0:devel/py-iso8601@${PY_FLAVOR}
# Python 2.7, 3.4-3.6
USES= compiler:env python ssl
USE_PYTHON= autoplist concurrent distutils
CFLAGS+= -I${OPENSSLINC}
LDFLAGS+= -L${OPENSSLLIB}
.include <bsd.port.pre.mk>
.if ${CHOSEN_COMPILER_TYPE} == gcc && ${COMPILER_VERSION} <= 42
post-patch:
@${REINPLACE_CMD} -e 's|"-Wno-error=sign-conversion"||' \
${WRKSRC}/src/_cffi_src/build_openssl.py
.endif
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/cryptography/hazmat/bindings/*.so
do-test:
@cd ${WRKSRC} && ${PYTHON_CMD} ${PYDISTUTILS_SETUP} test
.include <bsd.port.post.mk>