# -*- 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 gnu_info 1.0 name gsl version 2.7.1 revision 1 checksums rmd160 436aeb0fee5d47a25d0d095c7128b13b22ed7c3e \ sha256 dcb0fbd43048832b757ff9942691a8dd70026d5da0ff85601e52687f6deeb34b \ size 7509209 categories math science maintainers {dtakahashi @daitakahashi} openmaintainer license GPL-3+ homepage https://www.gnu.org/software/gsl description A numerical library for C and C++ programmers long_description The GNU Scientific Library (GSL) is a numerical library \ for C and C++ programmers. It is free software under the \ GNU General Public License. \ \ The library provides a wide range of mathematical routines \ such as random number generators, special functions and \ least-squares fitting. There are over 1000 functions in \ total. master_sites gnu patchfiles-append dynamic_lookup-11.patch configure.args --infodir=${prefix}/share/info \ --mandir=${prefix}/share/man test.run yes test.target check gnu_info.name gsl-ref compilers.choose cc compilers.setup set python_version 3.9 set python_ver_no_dot [string map {. {}} ${python_version}] variant doc description {Build documentation} { depends_build port:ghostscript \ bin:latexmk:latexmk \ bin:latex:texlive \ port:texlive-latex-extra \ port:py${python_ver_no_dot}-sphinx \ port:py${python_ver_no_dot}-sphinx_rtd_theme \ port:py${python_ver_no_dot}-sphinxcontrib-websupport patchfiles-append \ patch-python_version.diff post-patch { reinplace "s|__MACPORTS_SPHINX_BUILD__|sphinx-build-${python_version}|g" ${worksrcpath}/doc/Makefile.in } post-build { system -W ${worksrcpath}/doc "make latexpdf" system -W ${worksrcpath}/doc "make html" } post-destroot { xinstall -d ${destroot}${prefix}/share/doc/${name} xinstall -c -m 0644 ${worksrcpath}/doc/_build/latex/gsl-ref.pdf ${destroot}${prefix}/share/doc/${name} copy ${worksrcpath}/doc/_build/html ${destroot}${prefix}/share/doc/${name}/ } } variant optimize description "Provide further optimization options (depending on compiler used)" { configure.optflags-append -O3 } platform darwin i386 { if { [variant_isset optimize] } { if { [clang_variant_isset] } { configure.optflags -march=native } elseif { [gcc_variant_isset] } { configure.optflags -ftree-vectorize -march=native -mno-avx if { ! ([variant_isset gcc44] || [variant_isset gcc45] || [variant_isset gcc46]) } { ## Haswell's new instruction sets need to be disabled, ## because these instructions are not recognized by ## cctools' assembler configure.optflags-append -mno-avx2 -mno-bmi -mno-bmi2 } } else { #Default compiler. Check if the compiler supports "native" architecture if { [string match "clang" ${configure.cc}] } { configure.optflags -march=native } } } } livecheck.type regex livecheck.url https://ftp.gnu.org/gnu/gsl/ livecheck.regex ${name}-(\[\\d.\]+)${extract.suffix}