2013-02-03 19:23:25 +00:00
|
|
|
# $Id$
|
2011-02-22 06:37:08 +00:00
|
|
|
# Maintainer: Ronald van Haren <ronald.archlinux.org>
|
|
|
|
# Contributor: damir <damir@archlinux.org>
|
|
|
|
|
2013-02-03 19:23:25 +00:00
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
2011-09-03 16:47:29 +00:00
|
|
|
# - removed -malign-double from CFLAGS
|
2011-02-22 06:37:08 +00:00
|
|
|
# - removed --enable-sse2 from double precision
|
|
|
|
# - removed --enable-sse from single precision
|
|
|
|
|
|
|
|
pkgname=fftw
|
2017-01-22 18:04:30 +00:00
|
|
|
pkgver=3.3.6
|
2017-04-02 23:37:09 +00:00
|
|
|
pkgrel=2
|
2011-02-22 06:37:08 +00:00
|
|
|
pkgdesc="A library for computing the discrete Fourier transform (DFT)"
|
|
|
|
arch=('i686' 'x86_64')
|
|
|
|
license=('GPL2')
|
|
|
|
url="http://www.fftw.org/"
|
2014-04-10 13:12:41 +00:00
|
|
|
depends=('bash' 'gcc-libs')
|
2011-02-22 06:37:08 +00:00
|
|
|
makedepends=('gcc-fortran')
|
2017-04-02 23:37:09 +00:00
|
|
|
source=("http://www.fftw.org/${pkgname}-${pkgver}-pl2.tar.gz")
|
|
|
|
sha1sums=('66384d4bf5da3efbcbb9d6ea92f0df264b1620b1')
|
2011-02-22 06:37:08 +00:00
|
|
|
|
|
|
|
# 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() {
|
2013-02-03 19:23:25 +00:00
|
|
|
cd ${srcdir}
|
|
|
|
|
2017-04-02 23:37:09 +00:00
|
|
|
cp -a ${pkgname}-${pkgver}-pl2 ${pkgname}-${pkgver}-double
|
|
|
|
cp -a ${pkgname}-${pkgver}-pl2 ${pkgname}-${pkgver}-long-double
|
|
|
|
mv ${pkgname}-${pkgver}-pl2 ${pkgname}-${pkgver}-single
|
2013-02-03 19:23:25 +00:00
|
|
|
|
2011-02-22 06:37:08 +00:00
|
|
|
|
|
|
|
# use upstream default CFLAGS while keeping our -march/-mtune
|
|
|
|
CFLAGS+=" -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math"
|
|
|
|
|
|
|
|
CONFIGURE="./configure F77=gfortran --prefix=/usr \
|
2013-02-03 19:23:25 +00:00
|
|
|
--enable-shared --enable-threads"
|
2011-02-22 06:37:08 +00:00
|
|
|
|
2013-02-03 19:23:25 +00:00
|
|
|
# build double precision
|
|
|
|
cd ${srcdir}/${pkgname}-${pkgver}-double
|
2011-02-22 06:37:08 +00:00
|
|
|
$CONFIGURE
|
|
|
|
make
|
|
|
|
|
|
|
|
# build & install long double precission
|
2013-02-03 19:23:25 +00:00
|
|
|
cd ${srcdir}/${pkgname}-${pkgver}-long-double
|
2011-02-22 06:37:08 +00:00
|
|
|
$CONFIGURE --enable-long-double
|
|
|
|
make
|
|
|
|
|
|
|
|
# build & install single precision
|
2013-02-03 19:23:25 +00:00
|
|
|
cd ${srcdir}/${pkgname}-${pkgver}-single
|
2011-02-22 06:37:08 +00:00
|
|
|
$CONFIGURE --enable-float
|
|
|
|
make
|
2013-02-03 19:23:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
package() {
|
|
|
|
cd ${srcdir}/${pkgname}-${pkgver}-double
|
|
|
|
make DESTDIR=${pkgdir} install
|
|
|
|
|
|
|
|
cd ${srcdir}/${pkgname}-${pkgver}-long-double
|
2011-02-22 06:37:08 +00:00
|
|
|
make DESTDIR=${pkgdir} install
|
2013-02-03 19:23:25 +00:00
|
|
|
|
|
|
|
cd ${srcdir}/${pkgname}-${pkgver}-single
|
|
|
|
make DESTDIR=${pkgdir} install
|
2011-02-22 06:37:08 +00:00
|
|
|
}
|