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.1_beta1.ebuild
Date: Sun, 05 Feb 2012 20:55:06
Message-Id: 20120205205457.1F5BE2004C@flycatcher.gentoo.org
1 ottxor 12/02/05 20:54:57
2
3 Modified: ChangeLog
4 Added: fftw-3.3.1_beta1.ebuild
5 Log:
6 added 3.3.1_beta1 with neon support
7
8 (Portage version: 2.2.0_alpha85/cvs/Linux i686)
9
10 Revision Changes Path
11 1.123 sci-libs/fftw/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.123&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/ChangeLog?rev=1.123&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/ChangeLog?r1=1.122&r2=1.123
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v
20 retrieving revision 1.122
21 retrieving revision 1.123
22 diff -u -r1.122 -r1.123
23 --- ChangeLog 5 Feb 2012 20:39:36 -0000 1.122
24 +++ ChangeLog 5 Feb 2012 20:54:57 -0000 1.123
25 @@ -1,6 +1,11 @@
26 # ChangeLog for sci-libs/fftw
27 # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.122 2012/02/05 20:39:36 ottxor Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/ChangeLog,v 1.123 2012/02/05 20:54:57 ottxor Exp $
30 +
31 +*fftw-3.3.1_beta1 (05 Feb 2012)
32 +
33 + 05 Feb 2012; Christoph Junghans <ottxor@g.o> +fftw-3.3.1_beta1.ebuild:
34 + added 3.3.1_beta1 with neon support
35
36 *fftw-3.2.2-r2 (05 Feb 2012)
37
38
39
40
41 1.1 sci-libs/fftw/fftw-3.3.1_beta1.ebuild
42
43 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/fftw-3.3.1_beta1.ebuild?rev=1.1&view=markup
44 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sci-libs/fftw/fftw-3.3.1_beta1.ebuild?rev=1.1&content-type=text/plain
45
46 Index: fftw-3.3.1_beta1.ebuild
47 ===================================================================
48 # Copyright 1999-2012 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.1_beta1.ebuild,v 1.1 2012/02/05 20:54:57 ottxor Exp $
51
52 EAPI=4
53
54 inherit autotools-utils 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 avx doc fortran mpi neon openmp quad sse sse2 static-libs threads zbus"
64
65 DEPEND="
66 fortran? ( virtual/fortran[openmp?] )
67 mpi? ( virtual/mpi )"
68 RDEPEND="${DEPEND}"
69
70 S=${WORKDIR}/${P/_/-}
71
72 AUTOTOOLS_AUTORECONF=1
73
74 DOCS=( AUTHORS ChangeLog NEWS README TODO COPYRIGHT CONVENTIONS doc/fftw3.pdf )
75
76 HTML_DOCS=( doc/html/ )
77
78 pkg_setup() {
79 if use openmp; then
80 tc-has-openmp || die "Please ensure your compiler has openmp support"
81 FORTRAN_NEED_OPENMP="1"
82 [[ $(tc-getCC)$ == icc* ]] && append-ldflags $(no-as-needed)
83 fi
84 use fortran && fortran-2_pkg_setup
85 FFTW_DIRS="single double longdouble"
86 use quad && FFTW_DIRS+= "quad"
87 }
88
89 src_prepare() {
90 # fix info file for category directory
91 sed -i \
92 -e 's/Texinfo documentation system/Libraries/' \
93 doc/fftw3.info || die "failed to fix info file"
94
95 rm -f m4/lt* m4/libtool.m4
96 }
97
98 src_configure() {
99 local x
100
101 # filter -Os according to docs
102 replace-flags -Os -O2
103
104 for x in ${FFTW_DIRS}; do
105 myeconfargs=(
106 $(use_enable fortran)
107 $(use_enable zbus mips-zbus-timer)
108 $(use_enable threads)
109 $(use_enable openmp)
110 )
111 if [[ $x == single ]]; then
112 #altivec, sse, single-paired only work for single
113 myeconfargs+=(
114 --enable-single
115 $(use_enable altivec)
116 $(use_enable avx)
117 $(use_enable sse)
118 $(use_enable mpi)
119 $(use_enable neon)
120 )
121 elif [[ $x == double ]]; then
122 myeconfargs+=(
123 $(use_enable avx)
124 $(use_enable sse2)
125 $(use_enable mpi)
126 )
127 elif [[ $x == longdouble ]]; then
128 myeconfargs+=(
129 --enable-long-double
130 $(use_enable mpi)
131 )
132 elif [[ $x == quad ]]; then
133 #quad does not support mpi
134 myeconfargs+=( --enable-quad-precision )
135 else
136 die "${x} precision not implemented in this ebuild"
137 fi
138
139 einfo "Configuring for ${x} precision"
140 AUTOTOOLS_BUILD_DIR="${S}-${x}" \
141 autotools-utils_src_configure
142 done
143 }
144
145 src_compile() {
146 for x in ${FFTW_DIRS}; do
147 einfo "Compiling for ${x} precision"
148 AUTOTOOLS_BUILD_DIR="${S}-${x}" \
149 autotools-utils_src_compile
150 done
151 }
152
153 src_test () {
154 # We want this to be a reasonably quick test, but that is still hard...
155 ewarn "This test series will take 30 minutes on a modern 2.5Ghz machine"
156 # Do not increase the number of threads, it will not help your performance
157 #local testbase="perl check.pl --nthreads=1 --estimate"
158 # ${testbase} -${p}d || die "Failure: $n"
159 for x in ${FFTW_DIRS}; do
160 cd "${S}-${x}/tests"
161 einfo "Testing ${x} precision"
162 emake -j1 check
163 done
164 }
165
166 src_install () {
167 local u x
168
169 for x in ${FFTW_DIRS}; do
170 AUTOTOOLS_BUILD_DIR="${S}-${x}" \
171 autotools-utils_src_install
172 done
173
174 if use doc; then
175 insinto /usr/share/doc/"${PF}"/faq
176 doins -r "${S}"/doc/FAQ/fftw-faq.html/*
177 fi
178
179 for x in "${ED}"/usr/lib*/pkgconfig/*.pc; do
180 for u in $(usev mpi) $(usev threads) $(usex openmp omp ""); do
181 sed "s|-lfftw3[flq]\?|&_$u &|" "$x" > "${x%.pc}_$u.pc" || die
182 done
183 done
184 }