# -*- 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 90333 2012-03-02 15:21:39Z ryandesign@macports.org $

PortSystem          1.0

name                f2c
version             20110816
categories          lang
platforms           darwin
maintainers         ryandesign

description         Fortran to C converter

long_description    ${name} is a ${description}.

homepage            http://www.netlib.org/f2c/
master_sites        http://www.ryandesign.com/macports/distfiles/${name}
use_bzip2           yes

checksums           rmd160  c984a9bfe6d0f5da6e4325c80b6880af733591d8 \
                    sha256  418dc57b98598c8a538931f2704ec30ff7bf78aaa395bb3820f8e4530cf88409

depends_run         port:libf2c

post-extract {
    # For case-sensitive filesystems. When building the next version of the
    # archive, I should ensure it contains README not readme, since readme is
    # never used (?) but README is.
    if {![file exists ${worksrcpath}/README]} {
        ln -s readme ${worksrcpath}/README
    }
}

use_configure       no

variant universal {}

build.args          -f makefile.u \
                    CC="${configure.cc} [get_canonical_archflags cc]" \
                    CFLAGS="${configure.cflags}"

destroot {
    xinstall ${worksrcpath}/f2c ${destroot}${prefix}/bin
    xinstall -m 644 ${worksrcpath}/f2c.1t ${destroot}${prefix}/share/man/man1/f2c.1
}

livecheck.type      none
