# -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4
# $Id: Portfile 66665 2010-04-19 15:06:22Z snc@macports.org $

PortSystem          1.0

name                sbsat
version             2.7b
revision            3
categories          science math
maintainers         snc
description         A state-based Satisfiability solver.
long_description    SBSAT is a software package used primarily for solving \
                    instances of a generalization of the well-known \
                    Satisﬁability problem.

homepage            http://www.cs.uc.edu/~weaversa/SBSAT.html
platforms           freebsd darwin

master_sites        http://www.cs.uc.edu/~weaversa/SBSAT_files/
checksums           md5    1491e7d79af20ce6bf138acd9a16dd41 \
                    sha1   08e9d0a447105fcd36518fab4653fcc8a0973ced \
                    rmd160 0ef8e2ee04d54b71fe837407ba3f771cca381636

variant jeremy description {Enable Jeremy's modifications} {
	depends_run     path:bin/python:python25

    patchfiles      patch-src-generator-Makefile.am.diff \
                    patch-src-generator-gentest.cc.diff \
                    patch-configure.ac.diff
    post-patch {
        file copy ${filespath}/slider3_base.py ${worksrcpath}/src/generator/
        reinplace s|@@PREFIX@@|${prefix}/bin| ${worksrcpath}/src/generator/gentest.cc
    }

    use_autoreconf      yes
}

configure.args      --enable-optimization

test.run            yes
test.target         check

livecheck.type      regex
livecheck.url       ${homepage}
livecheck.regex     "${name}-(\\d+\\.\\d+(b)?(\\.\\d+)?)${extract.suffix}"
