80 lines
1.9 KiB
Bash
80 lines
1.9 KiB
Bash
# Template file for 'fftw'
|
|
pkgname=fftw
|
|
version=3.3.8
|
|
revision=2
|
|
hostmakedepends="libtool automake"
|
|
makedepends="libgomp-devel"
|
|
short_desc="Library for computing the discrete Fourier transform (DFT)"
|
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
|
license="GPL-2.0-or-later"
|
|
homepage="http://www.fftw.org/"
|
|
distfiles="${homepage}/fftw-${version}.tar.gz"
|
|
checksum=6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303
|
|
|
|
pre_configure() {
|
|
sed -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,g' -i configure.ac
|
|
if [ "$CROSS_BUILD" ]; then
|
|
# Remove test which does not work when cross compiling
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
armv[78]*|aarch64*) sed -i configure.ac \
|
|
-e "/dnl Check for not-always-available (not quite) cycle counters/,+26d"
|
|
esac
|
|
fi
|
|
autoreconf -fi
|
|
}
|
|
|
|
do_configure() {
|
|
local CARGS="--enable-shared --enable-threads --enable-openmp"
|
|
|
|
case "$XBPS_TARGET_MACHINE" in
|
|
i686*|x86_64*) _sse="--enable-sse"; _sse2="--enable-sse2";;
|
|
esac
|
|
|
|
# double precision
|
|
mkdir build-double
|
|
cd ${wrksrc}/build-double
|
|
../configure ${configure_args} ${CARGS} ${_sse2}
|
|
|
|
# long double precission
|
|
mkdir ${wrksrc}/build-long-double
|
|
cd ${wrksrc}/build-long-double
|
|
../configure ${configure_args} ${CARGS} --enable-long-double
|
|
|
|
# single precission
|
|
mkdir ${wrksrc}/build-single
|
|
cd ${wrksrc}/build-single
|
|
../configure ${configure_args} ${CARGS} --enable-float ${_sse}
|
|
}
|
|
|
|
do_build() {
|
|
for f in double long-double single; do
|
|
cd ${wrksrc}/build-${f}
|
|
make ${makejobs}
|
|
done
|
|
}
|
|
|
|
do_install() {
|
|
for f in double long-double single; do
|
|
cd ${wrksrc}/build-${f}
|
|
make DESTDIR=${DESTDIR} install
|
|
done
|
|
}
|
|
|
|
libfftw_package() {
|
|
short_desc+=" - runtime libraries"
|
|
pkg_install() {
|
|
vmove "usr/lib/*.so.*"
|
|
}
|
|
}
|
|
fftw-devel_package() {
|
|
depends="libfftw>=${version}_${revision}"
|
|
short_desc+=" - Development files"
|
|
pkg_install() {
|
|
vmove usr/include
|
|
vmove usr/lib/pkgconfig
|
|
vmove usr/lib/cmake
|
|
vmove "usr/lib/*.a"
|
|
vmove "usr/lib/*.so"
|
|
vmove usr/share/info
|
|
}
|
|
}
|