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: fftw-2.1.5-r4.ebuild fftw-2.1.5-r3.ebuild
Date: Tue, 29 Apr 2008 22:12:01
Message-Id: E1Jqy3K-0005NB-8E@stork.gentoo.org
1 bicatali 08/04/29 22:11:58
2
3 Added: fftw-2.1.5-r4.ebuild
4 Removed: fftw-2.1.5-r3.ebuild
5 Log:
6 Revision bump without changes to make sure users catch the link fixes (bug #219753)
7 (Portage version: 2.1.5_rc6, RepoMan options: --force)
8
9 Revision Changes Path
10 1.1 sci-libs/fftw/fftw-2.1.5-r4.ebuild
11
12 file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r4.ebuild?rev=1.1&view=markup
13 plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r4.ebuild?rev=1.1&content-type=text/plain
14
15 Index: fftw-2.1.5-r4.ebuild
16 ===================================================================
17 # Copyright 1999-2008 Gentoo Foundation
18 # Distributed under the terms of the GNU General Public License v2
19 # $Header: /var/cvsroot/gentoo-x86/sci-libs/fftw/fftw-2.1.5-r4.ebuild,v 1.1 2008/04/29 22:11:57 bicatali Exp $
20
21 inherit eutils flag-o-matic multilib autotools fortran
22
23 DESCRIPTION="Fast C library for the Discrete Fourier Transform"
24 SRC_URI="http://www.fftw.org/${P}.tar.gz"
25 HOMEPAGE="http://www.fftw.org"
26
27 # hppa does not have yet a virtual/mpi
28 DEPEND="mpi? ( !hppa? ( virtual/mpi ) )
29 mpi? ( hppa? ( sys-cluster/lam-mpi ) )"
30
31 SLOT="2.1"
32 LICENSE="GPL-2"
33 IUSE="doc fortran mpi float"
34
35 KEYWORDS="alpha amd64 hppa ia64 ppc ppc64 sparc x86"
36
37 pkg_setup() {
38 # this one is reported to cause trouble on pentium4 m series
39 filter-mfpmath "sse"
40
41 # here I need (surprise) to increase optimization:
42 # --enable-i386-hacks requires -fomit-frame-pointer to work properly
43 if [ "${ARCH}" == "x86" ]; then
44 is-flag "-fomit-frame-pointer" || append-flags "-fomit-frame-pointer"
45 fi
46 FORTRAN="gfortran ifc g77"
47 use fortran && fortran_pkg_setup
48 }
49
50 src_unpack() {
51 # doc suggests installing single and double precision versions
52 # via separate compilations. will do in two separate source trees
53 # since some sed'ing is done during the build
54 # (?if --enable-type-prefix is set?)
55
56 unpack ${A}
57 cd "${S}"
58 epatch "${FILESDIR}/${P}-as-needed.patch"
59 epatch "${FILESDIR}/${P}-configure.in.patch"
60
61 # fix info files
62 for infofile in doc/fftw*info*; do
63 cat >> ${infofile} <<-EOF
64 INFO-DIR-SECTION Libraries
65 START-INFO-DIR-ENTRY
66 * fftw: (fftw). ${DESCRIPTION}
67 END-INFO-DIR-ENTRY
68 EOF
69 done
70
71 eautoreconf
72
73 cd "${WORKDIR}"
74 cp -R ${P} ${P}-double
75 mv ${P} ${P}-single
76 }
77
78 src_compile() {
79 cd "${S}-single"
80 econf \
81 --enable-float \
82 --enable-shared \
83 --enable-type-prefix \
84 --enable-vec-recurse \
85 --enable-threads \
86 $(use_enable fortran) \
87 $(use_enable mpi) \
88 $(use_enable x86 i386-hacks) \
89 || die "econf for float failed"
90 emake || die "emake for float failed"
91
92 # the only difference here is no --enable-float
93 cd "${S}-double"
94 econf \
95 --enable-shared \
96 --enable-type-prefix \
97 --enable-vec-recurse \
98 --enable-threads \
99 $(use_enable fortran) \
100 $(use_enable mpi) \
101 $(use_enable x86 i386-hacks) \
102 || die "econf for double failed"
103 emake || die "emake for double failed"
104 }
105
106 src_test() {
107 cd "${S}-single"
108 emake check || die "emake check single failed"
109 cd "${S}-double"
110 emake check || die "emake check double failed"
111 }
112
113 src_install () {
114
115 # both builds are installed in the same place
116 # libs are distinguished by prefix (s or d), see docs for details
117
118 cd "${S}-single"
119 emake DESTDIR="${D}" install || die "emake install float failed"
120 insinto /usr/include
121 doins fortran/fftw_f77.i || die "doins failed"
122 dodoc AUTHORS ChangeLog NEWS TODO README README.hacks || die "dodoc failed"
123 use doc && dohtml doc/*
124
125 cd "${S}-double"
126 emake DESTDIR="${D}" install || die "emake install double failed"
127
128 if use float; then
129 for f in "${D}"/usr/{include,$(get_libdir)}/*sfft*; do
130 ln -s $(basename ${f}) ${f/sfft/fft}
131 done
132 for f in "${D}"/usr/{include,$(get_libdir)}/*srfft*; do
133 ln -s $(basename ${f}) ${f/srfft/rfft}
134 done
135 else
136 for f in "${D}"/usr/{include,$(get_libdir)}/*dfft*; do
137 ln -s $(basename ${f}) ${f/dfft/fft}
138 done
139 for f in "${D}"/usr/{include,$(get_libdir)}/*drfft*; do
140 ln -s $(basename ${f}) ${f/drfft/rfft}
141 done
142 fi
143 }
144
145
146
147 --
148 gentoo-commits@l.g.o mailing list