diff options
author | Jan Beich <jbeich@FreeBSD.org> | 2015-05-05 21:54:29 +0000 |
---|---|---|
committer | Jan Beich <jbeich@FreeBSD.org> | 2015-05-05 21:54:29 +0000 |
commit | bef4dc1626df6695999d63c39a4f13d2e2e70522 (patch) | |
tree | ab4afd56497d5c009d45f5d8774ed20e663f98aa /math/py-cryptominisat | |
parent | b0e802fc0a56b73426f550e5d3cc086684f8c5ee (diff) | |
download | ports-bef4dc1626df6695999d63c39a4f13d2e2e70522.tar.gz ports-bef4dc1626df6695999d63c39a4f13d2e2e70522.zip |
Notes
Diffstat (limited to 'math/py-cryptominisat')
-rw-r--r-- | math/py-cryptominisat/Makefile | 24 | ||||
-rw-r--r-- | math/py-cryptominisat/files/patch-pycryptosat.cpp | 19 |
2 files changed, 43 insertions, 0 deletions
diff --git a/math/py-cryptominisat/Makefile b/math/py-cryptominisat/Makefile new file mode 100644 index 000000000000..8cf25e213920 --- /dev/null +++ b/math/py-cryptominisat/Makefile @@ -0,0 +1,24 @@ +# $FreeBSD$ + +CATEGORIES= math python +PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} + +COMMENT= Python bindings to CryptoMiniSat + +LICENSE= MIT + +LIB_DEPENDS= libcryptominisat4.so:${PORTSDIR}/math/cryptominisat + +USES= compiler:c++11-lib python:2.7 tar:bzip2 +USE_PYTHON= autoplist distutils +WRKSRC_SUBDIR= python + +MASTERDIR= ${.CURDIR}/../cryptominisat +PATCHDIR= ${.CURDIR}/files +PLIST= ${.CURDIR}/pkg-plist + +post-install: + ${FIND} ${STAGEDIR}${PYTHONPREFIX_SITELIBDIR} -name \*.so \ + -exec ${STRIP_CMD} {} + + +.include "${MASTERDIR}/Makefile" diff --git a/math/py-cryptominisat/files/patch-pycryptosat.cpp b/math/py-cryptominisat/files/patch-pycryptosat.cpp new file mode 100644 index 000000000000..7d6b9d31f49c --- /dev/null +++ b/math/py-cryptominisat/files/patch-pycryptosat.cpp @@ -0,0 +1,19 @@ +On FreeBSD -std=c++11 turns NULL into nullptr which sometimes breaks: + + pycryptosat.cpp:393:12: error: cannot initialize return object of type 'int' with an rvalue of type 'nullptr_t' + return NULL; + ^~~~ + /usr/include/sys/_null.h:35:14: note: expanded from macro 'NULL' + #define NULL nullptr + ^~~~~~~ +--- pycryptosat.cpp.orig 2014-07-06 23:41:16 UTC ++++ pycryptosat.cpp +@@ -390,7 +390,7 @@ Solver_init(Solver *self, PyObject *args + if (!self->cmsat) { + return -1; + } +- return NULL; ++ return 0; + } + + static PyMemberDef Solver_members[] = { |