diff options
author | Steve Arnold <nerdboy@gentoo.org> | 2011-04-09 19:11:31 +0000 |
---|---|---|
committer | Steve Arnold <nerdboy@gentoo.org> | 2011-04-09 19:11:31 +0000 |
commit | 9c67f5e8d14ed41bc8d7cdffc1b55c2a460c9e66 (patch) | |
tree | d0cb4fea872ffb2e7a7870146127aa148a77dc57 /sci-mathematics/minisat | |
parent | version bump for security bug 362509 (diff) | |
download | gentoo-2-9c67f5e8d14ed41bc8d7cdffc1b55c2a460c9e66.tar.gz gentoo-2-9c67f5e8d14ed41bc8d7cdffc1b55c2a460c9e66.tar.bz2 gentoo-2-9c67f5e8d14ed41bc8d7cdffc1b55c2a460c9e66.zip |
New ebuild for minisat, a small fast SAT solver. Look it up... ;)
(Portage version: 2.1.9.45/cvs/Linux x86_64)
Diffstat (limited to 'sci-mathematics/minisat')
-rw-r--r-- | sci-mathematics/minisat/ChangeLog | 11 | ||||
-rw-r--r-- | sci-mathematics/minisat/metadata.xml | 13 | ||||
-rw-r--r-- | sci-mathematics/minisat/minisat-2.2.0.ebuild | 81 |
3 files changed, 105 insertions, 0 deletions
diff --git a/sci-mathematics/minisat/ChangeLog b/sci-mathematics/minisat/ChangeLog new file mode 100644 index 000000000000..368bd6753737 --- /dev/null +++ b/sci-mathematics/minisat/ChangeLog @@ -0,0 +1,11 @@ +# ChangeLog for sci-mathematics/minisat +# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/minisat/ChangeLog,v 1.1 2011/04/09 19:11:31 nerdboy Exp $ + +*minisat-2.2.0 (09 Apr 2011) + + 09 Apr 2011; Steve Arnold <nerdboy@gentoo.org> +minisat-2.2.0.ebuild, + +metadata.xml: + New ebuild for minisat, a small fast SAT solver (a tool for solving + the Boolean Satisfiability Problem used in model checking). + diff --git a/sci-mathematics/minisat/metadata.xml b/sci-mathematics/minisat/metadata.xml new file mode 100644 index 000000000000..1c6eb08a7b39 --- /dev/null +++ b/sci-mathematics/minisat/metadata.xml @@ -0,0 +1,13 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<herd>sci</herd> +<maintainer> +<email>nerdboy@gentoo.org</email> +</maintainer> +<use> +<flag name="extended-solver">Build extended version of SAT solver with + additional features.</flag> +<flag name="prof">Build with profiling enabled.</flag> +</use> +</pkgmetadata> diff --git a/sci-mathematics/minisat/minisat-2.2.0.ebuild b/sci-mathematics/minisat/minisat-2.2.0.ebuild new file mode 100644 index 000000000000..66e3421bac68 --- /dev/null +++ b/sci-mathematics/minisat/minisat-2.2.0.ebuild @@ -0,0 +1,81 @@ +# Copyright 1999-2011 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sci-mathematics/minisat/minisat-2.2.0.ebuild,v 1.1 2011/04/09 19:11:31 nerdboy Exp $ + +EAPI="3" + +inherit eutils toolchain-funcs + +DESCRIPTION="Small yet efficient SAT solver with reference paper." +HOMEPAGE="http://minisat.se/Main.html" +SRC_URI="http://minisat.se/downloads/${P}.tar.gz + doc? ( http://minisat.se/downloads/MiniSat.pdf )" + +SLOT="0" +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux" +LICENSE="MIT" + +IUSE="debug doc extended-solver prof" + +DEPEND="sys-libs/zlib" +RDEPEND="${DEPEND}" + +S="${WORKDIR}/${PN}" + +src_configure() { + if use debug; then + myconf="d" + elif use prof; then + myconf="p" + else + myconf="r" + fi + + sed -i -e "s|-O3|${CFLAGS} ${LDFLAGS}|" mtl/template.mk +} + +src_compile() { + tc-export CXX + export MROOT="${S}" + + if use extended-solver; then + cd simp + else + cd core + fi + + gmake "$myconf" || die "make failed" + LIB="${PN}" gmake lib"$myconf" || die "make lib failed" + cd "${S}" +} + +src_install() { + insinto /usr/include + doins utils/Options.h utils/System.h core/Solver.h core/SolverTypes.h + + # somewhat brute-force, but so is the build setup... + if use extended-solver; then + cd simp + doins SimpSolver.h + else + cd core + fi + + if use debug; then + newbin ${PN}_debug ${PN} || die + newlib.a lib${PN}_debug.a lib${PN}.a || die + elif use prof; then + newbin ${PN}_profile ${PN} || die + newlib.a lib${PN}_profile.a lib${PN}.a || die + else + newbin ${PN}_release ${PN} || die + newlib.a lib${PN}_release.a lib${PN}.a || die + fi + cd "${S}" + + dodoc README doc/ReleaseNotes-2.2.0.txt + if use doc; then + insinto /usr/share/doc/${PF} + doins "${DISTDIR}"/MiniSat.pdf + fi +} |