# -*- 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 101105 2013-01-04 12:18:38Z ryandesign@macports.org $

PortSystem          1.0

name                irsim
version             9.7.74
license             GPL-2
categories          science
maintainers         and.damore openmaintainer
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/
platforms           darwin

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

checksums           md5     46fbe2c9b9a7875162318a9ae69e4dd9 \
                    sha1    c903dcbe3462dabbfc3ef87e9a648d056a2a1ff1 \
                    rmd160  22002d4caf5e25689370c7dc000d2d3d5aa18b2b

extract.suffix      .tgz

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

patch.pre_args      -p1
patchfiles          patch-remove_sw.diff
platform darwin 12  {patchfiles-append  patch-macosx_define.diff}

build.env-append    LIBS="-L${prefix}/lib"
configure.args      --mandir=${prefix}/share/man

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}
