1 | # -*- coding: utf-8; mode: tcl; tab-width: 4; truncate-lines: t; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 57624 2009-09-14 07:10:35Z jochen@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name gsl |
---|
7 | version 1.13 |
---|
8 | categories math science |
---|
9 | maintainers openmaintainer jochen |
---|
10 | homepage http://www.gnu.org/software/gsl |
---|
11 | description A numerical library for C and C++ programmers |
---|
12 | long_description The GNU Scientific Library (GSL) is a numerical library \ |
---|
13 | for C and C++ programmers. It is free software under the \ |
---|
14 | GNU General Public License. \ |
---|
15 | \ |
---|
16 | The library provides a wide range of mathematical routines \ |
---|
17 | such as random number generators, special functions and \ |
---|
18 | least-squares fitting. There are over 1000 functions in total. |
---|
19 | |
---|
20 | master_sites gnu |
---|
21 | checksums md5 d9fcfa367c44ab68a25b4edf34c3c5f7 \ |
---|
22 | sha1 02db78b9583bc7b2a577da6f45f5dd9f23ef737e \ |
---|
23 | rmd160 f71507181ace425df0977a13946f12cae4b65783 |
---|
24 | |
---|
25 | platforms darwin |
---|
26 | # Lower optimization level (-O1) is required to avoid code generation |
---|
27 | # bugs in Apple's gcc 3.3 and earlier. |
---|
28 | platform darwin 7 { |
---|
29 | configure.cflags-append "-O1" |
---|
30 | } |
---|
31 | |
---|
32 | depends_build port:texinfo |
---|
33 | use_parallel_build yes |
---|
34 | |
---|
35 | configure.args --mandir=${prefix}/share/man --infodir=${prefix}/share/info |
---|
36 | test.run yes |
---|
37 | test.target check |
---|
38 | |
---|
39 | post-activate { |
---|
40 | system "install-info ${destroot}${prefix}/share/info/gsl-ref.info ${prefix}/share/info/dir" |
---|
41 | } |
---|
42 | |
---|
43 | variant 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 | |
---|
62 | variant gcc43 conflicts gcc44 description "Use GCC 4.3 for compilation of GSL - optimized for host machine" { |
---|
63 | depends_build-append port:gcc43 |
---|
64 | configure.compiler macports-gcc-4.3 |
---|
65 | configure.cflags-append "-ftree-vectorize -O3" |
---|
66 | } |
---|
67 | |
---|
68 | variant gcc44 conflicts gcc43 description "Use GCC 4.4 for compilation of GSL - optimized for host machine (unsupported)" { |
---|
69 | depends_build-append port:gcc44 |
---|
70 | configure.compiler macports-gcc-4.4 |
---|
71 | configure.cflags-append "-ftree-vectorize -O3" |
---|
72 | } |
---|
73 | |
---|
74 | platform i386 { |
---|
75 | if {[variant_isset gcc43] || [variant_isset gcc44]} { |
---|
76 | configure.cflags-append "-march=native" |
---|
77 | } |
---|
78 | } |
---|