updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / lib32-fftw / PKGBUILD
blob17f6ca4f66e6965bfc89b1a1cdd6996bf4811f79
1 # Maintainer: josephgbr <rafael.f.f1@gmail.com>
3 _pkgbase=fftw
4 pkgname=lib32-${_pkgbase}
5 pkgver=3.3
6 pkgrel=1
7 pkgdesc="A library for computing the discrete Fourier transform (DFT) (32 bit)"
8 arch=('x86_64')
9 license=('GPL2')
10 url="http://www.fftw.org/"
11 depends=('lib32-glibc' "${_pkgbase}")
12 makedepends=('gcc-fortran-multilib')
13 options=(!libtool)
14 source=(http://www.fftw.org/${_pkgbase}-${pkgver}.tar.gz)
15 sha1sums=('e44493ba4babeacba184568e727876d9aed44205')
17 # notes:
18 # http://www.fftw.org/fftw2_doc/fftw_6.html#SEC69
19 # http://www.fftw.org/faq/section2.html#singleprec
20 # http://www.fftw.org/fftw3_doc/Precision.html#Precision
23 build() {
24   export CC='gcc -m32'
25   export CXX='g++ -m32'
26   export PKG_CONFIG_PATH='/usr/lib32/pkgconfig'
27   
28   cd "${srcdir}/${_pkgbase}-${pkgver}"
30   # use upstream default CFLAGS while keeping our -march/-mtune
31   CFLAGS+=" -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math"
33   CONFIGURE="./configure F77=gfortran --prefix=/usr \
34                  --enable-shared --enable-threads --libdir=/usr/lib32"
36   # build & install double precision
37   $CONFIGURE --enable-sse2
38   make
39   make DESTDIR="${pkgdir}" install
40   make clean 
42 # Disabled single and long double precision - this is a difference from the
43 # original 'fftw'. This can be activated anytime by uncommenting the list below,
44 # but be warned that compilation time will drastically increase. -- josephgbr
46   ## build & install long double precission
47   #$CONFIGURE --enable-long-double
48   #make
49   #make DESTDIR="${pkgdir}" install
50   #make clean
52   ## build & install single precision
53   #$CONFIGURE --enable-float --enable-sse
54   #make
55   #make DESTDIR="${pkgdir}" install
56   
57   rm -rf "${pkgdir}/usr"/{bin,include,share}