# $Id: Portfile 88230 2011-12-22 13:22:05Z ryandesign@macports.org $

PortSystem 1.0

name                minisat
version             2.2.0
categories          math science
platforms           darwin
maintainers         mww openmaintainer
homepage            http://minisat.se/
license             MIT
description         Minimalistic SAT solver
long_description    MiniSat is a minimalistic, open-source SAT solver, \
                    developed to help researchers and developers alike to get \
                    started on SAT.

master_sites        http://minisat.se/downloads/
patchfiles          patch-mtl-template.mk.diff patch-utils-System.cc.diff patch-simp-Makefile.diff

checksums           md5     99a2eaabe528cd366100e4bc0327d22e \
                    sha1    dfc25898bf40e00cf04252a42176e0c0600fbc90 \
                    rmd160  169ec9116befa9067db9076d26309f7e9ab408dd

depends_lib         port:zlib

worksrcdir          minisat

post-extract {
    xinstall -m 755 ${filespath}/configure ${worksrcpath}/simp
}

configure.dir        ${worksrcpath}/simp

build.target         rs
build.args           MROOT="${worksrcpath}"
build.dir            ${configure.dir}

destroot {
    xinstall -m 755 -d ${destroot}${prefix}/bin \
        ${destroot}${prefix}/share/doc/${name}
    xinstall -m 755 ${worksrcpath}/simp/minisat_static ${destroot}${prefix}/bin/minisat
    xinstall -m 644 -W ${worksrcpath} README LICENSE doc/ReleaseNotes-${version}.txt \
        ${destroot}${prefix}/share/doc/${name}
}

livecheck.type       regex
livecheck.url        http://minisat.se/downloads/
livecheck.regex      minisat-(\[0-9\.\]+).tar.gz
