Fix swig detection

- Add conditional RUN_DEPENDS
- Bump PORTREVISION for dependency and package change

PR:		216257
Submitted by:	Luca Pizzamiglio <luca.pizzamiglio@gmail.com>
This commit is contained in:
Sunpoet Po-Chuan Hsieh 2017-01-19 19:26:08 +00:00
parent 1e3f6e70de
commit dbbbc116cf
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=431898

View File

@ -3,6 +3,7 @@
PORTNAME= m2crypto
PORTVERSION= 0.25.1
PORTREVISION= 1
CATEGORIES= security python
MASTER_SITES= CHEESESHOP
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
@ -20,7 +21,16 @@ PYDISTUTILS_BUILDARGS= build_ext --openssl=${OPENSSLBASE} --swig=${LOCALBASE}/bi
USE_PYTHON= autoplist concurrent distutils
USES= python ssl
post-patch:
@${REINPLACE_CMD} -e "s|swig\(', '-version\)|swig3.0\1|" ${WRKSRC}/${PYSETUP}
post-install:
${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/M2Crypto/__m2crypto.so
.include <bsd.port.mk>
.include <bsd.port.pre.mk>
.if ${PYTHON_REL} < 3500
RUN_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}typing>=0:devel/py-typing
.endif
.include <bsd.port.post.mk>