1 |
commit: 1741e4a708a66343a0e0320253b6713a7bcf1e9c |
2 |
Author: David Seifert <soap <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Aug 1 20:07:08 2016 +0000 |
4 |
Commit: Christoph Junghans <ottxor <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Aug 1 20:08:01 2016 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1741e4a7 |
7 |
|
8 |
sci-libs/fftw: version bump |
9 |
|
10 |
* EAPI=6 |
11 |
* Clean up and simplify multilib handling |
12 |
|
13 |
Package-Manager: portage-2.3.0 |
14 |
|
15 |
sci-libs/fftw/Manifest | 1 + |
16 |
sci-libs/fftw/fftw-3.3.5.ebuild | 183 ++++++++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 184 insertions(+) |
18 |
|
19 |
diff --git a/sci-libs/fftw/Manifest b/sci-libs/fftw/Manifest |
20 |
index b1d9259..8e7135c 100644 |
21 |
--- a/sci-libs/fftw/Manifest |
22 |
+++ b/sci-libs/fftw/Manifest |
23 |
@@ -1,2 +1,3 @@ |
24 |
DIST fftw-2.1.5.tar.gz 1256888 SHA256 f8057fae1c7df8b99116783ef3e94a6a44518d49c72e2e630c24b689c6022630 SHA512 8724a7f66aa19b271aa0ffb0e3762919f08082ac4400f52d11b50aef9b9d23a7d4fc5d6b2eae0ac166e2bb30a4d38a52c878e8bf8e24aba01ab1c3ddf5ebec15 WHIRLPOOL 2ea64d246c12e14962b93e05411c5f06dd193a887acb3fe5e7f63231a1a2f1f21b3a41f75951e18c332b25105865633c87150f2107169f5487b6b9983b968e10 |
25 |
DIST fftw-3.3.4.tar.gz 3940427 SHA256 8f0cde90929bc05587c3368d2f15cd0530a60b8a9912a8e2979a72dbe5af0982 SHA512 1ee2c7bec3657f6846e63c6dfa71410563830d2b951966bf0123bd8f4f2f5d6b50f13b76d9a7b0eae70e44856f829ca6ceb3d080bb01649d1572c9f3f68e8eb1 WHIRLPOOL 2a5733f5537ff55a1830994431f1750dd790a4df3e8b3d1e9018c1afba2c5172f4e456eaee1c3427a2b170d23b6928da462e067a6f4e94792cfc7ff1cbc38938 |
26 |
+DIST fftw-3.3.5.tar.gz 4148447 SHA256 8ecfe1b04732ec3f5b7d279fdb8efcad536d555f9d1e8fabd027037d45ea8bcf SHA512 a81f02d884cfe4171fab479b0e5ec76eceb9c5da6d4eda1f89281b7e1efa2d8176c9ba87051595c402889eb32172d216ce40eb2bef41289c646f01002fb4ba8e WHIRLPOOL dc044c73dbb1b9fa595a0f1e71b5958d3e023c38cd6b1bb8a486adcad506fc6e411a3d8d0657a32346ff6636cf25396bd9bcdbcd720e8c799f6e40f1e04bfd65 |
27 |
|
28 |
diff --git a/sci-libs/fftw/fftw-3.3.5.ebuild b/sci-libs/fftw/fftw-3.3.5.ebuild |
29 |
new file mode 100644 |
30 |
index 0000000..1218d51 |
31 |
--- /dev/null |
32 |
+++ b/sci-libs/fftw/fftw-3.3.5.ebuild |
33 |
@@ -0,0 +1,183 @@ |
34 |
+# Copyright 1999-2016 Gentoo Foundation |
35 |
+# Distributed under the terms of the GNU General Public License v2 |
36 |
+# $Id$ |
37 |
+ |
38 |
+EAPI=6 |
39 |
+ |
40 |
+FORTRAN_NEEDED=fortran |
41 |
+ |
42 |
+inherit flag-o-matic fortran-2 toolchain-funcs versionator multibuild multilib-minimal |
43 |
+ |
44 |
+DESCRIPTION="Fast C library for the Discrete Fourier Transform" |
45 |
+HOMEPAGE="http://www.fftw.org/" |
46 |
+ |
47 |
+if [[ ${PV} = *9999 ]]; then |
48 |
+ inherit autotools git-2 |
49 |
+ EGIT_REPO_URI="https://github.com/FFTW/fftw3.git" |
50 |
+else |
51 |
+ SRC_URI="http://www.fftw.org/${P}.tar.gz" |
52 |
+ KEYWORDS="~alpha ~amd64 ~arm ~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 openmp quad static-libs test threads zbus" |
58 |
+ |
59 |
+RDEPEND=" |
60 |
+ mpi? ( virtual/mpi )" |
61 |
+DEPEND="${RDEPEND} |
62 |
+ test? ( dev-lang/perl )" |
63 |
+ |
64 |
+pkg_setup() { |
65 |
+ if [[ ${MERGE_TYPE} != binary ]] && use openmp; then |
66 |
+ if ! tc-has-openmp; then |
67 |
+ ewarn "OpenMP is not available in your current selected compiler" |
68 |
+ |
69 |
+ if tc-is-clang; then |
70 |
+ ewarn "OpenMP support in sys-devel/clang is provided by sys-libs/libomp," |
71 |
+ ewarn "which you will need to build ${CATEGORY}/${PN} with USE=\"openmp\"" |
72 |
+ fi |
73 |
+ |
74 |
+ die "need openmp capable compiler" |
75 |
+ fi |
76 |
+ FORTRAN_NEED_OPENMP=1 |
77 |
+ fi |
78 |
+ |
79 |
+ fortran-2_pkg_setup |
80 |
+ |
81 |
+ MULTIBUILD_VARIANTS=( single double longdouble ) |
82 |
+ if use quad; then |
83 |
+ if tc-is-gcc && ! version_is_at_least 4.6 $(gcc-version); then |
84 |
+ ewarn "quad precision only available for gcc >= 4.6" |
85 |
+ die "need quad precision capable gcc" |
86 |
+ fi |
87 |
+ MULTIBUILD_VARIANTS+=( quad ) |
88 |
+ fi |
89 |
+} |
90 |
+ |
91 |
+src_prepare() { |
92 |
+ default |
93 |
+ |
94 |
+ # fix info file for category directory |
95 |
+ if [[ ${PV} = *9999 ]]; then |
96 |
+ sed -i -e |
97 |
+ 's/Texinfo documentation system/Libraries/' \ |
98 |
+ doc/fftw3."info" || die "failed to fix info file" |
99 |
+ |
100 |
+ eautoreconf |
101 |
+ fi |
102 |
+} |
103 |
+ |
104 |
+multilib_src_configure() { |
105 |
+ # there is no abi_x86_32 port of virtual/mpi right now, bug 519700 |
106 |
+ local enable_mpi=$(multilib_native_use_enable mpi) |
107 |
+ |
108 |
+ # jlec reported USE=quad on abi_x86_32 has too few registers |
109 |
+ # stub Makefiles |
110 |
+ if [[ ${MULTILIB_ABI_FLAG} == abi_x86_32 && ${MULTIBUILD_ID} == quad-* ]]; then |
111 |
+ mkdir -p "${BUILD_DIR}/tests" || die |
112 |
+ echo "all: ;" > "${BUILD_DIR}/Makefile" || die |
113 |
+ echo "install: ;" >> "${BUILD_DIR}/Makefile" || die |
114 |
+ echo "smallcheck: ;" > "${BUILD_DIR}/tests/Makefile" || die |
115 |
+ return 0 |
116 |
+ fi |
117 |
+ |
118 |
+ local myconf=( |
119 |
+ $(use_enable "cpu_flags_x86_fma$(usex cpu_flags_x86_fma3 3 4)" fma) |
120 |
+ $(use_enable fortran) |
121 |
+ $(use_enable zbus mips-zbus-timer) |
122 |
+ $(use_enable threads) |
123 |
+ $(use_enable openmp) |
124 |
+ ) |
125 |
+ case "${MULTIBUILD_ID}" in |
126 |
+ single-*) |
127 |
+ #altivec, sse, single-paired only work for single |
128 |
+ myconf+=( |
129 |
+ --enable-single |
130 |
+ $(use_enable altivec) |
131 |
+ $(use_enable cpu_flags_x86_avx avx) |
132 |
+ $(use_enable cpu_flags_x86_avx2 avx2) |
133 |
+ $(use_enable cpu_flags_x86_sse sse) |
134 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
135 |
+ ${enable_mpi} |
136 |
+ ) |
137 |
+ ;; |
138 |
+ |
139 |
+ double-*) |
140 |
+ myconf+=( |
141 |
+ $(use_enable cpu_flags_x86_avx avx) |
142 |
+ $(use_enable cpu_flags_x86_avx2 avx2) |
143 |
+ $(use_enable cpu_flags_x86_sse2 sse2) |
144 |
+ ${enable_mpi} |
145 |
+ ) |
146 |
+ ;; |
147 |
+ |
148 |
+ longdouble-*) |
149 |
+ myconf+=( |
150 |
+ --enable-long-double |
151 |
+ ${enable_mpi} |
152 |
+ ) |
153 |
+ ;; |
154 |
+ |
155 |
+ quad-*) |
156 |
+ #quad does not support mpi |
157 |
+ myconf+=( |
158 |
+ --enable-quad-precision |
159 |
+ ) |
160 |
+ ;; |
161 |
+ |
162 |
+ *) |
163 |
+ die "${MULTIBUILD_ID%-*} precision not implemented in this ebuild" |
164 |
+ ;; |
165 |
+ esac |
166 |
+ |
167 |
+ ECONF_SOURCE="${S}" econf "${myconf[@]}" |
168 |
+} |
169 |
+ |
170 |
+src_configure() { |
171 |
+ multibuild_foreach_variant multilib-minimal_src_configure |
172 |
+} |
173 |
+ |
174 |
+src_compile() { |
175 |
+ multibuild_foreach_variant multilib-minimal_src_compile |
176 |
+} |
177 |
+ |
178 |
+multilib_src_test() { |
179 |
+ emake -C tests smallcheck |
180 |
+} |
181 |
+ |
182 |
+src_test() { |
183 |
+ # We want this to be a reasonably quick test, but that is still hard... |
184 |
+ ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" |
185 |
+ # Do not increase the number of threads, it will not help your performance |
186 |
+ # local testbase="perl check.pl --nthreads=1 --estimate" |
187 |
+ # ${testbase} -${p}d || die "Failure: $n" |
188 |
+ |
189 |
+ multibuild_foreach_variant multilib-minimal_src_test |
190 |
+} |
191 |
+ |
192 |
+src_install() { |
193 |
+ DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS ) |
194 |
+ HTML_DOCS=( doc/html/ ) |
195 |
+ |
196 |
+ multibuild_foreach_variant multilib-minimal_src_install |
197 |
+ |
198 |
+ if use doc; then |
199 |
+ dodoc doc/*.pdf |
200 |
+ docinto faq |
201 |
+ dodoc -r doc/FAQ/fftw-faq.html/. |
202 |
+ else |
203 |
+ rm -r "${ED}"/usr/share/doc/${PF}/html || die |
204 |
+ fi |
205 |
+ |
206 |
+ local x |
207 |
+ for x in "${ED}"/usr/lib*/pkgconfig/*.pc; do |
208 |
+ local u |
209 |
+ for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do |
210 |
+ sed -e "s|-lfftw3[flq]\?|&_${u} &|" "$x" > "${x%.pc}_${u}.pc" || die |
211 |
+ done |
212 |
+ done |
213 |
+ |
214 |
+ # fftw uses pkg-config to record its private dependencies |
215 |
+ find "${ED}" -name '*.la' -delete || die |
216 |
+} |