PKGBUILDs/extra/fftw/PKGBUILD

134 lines
4.6 KiB
Bash
Raw Normal View History

2021-09-15 19:18:19 +00:00
# Maintainer: David Runge <dvzrv@archlinux.org>
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
2021-09-15 19:18:19 +00:00
pkgver=3.3.10
2020-12-15 14:59:52 +00:00
pkgrel=1
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')
2017-10-31 23:21:03 +00:00
source=("http://www.fftw.org/${pkgname}-${pkgver}.tar.gz")
2021-09-15 19:18:19 +00:00
sha512sums=('2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40')
b2sums=('3663872bd95a01d2c79af185f53918e1d1a9c91c620082402772c07f25b9b77d4920a78dc686fac6b51aa961b8d62b7e2cef3f3031e096bed40ced80b59b29d5')
2011-02-22 06:37:08 +00:00
2020-01-19 17:48:54 +00:00
prepare() {
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
2020-12-15 14:59:52 +00:00
# NOTE: fix overlinking
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
2020-01-19 17:48:54 +00:00
)
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}
2020-12-15 14:59:52 +00:00
# NOTE: fix overlinking
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
2020-01-19 17:48:54 +00:00
)
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
2020-12-15 14:59:52 +00:00
# NOTE: fix overlinking
sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
2020-01-19 17:48:54 +00:00
)
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"
2020-12-15 14:59:52 +00:00
# NOTE: cmake setup still missing MPI integration and needs patch for libquadmath
# _default_options=(
# -DCMAKE_INSTALL_PREFIX=/usr
# -DCMAKE_BUILD_TYPE='None'
# -DBUILD_SHARED_LIBS=ON
# -DENABLE_THREADS=ON
# -DENABLE_OPENMP=ON
# -Wno-dev
# )
#
# cmake "${_default_options[@]}" \
# -DENABLE_SSE2=ON \
# -DENABLE_AVX=ON \
# -B "${pkgname}-${pkgver}/build" \
# -S "${pkgname}-${pkgver}"
# make VERBOSE=1 -C "${pkgname}-${pkgver}/build"
#
# cmake "${_default_options[@]}" \
# -DENABLE_FLOAT=ON \
# -DENABLE_SSE=ON \
# -DENABLE_AVX=ON \
# -B "${pkgname}-${pkgver}/build-float" \
# -S "${pkgname}-${pkgver}"
# make VERBOSE=1 -C "${pkgname}-${pkgver}/build-float"
#
# cmake "${_default_options[@]}" \
# -DENABLE_LONG_DOUBLE=ON \
# -B "${pkgname}-${pkgver}/build-long-double" \
# -S "${pkgname}-${pkgver}"
# make VERBOSE=1 -C "${pkgname}-${pkgver}/build-long-double"
#
# cmake "${_default_options[@]}" \
# -DENABLE_QUAD_PRECISION=ON \
# -B "${pkgname}-${pkgver}/build-quad" \
# -S "${pkgname}-${pkgver}"
# make VERBOSE=1 -C "${pkgname}-${pkgver}/build-quad"
}
check() {
make check -C "${pkgname}-${pkgver}"
make check -C "${pkgname}-${pkgver}-double"
make check -C "${pkgname}-${pkgver}-long-double"
make check -C "${pkgname}-${pkgver}-quad"
# cd "${pkgname}-${pkgver}"
# make VERBOSE=1 -C build test
# make VERBOSE=1 -C build-float test
# make VERBOSE=1 -C build-long-double test
# make VERBOSE=1 -C build-quad test
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"
2020-12-15 14:59:52 +00:00
2020-01-19 17:48:54 +00:00
cd "${pkgname}-${pkgver}"
2020-12-15 14:59:52 +00:00
# make VERBOSE=1 DESTDIR="${pkgdir}" -C build install
# make VERBOSE=1 DESTDIR="${pkgdir}" -C build-float install
# make VERBOSE=1 DESTDIR="${pkgdir}" -C build-long-double install
# make VERBOSE=1 DESTDIR="${pkgdir}" -C build-quad install
2020-01-19 17:48:54 +00:00
install -vDm 644 {AUTHORS,ChangeLog,NEWS,README,TODO} \
-t "${pkgdir}/usr/share/doc/${pkgname}"
2011-02-22 06:37:08 +00:00
}