summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Berquist2015-09-09 07:58:40 -0400
committerEric Berquist2015-09-09 07:58:40 -0400
commit397a5a104a35a14bda5376c9cbc6b578173d22d2 (patch)
treec7449aca01295fed8decead6be47bcf9d5ed533d
downloadaur-397a5a104a35a14bda5376c9cbc6b578173d22d2.tar.gz
Initial commit.
-rw-r--r--.SRCINFO21
-rw-r--r--.gitignore7
-rw-r--r--PKGBUILD73
-rw-r--r--fftw2.install21
4 files changed, 122 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 00000000000..6393ea0f205
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,21 @@
+pkgbase = fftw2
+ pkgdesc = A library for computing the discrete Fourier transform (DFT), major version 2, with OpenMPI
+ pkgver = 2.1.5
+ pkgrel = 1
+ url = http://www.fftw.org/
+ install = fftw2.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gcc-fortran
+ makedepends = openmpi
+ depends = glibc
+ provides = fftw2
+ conflicts = fftw2
+ options = libtool
+ options = staticlibs
+ source = http://www.fftw.org/fftw-2.1.5.tar.gz
+ sha1sums = 12020b58edc1b0490a83db4aa912fac5dfdfb26b
+
+pkgname = fftw2
+
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 00000000000..d77ee05e194
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,7 @@
+# makepkg files
+pkg/
+src/
+*.xz
+
+# source files
+*.gz
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 00000000000..ee4488ec350
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,73 @@
+# Maintainer: Eric Berquist <eric DOT berquist AT gmail DOT com>
+
+_basename=fftw
+pkgname=fftw2
+pkgver=2.1.5
+pkgrel=1
+pkgdesc="A library for computing the discrete Fourier transform (DFT), major version 2, with OpenMPI"
+arch=("i686" "x86_64")
+license=("GPL2")
+url="http://www.fftw.org/"
+provides=("${pkgname}")
+conflicts=("${pkgname}")
+depends=("glibc")
+makedepends=("gcc-fortran" "openmpi")
+options=("libtool" "staticlibs")
+source=("http://www.fftw.org/${_basename}-${pkgver}.tar.gz")
+sha1sums=('12020b58edc1b0490a83db4aa912fac5dfdfb26b')
+install=fftw2.install
+
+# 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}
+
+ # Don"t want to switch all the variable names in the PKGBUILD.
+ mv ${_basename}-${pkgver} ${pkgname}-${pkgver}
+
+ cp -a ${pkgname}-${pkgver} ${pkgname}-${pkgver}-double
+ mv ${pkgname}-${pkgver} ${pkgname}-${pkgver}-single
+
+ # use upstream default CFLAGS while keeping our -march/-mtune
+ CFLAGS+=" -fomit-frame-pointer -malign-double -fstrict-aliasing -ffast-math"
+
+ CONFIGURE="./configure \
+ F77=gfortran \
+ --with-gcc \
+ --prefix=/usr \
+ --infodir=/usr/share/info \
+ --enable-type-prefix \
+ --enable-shared \
+ --enable-threads \
+ --enable-openmp \
+ --enable-mpi"
+
+ # double precision
+ cd ${srcdir}/${pkgname}-${pkgver}-double
+ ${CONFIGURE}
+ make
+
+ # single precision
+ cd ${srcdir}/${pkgname}-${pkgver}-single
+ ${CONFIGURE} --enable-float
+ make
+}
+
+check() {
+ cd ${srcdir}/${pkgname}-${pkgver}-double
+ make check
+
+ cd ${srcdir}/${pkgname}-${pkgver}-single
+ make check
+}
+
+package() {
+ cd ${srcdir}/${pkgname}-${pkgver}-double
+ make DESTDIR=${pkgdir} install
+
+ cd ${srcdir}/${pkgname}-${pkgver}-single
+ make DESTDIR=${pkgdir} install
+}
diff --git a/fftw2.install b/fftw2.install
new file mode 100644
index 00000000000..d5080cdb692
--- /dev/null
+++ b/fftw2.install
@@ -0,0 +1,21 @@
+info_dir=/usr/share/info
+info_files=(fftw.info fftw.info-1 fftw.info-2 fftw.info-3 fftw.info-4 fftw.info-5)
+
+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() {
+ pre_remove $1
+ post_install $1
+}
+
+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
+}