PKGBUILDs/extra/fftw/PKGBUILD

80 lines
2.7 KiB
Bash
Raw Normal View History

2011-02-22 06:37:08 +00:00
# Maintainer: Ronald van Haren <ronald.archlinux.org>
2020-01-19 17:48:54 +00:00
# Contributor: David Runge <dvzrv@archlinux.org>
2011-02-22 06:37:08 +00:00
# Contributor: damir <damir@archlinux.org>
2013-02-03 19:23:25 +00:00
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
2011-09-03 16:47:29 +00:00
# - removed -malign-double from CFLAGS
2011-02-22 06:37:08 +00:00
# - removed --enable-sse from single precision
2020-01-19 17:48:54 +00:00
# - removed --enable-sse2, --enable-avx from double precision
# - removed quad precision variant
2011-02-22 06:37:08 +00:00
pkgname=fftw
2018-05-28 22:22:02 +00:00
pkgver=3.3.8
2020-05-15 00:14:19 +00:00
pkgrel=3
2011-02-22 06:37:08 +00:00
pkgdesc="A library for computing the discrete Fourier transform (DFT)"
2018-05-28 22:22:02 +00:00
arch=('x86_64')
2011-02-22 06:37:08 +00:00
license=('GPL2')
url="http://www.fftw.org/"
2020-01-19 17:48:54 +00:00
depends=('bash' 'gcc-libs' 'glibc' 'openmpi')
2011-02-22 06:37:08 +00:00
makedepends=('gcc-fortran')
2020-01-19 17:48:54 +00:00
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')
2017-10-31 23:21:03 +00:00
source=("http://www.fftw.org/${pkgname}-${pkgver}.tar.gz")
2020-01-19 17:48:54 +00:00
# source=("https://github.com/${pkgname}/fftw3/archive/${pkgname}-${pkgver}.tar.gz")
sha512sums=('ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38')
2011-02-22 06:37:08 +00:00
2020-01-19 17:48:54 +00:00
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"
}
2011-02-22 06:37:08 +00:00
build() {
2020-01-19 17:48:54 +00:00
export F77='gfortran'
2011-02-22 06:37:08 +00:00
# use upstream default CFLAGS while keeping our -march/-mtune
CFLAGS+=" -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math"
2020-01-19 17:48:54 +00:00
# default configure call
_default_configure="./configure --prefix=/usr --enable-shared --enable-threads --enable-mpi --enable-openmp"
2011-02-22 06:37:08 +00:00
2020-01-19 17:48:54 +00:00
# configure single precision
(
cd "${pkgname}-${pkgver}"
${_default_configure} --enable-single
)
2011-02-22 06:37:08 +00:00
2020-01-19 17:48:54 +00:00
# configure double precision
(
cd "${pkgname}-${pkgver}-double"
${_default_configure}
)
2011-02-22 06:37:08 +00:00
2020-01-19 17:48:54 +00:00
# configure long-double precission
(
cd "${pkgname}-${pkgver}-long-double"
${_default_configure} --enable-long-double
)
2011-02-22 06:37:08 +00:00
2020-01-19 17:48:54 +00:00
make -C "${pkgname}-${pkgver}"
make -C "${pkgname}-${pkgver}-double"
make -C "${pkgname}-${pkgver}-long-double"
2013-02-03 19:23:25 +00:00
}
package() {
2020-01-19 17:48:54 +00:00
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}"
2011-02-22 06:37:08 +00:00
}