# Copyright 1999-2003 Gentoo Technologies, Inc. # Distributed under the terms of the GNU General Public License v2 # $Header: /home/cvsroot/gentoo-x86/dev-libs/fftw/fftw-2.1.5.ebuild,v 1.2 2003/05/07 22:47:54 george Exp $ inherit flag-o-matic IUSE="" MYP="${P/fftw3/fftw}" S="${WORKDIR}/${MYP}" DESCRIPTION="C subroutine library for computing the Discrete Fourier Transform (DFT)" SRC_URI="http://www.fftw.org/${MYP}.tar.gz" HOMEPAGE="http://www.fftw.org" SLOT="0" LICENSE="GPL-2" #remove ~'s on ppc and sparc when removig on x86 (as per recent discussion on -core) KEYWORDS="~x86 ~ppc ~sparc ~alpha" #this one is reported to cause trouble on pentium4 m series filter-flags "-mfpmath=sse" #here I need (surprise) to increase optimization: #--enable-i386-hacks requires -fomit-frame-pointer to work properly export CFLAGS="${CFLAGS/-fomit-frame-pointer/} -fomit-frame-pointer" pkg_setup() { einfo "" einfo "This ebuild installs double and single precision versions of library" einfo "This involves some name mangling, as supported by package and required" einfo "by some apps that use it." einfo "By default, the symlinks to non-mangled names will be created off" einfo "double-precision version. In order to symlink to single-precision use" einfo "SINGLE=yes emerge fftw" einfo "" } src_unpack() { #doc suggests installing single and double precision versions via separate compilations #will do in two separate source trees #since some sed'ing is done during the build (?if --enable-type-prefix is set?) unpack ${A} } src_compile() { local myconf="" #mpi is not a valid flag yet. In this revision it is used merely to block --enable-mpi option #it might be needed if it is decided that lam is an optional dependence econf \ --enable-shared \ --enable-threads \ --enable-type-prefix \ --enable-float \ --enable-i386-hacks \ --enable-vec-recurse \ ${myconf} || die "./configure failed" emake || die } src_install () { #both builds are installed in the same place #libs are distinguished by preffix (s or d), see docs for details make DESTDIR=${D} install || die cd "${S}-double" dodoc AUTHORS ChangeLog COPYING INSTALL NEWS TODO dohtml doc/fftw*.html }