# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 90797 2012-03-14 19:20:39Z snc@macports.org $

PortSystem          1.0

name                sbsat
version             2.7b
revision            3
categories          science math
maintainers         snc
license             Permissive
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           rmd160 0ef8e2ee04d54b71fe837407ba3f771cca381636 \
                    sha256  deeddec6495a8065c28f4bf29823d5e8b702688e61e777cc281cead3881b1f52

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}"
