1 |
commit: 461721fc58ad27051c1a3108f62a0e431288160e |
2 |
Author: Conrad Kostecki <conrad <AT> kostecki <DOT> com> |
3 |
AuthorDate: Sat Sep 1 13:49:27 2018 +0000 |
4 |
Commit: Andrew Savchenko <bircoph <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Sep 1 22:23:44 2018 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=461721fc |
7 |
|
8 |
sci-libs/fftw: bump to version 3.3.8 |
9 |
|
10 |
Closes: https://bugs.gentoo.org/651028 |
11 |
Closes: https://bugs.gentoo.org/608990 |
12 |
Package-Manager: Portage-2.3.48, Repoman-2.3.10 |
13 |
|
14 |
sci-libs/fftw/Manifest | 1 + |
15 |
sci-libs/fftw/fftw-3.3.8.ebuild | 181 ++++++++++++++++++++++++++++++++++++++++ |
16 |
2 files changed, 182 insertions(+) |
17 |
|
18 |
diff --git a/sci-libs/fftw/Manifest b/sci-libs/fftw/Manifest |
19 |
index 6d14a69bd13..6eebda50fbe 100644 |
20 |
--- a/sci-libs/fftw/Manifest |
21 |
+++ b/sci-libs/fftw/Manifest |
22 |
@@ -1,2 +1,3 @@ |
23 |
DIST fftw-2.1.5.tar.gz 1256888 BLAKE2B 61e2eed91459479ab893a423c1a6f38dd7e9637e0466fa0a59fccfa2cec930e8870a5febfccfacfe44e876e40534c34e05dc62b8e7bf188b43fe3a65c6a7bdba SHA512 8724a7f66aa19b271aa0ffb0e3762919f08082ac4400f52d11b50aef9b9d23a7d4fc5d6b2eae0ac166e2bb30a4d38a52c878e8bf8e24aba01ab1c3ddf5ebec15 |
24 |
DIST fftw-3.3.6-pl2.tar.gz 4185261 BLAKE2B e2f877c13ab441ddf1ae731cf3ebdc5d1565f8216f497694ea1fccc43b6a53fc02d39e17f97c56d15d03410b2005e6c693cb4b639399aac0f6ebdc63fed32d2e SHA512 e130309856752a1555b6d151c4d0ce9eb4b2c208fff7e3e89282ca8ef6104718f865cbb5e9c4af4367b3615b69b0d50fd001a26d74fd5324ff2faabe14fe3472 |
25 |
+DIST fftw-3.3.8.tar.gz 4110137 BLAKE2B 555ac1401a5a41b7661afd0288c2353398f2c9b73695742459079ebf050dfa4c371484ea65324fd4b7d374f70d88a5942ff8abaad167b0d44d485bf1dc9e208c SHA512 ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38 |
26 |
|
27 |
diff --git a/sci-libs/fftw/fftw-3.3.8.ebuild b/sci-libs/fftw/fftw-3.3.8.ebuild |
28 |
new file mode 100644 |
29 |
index 00000000000..47b31f4171e |
30 |
--- /dev/null |
31 |
+++ b/sci-libs/fftw/fftw-3.3.8.ebuild |
32 |
@@ -0,0 +1,181 @@ |
33 |
+# Copyright 1999-2018 Gentoo Foundation |
34 |
+# Distributed under the terms of the GNU General Public License v2 |
35 |
+ |
36 |
+EAPI=6 |
37 |
+ |
38 |
+FORTRAN_NEEDED=fortran |
39 |
+ |
40 |
+inherit flag-o-matic fortran-2 multibuild multilib-minimal toolchain-funcs |
41 |
+ |
42 |
+DESCRIPTION="Fast C library for the Discrete Fourier Transform" |
43 |
+HOMEPAGE="http://www.fftw.org/" |
44 |
+ |
45 |
+MY_P=${PN}-${PV/_p/-pl} |
46 |
+ |
47 |
+if [[ ${PV} = *9999 ]]; then |
48 |
+ inherit autotools git-r3 |
49 |
+ EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" |
50 |
+else |
51 |
+ SRC_URI="http://www.fftw.org/${PN}-${PV/_p/-pl}.tar.gz" |
52 |
+ KEYWORDS="~alpha ~amd64 ~arm ~arm64 ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" |
53 |
+fi |
54 |
+ |
55 |
+LICENSE="GPL-2+" |
56 |
+SLOT="3.0/3" |
57 |
+IUSE="altivec cpu_flags_x86_avx cpu_flags_x86_avx2 cpu_flags_x86_fma3 cpu_flags_x86_fma4 cpu_flags_x86_sse cpu_flags_x86_sse2 doc fortran mpi neon openmp quad static-libs test threads zbus" |
58 |
+ |
59 |
+RDEPEND=" |
60 |
+ mpi? ( >=virtual/mpi-2.0-r4[${MULTILIB_USEDEP}] )" |
61 |
+DEPEND="${RDEPEND} |
62 |
+ quad? ( sys-devel/gcc[fortran] ) |
63 |
+ test? ( dev-lang/perl )" |
64 |
+ |
65 |
+S=${WORKDIR}/${MY_P} |
66 |
+HTML_DOCS=( doc/html/. ) |
67 |
+ |
68 |
+pkg_pretend() { |
69 |
+ [[ ${MERGE_TYPE} != binary ]] && use openmp && tc-check-openmp |
70 |
+} |
71 |
+ |
72 |
+pkg_setup() { |
73 |
+ if [[ ${MERGE_TYPE} != binary ]] && use openmp; then |
74 |
+ tc-check-openmp |
75 |
+ FORTRAN_NEED_OPENMP=1 |
76 |
+ fi |
77 |
+ |
78 |
+ fortran-2_pkg_setup |
79 |
+ |
80 |
+ MULTIBUILD_VARIANTS=( single double longdouble ) |
81 |
+ if use quad; then |
82 |
+ if ! tc-is-gcc; then |
83 |
+ ewarn "quad precision only available for gcc >= 4.6" |
84 |
+ die "need quad precision capable gcc" |
85 |
+ fi |
86 |
+ MULTIBUILD_VARIANTS+=( quad ) |
87 |
+ fi |
88 |
+} |
89 |
+ |
90 |
+src_prepare() { |
91 |
+ default |
92 |
+ |
93 |
+ # fix info file for category directory |
94 |
+ if [[ ${PV} = *9999 ]]; then |
95 |
+ sed -i -e |
96 |
+ 's/Texinfo documentation system/Libraries/' \ |
97 |
+ doc/fftw3."info" || die "failed to fix info file" |
98 |
+ |
99 |
+ eautoreconf |
100 |
+ fi |
101 |
+} |
102 |
+ |
103 |
+multilib_src_configure() { |
104 |
+ # jlec reported USE=quad on abi_x86_32 has too few registers |
105 |
+ # stub Makefiles |
106 |
+ if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then |
107 |
+ mkdir -p "${BUILD_DIR}/tests" || die |
108 |
+ echo "all: ;" > "${BUILD_DIR}/Makefile" || die |
109 |
+ echo "install: ;" >> "${BUILD_DIR}/Makefile" || die |
110 |
+ echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die |
111 |
+ return 0 |
112 |
+ fi |
113 |
+ |
114 |
+ local myconf=( |
115 |
+ --enable-shared |
116 |
+ $(use_enable static-libs static) |
117 |
+ $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) |
118 |
+ $(use_enable fortran) |
119 |
+ $(use_enable zbus mips-zbus-timer) |
120 |
+ $(use_enable threads) |
121 |
+ $(use_enable openmp) |
122 |
+ ) |
123 |
+ case "${MULTIBUILD_ID}" in |
124 |
+ single-*) |
125 |
+ # altivec, sse, single-paired only work for single |
126 |
+ myconf+=( |
127 |
+ --enable-single |
128 |
+ $(use_enable altivec) |
129 |
+ $(use_enable cpu_flags_x86_avx avx) |
130 |
+ $(use_enable cpu_flags_x86_avx2 avx2) |
131 |
+ $(use_enable cpu_flags_x86_sse sse) |
132 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
133 |
+ $(use_enable neon) |
134 |
+ $(use_enable mpi) |
135 |
+ ) |
136 |
+ ;; |
137 |
+ |
138 |
+ double-*) |
139 |
+ myconf+=( |
140 |
+ $(use_enable cpu_flags_x86_avx avx) |
141 |
+ $(use_enable cpu_flags_x86_avx2 avx2) |
142 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
143 |
+ $(use_enable mpi) |
144 |
+ ) |
145 |
+ ;; |
146 |
+ |
147 |
+ longdouble-*) |
148 |
+ myconf+=( |
149 |
+ --enable-long-double |
150 |
+ $(use_enable mpi) |
151 |
+ ) |
152 |
+ ;; |
153 |
+ |
154 |
+ quad-*) |
155 |
+ # quad does not support mpi |
156 |
+ myconf+=( |
157 |
+ --enable-quad-precision |
158 |
+ ) |
159 |
+ ;; |
160 |
+ |
161 |
+ *) |
162 |
+ die "${MULTIBUILD_ID%-*} precision not implemented in this ebuild" |
163 |
+ ;; |
164 |
+ esac |
165 |
+ |
166 |
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" MPICC="$(tc-getCC -lmpi)" |
167 |
+} |
168 |
+ |
169 |
+src_configure() { |
170 |
+ multibuild_foreach_variant multilib-minimal_src_configure |
171 |
+} |
172 |
+ |
173 |
+src_compile() { |
174 |
+ multibuild_foreach_variant multilib-minimal_src_compile |
175 |
+} |
176 |
+ |
177 |
+multilib_src_test() { |
178 |
+ emake -C tests smallcheck |
179 |
+} |
180 |
+ |
181 |
+src_test() { |
182 |
+ # We want this to be a reasonably quick test, but that is still hard... |
183 |
+ ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" |
184 |
+ # Do not increase the number of threads, it will not help your performance |
185 |
+ # local testbase="perl check.pl --nthreads=1 --estimate" |
186 |
+ # ${testbase} -${p}d || die "Failure: $n" |
187 |
+ |
188 |
+ multibuild_foreach_variant multilib-minimal_src_test |
189 |
+} |
190 |
+ |
191 |
+src_install() { |
192 |
+ multibuild_foreach_variant multilib-minimal_src_install |
193 |
+ dodoc CONVENTIONS |
194 |
+ |
195 |
+ if use doc; then |
196 |
+ dodoc doc/*.pdf |
197 |
+ docinto faq |
198 |
+ dodoc -r doc/FAQ/fftw-faq.html/. |
199 |
+ else |
200 |
+ rm -r "${ED%/}"/usr/share/doc/${PF}/html || die |
201 |
+ fi |
202 |
+ |
203 |
+ local x |
204 |
+ for x in "${ED%/}"/usr/lib*/pkgconfig/*.pc; do |
205 |
+ local u |
206 |
+ for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do |
207 |
+ sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die |
208 |
+ done |
209 |
+ done |
210 |
+ |
211 |
+ # fftw uses pkg-config to record its private dependencies |
212 |
+ find "${D}" -name '*.la' -delete || die |
213 |
+} |