source: trunk/dports/math/gsl/Portfile @ 137982

Last change on this file since 137982 was 137982, checked in by larryv@…, 4 years ago

gsl, gsl-devel: Remove conflict

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