summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--math/Makefile2
-rw-r--r--math/cryptominisat/Makefile21
-rw-r--r--math/cryptominisat/distinfo2
-rw-r--r--math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt10
-rw-r--r--math/cryptominisat/files/patch-cryptominisat4_bva.cpp10
-rw-r--r--math/cryptominisat/pkg-descr6
-rw-r--r--math/cryptominisat/pkg-plist9
-rw-r--r--math/py-cryptominisat/Makefile24
-rw-r--r--math/py-cryptominisat/files/patch-pycryptosat.cpp19
9 files changed, 103 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index 127e82fbbf6a..38dda0647bfd 100644
--- a/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
diff --git a/math/cryptominisat/Makefile b/math/cryptominisat/Makefile
new file mode 100644
index 000000000000..9d6bf5d50b6f
--- /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 -DPYTHON_EXECUTABLE=0
+WRKSRC= ${WRKDIR}/${PORTNAME}4-${PORTVERSION}
+USE_LDCONFIG= yes
+
+.include <bsd.port.mk>
diff --git a/math/cryptominisat/distinfo b/math/cryptominisat/distinfo
new file mode 100644
index 000000000000..b5d43b093704
--- /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
diff --git a/math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt b/math/cryptominisat/files/patch-cryptominisat4_CMakeLists.txt
new file mode 100644
index 000000000000..faaa41f67ea5
--- /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 )
diff --git a/math/cryptominisat/files/patch-cryptominisat4_bva.cpp b/math/cryptominisat/files/patch-cryptominisat4_bva.cpp
new file mode 100644
index 000000000000..e02fce164a03
--- /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 <cmath>
+ #include <functional>
+
+ using namespace CMSat;
diff --git a/math/cryptominisat/pkg-descr b/math/cryptominisat/pkg-descr
new file mode 100644
index 000000000000..8b829dd0a584
--- /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/
diff --git a/math/cryptominisat/pkg-plist b/math/cryptominisat/pkg-plist
new file mode 100644
index 000000000000..2256d86fa6c4
--- /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
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[] = {