summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMcNoggins2015-12-22 10:09:11 -0500
committerMcNoggins2015-12-22 10:09:11 -0500
commit44621014794c2969b2023a01d4eaac883ebceb81 (patch)
tree99d38fba7308fcd2836006a00308f9b9adedfaef
downloadaur-44621014794c2969b2023a01d4eaac883ebceb81.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD61
-rw-r--r--fftw.install20
3 files changed, 101 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..db7c7b3daeab
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = fftw-mpi
+ pkgdesc = fftw, compiled with MPI and OpenMP support
+ pkgver = 3.3.4
+ pkgrel = 1
+ url = http://www.fftw.org/
+ install = fftw.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gcc-fortran
+ depends = glibc
+ depends = bash
+ depends = openmpi
+ provides = fftw
+ conflicts = fftw
+ source = http://www.fftw.org/fftw-3.3.4.tar.gz
+ sha1sums = fd508bac8ac13b3a46152c54b7ac885b69734262
+
+pkgname = fftw-mpi
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..471827d1d5cb
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,61 @@
+pkgname=fftw-mpi
+pkgver=3.3.4
+pkgrel=1
+pkgdesc="fftw, compiled with MPI and OpenMP support"
+arch=('i686' 'x86_64')
+license=('GPL2')
+url="http://www.fftw.org/"
+depends=('glibc' 'bash' 'openmpi')
+conflicts=('fftw')
+makedepends=('gcc-fortran')
+source=("http://www.fftw.org/fftw-${pkgver}.tar.gz")
+provides=('fftw')
+install=fftw.install
+sha1sums=('fd508bac8ac13b3a46152c54b7ac885b69734262')
+
+# 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}
+
+ cp -a fftw-${pkgver} fftw-${pkgver}-double
+ cp -a fftw-${pkgver} fftw-${pkgver}-long-double
+ mv fftw-${pkgver} fftw-${pkgver}-single
+
+
+ # 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 --enable-mpi --enable-openmp"
+
+ # build double precision
+ cd ${srcdir}/fftw-${pkgver}-double
+ $CONFIGURE --enable-sse2
+ make
+
+ # build & install long double precission
+ cd ${srcdir}/fftw-${pkgver}-long-double
+ $CONFIGURE --enable-long-double
+ make
+
+ # build & install single precision
+ cd ${srcdir}/fftw-${pkgver}-single
+ $CONFIGURE --enable-float --enable-sse
+ make
+}
+
+package() {
+ cd ${srcdir}/fftw-${pkgver}-double
+ make DESTDIR=${pkgdir} install
+
+ cd ${srcdir}/fftw-${pkgver}-long-double
+ make DESTDIR=${pkgdir} install
+
+ cd ${srcdir}/fftw-${pkgver}-single
+ make DESTDIR=${pkgdir} install
+}
diff --git a/fftw.install b/fftw.install
new file mode 100644
index 000000000000..b5784e94818f
--- /dev/null
+++ b/fftw.install
@@ -0,0 +1,20 @@
+info_dir=/usr/share/info
+info_files=(fftw3.info)
+
+post_install() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${info_files[@]}; do
+ install-info ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}
+
+post_upgrade() {
+ post_install
+}
+
+pre_remove() {
+ [[ -x usr/bin/install-info ]] || return 0
+ for f in ${info_files[@]}; do
+ install-info --delete ${info_dir}/$f.gz ${info_dir}/dir 2> /dev/null
+ done
+}