# $Id: PKGBUILD 136896 2011-09-02 17:27:59Z ronald $ # Maintainer: Ronald van Haren # Contributor: damir pkgname=fftw pkgver=3.3 pkgrel=1 pkgdesc="A library for computing the discrete Fourier transform (DFT)" arch=('i686' 'x86_64' 'mips64el') license=('GPL2') url="http://www.fftw.org/" depends=('glibc' 'bash') makedepends=('gcc-fortran') options=(!libtool) source=(http://www.fftw.org/${pkgname}-${pkgver}.tar.gz) install=fftw.install sha1sums=('e44493ba4babeacba184568e727876d9aed44205') # notes: # http://www.fftw.org/fftw2_doc/fftw_6.html#SEC69 # http://www.fftw.org/faq/section2.html#singleprec # http://www.fftw.org/fftw3_doc/Precision.html#Precision build() { cd ${srcdir}/${pkgname}-${pkgver} if [ "$CARCH" = "mips64el" ] ; then sse2="" sse="" aligndouble="" else sse2="--enable-sse2" sse="--enable-sse" aligndouble="-malign-double" fi # use upstream default CFLAGS while keeping our -march/-mtune CFLAGS+=" -O3 -fomit-frame-pointer $aligndouble -fstrict-aliasing -ffast-math" CONFIGURE="./configure F77=gfortran --prefix=/usr \ --enable-shared --enable-threads" msg "Build & install double precision" $CONFIGURE $sse2 make make DESTDIR=${pkgdir} install make clean msg "build & install long double precission" $CONFIGURE --enable-long-double make make DESTDIR=${pkgdir} install make clean msg "build & install single precision" $CONFIGURE --enable-float $sse make make DESTDIR=${pkgdir} install }