# -*- 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                scalc
version             1.15
revision            1
categories          math
platforms           darwin
license             GPL-2
maintainers         nomaintainer

description         tool for simple integer calculations or for converting numbers

long_description    The calc command may be used to do simple integer \
                    calculations or to convert numbers from one radix to \
                    another.

homepage            http://www.fokus.fraunhofer.de/research/cc/berlios/employees/joerg.schilling/private/
master_sites        ftp://ftp.berlios.de/pub/calc/
distname            calc-${version}

checksums           md5     f2a89c26bf52078b156af79897d8556a

depends_build       port:smake

patchfiles          patch-RULES_rules.prg.diff \
                    patch-getline.diff

use_configure       no

# smake does not support the -j flag
build.jobs          -1

build.cmd           ${prefix}/bin/smake

destroot.destdir    INS_BASE=${destroot}${prefix} \
                    MANDIR=share/man

post-destroot {
    delete ${destroot}${prefix}/lib ${destroot}${prefix}/include \
        ${destroot}${prefix}/share/man/man5
    move ${destroot}${prefix}/bin/calc ${destroot}${prefix}/bin/${name}
    move ${destroot}${prefix}/share/man/man1/calc.1 \
        ${destroot}${prefix}/share/man/man1/${name}.1
}
