mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
79 lines
2.7 KiB
Bash
79 lines
2.7 KiB
Bash
# Maintainer: Ronald van Haren <ronald.archlinux.org>
|
|
# Contributor: David Runge <dvzrv@archlinux.org>
|
|
# Contributor: damir <damir@archlinux.org>
|
|
|
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
|
# - removed -malign-double from CFLAGS
|
|
# - removed --enable-sse from single precision
|
|
# - removed --enable-sse2, --enable-avx from double precision
|
|
# - removed quad precision variant
|
|
|
|
pkgname=fftw
|
|
pkgver=3.3.8
|
|
pkgrel=2
|
|
pkgdesc="A library for computing the discrete Fourier transform (DFT)"
|
|
arch=('x86_64')
|
|
license=('GPL2')
|
|
url="http://www.fftw.org/"
|
|
depends=('bash' 'gcc-libs' 'glibc' 'openmpi')
|
|
makedepends=('gcc-fortran')
|
|
provides=('libfftw3q_threads.so' 'libfftw3q_omp.so' 'libfftw3q.so'
|
|
'libfftw3l_threads.so' 'libfftw3l_omp.so' 'libfftw3l_mpi.so' 'libfftw3l.so'
|
|
'libfftw3f_threads.so' 'libfftw3f_omp.so' 'libfftw3f_mpi.so' 'libfftw3f.so'
|
|
'libfftw3_threads.so' 'libfftw3_omp.so' 'libfftw3_mpi.so' 'libfftw3.so')
|
|
# makedepends=('gcc-fortran' 'ocaml' 'ocaml-num' 'ocamlbuild')
|
|
source=("http://www.fftw.org/${pkgname}-${pkgver}.tar.gz")
|
|
# source=("https://github.com/${pkgname}/fftw3/archive/${pkgname}-${pkgver}.tar.gz")
|
|
sha512sums=('ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38')
|
|
|
|
prepare() {
|
|
# issue with ocaml-num
|
|
# mv -v "fftw3-${pkgname}-${pkgver}" "${pkgname}-${pkgver}"
|
|
# (
|
|
# cd "$pkgname-$pkgver"
|
|
# cp -v NEWS ChangeLog
|
|
# autoreconf -vfi
|
|
# )
|
|
cp -av "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-double"
|
|
cp -av "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-long-double"
|
|
cp -av "${pkgname}-${pkgver}" "${pkgname}-${pkgver}-quad"
|
|
}
|
|
|
|
build() {
|
|
export F77='gfortran'
|
|
# use upstream default CFLAGS while keeping our -march/-mtune
|
|
CFLAGS+=" -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math"
|
|
# default configure call
|
|
_default_configure="./configure --prefix=/usr --enable-shared --enable-threads --enable-mpi --enable-openmp"
|
|
|
|
# configure single precision
|
|
(
|
|
cd "${pkgname}-${pkgver}"
|
|
${_default_configure} --enable-single
|
|
)
|
|
|
|
# configure double precision
|
|
(
|
|
cd "${pkgname}-${pkgver}-double"
|
|
${_default_configure}
|
|
)
|
|
|
|
# configure long-double precission
|
|
(
|
|
cd "${pkgname}-${pkgver}-long-double"
|
|
${_default_configure} --enable-long-double
|
|
)
|
|
|
|
make -C "${pkgname}-${pkgver}"
|
|
make -C "${pkgname}-${pkgver}-double"
|
|
make -C "${pkgname}-${pkgver}-long-double"
|
|
}
|
|
|
|
package() {
|
|
make DESTDIR="${pkgdir}" install -C "${pkgname}-${pkgver}"
|
|
make DESTDIR="${pkgdir}" install -C "${pkgname}-${pkgver}-double"
|
|
make DESTDIR="${pkgdir}" install -C "${pkgname}-${pkgver}-long-double"
|
|
cd "${pkgname}-${pkgver}"
|
|
install -vDm 644 {AUTHORS,ChangeLog,NEWS,README,TODO} \
|
|
-t "${pkgdir}/usr/share/doc/${pkgname}"
|
|
}
|