# -*- 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
PortGroup           github 1.0
PortGroup           legacysupport 1.1
PortGroup           makefile 1.0

# strndup
legacysupport.newest_darwin_requires_legacy 10

github.setup        CodethinkLabs ofc f6cd87db13f13187c3be0df9d26951c4ec053874
version             2023.11.29
revision            0
categories          lang fortran
license             Apache-2
maintainers         nomaintainer
description         Open Fortran Compiler
long_description    Currently OFC is a Fortran front-end capable of parsing and performing semantic analysis \
                    on Fortran. We’re targeting legacy Fortran first, and can currently parse and semantically analyse \
                    most F77 and earlier, providing syntax and semantic warnings and errors.
checksums           rmd160  7e312e124366eea3cc75d48545d01941b6d88d55 \
                    sha256  ad1fc4ccfb749cb3e4be4e369de60b8630dc54bbe96792ce7f07e87d08660d22 \
                    size    199336
github.tarball_from archive
installs_libs       no

compiler.blacklist  *gcc-4.* {clang < 421}

post-patch {
    reinplace "s|/usr/local|${prefix}|" ${worksrcpath}/Makefile

    if {${os.platform} eq "darwin" && ${os.major} < 11} {
        reinplace "s|LDFLAGS = -lm|LDFLAGS = -lm -lMacportsLegacySupport|" ${worksrcpath}/Makefile
    }
}
