mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
extra/fftw to 3.3.8-2
This commit is contained in:
parent
204f399b84
commit
3fd2efd776
1 changed files with 51 additions and 37 deletions
|
@ -1,65 +1,79 @@
|
||||||
# $Id$
|
|
||||||
# Maintainer: Ronald van Haren <ronald.archlinux.org>
|
# Maintainer: Ronald van Haren <ronald.archlinux.org>
|
||||||
|
# Contributor: David Runge <dvzrv@archlinux.org>
|
||||||
# Contributor: damir <damir@archlinux.org>
|
# Contributor: damir <damir@archlinux.org>
|
||||||
|
|
||||||
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
# ALARM: Kevin Mihelich <kevin@archlinuxarm.org>
|
||||||
# - removed -malign-double from CFLAGS
|
# - removed -malign-double from CFLAGS
|
||||||
# - removed --enable-sse2 from double precision
|
|
||||||
# - removed --enable-sse from single precision
|
# - removed --enable-sse from single precision
|
||||||
|
# - removed --enable-sse2, --enable-avx from double precision
|
||||||
|
# - removed quad precision variant
|
||||||
|
|
||||||
pkgname=fftw
|
pkgname=fftw
|
||||||
pkgver=3.3.8
|
pkgver=3.3.8
|
||||||
pkgrel=1
|
pkgrel=2
|
||||||
pkgdesc="A library for computing the discrete Fourier transform (DFT)"
|
pkgdesc="A library for computing the discrete Fourier transform (DFT)"
|
||||||
arch=('x86_64')
|
arch=('x86_64')
|
||||||
license=('GPL2')
|
license=('GPL2')
|
||||||
url="http://www.fftw.org/"
|
url="http://www.fftw.org/"
|
||||||
depends=('bash' 'gcc-libs')
|
depends=('bash' 'gcc-libs' 'glibc' 'openmpi')
|
||||||
makedepends=('gcc-fortran')
|
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=("http://www.fftw.org/${pkgname}-${pkgver}.tar.gz")
|
||||||
sha1sums=('59831bd4b2705381ee395e54aa6e0069b10c3626')
|
# source=("https://github.com/${pkgname}/fftw3/archive/${pkgname}-${pkgver}.tar.gz")
|
||||||
|
sha512sums=('ab918b742a7c7dcb56390a0a0014f517a6dff9a2e4b4591060deeb2c652bf3c6868aa74559a422a276b853289b4b701bdcbd3d4d8c08943acf29167a7be81a38')
|
||||||
# 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
|
|
||||||
|
|
||||||
|
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() {
|
build() {
|
||||||
cp -a ${pkgname}-${pkgver} ${pkgname}-${pkgver}-double
|
export F77='gfortran'
|
||||||
cp -a ${pkgname}-${pkgver} ${pkgname}-${pkgver}-long-double
|
|
||||||
mv ${pkgname}-${pkgver} ${pkgname}-${pkgver}-single
|
|
||||||
|
|
||||||
|
|
||||||
# use upstream default CFLAGS while keeping our -march/-mtune
|
# use upstream default CFLAGS while keeping our -march/-mtune
|
||||||
CFLAGS+=" -O3 -fomit-frame-pointer -fstrict-aliasing -ffast-math"
|
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="./configure F77=gfortran --prefix=/usr \
|
# configure single precision
|
||||||
--enable-shared --enable-threads"
|
(
|
||||||
|
cd "${pkgname}-${pkgver}"
|
||||||
|
${_default_configure} --enable-single
|
||||||
|
)
|
||||||
|
|
||||||
# build double precision
|
# configure double precision
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}-double
|
(
|
||||||
$CONFIGURE
|
cd "${pkgname}-${pkgver}-double"
|
||||||
make
|
${_default_configure}
|
||||||
|
)
|
||||||
|
|
||||||
# build & install long double precission
|
# configure long-double precission
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}-long-double
|
(
|
||||||
$CONFIGURE --enable-long-double
|
cd "${pkgname}-${pkgver}-long-double"
|
||||||
make
|
${_default_configure} --enable-long-double
|
||||||
|
)
|
||||||
|
|
||||||
# build & install single precision
|
make -C "${pkgname}-${pkgver}"
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}-single
|
make -C "${pkgname}-${pkgver}-double"
|
||||||
$CONFIGURE --enable-float
|
make -C "${pkgname}-${pkgver}-long-double"
|
||||||
make
|
|
||||||
}
|
}
|
||||||
|
|
||||||
package() {
|
package() {
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}-double
|
make DESTDIR="${pkgdir}" install -C "${pkgname}-${pkgver}"
|
||||||
make DESTDIR=${pkgdir} install
|
make DESTDIR="${pkgdir}" install -C "${pkgname}-${pkgver}-double"
|
||||||
|
make DESTDIR="${pkgdir}" install -C "${pkgname}-${pkgver}-long-double"
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}-long-double
|
cd "${pkgname}-${pkgver}"
|
||||||
make DESTDIR=${pkgdir} install
|
install -vDm 644 {AUTHORS,ChangeLog,NEWS,README,TODO} \
|
||||||
|
-t "${pkgdir}/usr/share/doc/${pkgname}"
|
||||||
cd ${srcdir}/${pkgname}-${pkgver}-single
|
|
||||||
make DESTDIR=${pkgdir} install
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue