1 |
bicatali 08/07/02 09:20:22 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: fftw-2.1.5-r5.ebuild fftw-3.1.2-r1.ebuild |
5 |
Log: |
6 |
Added openmp support for both fftw-2 and fftw-3. Added as-needed fixes for fftw-3, needed for threads support. Added a doc use flag for fftw-3. |
7 |
(Portage version: 2.1.4.4) |
8 |
|
9 |
Revision Changes Path |
10 |
1.67 sci-libs/fftw/ChangeLog |
11 |
|
12 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.67&view=markup |
13 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.67&content-type=text/plain |
14 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?r1=1.66&r2=1.67 |
15 |
|
16 |
Index: ChangeLog |
17 |
=================================================================== |
18 |
RCS file: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v |
19 |
retrieving revision 1.66 |
20 |
retrieving revision 1.67 |
21 |
diff -u -r1.66 -r1.67 |
22 |
--- ChangeLog 23 Jun 2008 14:31:13 -0000 1.66 |
23 |
+++ ChangeLog 2 Jul 2008 09:20:22 -0000 1.67 |
24 |
@@ -1,6 +1,16 @@ |
25 |
# ChangeLog for sci-libs/fftw |
26 |
# Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 |
27 |
-# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.66 2008/06/23 14:31:13 bicatali Exp $ |
28 |
+# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.67 2008/07/02 09:20:22 bicatali Exp $ |
29 |
+ |
30 |
+*fftw-3.1.2-r1 (02 Jul 2008) |
31 |
+*fftw-2.1.5-r5 (02 Jul 2008) |
32 |
+ |
33 |
+ 02 Jul 2008; Sébastien Fabbro <bicatali@g.o> |
34 |
+ files/fftw-2.1.5-configure.in.patch, +files/fftw-3.1.2-as-needed.patch, |
35 |
+ files/fftw-3.1.2-configure.ac.patch, +files/fftw-3.1.2-openmp.patch, |
36 |
+ +fftw-2.1.5-r5.ebuild, +fftw-3.1.2-r1.ebuild: |
37 |
+ Added openmp support for both fftw-2 and fftw-3. Added as-needed fixes for |
38 |
+ fftw-3, needed for threads support. Added a doc use flag for fftw-3. |
39 |
|
40 |
23 Jun 2008; Sébastien Fabbro <bicatali@g.o> |
41 |
+files/fftw-2.1.5-no-test.patch, fftw-2.1.5-r4.ebuild, fftw-3.1.2.ebuild: |
42 |
|
43 |
|
44 |
|
45 |
1.1 sci-libs/fftw/fftw-2.1.5-r5.ebuild |
46 |
|
47 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r5.ebuild?rev=1.1&view=markup |
48 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r5.ebuild?rev=1.1&content-type=text/plain |
49 |
|
50 |
Index: fftw-2.1.5-r5.ebuild |
51 |
=================================================================== |
52 |
# Copyright 1999-2008 Gentoo Foundation |
53 |
# Distributed under the terms of the GNU General Public License v2 |
54 |
# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r5.ebuild,v 1.1 2008/07/02 09:20:22 bicatali Exp $ |
55 |
|
56 |
inherit eutils flag-o-matic multilib autotools fortran |
57 |
|
58 |
DESCRIPTION="Fast C library for the Discrete Fourier Transform" |
59 |
SRC_URI="http://www.fftw.org/${P}.tar.gz" |
60 |
HOMEPAGE="http://www.fftw.org" |
61 |
|
62 |
# hppa does not have yet a virtual/mpi |
63 |
DEPEND="mpi? ( virtual/mpi )" |
64 |
|
65 |
SLOT="2.1" |
66 |
LICENSE="GPL-2" |
67 |
IUSE="doc float fortran mpi openmp threads" |
68 |
|
69 |
KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86" |
70 |
|
71 |
pkg_setup() { |
72 |
# this one is reported to cause trouble on pentium4 m series |
73 |
filter-mfpmath "sse" |
74 |
|
75 |
# here I need (surprise) to increase optimization: |
76 |
# --enable-i386-hacks requires -fomit-frame-pointer to work properly |
77 |
if [ "${ARCH}" == "x86" ]; then |
78 |
is-flag "-fomit-frame-pointer" || append-flags "-fomit-frame-pointer" |
79 |
fi |
80 |
FORTRAN="gfortran ifc g77" |
81 |
use fortran && fortran_pkg_setup |
82 |
} |
83 |
|
84 |
src_unpack() { |
85 |
# doc suggests installing single and double precision versions |
86 |
# via separate compilations. will do in two separate source trees |
87 |
# since some sed'ing is done during the build |
88 |
# (?if --enable-type-prefix is set?) |
89 |
|
90 |
unpack ${A} |
91 |
cd "${S}" |
92 |
epatch "${FILESDIR}"/${P}-as-needed.patch |
93 |
epatch "${FILESDIR}"/${P}-configure.in.patch |
94 |
epatch "${FILESDIR}"/${P}-no-test.patch |
95 |
|
96 |
# fix info files |
97 |
for infofile in doc/fftw*info*; do |
98 |
cat >> ${infofile} <<-EOF |
99 |
INFO-DIR-SECTION Libraries |
100 |
START-INFO-DIR-ENTRY |
101 |
* fftw: (fftw). ${DESCRIPTION} |
102 |
END-INFO-DIR-ENTRY |
103 |
EOF |
104 |
done |
105 |
|
106 |
eautoreconf |
107 |
|
108 |
cd "${WORKDIR}" |
109 |
cp -R ${P} ${P}-double |
110 |
mv ${P} ${P}-single |
111 |
} |
112 |
|
113 |
src_compile() { |
114 |
cd "${S}-single" |
115 |
econf \ |
116 |
--enable-float \ |
117 |
--enable-shared \ |
118 |
--enable-type-prefix \ |
119 |
--enable-vec-recurse \ |
120 |
$(use_enable threads) \ |
121 |
$(use_with openmp) \ |
122 |
$(use_enable fortran) \ |
123 |
$(use_enable mpi) \ |
124 |
$(use_enable x86 i386-hacks) \ |
125 |
|| die "econf for float failed" |
126 |
emake || die "emake for float failed" |
127 |
|
128 |
# the only difference here is no --enable-float |
129 |
cd "${S}-double" |
130 |
econf \ |
131 |
--enable-shared \ |
132 |
--enable-type-prefix \ |
133 |
--enable-vec-recurse \ |
134 |
$(use_enable threads) \ |
135 |
$(use_with openmp) \ |
136 |
$(use_enable fortran) \ |
137 |
$(use_enable mpi) \ |
138 |
$(use_enable x86 i386-hacks) \ |
139 |
|| die "econf for double failed" |
140 |
emake || die "emake for double failed" |
141 |
} |
142 |
|
143 |
src_test() { |
144 |
cd "${S}-single" |
145 |
emake -j1 check || die "emake check single failed" |
146 |
cd "${S}-double" |
147 |
emake -j1 check || die "emake check double failed" |
148 |
} |
149 |
|
150 |
src_install () { |
151 |
|
152 |
# both builds are installed in the same place |
153 |
# libs are distinguished by prefix (s or d), see docs for details |
154 |
|
155 |
cd "${S}-single" |
156 |
emake DESTDIR="${D}" install || die "emake install float failed" |
157 |
insinto /usr/include |
158 |
doins fortran/fftw_f77.i || die "doins failed" |
159 |
dodoc AUTHORS ChangeLog NEWS TODO README README.hacks || die "dodoc failed" |
160 |
use doc && dohtml doc/* |
161 |
|
162 |
cd "${S}-double" |
163 |
emake DESTDIR="${D}" install || die "emake install double failed" |
164 |
|
165 |
if use float; then |
166 |
for f in "${D}"/usr/{include,$(get_libdir)}/*sfft*; do |
167 |
ln -s $(basename ${f}) ${f/sfft/fft} |
168 |
done |
169 |
for f in "${D}"/usr/{include,$(get_libdir)}/*srfft*; do |
170 |
ln -s $(basename ${f}) ${f/srfft/rfft} |
171 |
done |
172 |
else |
173 |
for f in "${D}"/usr/{include,$(get_libdir)}/*dfft*; do |
174 |
ln -s $(basename ${f}) ${f/dfft/fft} |
175 |
done |
176 |
for f in "${D}"/usr/{include,$(get_libdir)}/*drfft*; do |
177 |
ln -s $(basename ${f}) ${f/drfft/rfft} |
178 |
done |
179 |
fi |
180 |
} |
181 |
|
182 |
|
183 |
|
184 |
1.1 sci-libs/fftw/fftw-3.1.2-r1.ebuild |
185 |
|
186 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-3.1.2-r1.ebuild?rev=1.1&view=markup |
187 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-3.1.2-r1.ebuild?rev=1.1&content-type=text/plain |
188 |
|
189 |
Index: fftw-3.1.2-r1.ebuild |
190 |
=================================================================== |
191 |
# Copyright 1999-2008 Gentoo Foundation |
192 |
# Distributed under the terms of the GNU General Public License v2 |
193 |
# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.1.2-r1.ebuild,v 1.1 2008/07/02 09:20:22 bicatali Exp $ |
194 |
|
195 |
inherit flag-o-matic eutils toolchain-funcs autotools fortran |
196 |
|
197 |
DESCRIPTION="Fast C library for the Discrete Fourier Transform" |
198 |
HOMEPAGE="http://www.fftw.org/" |
199 |
SRC_URI="http://www.fftw.org/${P}.tar.gz" |
200 |
|
201 |
LICENSE="GPL-2" |
202 |
SLOT="3.0" |
203 |
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86" |
204 |
IUSE="altivec doc fortran openmp sse sse2 threads" |
205 |
|
206 |
pkg_setup() { |
207 |
FORTRAN="gfortran ifc g77" |
208 |
use fortran && fortran_pkg_setup |
209 |
} |
210 |
|
211 |
src_unpack() { |
212 |
unpack ${A} |
213 |
cd "${S}" |
214 |
epatch "${FILESDIR}"/${P}-configure.ac.patch |
215 |
epatch "${FILESDIR}"/${P}-openmp.patch |
216 |
epatch "${FILESDIR}"/${P}-as-needed.patch |
217 |
|
218 |
# fix info file |
219 |
sed -e 's/Texinfo documentation system/Libraries/' \ |
220 |
-i doc/fftw3.info || die "failed to fix info file" |
221 |
AT_M4DIR=m4 eautoreconf |
222 |
cd "${WORKDIR}" |
223 |
mv ${P} ${P}-single |
224 |
cp -pPR ${P}-single ${P}-double |
225 |
cp -pPR ${P}-single ${P}-longdouble |
226 |
} |
227 |
|
228 |
src_compile() { |
229 |
# filter -Os according to docs |
230 |
replace-flags -Os -O2 |
231 |
|
232 |
local myconfcommon="--enable-shared |
233 |
$(use_with openmp) |
234 |
$(use_enable threads) |
235 |
$(use_enable fortran)" |
236 |
local myconfsingle="" |
237 |
local myconfdouble="" |
238 |
local myconflongdouble="" |
239 |
|
240 |
if use sse2; then |
241 |
myconfsingle="${myconfsingle} --enable-sse" |
242 |
myconfdouble="${myconfdouble} --enable-sse2" |
243 |
elif use sse; then |
244 |
myconfsingle="${myconfsingle} --enable-sse" |
245 |
fi |
246 |
# altivec only helps floats, not doubles |
247 |
if use altivec; then |
248 |
myconfsingle="${myconfsingle} --enable-altivec" |
249 |
fi |
250 |
|
251 |
cd "${S}-single" |
252 |
econf \ |
253 |
--enable-float \ |
254 |
${myconfcommon} \ |
255 |
${myconfsingle} || \ |
256 |
die "econf single failed" |
257 |
emake || die "emake single failed" |
258 |
|
259 |
# the only difference here is no --enable-float |
260 |
cd "${S}-double" |
261 |
econf \ |
262 |
${myconfcommon} \ |
263 |
${myconfdouble} || \ |
264 |
die "econf double failed" |
265 |
emake || die "emake double failed" |
266 |
|
267 |
# the only difference here is --enable-long-double |
268 |
cd "${S}-longdouble" |
269 |
econf \ |
270 |
--enable-long-double \ |
271 |
${myconfcommon} \ |
272 |
${myconflongdouble} || \ |
273 |
die "econf long double failed" |
274 |
emake || die "emake long double failed" |
275 |
} |
276 |
|
277 |
|
278 |
src_test () { |
279 |
# We want this to be a reasonably quick test, but that is still hard... |
280 |
ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine" |
281 |
# Do not increase the number of threads, it will not help your performance |
282 |
#local testbase="perl check.pl --nthreads=1 --estimate" |
283 |
# ${testbase} -${p}d || die "Failure: $n" |
284 |
for d in single double longdouble; do |
285 |
cd "${S}-${d}"/tests |
286 |
einfo "Testing ${PN}-${d}" |
287 |
emake -j1 check || die "emake test failed" |
288 |
done |
289 |
} |
290 |
|
291 |
src_install () { |
292 |
# all builds are installed in the same place |
293 |
# libs have distinuguished names; include files, docs etc. identical. |
294 |
for i in single double longdouble; do |
295 |
cd "${S}-${i}" |
296 |
emake DESTDIR="${D}" install || die "emake install for ${i} failed" |
297 |
done |
298 |
|
299 |
# Install documentation. |
300 |
cd "${S}-single" |
301 |
dodoc AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS || die |
302 |
if use doc; then |
303 |
cd doc |
304 |
insinto /usr/share/doc/${PF} |
305 |
doins -r html fftw3.pdf || die "doc install failed" |
306 |
insinto /usr/share/doc/${PF}/faq |
307 |
doins FAQ/fftw-faq.html/* |
308 |
fi |
309 |
} |
310 |
|
311 |
|
312 |
|
313 |
-- |
314 |
gentoo-commits@l.g.o mailing list |