2018-06-21 11:06:10 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
|
|
|
|
PORTNAME= cvc4
|
2019-08-01 15:20:28 +00:00
|
|
|
DISTVERSION= 1.7
|
2020-07-09 15:44:39 +00:00
|
|
|
PORTREVISION= 4
|
2018-06-21 11:06:10 +00:00
|
|
|
CATEGORIES= math java
|
2019-08-01 15:20:28 +00:00
|
|
|
MASTER_SITES+= http://www.antlr3.org/download/:antlr3
|
|
|
|
DISTFILES+= antlr-3.4-complete.jar:antlr3
|
|
|
|
EXTRACT_ONLY= ${DISTNAME}${EXTRACT_SUFX}
|
|
|
|
|
|
|
|
PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
|
|
|
|
PATCHFILES+= fc8907afc08d.patch:-p1 # Install Java bindings
|
2018-06-21 11:06:10 +00:00
|
|
|
|
|
|
|
MAINTAINER= greg@unrelenting.technology
|
|
|
|
COMMENT= Automatic theorem prover for SMT (Satisfiability Modulo Theories)
|
|
|
|
|
|
|
|
LICENSE= BSD3CLAUSE
|
|
|
|
LICENSE_FILE= ${WRKSRC}/COPYING
|
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
BUILD_DEPENDS= bash:shells/bash
|
2018-06-21 11:06:10 +00:00
|
|
|
LIB_DEPENDS= libantlr3c.so:devel/libantlr3c \
|
|
|
|
libboost_system.so:devel/boost-libs
|
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
USES= cmake ncurses compiler:c++17-lang \
|
2019-05-27 10:10:15 +00:00
|
|
|
pkgconfig python:3.5+,build shebangfix
|
2019-08-01 15:20:28 +00:00
|
|
|
|
|
|
|
SHEBANG_FILES= src/base/mktagheaders \
|
|
|
|
src/base/mktags
|
|
|
|
|
|
|
|
USE_GITHUB= yes
|
|
|
|
GH_ACCOUNT= CVC4
|
|
|
|
GH_PROJECT= CVC4
|
|
|
|
|
2018-06-21 11:06:10 +00:00
|
|
|
USE_JAVA= yes
|
|
|
|
JAVA_BUILD= yes
|
|
|
|
|
|
|
|
USE_LDCONFIG= yes
|
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
CMAKE_BUILD_TYPE= Production
|
|
|
|
CMAKE_ARGS+= -DANTLR_BINARY=${WRKDIR}/antlr3
|
|
|
|
|
|
|
|
OPTIONS_DEFINE= CRYPTOMINISAT JAVA PYTHON READLINE
|
2018-06-21 11:06:10 +00:00
|
|
|
OPTIONS_RADIO= NUMLIB
|
|
|
|
OPTIONS_RADIO_NUMLIB= GMP CLN
|
2019-08-01 15:20:28 +00:00
|
|
|
OPTIONS_DEFAULT= CRYPTOMINISAT JAVA PYTHON READLINE GMP
|
2018-06-21 11:06:10 +00:00
|
|
|
OPTIONS_SUB= yes
|
|
|
|
|
2018-07-22 18:30:29 +00:00
|
|
|
CRYPTOMINISAT_DESC= Use CryptoMiniSat as the SAT solver
|
2018-06-21 11:06:10 +00:00
|
|
|
GMP_DESC= Use GMP numeric library
|
|
|
|
CLN_DESC= Use CLN numeric library (disables portfolio mode)
|
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
CRYPTOMINISAT_CMAKE_BOOL= USE_CRYPTOMINISAT
|
2018-07-22 18:30:29 +00:00
|
|
|
CRYPTOMINISAT_LIB_DEPENDS= libcryptominisat5.so:math/cryptominisat
|
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
JAVA_CMAKE_BOOL= BUILD_BINDINGS_JAVA
|
|
|
|
JAVA_CMAKE_ON= -DJAVA_INCLUDE_PATH:PATH=${JAVA_HOME}/include \
|
|
|
|
-DJAVA_AWT_LIBRARY:PATH=${JAVA_HOME}/jre/lib/${ARCH}/libjawt.so \
|
|
|
|
-DJAVA_JVM_LIBRARY:PATH=${JAVA_HOME}/jre/lib/${ATCH}/libjava.so
|
2020-06-17 18:17:45 +00:00
|
|
|
JAVA_BUILD_DEPENDS= swig:devel/swig
|
2018-06-21 11:06:10 +00:00
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
PYTHON_CMAKE_BOOL= BUILD_BINDINGS_PYTHON USE_PYTHON3
|
2020-06-17 18:17:45 +00:00
|
|
|
PYTHON_BUILD_DEPENDS= swig:devel/swig
|
2018-06-21 11:06:10 +00:00
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
READLINE_CMAKE_BOOL= USE_READLINE
|
|
|
|
READLINE_USES= readline:port
|
2018-06-21 11:06:10 +00:00
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
GMP_CMAKE_BOOL= ENABLE_PORTFOLIO
|
|
|
|
GMP_CMAKE_ON= -DENABLE_DUMPING=OFF
|
|
|
|
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
|
2018-06-21 11:06:10 +00:00
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
CLN_CMAKE_BOOL= USE_CLN
|
|
|
|
CLN_LIB_DEPENDS= libcln.so:math/cln \
|
|
|
|
libgmp.so:math/gmp
|
2018-06-21 11:06:10 +00:00
|
|
|
|
|
|
|
.include <bsd.port.options.mk>
|
|
|
|
|
|
|
|
.if ${PORT_OPTIONS:MREADLINE} || ${PORT_OPTIONS:MCLN}
|
|
|
|
LICENSE= GPLv3
|
2019-08-01 15:20:28 +00:00
|
|
|
CMAKE_ARGS+= -DENABLE_GPL:BOOL=ON
|
2018-06-21 11:06:10 +00:00
|
|
|
.endif
|
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
post-extract:
|
|
|
|
@${CP} ${DISTDIR}/antlr-3.4-complete.jar ${WRKDIR}/antlr3.jar
|
|
|
|
@${ECHO_CMD} "#!/bin/sh" > ${WRKDIR}/antlr3
|
2019-11-26 21:46:12 +00:00
|
|
|
@${ECHO_CMD} "exec \"${LOCALBASE}/bin/java\" -classpath \"${WRKDIR}/antlr3.jar\" org.antlr.Tool \"\$$@\"" >> ${WRKDIR}/antlr3
|
2019-08-01 15:20:28 +00:00
|
|
|
@${CHMOD} +x ${WRKDIR}/antlr3
|
|
|
|
|
2019-08-05 16:59:25 +00:00
|
|
|
post-patch:
|
2019-08-06 17:36:36 +00:00
|
|
|
@${REINPLACE_CMD} -e "s|sed -i 's|sed -i '' 's|g" \
|
2019-08-05 16:59:25 +00:00
|
|
|
${WRKSRC}/src/fix-install-headers.sh
|
|
|
|
|
2019-08-01 15:20:28 +00:00
|
|
|
# make a relative symlink instead of absolute to build dir
|
|
|
|
post-install-JAVA-on:
|
|
|
|
@${LN} -sf CVC4-1.7.0.jar ${STAGEDIR}${PREFIX}/share/java/cvc4/CVC4.jar
|
|
|
|
|
2018-06-21 11:06:10 +00:00
|
|
|
.include <bsd.port.mk>
|