Gentoo Archives: gentoo-commits

From: "Sebastien Fabbro (bicatali)" <bicatali@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/fftw: ChangeLog fftw-3.2.ebuild fftw-3.1.2-r1.ebuild
Date: Mon, 24 Nov 2008 11:02:09
Message-Id: E1L4ZCf-0008DV-TB@stork.gentoo.org
1 bicatali 08/11/24 11:02:05
2
3 Modified: ChangeLog
4 Added: fftw-3.2.ebuild
5 Removed: fftw-3.1.2-r1.ebuild
6 Log:
7 Version bump. Thanks to Adam Pi#tyszek, closing bug #247561
8 (Portage version: 2.2_rc15/cvs/Linux 2.6.25-gentoo-r7 x86_64)
9
10 Revision Changes Path
11 1.74 sci-libs/fftw/ChangeLog
12
13 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.74&view=markup
14 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.74&content-type=text/plain
15 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?r1=1.73&r2=1.74
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v
20 retrieving revision 1.73
21 retrieving revision 1.74
22 diff -u -r1.73 -r1.74
23 --- ChangeLog 20 Oct 2008 21:45:12 -0000 1.73
24 +++ ChangeLog 24 Nov 2008 11:02:05 -0000 1.74
25 @@ -1,6 +1,13 @@
26 # ChangeLog for sci-libs/fftw
27 # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.73 2008/10/20 21:45:12 bicatali Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.74 2008/11/24 11:02:05 bicatali Exp $
30 +
31 +*fftw-3.2 (21 Nov 2008)
32 +
33 + 21 Nov 2008; Sébastien Fabbro <bicatali@g.o>
34 + +files/fftw-3.2-as-needed.patch, +files/fftw-3.2-cppflags.patch,
35 + +files/fftw-3.2-openmp.patch, -fftw-3.1.2-r1.ebuild, +fftw-3.2.ebuild:
36 + Version bump. Thanks to Adam Piątyszek, closing bug #247561
37
38 *fftw-3.1.3 (20 Oct 2008)
39
40
41
42
43 1.1 sci-libs/fftw/fftw-3.2.ebuild
44
45 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-3.2.ebuild?rev=1.1&view=markup
46 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-3.2.ebuild?rev=1.1&content-type=text/plain
47
48 Index: fftw-3.2.ebuild
49 ===================================================================
50 # Copyright 1999-2008 Gentoo Foundation
51 # Distributed under the terms of the GNU General Public License v2
52 # $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.2.ebuild,v 1.1 2008/11/24 11:02:05 bicatali Exp $
53
54 inherit flag-o-matic eutils toolchain-funcs autotools fortran
55
56 DESCRIPTION="Fast C library for the Discrete Fourier Transform"
57 HOMEPAGE="http://www.fftw.org/"
58 SRC_URI="http://www.fftw.org/${P}.tar.gz"
59
60 LICENSE="GPL-2"
61 SLOT="3.0"
62 KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~sparc ~x86"
63 IUSE="altivec doc fortran openmp sse sse2 threads"
64
65 pkg_setup() {
66 if use openmp &&
67 [[ $(tc-getCC)$ == *gcc* ]] &&
68 ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] ||
69 ! built_with_use sys-devel/gcc openmp )
70 then
71 ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
72 ewarn "If you want to build fftw with OpenMP, abort now,"
73 ewarn "and switch CC to an OpenMP capable compiler"
74 ewarn "Otherwise the configure script will select POSIX threads."
75 epause 5
76 fi
77 FORTRAN="gfortran ifc g77"
78 use fortran && fortran_pkg_setup
79 }
80
81 src_unpack() {
82 unpack ${A}
83 cd "${S}"
84 epatch "${FILESDIR}"/${P}-openmp.patch
85 epatch "${FILESDIR}"/${P}-as-needed.patch
86 epatch "${FILESDIR}"/${P}-cppflags.patch
87
88 # fix info file
89 sed -e 's/Texinfo documentation system/Libraries/' \
90 -i doc/fftw3.info || die "failed to fix info file"
91 AT_M4DIR=m4 eautoreconf
92 cd "${WORKDIR}"
93 mv ${P} ${P}-single
94 cp -pPR ${P}-single ${P}-double
95 cp -pPR ${P}-single ${P}-longdouble
96 }
97
98 src_compile() {
99 # filter -Os according to docs
100 replace-flags -Os -O2
101
102 local myconfcommon="
103 --enable-shared
104 $(use_enable threads)
105 $(use_enable fortran)"
106
107 if use openmp; then
108 myconfcommon="${myconfcommon}
109 --disable-threads
110 --enable-openmp"
111 elif use threads; then
112 myconfcommon="${myconfcommon}
113 --enable-threads
114 --disable-openmp"
115 else
116 myconfcommon="${myconfcommon}
117 --disable-threads
118 --disable-openmp"
119 fi
120 local myconfsingle=""
121 local myconfdouble=""
122 local myconflongdouble=""
123
124 if use sse2; then
125 myconfsingle="${myconfsingle} --enable-sse"
126 myconfdouble="${myconfdouble} --enable-sse2"
127 elif use sse; then
128 myconfsingle="${myconfsingle} --enable-sse"
129 fi
130 # altivec only helps floats, not doubles
131 if use altivec; then
132 myconfsingle="${myconfsingle} --enable-altivec"
133 fi
134
135 cd "${S}-single"
136 econf \
137 --enable-float \
138 ${myconfcommon} \
139 ${myconfsingle} || \
140 die "econf single failed"
141 emake || die "emake single failed"
142
143 # the only difference here is no --enable-float
144 cd "${S}-double"
145 econf \
146 ${myconfcommon} \
147 ${myconfdouble} || \
148 die "econf double failed"
149 emake || die "emake double failed"
150
151 # the only difference here is --enable-long-double
152 cd "${S}-longdouble"
153 econf \
154 --enable-long-double \
155 ${myconfcommon} \
156 ${myconflongdouble} || \
157 die "econf long double failed"
158 emake || die "emake long double failed"
159 }
160
161 src_test () {
162 # We want this to be a reasonably quick test, but that is still hard...
163 ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine"
164 # Do not increase the number of threads, it will not help your performance
165 #local testbase="perl check.pl --nthreads=1 --estimate"
166 # ${testbase} -${p}d || die "Failure: $n"
167 for d in single double longdouble; do
168 cd "${S}-${d}"/tests
169 einfo "Testing ${PN}-${d}"
170 emake -j1 check || die "emake test failed"
171 done
172 }
173
174 src_install () {
175 # all builds are installed in the same place
176 # libs have distinuguished names; include files, docs etc. identical.
177 for i in single double longdouble; do
178 cd "${S}-${i}"
179 emake DESTDIR="${D}" install || die "emake install for ${i} failed"
180 done
181
182 # Install documentation.
183 cd "${S}-single"
184 dodoc AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS || die
185 if use doc; then
186 cd doc
187 insinto /usr/share/doc/${PF}
188 doins -r html fftw3.pdf || die "doc install failed"
189 insinto /usr/share/doc/${PF}/faq
190 doins FAQ/fftw-faq.html/*
191 fi
192 }