Ticket #11613: Portfile

File Portfile, 2.4 KB (added by takeshi@…, 17 years ago)
Line 
1PortSystem      1.0
2name            fftw3
3version         3.1.2
4categories      math
5platforms       darwin
6maintainers     takeshi@mac.com
7homepage        http://www.fftw.org/
8distname        fftw-${portversion}
9
10master_sites \
11        ${homepage} \
12        ftp://ftp.fftw.org/pub/fftw/ \
13        ftp://ftp.kusastro.kyoto-u.ac.jp/pub/src/GNU/fftw/
14
15description \
16        Fast C routines to compute the Discrete Fourier Transform
17
18long_description \
19        FFTW is a C subroutine library for computing the \
20        Discrete Fourier Transform (DFT) in one or more \
21        dimensions, of both real and complex data, and of \
22        arbitrary input size. We believe that FFTW, which is \
23        free software, should become the FFT library of choice \
24        for most applications. Our benchmarks, performed on a \
25        variety of platforms, show that FFTW's performance is \
26        typically superior to that of other publicly available \
27        FFT software. Moreover, FFTW's performance is portable: \
28        the program will perform well on most architectures \
29        without modification. \
30        This port is of fftw version 3.x. It has many \
31        improvements relative to 2.x, but is not backwardly \
32        compatible.
33
34checksums \
35        md5 08f2e21c9fd02f4be2bd53a62592afa4 \
36        sha1 3e4c64009ffb48123a0f30f46c1d89da7810dc67 \
37        rmd160 13069b3582eeaa1fba1614cdca2dfbc2e45ab585 \
38
39configure.args \
40        --enable-type-prefix \
41        --enable-threads \
42        --enable-fma \
43        --disable-fortran \
44        --mandir=${prefix}/share/man \
45        --infodir=${prefix}/share/info
46
47post-build {
48        cd ${worksrcpath}
49        system "make check"
50}
51
52variant fortran conflicts g95 {
53        depends_lib-append port:gcc40
54        configure.args-delete --disable-fortran
55        configure.args-append --enable-fortran=gfortran-dp-4.0
56}
57
58variant g95 conflicts fortran {
59        configure.env-append FC=${prefix}/bin/g95 \
60                             FLIBS="-L${prefix}/lib/libf95.a -lf95"
61        depends_lib-append port:g95
62        configure.args-delete --disable-fortran
63        configure.args-append --enable-fortran
64}
65
66post-destroot {
67        configure.args-append --enable-single
68        if {$os_arch == "i386"} {
69                configure.args-append --without-gcc-arch
70        } else {
71                configure.args-append --enable-altivec
72        }
73        system "cd ${worksrcpath}; make clean"
74        run_command configure
75        run_command build
76        cd ${worksrcpath}
77        system "make check"
78        system "make -j1 install prefix=${destroot}${prefix}"
79}
80
81proc run_command {cmd} {
82        if {[catch {system "[command $cmd]"} result]} {
83                return -code error "[format [msgcat::mc "%s failure: %s"] $cmd $result]"
84        }
85}
86