aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Jaeger <pi@FreeBSD.org>2018-06-21 11:06:10 +0000
committerKurt Jaeger <pi@FreeBSD.org>2018-06-21 11:06:10 +0000
commit1c2716f9593c83ad3dd25013c951993990ca427e (patch)
treee048fc45793fb84fca5df4c1e45f80c5c8b0a07f
parentf1a50935a3a46c843b08ac0e81156ad11e77c485 (diff)
downloadports-1c2716f9593c83ad3dd25013c951993990ca427e.tar.gz
ports-1c2716f9593c83ad3dd25013c951993990ca427e.zip
Notes
-rw-r--r--math/Makefile1
-rw-r--r--math/cvc4/Makefile74
-rw-r--r--math/cvc4/distinfo3
-rw-r--r--math/cvc4/files/patch-src_base_configuration.cpp11
-rw-r--r--math/cvc4/files/patch-src_main_portfolio.cpp24
-rw-r--r--math/cvc4/pkg-descr6
-rw-r--r--math/cvc4/pkg-plist130
7 files changed, 249 insertions, 0 deletions
diff --git a/math/Makefile b/math/Makefile
index b7fe6af0f32f..6ae92fba6b9f 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -166,6 +166,7 @@
SUBDIR += crlibm
SUBDIR += cryptominisat
SUBDIR += cvc3
+ SUBDIR += cvc4
SUBDIR += diehard
SUBDIR += dieharder
SUBDIR += djbfft
diff --git a/math/cvc4/Makefile b/math/cvc4/Makefile
new file mode 100644
index 000000000000..f52df32c8c07
--- /dev/null
+++ b/math/cvc4/Makefile
@@ -0,0 +1,74 @@
+# $FreeBSD$
+
+PORTNAME= cvc4
+PORTVERSION= 1.5
+CATEGORIES= math java
+MASTER_SITES= https://cvc4.cs.stanford.edu/downloads/builds/src/
+
+MAINTAINER= greg@unrelenting.technology
+COMMENT= Automatic theorem prover for SMT (Satisfiability Modulo Theories)
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/COPYING
+
+LIB_DEPENDS= libantlr3c.so:devel/libantlr3c \
+ libboost_system.so:devel/boost-libs
+BUILD_DEPENDS= gexpr:sysutils/coreutils \
+ bash:shells/bash \
+ antlr3:devel/antlr3
+
+USES= compiler:c++11-lang pkgconfig gmake libtool shebangfix localbase
+USE_JAVA= yes
+JAVA_BUILD= yes
+
+GNU_CONFIGURE= yes
+CONFIGURE_ARGS+= --disable-dependency-tracking \
+ --with-swig=${LOCALBASE}/bin/swig3.0 \
+ ANTLR=${LOCALBASE}/bin/antlr3
+CONFIGURE_SHELL= ${LOCALBASE}/bin/bash
+USE_LDCONFIG= yes
+SHEBANG_FILES= src/mk* src/theory/mk* src/base/mk* src/expr/mk* src/options/mk* test/regress/run_regression
+
+OPTIONS_DEFINE= JAVA READLINE DEBUG
+OPTIONS_RADIO= NUMLIB
+OPTIONS_RADIO_NUMLIB= GMP CLN
+OPTIONS_DEFAULT= READLINE CLN
+OPTIONS_SUB= yes
+
+GMP_DESC= Use GMP numeric library
+CLN_DESC= Use CLN numeric library (disables portfolio mode)
+
+JAVA_CONFIGURE_ON= --enable-language-bindings=c,c++,java \
+ JAVA_CPPFLAGS="-I${JAVA_HOME}/include -I${JAVA_HOME}/include/freebsd" \
+ JAVAC=${JAVAC} JAVAH=${JAVAH} JAR=${JAR}
+JAVA_CONFIGURE_OFF= --enable-language-bindings=c,c++
+JAVA_BUILD_DEPENDS= swig3.0:devel/swig30
+
+READLINE_CONFIGURE_WITH= readline
+READLINE_USES= readline
+
+GMP_CONFIGURE_WITH= gmp
+GMP_CONFIGURE_ON= --with-portfolio
+GMP_LIB_DEPENDS= libgmp.so:math/gmp \
+ libboost_thread.so:devel/boost-libs
+# note: CVC4 already depends on boost-libs, so portfolio mode is "free" in terms of pkg dependencies
+
+CLN_CONFIGURE_WITH= cln
+CLN_LIB_DEPENDS= libcln.so:math/cln \
+ libgmp.so:math/gmp
+
+DEBUG_CONFIGURE_ON= --with-build=debug
+DEBUG_CONFIGURE_OFF= --with-build=production
+DEBUG_INSTALL_TARGET_OFF= install-strip
+
+post-patch:
+ ${REINPLACE_CMD} -e 's|expr |gexpr |g' ${WRKSRC}/src/options/mkoptions
+
+.include <bsd.port.options.mk>
+
+.if ${PORT_OPTIONS:MREADLINE} || ${PORT_OPTIONS:MCLN}
+LICENSE= GPLv3
+CONFIGURE_ARGS+= --enable-gpl
+.endif
+
+.include <bsd.port.mk>
diff --git a/math/cvc4/distinfo b/math/cvc4/distinfo
new file mode 100644
index 000000000000..579934f7d6c3
--- /dev/null
+++ b/math/cvc4/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1524235369
+SHA256 (cvc4-1.5.tar.gz) = 5d6b4f8ee8420f85e3f804181341cedf6ea32342c48f355a5be87754152b14e9
+SIZE (cvc4-1.5.tar.gz) = 8059968
diff --git a/math/cvc4/files/patch-src_base_configuration.cpp b/math/cvc4/files/patch-src_base_configuration.cpp
new file mode 100644
index 000000000000..6e48c9e5c562
--- /dev/null
+++ b/math/cvc4/files/patch-src_base_configuration.cpp
@@ -0,0 +1,11 @@
+--- src/base/configuration.cpp.orig 2018-04-22 17:53:43 UTC
++++ src/base/configuration.cpp
+@@ -291,7 +291,7 @@ std::string Configuration::getCompiler() {
+ }
+
+ std::string Configuration::getCompiledDateTime() {
+- return __DATE__ " " __TIME__;
++ return "(timestamp removed for reproducible builds)";
+ }
+
+ }/* CVC4 namespace */
diff --git a/math/cvc4/files/patch-src_main_portfolio.cpp b/math/cvc4/files/patch-src_main_portfolio.cpp
new file mode 100644
index 000000000000..454c9693112c
--- /dev/null
+++ b/math/cvc4/files/patch-src_main_portfolio.cpp
@@ -0,0 +1,24 @@
+--- src/main/portfolio.cpp.orig 2018-04-22 17:42:48 UTC
++++ src/main/portfolio.cpp
+@@ -18,6 +18,9 @@
+ #include <boost/bind.hpp>
+ #include <boost/thread/condition.hpp>
+ #include <boost/exception_ptr.hpp>
++#ifdef __FreeBSD__
++#include <pthread_np.h>
++#endif
+
+ #include "base/output.h"
+ #include "options/options.h"
+@@ -100,7 +103,11 @@ std::pair<int, S> runPortfolio(int numThreads,
+ void *stackaddr;
+ size_t stacksize;
+ pthread_attr_t attr;
++#ifdef __linux__
+ pthread_getattr_np(threads[t].native_handle(), &attr);
++#elif __FreeBSD__
++ pthread_attr_get_np(threads[t].native_handle(), &attr);
++#endif
+ pthread_attr_getstack(&attr, &stackaddr, &stacksize);
+ Chat() << "Created worker thread " << t << " with stack size " << stacksize << std::endl;
+ }
diff --git a/math/cvc4/pkg-descr b/math/cvc4/pkg-descr
new file mode 100644
index 000000000000..e113b3669187
--- /dev/null
+++ b/math/cvc4/pkg-descr
@@ -0,0 +1,6 @@
+An efficient open-source automatic theorem prover for satisfiability modulo
+theories (SMT) problems. It can be used to prove the validity (or, dually, the
+satisfiability) of first-order formulas in a large number of built-in logical
+theories and their combination.
+
+WWW: https://cvc4.cs.stanford.edu/web/
diff --git a/math/cvc4/pkg-plist b/math/cvc4/pkg-plist
new file mode 100644
index 000000000000..a7758f76b670
--- /dev/null
+++ b/math/cvc4/pkg-plist
@@ -0,0 +1,130 @@
+bin/cvc4
+bin/lfsc-checker
+%%GMP%%bin/pcvc4
+include/cvc4/base/configuration.h
+include/cvc4/base/exception.h
+include/cvc4/base/listener.h
+include/cvc4/base/modal_exception.h
+include/cvc4/base/ptr_closer.h
+include/cvc4/base/tls.h
+include/cvc4/bindings/compat/c/c_interface.h
+include/cvc4/bindings/compat/c/c_interface_defs.h
+include/cvc4/compat/cvc3_compat.h
+include/cvc4/context/cdhashmap_forward.h
+include/cvc4/context/cdhashset_forward.h
+include/cvc4/context/cdinsert_hashmap_forward.h
+include/cvc4/context/cdlist_forward.h
+include/cvc4/context/cdtrail_hashmap_forward.h
+include/cvc4/cvc4.h
+include/cvc4/cvc4_private.h
+include/cvc4/cvc4_private_library.h
+include/cvc4/cvc4_public.h
+include/cvc4/cvc4parser_private.h
+include/cvc4/cvc4parser_public.h
+include/cvc4/expr/array.h
+include/cvc4/expr/array_store_all.h
+include/cvc4/expr/ascription_type.h
+include/cvc4/expr/chain.h
+include/cvc4/expr/datatype.h
+include/cvc4/expr/emptyset.h
+include/cvc4/expr/expr.h
+include/cvc4/expr/expr_iomanip.h
+include/cvc4/expr/expr_manager.h
+include/cvc4/expr/expr_manager_template.h
+include/cvc4/expr/expr_stream.h
+include/cvc4/expr/expr_template.h
+include/cvc4/expr/kind.h
+include/cvc4/expr/kind_template.h
+include/cvc4/expr/pickler.h
+include/cvc4/expr/predicate.h
+include/cvc4/expr/record.h
+include/cvc4/expr/symbol_table.h
+include/cvc4/expr/type.h
+include/cvc4/expr/uninterpreted_constant.h
+include/cvc4/expr/variable_type_map.h
+include/cvc4/options/argument_extender.h
+include/cvc4/options/arith_heuristic_pivot_rule.h
+include/cvc4/options/arith_propagation_mode.h
+include/cvc4/options/arith_unate_lemma_mode.h
+include/cvc4/options/language.h
+include/cvc4/options/option_exception.h
+include/cvc4/options/options.h
+include/cvc4/options/printer_modes.h
+include/cvc4/options/quantifiers_modes.h
+include/cvc4/options/set_language.h
+include/cvc4/options/simplification_mode.h
+include/cvc4/options/theoryof_mode.h
+include/cvc4/parser/input.h
+include/cvc4/parser/parser.h
+include/cvc4/parser/parser_builder.h
+include/cvc4/parser/parser_exception.h
+include/cvc4/proof/unsat_core.h
+include/cvc4/smt/command.h
+include/cvc4/smt/logic_exception.h
+include/cvc4/smt/smt_engine.h
+include/cvc4/smt_util/lemma_channels.h
+include/cvc4/smt_util/lemma_input_channel.h
+include/cvc4/smt_util/lemma_output_channel.h
+include/cvc4/theory/logic_info.h
+include/cvc4/theory/theory_test_utils.h
+include/cvc4/util/abstract_value.h
+include/cvc4/util/bitvector.h
+include/cvc4/util/bool.h
+include/cvc4/util/cardinality.h
+include/cvc4/util/channel.h
+include/cvc4/util/divisible.h
+include/cvc4/util/floatingpoint.h
+include/cvc4/util/gmp_util.h
+include/cvc4/util/hash.h
+include/cvc4/util/integer.h
+include/cvc4/util/integer_cln_imp.h
+include/cvc4/util/integer_gmp_imp.h
+include/cvc4/util/proof.h
+include/cvc4/util/rational.h
+include/cvc4/util/rational_cln_imp.h
+include/cvc4/util/rational_gmp_imp.h
+include/cvc4/util/regexp.h
+include/cvc4/util/resource_manager.h
+include/cvc4/util/result.h
+include/cvc4/util/sexpr.h
+include/cvc4/util/statistics.h
+include/cvc4/util/subrange_bound.h
+include/cvc4/util/tuple.h
+include/cvc4/util/unsafe_interrupt_exception.h
+%%JAVA%%lib/jni/libcvc4compatjni.so
+%%JAVA%%lib/jni/libcvc4compatjni.so.4
+%%JAVA%%lib/jni/libcvc4compatjni.so.4.0.0
+%%JAVA%%lib/jni/libcvc4jni.so
+%%JAVA%%lib/jni/libcvc4jni.so.4
+%%JAVA%%lib/jni/libcvc4jni.so.4.0.0
+lib/libcvc4.so
+lib/libcvc4.so.4
+lib/libcvc4.so.4.0.0
+lib/libcvc4bindings_c_compat.so
+lib/libcvc4bindings_c_compat.so.4
+lib/libcvc4bindings_c_compat.so.4.0.0
+lib/libcvc4compat.so
+lib/libcvc4compat.so.4
+lib/libcvc4compat.so.4.0.0
+lib/libcvc4parser.so
+lib/libcvc4parser.so.4
+lib/libcvc4parser.so.4.0.0
+man/man1/cvc4.1.gz
+%%GMP%%man/man1/pcvc4.1.gz
+man/man3/SmtEngine.3cvc.gz
+man/man3/libcvc4.3.gz
+man/man3/libcvc4compat.3.gz
+man/man3/libcvc4parser.3.gz
+man/man3/options.3cvc.gz
+man/man5/cvc4.5.gz
+%%DATADIR%%/sat.plf
+%%DATADIR%%/smt.plf
+%%DATADIR%%/th_arrays.plf
+%%DATADIR%%/th_base.plf
+%%DATADIR%%/th_bv.plf
+%%DATADIR%%/th_bv_bitblast.plf
+%%DATADIR%%/th_bv_rewrites.plf
+%%DATADIR%%/th_int.plf
+%%DATADIR%%/th_real.plf
+%%JAVA%%share/java/CVC4.jar
+%%JAVA%%share/java/CVC4compat.jar