freebsd-ports/security/py-pycrypto/Makefile
Jason Helfman 3aec6823ff - Make GMP OPTION'al
- Add upstream patch for test failure when built without GMP

PR:		172299
Submitted by:	koobs.freebsd@gmail.com
2012-10-04 16:45:41 +00:00

49 lines
1,004 B
Makefile

# Created by: nbm
#
# $FreeBSD$
PORTNAME= pycrypto
PORTVERSION= 2.6
PORTREVISION= 1
CATEGORIES= security python
MASTER_SITES= CHEESESHOP \
https://ftp.dlitz.net/pub/dlitz/crypto/pycrypto/
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
MAINTAINER= jgh@FreeBSD.org
COMMENT= The Python Cryptography Toolkit
USE_PYTHON= yes
USE_PYDISTUTILS= yes
HAS_CONFIGURE= yes
USE_AUTOTOOLS= autoconf
OPTIONS_DEFINE= GMP
OPTIONS_DEFAULT= GMP
GMP_DESC= Use GMP for faster DSA/RSA operations
OPTIONSFILE?= ${PORT_DBDIR}/py-${PORTNAME}/options
.include <bsd.port.options.mk>
.if ${PORT_OPTIONS:MGMP}
LIB_DEPENDS+= gmp:${PORTSDIR}/math/gmp
CONFIGURE_ARGS+= --with-gmp
CPPFLAGS+= -I${LOCALBASE}/include
LDFLAGS+= -L${LOCALBASE}/lib
PLIST_SUB+= GMP=""
.else
CONFIGURE_ARGS+= --without-gmp
PLIST_SUB+= GMP="@comment "
.endif
pre-patch:
@${REINPLACE_CMD} -e "s|%%LOCALBASE%%|${LOCALBASE}|" ${WRKSRC}/setup.py
test: build
cd ${WRKSRC} && ${PYTHON_CMD} ${PYSETUP} test
regression-test: test
.include <bsd.port.mk>