# -*- 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           compilers 1.0
PortGroup           github 1.0

github.setup        reinh-bader fgsl 1.6.0 v
github.tarball_from archive
revision            0
categories          math science
maintainers         {takeshi @tenomoto} \
                    {@Dave-Allured noaa.gov:dave.allured} \
                    openmaintainer
license             GPL-2

description         Fortran interface to the GNU scientific library
long_description    A portable, object-based Fortran interface to the GNU scientific library \
                    (GSL), a collection of numerical routines for scientific computing. \
                    Version 1.6.x is for use with GSL versions >= 2.7. \
                    Source: https://github.com/reinh-bader/fgsl

homepage            https://doku.lrz.de/fgsl-a-fortran-interface-to-the-gnu-scientific-library-10746505.html

checksums           rmd160  40befdf134c677e75e42e54bb68beee6a58c677b \
                    sha256  8b6a02912b917e4544fed655b8e925c9b7160a063df57afcb35f064f351f1434 \
                    size    10755695

depends_build       port:pkgconfig
depends_lib         port:gsl
use_parallel_build  no
universal_variant   no

# Fix 10.7 build.
# Copied from https://github.com/macports/macports-ports/pull/17193
# https://github.com/william-dawson/NTPoly/issues/192
compiler.blacklist-append \
                    {clang < 500}

compilers.choose    fc f77 f90
compilers.setup     require_fortran -g95

use_autoreconf      yes

destroot.args-append    fgsl_exampledir=${prefix}/share/${name}/examples \
                        fgsl_docdir=${prefix}/share/doc/${name} \
                        fgsl_doc2dir=${prefix}/share/doc/${name}/html
