# -*- 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

PortSystem          1.0

name                irsim
version             9.7.117
license             GPL-2
categories          science
maintainers         nomaintainer
description         IRSIM, a switch level simulator for digital circuits
long_description    IRSIM is switch level simulator for digital circuits, it treats \
                    transistors as ideal switches. Extracted capacitance and lumped \
                    resistance values are used to make the switch a little bit more \
                    realistic than the ideal, using the RC time constants to predict \
                    the relative timing of events.

homepage            http://opencircuitdesign.com/irsim

master_sites        http://opencircuitdesign.com/irsim/archive

checksums           rmd160  afc4e01b493754b6ccfdceaf6464055d5e2eb812 \
                    sha256  5938a832cf5a33963bba4fbadb93a6fb345c906528811848fc155be645353b73 \
                    size    482019

extract.suffix      .tgz

depends_lib         port:tcl \
                    port:tk \
                    port:xorg-libXt

patchfiles          patch-remove_sw.diff \
                    patch-fix-archflags.diff \
                    patch-fix-includes.diff

post-patch {
    reinplace "s|@ARCHFLAGS@|[get_canonical_archflags cc]|g" ${worksrcpath}/configure
}

build.env-append    LIBS=-L${prefix}/lib

post-destroot {
    xinstall -d -m 755 ${destroot}${prefix}/share/doc
    file rename ${destroot}${prefix}/lib/${name}/doc ${destroot}${prefix}/share/doc/${name}
    xinstall -m 644 -W ${worksrcpath} COPYRIGHT README VERSION ${destroot}${prefix}/share/doc/${name}
}

livecheck.type      regex
livecheck.url       ${homepage}download.html
livecheck.regex     ${name}-(\[0-9.\]+)${extract.suffix}
