diff options
author | Mark Wright <gienah@gentoo.org> | 2012-05-30 00:51:22 +0000 |
---|---|---|
committer | Mark Wright <gienah@gentoo.org> | 2012-05-30 00:51:22 +0000 |
commit | e94320903bdb9f2408adc5bde37a36e4dbf787f5 (patch) | |
tree | df2a31d052c2755d34dd04085918f46ad940a6ee /sci-mathematics/cvc3 | |
parent | keyword ~x86-fbsd (diff) | |
download | gentoo-2-e94320903bdb9f2408adc5bde37a36e4dbf787f5.tar.gz gentoo-2-e94320903bdb9f2408adc5bde37a36e4dbf787f5.tar.bz2 gentoo-2-e94320903bdb9f2408adc5bde37a36e4dbf787f5.zip |
Add CVC3 automatic theorem prover, with optional Isabelle/HOL integration.
(Portage version: 2.1.10.63/cvs/Linux x86_64)
Diffstat (limited to 'sci-mathematics/cvc3')
-rw-r--r-- | sci-mathematics/cvc3/ChangeLog | 10 | ||||
-rw-r--r-- | sci-mathematics/cvc3/cvc3-2.4.1.ebuild | 146 | ||||
-rw-r--r-- | sci-mathematics/cvc3/files/50cvc3-gentoo.el | 5 | ||||
-rw-r--r-- | sci-mathematics/cvc3/metadata.xml | 40 |
4 files changed, 201 insertions, 0 deletions
diff --git a/sci-mathematics/cvc3/ChangeLog b/sci-mathematics/cvc3/ChangeLog new file mode 100644 index 000000000000..236286228415 --- /dev/null +++ b/sci-mathematics/cvc3/ChangeLog @@ -0,0 +1,10 @@ +# ChangeLog for sci-mathematics/cvc3 +# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/cvc3/ChangeLog,v 1.1 2012/05/30 00:51:22 gienah Exp $ + +*cvc3-2.4.1 (30 May 2012) + + 30 May 2012; Mark Wright <gienah@gentoo.org> +cvc3-2.4.1.ebuild, + +files/50cvc3-gentoo.el, +metadata.xml: + Add CVC3 automatic theorem prover, with optional Isabelle/HOL integration. + diff --git a/sci-mathematics/cvc3/cvc3-2.4.1.ebuild b/sci-mathematics/cvc3/cvc3-2.4.1.ebuild new file mode 100644 index 000000000000..8a53f5932de7 --- /dev/null +++ b/sci-mathematics/cvc3/cvc3-2.4.1.ebuild @@ -0,0 +1,146 @@ +# Copyright 1999-2012 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/cvc3/cvc3-2.4.1.ebuild,v 1.1 2012/05/30 00:51:22 gienah Exp $ + +EAPI="4" + +inherit elisp-common + +DESCRIPTION="CVC3 is an automatic theorem prover for Satisfiability Modulo Theories (SMT) problems" +HOMEPAGE="http://www.cs.nyu.edu/acsys/cvc3/index.html" +SRC_URI="http://www.cs.nyu.edu/acsys/cvc3/releases/2.4.1/${P}.tar.gz" + +LICENSE="CVC3" +SLOT="0" +KEYWORDS="~x86 ~amd64" +IUSE="doc emacs isabelle static-libs zchaff" + +RDEPEND="" +DEPEND="${RDEPEND} + >=dev-libs/gmp-5[static-libs?] + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) + emacs? ( + virtual/emacs + ) + isabelle? ( + >=sci-mathematics/isabelle-2011.1-r1 + )" + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + sed -e 's/prefix=@prefix@/prefix=${DESTDIR}@prefix/' \ + -e 's/libdir=@libdir@/libdir=${DESTDIR}@libdir/' \ + -e 's/mandir=@mandir@/mandir=${DESTDIR}@mandir@/' \ + -i "${S}/Makefile.local.in" \ + || die "Could not set DESTDIR in Makefile.local.in" +} + +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_enable zchaff) + + if use test; then + sed -e 's@LD_LIBS = @LD_LIBS = -L'"${S}"'/lib -Wl,-R'"${S}"'/lib @' \ + -i "${S}/test/Makefile" \ + || die "Could not set library paths in test/Makefile" + fi +} + +src_compile() { + emake + + if use doc; then + pushd doc || die "Could not cd to doc" + emake + popd + fi + + if use emacs ; then + pushd "${S}/emacs" || die "Could change directory to emacs" + elisp-compile *.el || die "emacs elisp compile failed" + popd + fi + + if use test; then + pushd test || die "Could not cd to test" + emake + popd + fi +} + +src_test() { + pushd test || die "Could not cd to test" + ./bin/test || die "tests failed" + popd +} + +src_install() { + emake DESTDIR="${D}" install + + if use doc; then + pushd "${S}"/doc/html || die "Could not cd to doc/html" + dohtml *.html + insinto /usr/share/doc/${PF}/html + doins *.css *.gif *.png + popd + fi + + if use emacs ; then + elisp-install ${PN} emacs/*.{el,elc} + cp "${FILESDIR}"/${SITEFILE} "${S}" + elisp-site-file-install ${SITEFILE} + fi + + if use isabelle; then + ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \ + || die "isabelle getenv ISABELLE_HOME failed" + if [[ -z "${ISABELLE_HOME}" ]]; then + die "ISABELLE_HOME empty" + fi + dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc" + cat <<- EOF >> "${S}/settings" + CVC3_COMPONENT="\$COMPONENT" + CVC3_HOME="${ROOT}usr/bin" + CVC3_SOLVER="\$CVC3_HOME/cvc3" + CVC3_REMOTE_SOLVER="cvc3" + CVC3_INSTALLED="yes" + EOF + insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc" + doins "${S}/settings" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen + if use isabelle; then + if [ -f "${ROOT}etc/isabelle/components" ]; then + if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then + sed -e "/contrib\/${PN}-[0-9.]*/d" \ + -i "${ROOT}etc/isabelle/components" + fi + cat <<- EOF >> "${ROOT}etc/isabelle/components" + contrib/${PN}-${PV} + EOF + fi + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen + if use isabelle; then + if [ ! -f "${ROOT}usr/bin/cvc3" ]; then + if [ -f "${ROOT}etc/isabelle/components" ]; then + # Note: this sed should only match the version of this ebuild + # Which is what we want as we do not want to remove the line + # of a new E being installed during an upgrade. + sed -e "/contrib\/${PN}-${PV}/d" \ + -i "${ROOT}etc/isabelle/components" + fi + fi + fi +} diff --git a/sci-mathematics/cvc3/files/50cvc3-gentoo.el b/sci-mathematics/cvc3/files/50cvc3-gentoo.el new file mode 100644 index 000000000000..2c8b4011acbd --- /dev/null +++ b/sci-mathematics/cvc3/files/50cvc3-gentoo.el @@ -0,0 +1,5 @@ +;;; teyjus site-lisp configuration + +(add-to-list 'load-path "@SITELISP@") +(add-to-list 'auto-mode-alist '("\\.cvc\\'" . cvc-mode)) +(autoload 'cvc-mode "cvc-mode" "CVC specifications editing mode." t) diff --git a/sci-mathematics/cvc3/metadata.xml b/sci-mathematics/cvc3/metadata.xml new file mode 100644 index 000000000000..db25562598fb --- /dev/null +++ b/sci-mathematics/cvc3/metadata.xml @@ -0,0 +1,40 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer> + <email>gienah@gentoo.org></email> +</maintainer> +<herd>sci-mathematics</herd> +<longdescription lang='en'> +CVC3 is an 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. + +CVC3 is the last offspring of a series of popular SMT provers, which +originated at Stanford University with the SVC system. In particular, +it builds on the code base of CVC Lite, its most recent +predecessor. Its high level design follows that of the Sammy prover. + +CVC3 works with a version of first-order logic with polymorphic types +and has a wide variety of features including: + + several built-in base theories: rational and integer linear + arithmetic, arrays, tuples, records, inductive data types, bit + vectors, and equality over uninterpreted function symbols; + support for quantifiers; + an interactive text-based interface; + a rich C and C++ API for embedding in other systems; + proof and model generation abilities; + predicate subtyping; + essentially no limit on its use for research or commercial + purposes (see license). +</longdescription> +<use> + <flag name='isabelle'>Add integration support for the Isabelle/HOL + theorem prover.</flag> + <flag name='zchaff'>Use the SAT solver zchaff whose copyright is + owned by Princeton University and is more restrictive (see license). + </flag> +</use> +</pkgmetadata> |