source: trunk/dports/math/gsl/Portfile

Last change on this file was 143478, checked in by mcalhoun@…, 2 years ago

gsl: update version 2.0->2.1

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.7 KB
Line 
1# -*- 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
2# $Id: Portfile 143478 2015-12-13 13:47:58Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           compilers 1.0
6
7name                gsl
8version             2.1
9categories          math science
10maintainers         dtakahashi openmaintainer
11license             GPL-3+
12homepage            http://www.gnu.org/software/gsl
13description         A numerical library for C and C++ programmers
14long_description    The GNU Scientific Library (GSL) is a numerical library  \
15                    for C and C++ programmers.  It is free software under the \
16                    GNU General Public License.  \
17                    \
18                    The library provides a wide range of mathematical routines \
19                    such as random number generators, special functions and \
20                    least-squares fitting. There are over 1000 functions in total.
21
22master_sites        gnu
23checksums           rmd160  4ccf5425d54c2b0ef76db97f5960563a4bf0e311 \
24                    sha256  59ad06837397617f698975c494fe7b2b698739a59e2fcf830b776428938a0c66
25
26platforms           darwin
27
28depends_build       port:texinfo
29use_parallel_build  yes
30
31configure.args      --mandir=${prefix}/share/man --infodir=${prefix}/share/info
32test.run            yes
33test.target         check
34
35post-activate    {
36    system "install-info ${prefix}/share/info/gsl-ref.info ${prefix}/share/info/dir"
37}
38
39compilers.choose    cc
40compilers.setup     -dragonegg
41
42variant doc description "Install PDF and HTML documentation" {
43    depends_build   port:ghostscript bin:latex:texlive
44    post-build      {
45        system -W ${worksrcpath}     "make dvi"
46        system -W ${worksrcpath}/doc "dvipdf gsl-ref.dvi gsl-ref.pdf"
47        system -W ${worksrcpath}/doc "latex fftalgorithms"
48        system -W ${worksrcpath}/doc "bibtex fftalgorithms"
49        system -W ${worksrcpath}/doc "latex fftalgorithms"
50        system -W ${worksrcpath}/doc "latex fftalgorithms"
51        system -W ${worksrcpath}/doc "dvipdf fftalgorithms.dvi fftalgorithms.pdf"
52        system -W ${worksrcpath}     "make html"
53    }
54    post-destroot   {
55        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}
56        xinstall -c -m 644 ${worksrcpath}/doc/gsl-ref.pdf ${destroot}${prefix}/share/doc/${name}
57        xinstall -c -m 644 ${worksrcpath}/doc/fftalgorithms.pdf ${destroot}${prefix}/share/doc/${name}
58        xinstall -d -m 755 ${destroot}${prefix}/share/doc/${name}/html
59        eval xinstall -c -m 644 [glob ${worksrcpath}/doc/gsl-ref.html/*] ${destroot}${prefix}/share/doc/${name}/html
60    }
61}
62
63variant optimize description "Provide further optimization options (depending on compiler used)" {
64    configure.optflags-append   -O3
65}
66
67platform darwin i386 {
68    if { [variant_isset optimize] } {
69        if { [clang_variant_isset] } {
70            configure.optflags  -march=native
71        } elseif { [gcc_variant_isset] } {
72            configure.optflags  -ftree-vectorize -march=native -mno-avx
73            if { ! ([variant_isset gcc44] ||
74                    [variant_isset gcc45] ||
75                    [variant_isset gcc46]) } {
76                ## Haswell's new instruction sets need to be disabled,
77                ## because these instructions are not recognized by
78                ## cctools' assembler
79                configure.optflags-append -mno-avx2 -mno-bmi -mno-bmi2
80            }
81        } else {
82            #Default compiler. Check if the compiler supports "native" architecture
83            if { [string match "clang" ${configure.cc}] } {
84                configure.optflags  -march=native
85            }
86        }
87    }
88}
89
90livecheck.type  regex
91livecheck.url   http://ftp.gnu.org/gnu/gsl/
92livecheck.regex ${name}-(\[\\d.\]+)${extract.suffix}
Note: See TracBrowser for help on using the repository browser.