# $Id: Portfile 96498 2012-08-12 10:38:51Z mww@macports.org $

PortSystem 1.0

name                bc
version             1.06.95
revision            1
categories          math
maintainers         mww openmaintainer
license             GPL-2
description      arbitrary precision numeric processing language
long_description \
    bc is an arbitrary precision numeric processing language. \
    Syntax is similar to C, but differs in many substantial \
    areas. It supports interactive execution of statements. \
    bc is a utility included in the POSIX P1003.2/D11 draft \
    standard.
homepage            http://www.gnu.org/software/bc/
platforms           darwin
master_sites        http://alpha.gnu.org/gnu/bc/
use_bzip2           yes
checksums           rmd160  d58c2d7a1f4b7bfa910f26e5809f3169a6e0da76 \
                    sha256  7ee4abbcfac03d8a6e1a8a3440558a3d239d6b858585063e745c760957725ecc

installs_libs       no

configure.args      --infodir=${prefix}/share/info \
                    --mandir=${prefix}/share/man

post-destroot {
    file delete -force ${destroot}${prefix}/share/info/dir
}

variant libedit conflicts readline description {use libedit for command input editing} {
    depends_lib-append port:libedit
    configure.args-append --with-libedit
}

variant readline conflicts libedit description {use GNU readline for command input editing} {
    depends_lib-append port:readline
    configure.args-append --with-readline
}

if {![variant_isset libedit] && ![variant_isset readline]} {
    default_variants +libedit
}

livecheck.type      regex
livecheck.url       http://alpha.gnu.org/gnu/bc/
livecheck.regex     bc-(\[0-9\.\]+\[0-9\])\\.
