source: trunk/dports/math/fftw-3/Portfile @ 97763

Last change on this file since 97763 was 97763, checked in by jeremyhu@…, 8 years ago

Revbump everything which could've been built with gcc44 or gcc45. Remove gcc42 variants since gcc42 only builds on Tiger (#33919).

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 9.2 KB
Line 
1# $Id: Portfile 97763 2012-09-14 18:56:08Z jeremyhu@macports.org $
2
3PortSystem      1.0
4PortGroup       muniversal 1.0
5
6name            fftw-3
7version         3.3.2
8revision        1
9categories      math
10license         GPL-2+
11platforms       darwin
12maintainers     ram openmaintainer
13homepage        http://www.fftw.org/
14distname        fftw-${version}
15
16master_sites \
17    ${homepage} \
18    ftp://ftp.fftw.org/pub/fftw/ \
19    ftp://ftp.kusastro.kyoto-u.ac.jp/pub/src/GNU/fftw/
20
21description \
22    Fast C routines to compute the Discrete Fourier Transform
23
24long_description \
25    FFTW is a C subroutine library for computing the \
26    Discrete Fourier Transform (DFT) in one or more \
27    dimensions, of both real and complex data, and of \
28    arbitrary input size. We believe that FFTW, which is \
29    free software, should become the FFT library of choice \
30    for most applications. Our benchmarks, performed on a \
31    variety of platforms, show that FFTW's performance is \
32    typically superior to that of other publicly available \
33    FFT software. Moreover, FFTW's performance is portable: \
34    the program will perform well on most architectures \
35    without modification. \
36    This port is of fftw version 3.x. It has many \
37    improvements relative to 2.x, but is not backwardly \
38    compatible.
39
40checksums \
41    rmd160 dbf87fcb7812024b80744335d433ade53bad8a4f \
42    sha256 b1236a780ca6e66fc5f8eda6ef0665d680e8253d9f01d7bf211b714a50032d01
43
44configure.args \
45    --enable-threads \
46    --disable-fortran \
47    --enable-shared
48
49configure.cflags-append \
50    -fno-common \
51    -O3 \
52    -fomit-frame-pointer \
53    -fstrict-aliasing
54
55array set merger_configure_args {
56    ppc    "--enable-fma"
57    ppc64  "--enable-fma"
58    i386   "--enable-sse2"
59    x86_64 "--enable-sse2"
60}
61
62test.run     yes
63test.target  check
64
65use_parallel_build yes
66
67platform i386 {
68  if {![variant_isset universal]} {
69    configure.args-append --enable-sse2
70  }
71}
72
73platform powerpc {
74  if {![variant_isset universal]} {
75    configure.args-append --enable-fma
76  }
77}
78
79subport fftw-3-single {
80    configure.args-append --enable-float
81
82    array set merger_configure_args {
83        ppc    "--enable-fma --enable-altivec"
84        ppc64  "--enable-fma --enable-altivec"
85        i386   "--enable-sse"
86        x86_64 "--enable-sse"
87    }
88
89    depends_lib port:fftw-3
90
91    platform i386 {
92        if {![variant_isset universal]} {
93            configure.args-delete --enable-sse2
94            configure.args-append --enable-sse
95        }
96    }
97
98    platform powerpc {
99        if {![variant_isset universal]} {
100            configure.args-append --enable-altivec
101        }
102    }
103
104    post-destroot {
105        file delete ${destroot}${prefix}/include/fftw3.f
106        file delete ${destroot}${prefix}/include/fftw3.f03
107        file delete ${destroot}${prefix}/include/fftw3l.f03
108        file delete ${destroot}${prefix}/include/fftw3q.f03
109        file delete ${destroot}${prefix}/include/fftw3.h
110        file delete ${destroot}${prefix}/bin/fftw-wisdom-to-conf
111        file delete ${destroot}${prefix}/share/man/man1/fftw-wisdom-to-conf.1
112        file delete ${destroot}${prefix}/share/info/fftw3.info
113        file delete ${destroot}${prefix}/share/info/fftw3.info-1
114        file delete ${destroot}${prefix}/share/info/fftw3.info-2
115        file delete ${destroot}${prefix}/share/info/fftw3.info-3
116        file delete ${destroot}${prefix}/share/info/fftw3.info-4
117        file delete ${destroot}${prefix}/share/info/fftw3.info-5
118
119        if {[variant_isset mpich2] || [variant_isset openmpi]} {
120          file delete ${destroot}${prefix}/include/fftw3-mpi.f03
121          file delete ${destroot}${prefix}/include/fftw3-mpi.h
122          file delete ${destroot}${prefix}/include/fftw3l-mpi.f03
123        }
124    }
125}
126
127subport fftw-3-long {
128    configure.args-append --enable-long-double
129
130     array set merger_configure_args {
131        ppc    ""
132        ppc64  ""
133        i386   ""
134        x86_64 ""
135    }
136
137    depends_lib port:fftw-3
138
139    platform i386 {
140        if {![variant_isset universal]} {
141            configure.args-delete --enable-sse2
142        }
143    }
144
145    platform powerpc {
146        if {![variant_isset universal]} {
147            configure.args-delete --enable-fma
148        }
149    }
150
151    post-destroot {
152        file delete ${destroot}${prefix}/include/fftw3.f
153        file delete ${destroot}${prefix}/include/fftw3.f03
154        file delete ${destroot}${prefix}/include/fftw3l.f03
155        file delete ${destroot}${prefix}/include/fftw3q.f03
156        file delete ${destroot}${prefix}/include/fftw3.h
157        file delete ${destroot}${prefix}/bin/fftw-wisdom-to-conf
158        file delete ${destroot}${prefix}/share/man/man1/fftw-wisdom-to-conf.1
159        file delete ${destroot}${prefix}/share/info/fftw3.info
160        file delete ${destroot}${prefix}/share/info/fftw3.info-1
161        file delete ${destroot}${prefix}/share/info/fftw3.info-2
162        file delete ${destroot}${prefix}/share/info/fftw3.info-3
163        file delete ${destroot}${prefix}/share/info/fftw3.info-4
164        file delete ${destroot}${prefix}/share/info/fftw3.info-5
165
166        if {[variant_isset mpich2] || [variant_isset openmpi]} {
167          file delete ${destroot}${prefix}/include/fftw3-mpi.f03
168          file delete ${destroot}${prefix}/include/fftw3-mpi.h
169          file delete ${destroot}${prefix}/include/fftw3l-mpi.f03
170        }
171    }
172}
173
174variant gcc43 description {compile using gcc43 toolchain} conflicts gcc44 gcc45 gcc46 gcc47 g95 {
175    depends_lib-append    port:gcc43
176    configure.compiler    macports-gcc-4.3
177    configure.args-delete --disable-fortran
178    if { ${os.arch} == "i386" } {
179        lappend merger_configure_args(ppc)     "--disable-fortran"
180        lappend merger_configure_args(ppc64)   "--disable-fortran"
181    } else {
182        lappend merger_configure_args(i386)    "--disable-fortran"
183        lappend merger_configure_args(x86_64)  "--disable-fortran"
184    }
185}
186
187variant gcc44 description {compile using gcc44 toolchain} conflicts gcc43 gcc45 gcc46 gcc47 g95 {
188    depends_lib-append    port:gcc44
189    configure.compiler    macports-gcc-4.4
190    configure.args-delete --disable-fortran
191    if { ${os.arch} == "i386" } {
192        lappend merger_configure_args(ppc)     "--disable-fortran"
193        lappend merger_configure_args(ppc64)   "--disable-fortran"
194    } else {
195        lappend merger_configure_args(i386)    "--disable-fortran"
196        lappend merger_configure_args(x86_64)  "--disable-fortran"
197    }
198}
199
200variant gcc45 description {compile using gcc45 toolchain} conflicts gcc43 gcc44 gcc46 gcc47 g95 {
201    depends_lib-append    port:gcc45
202    configure.compiler    macports-gcc-4.5
203    configure.args-delete --disable-fortran
204    if { ${os.arch} == "i386" } {
205        lappend merger_configure_args(ppc)     "--disable-fortran"
206        lappend merger_configure_args(ppc64)   "--disable-fortran"
207    } else {
208        lappend merger_configure_args(i386)    "--disable-fortran"
209        lappend merger_configure_args(x86_64)  "--disable-fortran"
210    }
211}
212
213variant gcc46 description {compile using gcc46 toolchain} conflicts gcc43 gcc44 gcc45 gcc47 g95 {
214    depends_lib-append    port:gcc46
215    configure.compiler    macports-gcc-4.6
216    configure.args-delete --disable-fortran
217    if { ${os.arch} == "i386" } {
218        lappend merger_configure_args(ppc)     "--disable-fortran"
219        lappend merger_configure_args(ppc64)   "--disable-fortran"
220    } else {
221        lappend merger_configure_args(i386)    "--disable-fortran"
222        lappend merger_configure_args(x86_64)  "--disable-fortran"
223    }
224}
225
226variant gcc47 description {compile using gcc47 toolchain} conflicts gcc43 gcc44 gcc45 gcc46 g95 {
227    depends_lib-append    port:gcc47
228    configure.compiler    macports-gcc-4.7
229    configure.args-delete --disable-fortran
230    if { ${os.arch} == "i386" } {
231        lappend merger_configure_args(ppc)     "--disable-fortran"
232        lappend merger_configure_args(ppc64)   "--disable-fortran"
233    } else {
234        lappend merger_configure_args(i386)    "--disable-fortran"
235        lappend merger_configure_args(x86_64)  "--disable-fortran"
236    }
237}
238
239variant g95 description {create Fortran wrappers using f95} conflicts gcc43 gcc44 gcc45 gcc46 gcc47 {
240    depends_lib-append    port:g95
241    depends_skip_archcheck g95
242    configure.f77          g95
243    configure.args-delete --disable-fortran
244    if { ${os.arch} == "i386" } {
245        lappend merger_configure_args(ppc)     "--disable-fortran"
246        lappend merger_configure_args(ppc64)   "--disable-fortran"
247        lappend merger_configure_args(x86_64)  "--disable-fortran"
248    } else {
249        lappend merger_configure_args(i386)    "--disable-fortran"
250        lappend merger_configure_args(ppc64)   "--disable-fortran"
251        lappend merger_configure_args(x86_64)  "--disable-fortran"
252    }
253}
254
255variant openmpi description {compile FFTW MPI library with OpenMPI} conflicts mpich2 {
256    depends_lib-append      port:openmpi
257    configure.env           MPICC=${prefix}/lib/openmpi/bin/mpicc
258    configure.args-append   --enable-mpi
259}
260
261variant mpich2 description {compile FFTW MPI library with MPICH2} conflicts openmpi {
262    depends_lib-append      path:bin/mpicc:mpich2
263    configure.env           MPICC=${prefix}/bin/mpicc
264    configure.args-append   --enable-mpi
265}
266
267if {${name} == ${subport}} {
268    livecheck.type  regex
269    livecheck.url   ${homepage}
270    livecheck.regex {FFTW (\d+(?:\.\d+)*) is the latest}
271} else {
272    livecheck.type  none
273}
Note: See TracBrowser for help on using the repository browser.