Gentoo Archives: gentoo-commits

From: "Christoph Junghans (ottxor)" <ottxor@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sci-libs/fftw: ChangeLog fftw-3.3.ebuild
Date: Wed, 31 Aug 2011 16:58:37
Message-Id: 20110831165827.2EC2E2004C@flycatcher.gentoo.org
1 ottxor 11/08/31 16:58:27
2
3 Modified: ChangeLog
4 Added: fftw-3.3.ebuild
5 Log:
6 version bump
7
8 (Portage version: 2.1.10.11/cvs/Linux i686)
9
10 Revision Changes Path
11 1.119 sci-libs/fftw/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.119&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.119&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/ChangeLog?r1=1.118&r2=1.119
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v
20 retrieving revision 1.118
21 retrieving revision 1.119
22 diff -u -r1.118 -r1.119
23 --- ChangeLog 24 Jun 2011 10:58:37 -0000 1.118
24 +++ ChangeLog 31 Aug 2011 16:58:27 -0000 1.119
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sci-libs/fftw
27 # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.118 2011/06/24 10:58:37 jlec Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.119 2011/08/31 16:58:27 ottxor Exp $
30 +
31 +*fftw-3.3 (31 Aug 2011)
32 +
33 + 31 Aug 2011; Christoph Junghans <ottxor@g.o> +fftw-3.3.ebuild:
34 + version bump (import from sci-overlay)
35
36 24 Jun 2011; Justin Lecher <jlec@g.o> fftw-2.1.5-r5.ebuild,
37 fftw-2.1.5-r8.ebuild, fftw-3.2.2.ebuild, fftw-3.2.2-r1.ebuild:
38
39
40
41 1.1 sci-libs/fftw/fftw-3.3.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/fftw-3.3.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/fftw-3.3.ebuild?rev=1.1&content-type=text/plain
45
46 Index: fftw-3.3.ebuild
47 ===================================================================
48 # Copyright 1999-2011 Gentoo Foundation
49 # Distributed under the terms of the GNU General Public License v2
50 # $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-3.3.ebuild,v 1.1 2011/08/31 16:58:27 ottxor Exp $
51
52 EAPI=4
53
54 inherit autotools eutils flag-o-matic fortran-2 toolchain-funcs
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 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
63 IUSE="altivec doc fortran mpi openmp sse sse2 static-libs threads"
64
65 DEPEND="
66 fortran? ( virtual/fortran )
67 mpi? ( virtual/mpi )"
68 RDEPEND="${DEPEND}"
69
70 pkg_setup() {
71 use openmp && FORTRAN_NEED_OPENMP="1"
72 use fortran && fortran-2_pkg_setup
73 use openmp && FFTW_OPENMP="--enable-openmp"
74 if use openmp && ! tc-has-openmp; then
75 ewarn "You are using gcc and OpenMP is only available with gcc >= 4.2 "
76 ewarn "If you want to build fftw with OpenMP, abort now,"
77 ewarn "and switch CC to an OpenMP capable compiler"
78 ewarn "Otherwise, we will build using POSIX threads."
79 epause 5
80 FFTW_OPENMP="--disable-openmp"
81 fi
82 FFTW_DIRS="single double longdouble"
83 use openmp && [[ $(tc-getCC)$ == icc* ]] && append-ldflags $(no-as-needed)
84 }
85
86 src_prepare() {
87 # fix info file for category directory
88 sed -i \
89 -e 's/Texinfo documentation system/Libraries/' \
90 doc/fftw3.info || die "failed to fix info file"
91
92 rm m4/lt* m4/libtool.m4
93
94 AT_M4DIR=m4 eautoreconf
95 for x in ${FFTW_DIRS}; do
96 mkdir "${S}-${x}" || die
97 done
98 }
99
100 src_configure() {
101 # filter -Os according to docs
102 replace-flags -Os -O2
103
104 local myconfcommon="--enable-shared
105 $(use_enable static-libs static)
106 $(use_enable fortran)
107 $(use_enable mpi)
108 $(use_enable threads)
109 ${FFTW_OPENMP}"
110
111 local myconfsingle="${myconfcommon} --enable-single"
112 local myconfdouble="${myconfcommon}"
113 local myconflongdouble="${myconfcommon} --enable-long-double"
114 if use sse2; then
115 myconfsingle="${myconfsingle} --enable-sse"
116 myconfdouble="${myconfdouble} --enable-sse2"
117 elif use sse; then
118 myconfsingle="${myconfsingle} --enable-sse"
119 fi
120 # altivec only helps singles, not doubles
121 if use altivec; then
122 myconfsingle="${myconfsingle} --enable-altivec"
123 fi
124
125 for x in ${FFTW_DIRS}; do
126 cd "${S}-${x}"
127 einfo "Configuring for ${x} precision"
128 local p=myconf${x}
129 ECONF_SOURCE="${S}" econf ${!p}
130 done
131 }
132
133 src_compile() {
134 for x in ${FFTW_DIRS}; do
135 cd "${S}-${x}"
136 einfo "Compiling for ${x} precision"
137 emake
138 done
139 }
140
141 src_test () {
142 # We want this to be a reasonably quick test, but that is still hard...
143 ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine"
144 # Do not increase the number of threads, it will not help your performance
145 #local testbase="perl check.pl --nthreads=1 --estimate"
146 # ${testbase} -${p}d || die "Failure: $n"
147 for x in ${FFTW_DIRS}; do
148 cd "${S}-${x}/tests"
149 einfo "Testing ${x} precision"
150 emake -j1 check
151 done
152 }
153
154 src_install () {
155 local f u
156
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
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
170 insinto /usr/share/doc/${PF}/faq
171 doins FAQ/fftw-faq.html/*
172 fi
173
174 use openmp && [[ ${FFTW_OPENMP} = "--enable-openmp" ]] && u="omp"
175 for f in "${ED}"/usr/lib*/pkgconfig/*.pc; do
176 for u in $(usev mpi) $(usev threads) ${u}; do
177 sed "s|-lfftw3[lf]\?|&_$u|" "$f" > "${f%.pc}_$u.pc" || die
178 done
179 done
180 }