aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--devel/py-cffi/Makefile22
-rw-r--r--devel/py-cffi/distinfo2
2 files changed, 18 insertions, 6 deletions
diff --git a/devel/py-cffi/Makefile b/devel/py-cffi/Makefile
index 639c5bf40390..03dd11170ede 100644
--- a/devel/py-cffi/Makefile
+++ b/devel/py-cffi/Makefile
@@ -17,15 +17,27 @@ LIB_DEPENDS= libffi.so:devel/libffi
RUN_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pycparser>=2.10:devel/py-pycparser
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest>0:devel/py-pytest
-CFLAGS+= -I${LOCALBASE}/include -Wl,-rpath,${LOCALBASE}/lib
-LDFLAGS+= -L${LOCALBASE}/lib
-
+# Actually 2.6-2.7,3.2-3.5
USES= python
USE_PYTHON= autoplist distutils
+.include <bsd.port.pre.mk>
+
+.if ${OSVERSION} >= 1100000
+CFLAGS+= -Wno-shift-negative-value
+.endif
+
+# Tests assume gcc, and fail on pure clang systems
+# Fixed in https://bitbucket.org/cffi/cffi/issues/271
+post-patch:
+ ${REINPLACE_CMD} -e 's|gcc|${CC}|g' ${WRKSRC}/testing/cffi0/test_ownlib.py
+
+post-install:
+ ${STRIP_CMD} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR}/_cffi_backend.so
+
do-test:
@(cd ${TEST_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PYTHON_CMD} \
${PYDISTUTILS_SETUP} build_ext -i)
- @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest)
+ @(cd ${TEST_WRKSRC} && ${SETENV} ${TEST_ENV} ${PYTHON_CMD} -m pytest -rs)
-.include <bsd.port.mk>
+.include <bsd.port.post.mk>
diff --git a/devel/py-cffi/distinfo b/devel/py-cffi/distinfo
index 3b6acaaf2b24..240a9845dd39 100644
--- a/devel/py-cffi/distinfo
+++ b/devel/py-cffi/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1463831192
+TIMESTAMP = 1469194464
SHA256 (cffi-1.6.0.tar.gz) = a7f75c4ef2362c0a0e54657add0a6c509fecbfa3b3807bc0925f5cb1c9f927db
SIZE (cffi-1.6.0.tar.gz) = 397024