-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
meta.yaml
204 lines (178 loc) · 6.56 KB
/
meta.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
{% set version = "3.3.10" %}
{% set build = 10 %}
# ensure mpi is defined (needed for conda-smithy recipe-lint)
{% set mpi = mpi or 'nompi' %}
# prioritize nompi variant via build number
{% if mpi == 'nompi' %}
{% set build = build + 100 %}
{% endif %}
# add build string so packages can depend on
# mpi or nompi variants explicitly:
# `pkg * mpi_mpich_*` for mpich
# `pkg * mpi_*` for any mpi
# `pkg * nompi_*` for no mpi
{% if mpi != 'nompi' %}
{% set mpi_prefix = "mpi_" + mpi %}
{% else %}
{% set mpi_prefix = "nompi" %}
{% endif %}
package:
name: fftw-split
version: {{ version }}
source:
url: http://www.fftw.org/fftw-{{ version }}.tar.gz
sha256: 56c932549852cddcfafdab3820b0200c7742675be92179e59e6215b340e26467
patches:
- 0001-cmake-Set-SIMD-flags-on-appropriate-source-files-onl.patch
build:
number: {{ build }}
outputs:
- name: fftw
script: build_fftw.sh # [unix]
script: bld_fftw.bat # [win]
build:
string: {{ mpi_prefix }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
run_exports:
- {{ pin_subpackage('fftw', max_pin='x') }}
{% if mpi != 'nompi' %}
- fftw * {{ mpi_prefix }}_*
{% endif %}
requirements:
build:
- perl 5.* # [not win]
- cmake
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }} # [not win]
- {{ stdlib("c") }}
- llvm-openmp # [osx]
- make # [unix]
- autoconf # [unix]
- automake # [unix]
- gettext # [unix]
- m4 # [unix]
- libtool # [unix]
- {{ mpi }} # [build_platform != target_platform and mpi == 'openmpi']
host:
- {{ mpi }} # [mpi != 'nompi']
- llvm-openmp # [osx]
run:
- llvm-openmp # [osx]
test:
files: # [not win]
- test_cmake.sh # [not win]
- test_cmake/* # [not win]
requires:
- python >=3
- cmake # [not win]
- make # [not win]
- {{ compiler('c') }} # [not win]
- {{ compiler('cxx') }} # [not win]
commands:
# Verify that static library files aren't present yet
- test ! -f ${PREFIX}/lib/libfftw3f.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3l.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3f_threads.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3_threads.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3l_threads.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3f_omp.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3_omp.a # [not win]
- test ! -f ${PREFIX}/lib/libfftw3l_omp.a # [not win]
# Verify headers are installed
- test -f ${PREFIX}/include/fftw3.h # [not win]
- if not exist %LIBRARY_INC%\\fftw3.h exit 1 # [win]
# Verify shared libraries are installed
{% set fftw_libs = [
"libfftw3",
"libfftw3_threads",
"libfftw3f",
"libfftw3f_threads",
"libfftw3l",
"libfftw3l_threads",
] %}
{% set fftw_omp_libs = [
"libfftw3_omp",
"libfftw3f_omp",
"libfftw3l_omp",
] %}
{% set fftw_mpi_libs = [
"libfftw3_mpi",
"libfftw3f_mpi",
"libfftw3l_mpi",
] %}
{% for lib in fftw_libs %}
- python -c "import ctypes; ctypes.cdll[r'${PREFIX}/lib/{{ lib }}${SHLIB_EXT}']" # [unix]
{% endfor %}
{% for lib in fftw_omp_libs %}
- python -c "import ctypes; ctypes.cdll[r'${PREFIX}/lib/{{ lib }}${SHLIB_EXT}']" # [unix]
{% endfor %}
{% if mpi != 'nompi' %}
{% for lib in fftw_mpi_libs %}
# you need to link to the mpi libs to load the dll, so we just test
# if it exists
- test -f ${PREFIX}/lib/{{ lib }}${SHLIB_EXT} || exit 1 # [unix]
{% endfor %}
{% endif %}
{% set fftw_libs = ["fftw3f", "fftw3"] %}
{% for base in fftw_libs %}
- if not exist %LIBRARY_LIB%\\{{ base }}.lib exit 1 # [win]
- if not exist %LIBRARY_BIN%\\{{ base }}.dll exit 1 # [win]
{% endfor %}
# verify cmake builds
- bash test_cmake.sh # [not win]
- name: fftw-static
script: build_fftw.sh # [unix]
build:
skip: true # [win]
string: {{ mpi_prefix }}_h{{ PKG_HASH }}_{{ PKG_BUILDNUM }}
requirements:
build:
- perl 5.* # [not win]
- cmake
- {{ compiler('c') }}
- {{ compiler('cxx') }}
- {{ compiler('fortran') }} # [not win]
- {{ stdlib("c") }}
- llvm-openmp # [osx]
- make # [unix]
- autoconf # [unix]
- automake # [unix]
- gettext # [unix]
- m4 # [unix]
- libtool # [unix]
- {{ mpi }} # [build_platform != target_platform and mpi == 'openmpi']
host:
- {{ mpi }} # [mpi != 'nompi']
- llvm-openmp # [osx]
- {{ pin_subpackage('fftw', exact=True) }}
run:
- llvm-openmp # [osx]
- {{ pin_subpackage('fftw', exact=True) }}
test:
commands:
# Verify library contains Fortran symbols
- strings ${PREFIX}/lib/libfftw3.a | grep -q dfftw # [not win]
# Verify existence of static library files
- test -f ${PREFIX}/lib/libfftw3f.a # [not win]
- test -f ${PREFIX}/lib/libfftw3.a # [not win]
- test -f ${PREFIX}/lib/libfftw3l.a # [not win]
- test -f ${PREFIX}/lib/libfftw3f_threads.a # [not win]
- test -f ${PREFIX}/lib/libfftw3_threads.a # [not win]
- test -f ${PREFIX}/lib/libfftw3l_threads.a # [not win]
- test -f ${PREFIX}/lib/libfftw3f_omp.a # [not win]
- test -f ${PREFIX}/lib/libfftw3_omp.a # [not win]
- test -f ${PREFIX}/lib/libfftw3l_omp.a # [not win]
about:
home: http://fftw.org
license: GPL-2.0-or-later
license_file: COPYING
summary: The fastest Fourier transform in the west.
dev_url: https://github.com/FFTW/fftw3
extra:
recipe-maintainers:
- alexbw
- jakirkham
- grlee77
- jschueller
- egpbos