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

if {${subport} eq ${name}} {
    version         2017.10.03
    revision        1
    checksums       rmd160  6b3311ba759d418c302e8e2138163a0d933dc9bf \
                    sha256  2facf5e945cf253727bef9b8e2602767599ea77a6c0d8c5d91101764544fa09a \
                    size    795821

    conflicts       ${name}-devel
    livecheck.version [string map {. {}} ${version}]
    livecheck.regex ${name}-(\\d{8})[quotemeta ${extract.suffix}]
    distname        ${name}-${livecheck.version}
    patchfiles-append constfix.patch
}

subport ${name}-devel {
    version         2018.08.31
    revision        1
    checksums       rmd160  30c921399c1975fb2e6abe95e9a44209dca68d0e \
                    sha256  2ba7bc1e2bc1bc8d54c7b774711eccbbb578872d6c68a5170d6eb671e9fe10e1 \
                    size    798810

    conflicts       ${name}
    livecheck.version [string range [string map {. {}} ${version}] 4 end]
    livecheck.regex ${name}-dev-(\\d{4})[quotemeta ${extract.suffix}]
    distname        ${name}-dev-${livecheck.version}
}

categories          science
platforms           darwin
license             GPL-3+
maintainers         nomaintainer

description         GNU Circuit Analysis Package

long_description    Gnucap is the Gnu Circuit Analysis Package. The primary component is a \
                    general purpose circuit simulator. It performs nonlinear dc and \
                    transient analyses, fourier analysis, and ac analysis. It is fully \
                    interactive and command driven. It can also be run in batch mode or as \
                    a server. Spice compatible models for the MOSFET (level 1-7), BJT, and \
                    diode are included in this release.

homepage            http://gnucap.org
master_sites        http://git.savannah.gnu.org/cgit/gnucap.git/snapshot/

depends_lib         port:readline

patchfiles-append   fix-build-system.patch

if {[string match *clang* ${configure.cxx}] && ${configure.cxx_stdlib} ne ""} {
    configure.ldflags-append    -stdlib=${configure.cxx_stdlib}
}

build.target

livecheck.type      regex
livecheck.url       http://git.savannah.gnu.org/cgit/gnucap.git/refs/tags
