[arch-commits] Commit in fftw/trunk (PKGBUILD)

Allan McRae allan at archlinux.org
Sat Feb 19 07:05:56 UTC 2011


    Date: Saturday, February 19, 2011 @ 02:05:55
  Author: allan
Revision: 110392

upgpkg: fftw 3.2.2-2
build with threads and (optional) sse1/2 support (FS#19172, FS#18541)

Modified:
  fftw/trunk/PKGBUILD

----------+
 PKGBUILD |   36 ++++++++++++++++++++----------------
 1 file changed, 20 insertions(+), 16 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2011-02-19 06:51:02 UTC (rev 110391)
+++ PKGBUILD	2011-02-19 07:05:55 UTC (rev 110392)
@@ -4,12 +4,13 @@
 
 pkgname=fftw
 pkgver=3.2.2
-pkgrel=1
+pkgrel=2
 pkgdesc="A library for computing the discrete Fourier transform (DFT)"
 arch=('i686' 'x86_64')
 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
@@ -23,24 +24,27 @@
 
 build() {
   cd ${srcdir}/${pkgname}-${pkgver}
-  
- # build & install double precision
-  ./configure F77=gfortran --prefix=/usr \
-              --enable-shared || return 1
-  make || return 1
-  make DESTDIR=${pkgdir} install || return 1
+
+  # use upstream default CFLAGS while keeping our -march/-mtune
+  CFLAGS+=" -O3 -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math"
+
+  CONFIGURE="./configure F77=gfortran --prefix=/usr \
+                 --enable-shared --enable-threads"
+
+  # build & install double precision
+  $CONFIGURE --enable-sse2
+  make
+  make DESTDIR=${pkgdir} install
   make clean 
 
   # build & install long double precission
-  ./configure F77=gfortran --prefix=/usr \
-   --enable-long-double  --enable-shared || return 1
-  make || return 1
-  make DESTDIR=${pkgdir} install || return 1
+  $CONFIGURE --enable-long-double
+  make
+  make DESTDIR=${pkgdir} install
   make clean
 
-  # build + install single precision
-  ./configure F77=gfortran --prefix=/usr \
-              --enable-float --enable-shared || return 1
-  make || return 1
-  make DESTDIR=${pkgdir} install || return 1
+  # build & install single precision
+  $CONFIGURE --enable-float --enable-sse
+  make
+  make DESTDIR=${pkgdir} install
 }




More information about the arch-commits mailing list