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.1.ebuild
Date: Thu, 26 Feb 2009 17:38:07
Message-Id: E1LckBR-0006PX-Vv@stork.gentoo.org
1 bicatali 09/02/26 17:38:05
2
3 Modified: ChangeLog
4 Added: fftw-3.2.1.ebuild
5 Log:
6 Version bump. More as-needed fixes, and general cleanup.
7 (Portage version: 2.2_rc23/cvs/Linux x86_64)
8
9 Revision Changes Path
10 1.76 sci-libs/fftw/ChangeLog
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.76&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.76&content-type=text/plain
14 diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/ChangeLog?r1=1.75&r2=1.76
15
16 Index: ChangeLog
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v
19 retrieving revision 1.75
20 retrieving revision 1.76
21 diff -u -r1.75 -r1.76
22 --- ChangeLog 27 Nov 2008 10:39:28 -0000 1.75
23 +++ ChangeLog 26 Feb 2009 17:38:05 -0000 1.76
24 @@ -1,6 +1,12 @@
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.75 2008/11/27 10:39:28 bicatali Exp $
28 +# Copyright 2002-2009 Gentoo Foundation; Distributed under the GPL v2
29 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.76 2009/02/26 17:38:05 bicatali Exp $
30 +
31 +*fftw-3.2.1 (26 Feb 2009)
32 +
33 + 26 Feb 2009; Sébastien Fabbro <bicatali@g.o>
34 + +files/fftw-3.2.1-as-needed.patch, +fftw-3.2.1.ebuild:
35 + Version bump. More as-needed fixes, and general cleanup.
36
37 27 Nov 2008; Sébastien Fabbro <bicatali@g.o> fftw-3.2.ebuild:
38 Fixed for older libtool versions and forcing posix threads in the ebuild
39
40
41
42 1.1 sci-libs/fftw/fftw-3.2.1.ebuild
43
44 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-3.2.1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-3.2.1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: fftw-3.2.1.ebuild
48 ===================================================================
49 # Copyright 1999-2009 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.2.1.ebuild,v 1.1 2009/02/26 17:38:05 bicatali Exp $
52
53 EAPI=2
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 FFTW_THREADS="--disable-threads --disable-openmp"
67 if use openmp; then
68 FFTW_THREADS="--disable-threads --enable-openmp"
69 elif use threads; then
70 FFTW_THREADS="--enable-threads --disable-openmp"
71 fi
72 if use openmp &&
73 [[ $(tc-getCC)$ == *gcc* ]] &&
74 ( [[ $(gcc-major-version)$(gcc-minor-version) -lt 42 ]] ||
75 ! built_with_use sys-devel/gcc openmp )
76 then
77 ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
78 ewarn "If you want to build fftw with OpenMP, abort now,"
79 ewarn "and switch CC to an OpenMP capable compiler"
80 ewarn "Otherwise, we will build using POSIX threads."
81 epause 5
82 FFTW_THREADS="--enable-threads --disable-openmp"
83 fi
84 FORTRAN="gfortran ifc g77"
85 use fortran && fortran_pkg_setup
86 FFTW_DIRS="single double longdouble"
87 }
88
89 src_prepare() {
90 epatch "${FILESDIR}"/${P}-as-needed.patch
91
92 # fix info file for category directory
93 sed -i \
94 -e 's/Texinfo documentation system/Libraries/' \
95 doc/fftw3.info || die "failed to fix info file"
96
97 rm m4/lt* m4/libtool.m4
98
99 AT_M4DIR=m4 eautoreconf
100 for x in ${FFTW_DIRS}; do
101 mkdir "${S}-${x}" || die
102 done
103 }
104
105 src_configure() {
106 # filter -Os according to docs
107 replace-flags -Os -O2
108
109 local myconfcommon="--enable-shared
110 $(use_enable fortran)
111 ${FFTW_THREADS}"
112
113 local myconfsingle="${myconfcommon} --enable-single"
114 local myconfdouble="${myconfcommon}"
115 local myconflongdouble="${myconfcommon} --enable-long-double"
116 if use sse2; then
117 myconfsingle="${myconfsingle} --enable-sse"
118 myconfdouble="${myconfdouble} --enable-sse2"
119 elif use sse; then
120 myconfsingle="${myconfsingle} --enable-sse"
121 fi
122 # altivec only helps singles, not doubles
123 if use altivec; then
124 myconfsingle="${myconfsingle} --enable-altivec"
125 fi
126
127 for x in ${FFTW_DIRS}; do
128 cd "${S}-${x}"
129 einfo "Configuring for ${x} precision"
130 local p=myconf${x}
131 ECONF_SOURCE="${S}" econf ${!p}
132 done
133 }
134
135 src_compile() {
136 for x in ${FFTW_DIRS}; do
137 cd "${S}-${x}"
138 einfo "Compiling for ${x} precision"
139 emake || die "emake for ${x} precision failed"
140 done
141 }
142
143 src_test () {
144 # We want this to be a reasonably quick test, but that is still hard...
145 ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine"
146 # Do not increase the number of threads, it will not help your performance
147 #local testbase="perl check.pl --nthreads=1 --estimate"
148 # ${testbase} -${p}d || die "Failure: $n"
149 for x in ${FFTW_DIRS}; do
150 cd "${S}-${x}/tests"
151 einfo "Testing ${x} precision"
152 emake -j1 check || die "emake test ${x} failed"
153 done
154 }
155
156 src_install () {
157 # all builds are installed in the same place
158 # libs have distinuguished names; include files, docs etc. identical.
159 for x in ${FFTW_DIRS}; do
160 cd "${S}-${x}"
161 emake DESTDIR="${D}" install || die "emake install for ${x} failed"
162 done
163
164 cd "${S}"
165 dodoc AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS
166 if use doc; then
167 cd doc
168 insinto /usr/share/doc/${PF}
169 doins -r html fftw3.pdf || die "doc install failed"
170 insinto /usr/share/doc/${PF}/faq
171 doins FAQ/fftw-faq.html/*
172 fi
173 }