summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Minges2015-06-28 12:17:12 +0200
committerAlexander Minges2015-06-28 12:17:12 +0200
commite7aec2f651a90102f9d01e6f23cef98ecd66ebf4 (patch)
tree70f3538c944ea84e5cbe4855baa900602abedb97
downloadaur-e7aec2f651a90102f9d01e6f23cef98ecd66ebf4.tar.gz
Initial commit
-rw-r--r--.SRCINFO20
-rw-r--r--PKGBUILD82
-rw-r--r--doctex.patch16
-rw-r--r--fftw2-float.install20
4 files changed, 138 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..56b6606a61d4
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,20 @@
+pkgbase = fftw2-float
+ pkgdesc = A C subroutine library for computing the discrete Fourier transform (DFT); Defaults to single precision
+ pkgver = 2.1.5
+ pkgrel = 1
+ url = http://www.fftw.org/
+ install = fftw2-float.install
+ arch = i686
+ arch = x86_64
+ license = GPL2
+ makedepends = gcc-fortran
+ depends = openmpi
+ provides = fftw2
+ options = !libtool
+ source = http://www.fftw.org/fftw-2.1.5.tar.gz
+ source = doctex.patch
+ md5sums = 8d16a84f3ca02a785ef9eb36249ba433
+ md5sums = ab9e67b83c3254f32aa12b9b16b7d80f
+
+pkgname = fftw2-float
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..1537737b1350
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,82 @@
+# Maintainer: Aaron Ali <t0nedef@causal.ca>
+# Contributor: damir <damir@archlinux.org>
+
+pkgname=fftw2-float
+pkgver=2.1.5
+pkgrel=1
+pkgdesc="A C subroutine library for computing the discrete Fourier transform (DFT); Defaults to single precision"
+arch=('i686' 'x86_64')
+url="http://www.fftw.org/"
+license=('GPL2')
+depends=('openmpi')
+makedepends=('gcc-fortran')
+options=('!libtool')
+provides=(fftw2)
+source=(
+ "http://www.fftw.org/fftw-${pkgver}.tar.gz"
+ "doctex.patch"
+)
+install=${pkgname}.install
+
+build() {
+ cd "${srcdir}"
+
+ # clean source tree and apply patch for latex info files
+ # (which are not cleaned by default)
+ cd fftw-${pkgver}
+ ./configure -q
+ cd doc
+ make maintainer-clean # doing this on the entire tree results in inability to build
+ cd ..
+ ./configure -q
+ make distclean
+ cd ..
+ patch -p0 < doctex.patch
+
+ # copy source tree for two build options
+ cp -r fftw-${pkgver} fftw-${pkgver}-double
+
+ # build single precision
+ cd fftw-${pkgver}
+ ./configure F77=gfortran --prefix=/usr \
+ --enable-float \
+ --enable-type-prefix \
+ --enable-shared \
+ --enable-threads \
+ --enable-mpi \
+ --infodir=/usr/share/info
+ make
+ cd ../
+
+ # build double precision
+ cd fftw-${pkgver}-double
+ ./configure F77=gfortran --prefix=/usr \
+ --enable-type-prefix \
+ --enable-shared \
+ --enable-threads \
+ --enable-mpi \
+ --infodir=/usr/share/info
+ make
+}
+
+package() {
+ # install single precision
+ cd "${srcdir}"/fftw-${pkgver}
+ make DESTDIR="${pkgdir}" install
+
+ # install double precision
+ cd "${srcdir}"/fftw-${pkgver}-double
+ make DESTDIR="${pkgdir}" install
+
+ # provide single precision as default
+
+ for f in "${pkgdir}"/usr/{include,$(get_libdir)}/*sfft*; do
+ ln -s $(basename ${f}) ${f/sfft/fft}
+ done
+ for f in "${pkgdir}"/usr/{include,$(get_libdir)}/*srfft*; do
+ ln -s $(basename ${f}) ${f/srfft/rfft}
+ done
+}
+#
+md5sums=('8d16a84f3ca02a785ef9eb36249ba433'
+ 'ab9e67b83c3254f32aa12b9b16b7d80f')
diff --git a/doctex.patch b/doctex.patch
new file mode 100644
index 000000000000..2353f8dc612b
--- /dev/null
+++ b/doctex.patch
@@ -0,0 +1,16 @@
+--- fftw-2.1.5/doc/fftw.texi 2003-03-16 18:43:18.000000000 -0500
++++ fftw-2.1.5-new/doc/fftw.texi 2013-03-02 08:07:14.933916909 -0500
+@@ -46,10 +46,10 @@
+ @titlepage
+ @sp 10
+ @comment The title is printed in a large font.
+-@title{FFTW User's Manual}
++@title FFTW User's Manual
+ @subtitle For version @value{VERSION}, @value{UPDATED}
+-@author{Matteo Frigo}
+-@author{Steven G. Johnson}
++@author Matteo Frigo
++@author Steven G. Johnson
+
+ @c The following two commands start the copyright page.
+ @page
diff --git a/fftw2-float.install b/fftw2-float.install
new file mode 100644
index 000000000000..dcefffc82497
--- /dev/null
+++ b/fftw2-float.install
@@ -0,0 +1,20 @@
+infodir=usr/share/info
+filelist=(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
+ install-info $infodir/fftw.info.gz $infodir/dir 2> /dev/null
+}
+
+post_upgrade() {
+ pre_remove $1
+ post_install $1
+}
+
+pre_remove() {
+ [ -x usr/bin/install-info ] || return 0
+ for file in ${filelist[@]}; do
+ install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+ done
+}
+