# $Id: Portfile 90829 2012-03-15 05:49:54Z jmr@macports.org $

PortSystem              1.0

name                    ftidy
version                 7.2
categories              lang
platforms               darwin
maintainers             nomaintainer
homepage                http://www.unb.ca/fredericton/science/chem/ajit/tidy/
master_sites            ${homepage}
distname                tidy72sc
use_zip                 yes
extract.mkdir           yes
build.args              tidy.for -o ftidy
use_configure           no
universal_variant       no
description             Fortran Tidy

long_description \
    TIDY v${version} (ftidy) is a highly configurable FORTRAN program \
    to indent and renumber statements, selectively change case \
    of keywords or non-keywords, and do various other clean-up \
    tasks on FORTRAN-77 source programs.

checksums \
    md5 f940dfa793408368f92af6aab535619b \
    sha1 200e4531f172355cde49c455e2f7e9df8f1f8404

patchfiles              tidy.for.patch

if { ![variant_isset gcc42] && ![variant_isset gcc43] && ![variant_isset gcc44] } {
    default_variants    +gcc45
}

variant gcc42 conflicts gcc43 gcc44 gcc45 description {Build using gcc42} {
    depends_build   port:gcc42
    configure.compiler  macports-gcc-4.2
}

variant gcc43 conflicts gcc42 gcc44 gcc45 description {Build using gcc43} {
    depends_build   port:gcc43
    configure.compiler  macports-gcc-4.3
}

variant gcc44 conflicts gcc42 gcc43 gcc45 description {Build using gcc44} {
    depends_build   port:gcc44
    configure.compiler  macports-gcc-4.4
}

variant gcc45 conflicts gcc42 gcc43 gcc44 description {Build using gcc45} {
    depends_build   port:gcc45
    configure.compiler  macports-gcc-4.5
}

build.pre_args        ${configure.fflags} ${configure.f77_archflags}
pre-build {
    build.cmd         ${configure.f77}
}

destroot {
    xinstall -m 755 -W ${worksrcpath} ftidy ${destroot}${prefix}/bin
}
