@@ -, +, @@ --- math/Makefile | 2 ++ math/cryptominisat/Makefile | 21 +++++++++++++++++++ math/cryptominisat/distinfo | 2 ++ .../files/patch-cryptominisat4_CMakeLists.txt | 10 +++++++++ .../files/patch-cryptominisat4_bva.cpp | 10 +++++++++ math/cryptominisat/pkg-descr | 6 ++++++ math/cryptominisat/pkg-plist | 9 ++++++++ math/py-cryptominisat/Makefile | 24 ++++++++++++++++++++++ math/py-cryptominisat/files/patch-pycryptosat.cpp | 19 +++++++++++++++++ 9 files changed, 103 insertions(+) create mode 100644 math/cryptominisat/Makefile create mode 100644 math/cryptominisat/distinfo create mode 100644 math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt create mode 100644 math/cryptominisat/files/patch-cryptominisat4_bva.cpp create mode 100644 math/cryptominisat/pkg-descr create mode 100644 math/cryptominisat/pkg-plist create mode 100644 math/py-cryptominisat/Makefile create mode 100644 math/py-cryptominisat/files/patch-pycryptosat.cpp --- b/math/Makefile +++ b/math/Makefile @@ -94,6 +94,7 @@ SUBDIR += convertall SUBDIR += coq SUBDIR += crlibm + SUBDIR += cryptominisat SUBDIR += cvc3 SUBDIR += dcdflib SUBDIR += diehard @@ -546,6 +547,7 @@ SUBDIR += py-basemap-data SUBDIR += py-bitvector SUBDIR += py-bottleneck + SUBDIR += py-cryptominisat SUBDIR += py-fastcluster SUBDIR += py-ffc SUBDIR += py-fiat --- /dev/null +++ b/math/cryptominisat/Makefile @@ -0,0 +1,21 @@ +# $FreeBSD$ + +PORTNAME= cryptominisat +PORTVERSION= 4.2.0 +PORTREVISION?= 0 +CATEGORIES?= math +MASTER_SITES= http://msoos.org/largefiles/ + +MAINTAINER= 6yearold@gmail.com +COMMENT?= General-purpose award-winning SAT solver + +LICENSE?= LGPL3 + +LIB_DEPENDS?= libboost_program_options.so:${PORTSDIR}/devel/boost-libs + +USES?= cmake compiler:c++11-lib tar:bzip2 +CMAKE_ARGS= -DNOMYSQL=1 -DNOM4RI=1 +WRKSRC= ${WRKDIR}/${PORTNAME}4-${PORTVERSION} +USE_LDCONFIG= yes + +.include --- /dev/null +++ b/math/cryptominisat/distinfo @@ -0,0 +1,2 @@ +SHA256 (cryptominisat-4.2.0.tar.bz2) = 4fb35b3f91a5fddcdd021a92e6e9f1a9049fb03f354860b118e9937a15a8ff02 +SIZE (cryptominisat-4.2.0.tar.bz2) = 634464 --- /dev/null +++ b/math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt @@ -0,0 +1,10 @@ +--- cryptominisat4/CMakeLists.txt.orig 2014-07-16 21:45:53 UTC ++++ cryptominisat4/CMakeLists.txt +@@ -85,6 +85,7 @@ target_link_libraries(libcryptominisat4 + set_target_properties(libcryptominisat4 PROPERTIES + OUTPUT_NAME cryptominisat4 + PUBLIC_HEADER "${cryptominisat4_public_headers}" ++ SOVERSION 0 + ) + + cmsat_add_public_header(libcryptominisat4 cryptominisat.h ) --- /dev/null +++ b/math/cryptominisat/files/patch-cryptominisat4_bva.cpp @@ -0,0 +1,10 @@ +--- cryptominisat4/bva.cpp.orig 2014-07-14 22:45:03 UTC ++++ cryptominisat4/bva.cpp +@@ -25,6 +25,7 @@ + #include "clausecleaner.h" + #include "subsumeimplicit.h" + #include "sqlstats.h" ++#include + #include + + using namespace CMSat; --- /dev/null +++ b/math/cryptominisat/pkg-descr @@ -0,0 +1,6 @@ +CryptoMiniSat is a modern, multi-threaded, feature-rich, simplifying SAT +solver, featuring over 100 configurable parameters to tune to specific +need, collection of statistical data to MySQL database + javascript-based +visualization of it and clean C++ and python interfaces. + +WWW: http://www.msoos.org/cryptominisat4/ --- /dev/null +++ b/math/cryptominisat/pkg-plist @@ -0,0 +1,9 @@ +bin/cryptominisat +include/cryptominisat4/cryptominisat.h +include/cryptominisat4/solverconf.h +include/cryptominisat4/solvertypesmini.h +lib/cmake/cryptominisat4/cryptominisat4Config.cmake +lib/cmake/cryptominisat4/cryptominisat4Targets-%%CMAKE_BUILD_TYPE%%.cmake +lib/cmake/cryptominisat4/cryptominisat4Targets.cmake +lib/libcryptominisat4.so +lib/libcryptominisat4.so.0 --- /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" --- /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[] = {