# -*- 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$ PortSystem 1.0 PortGroup compilers 1.0 name gsl version 2.1 categories math science maintainers dtakahashi openmaintainer license GPL-3+ homepage http://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 checksums rmd160 4ccf5425d54c2b0ef76db97f5960563a4bf0e311 \ sha256 59ad06837397617f698975c494fe7b2b698739a59e2fcf830b776428938a0c66 platforms darwin depends_build port:texinfo use_parallel_build yes configure.args --mandir=${prefix}/share/man --infodir=${prefix}/share/info test.run yes test.target check post-activate { system "install-info ${prefix}/share/info/gsl-ref.info ${prefix}/share/info/dir" } compilers.choose cc compilers.setup -dragonegg variant doc description "Install PDF and HTML documentation" { depends_build port:ghostscript bin:latex:texlive post-build { system -W ${worksrcpath} "make dvi" system -W ${worksrcpath}/doc "dvipdf gsl-ref.dvi gsl-ref.pdf" system -W ${worksrcpath}/doc "latex fftalgorithms" system -W ${worksrcpath}/doc "bibtex fftalgorithms" system -W ${worksrcpath}/doc "latex fftalgorithms" system -W ${worksrcpath}/doc "latex fftalgorithms" system -W ${worksrcpath}/doc "dvipdf fftalgorithms.dvi fftalgorithms.pdf" system -W ${worksrcpath} "make html" } post-destroot { xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name} xinstall -c -m 644 ${worksrcpath}/doc/gsl-ref.pdf ${destroot}${prefix}/share/doc/${name} xinstall -c -m 644 ${worksrcpath}/doc/fftalgorithms.pdf ${destroot}${prefix}/share/doc/${name} xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/html eval xinstall -c -m 644 [glob ${worksrcpath}/doc/gsl-ref.html/*] ${destroot}${prefix}/share/doc/${name}/html } } 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 http://ftp.gnu.org/gnu/gsl/ livecheck.regex ${name}-(\[\\d.\]+)${extract.suffix}