FFTW: bump, enable fortran, debuginfo, cleanup (#2896)

This commit is contained in:
miqlas
2018-08-05 19:38:17 +02:00
committed by waddlesplash
parent 364dbe4e4e
commit c599caa7bb
2 changed files with 127 additions and 0 deletions

View File

@@ -0,0 +1,103 @@
SUMMARY="Fast C library for the Discrete Fourier Transform"
DESCRIPTION="FFTW is a C subroutine library for computing the discrete \
Fourier transform (DFT) in one or more dimensions, of arbitrary input size, \
and of both real and complex data (as well as of even/odd data, i.e. the \
discrete cosine/sine transforms or DCT/DST). We believe that FFTW, which is \
free software, should become the FFT library of choice for most applications.
Our benchmarks, performed on on a variety of platforms, show that FFTW's \
performance is typically superior to that of other publicly available FFT \
software, and is even competitive with vendor-tuned codes. In contrast to \
vendor-tuned codes, however, FFTW's performance is portable: the same program \
will perform well on most architectures without modification. Hence the name, \
FFTW, which stands for the somewhat whimsical title of Fastest Fourier \
Transform in the West."
HOMEPAGE="http://www.fftw.org/"
COPYRIGHT="2003, 2007-2011 Matteo Frigo
2003, 2007-2011 Massachusetts Institute of Technology"
LICENSE="GNU GPL v2"
REVISION="1"
SOURCE_URI="http://www.fftw.org/fftw-$portVersion.tar.gz"
CHECKSUM_SHA256="6113262f6e92c5bd474f2875fa1b01054c4ad5040f6b0da7c03c98821d9ae303"
SOURCE_DIR="fftw-$portVersion"
ARCHITECTURES="x86_gcc2 x86 x86_64"
SECONDARY_ARCHITECTURES="x86_gcc2 x86"
libVersion="3.5.8"
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
PROVIDES="
fftw$secondaryArchSuffix = $portVersion compat >= 3
lib:libfftw3$secondaryArchSuffix = $libVersionCompat
lib:libfftw3f$secondaryArchSuffix = $libVersionCompat
cmd:fftw_wisdom$secondaryArchSuffix
cmd:fftwf_wisdom$secondaryArchSuffix
cmd:fftw_wisdom_to_conf$secondaryArchSuffix
"
REQUIRES="
haiku$secondaryArchSuffix
"
PROVIDES_devel="
fftw${secondaryArchSuffix}_devel = $portVersion compat >= 3
devel:libfftw3$secondaryArchSuffix = $libVersionCompat
devel:libfftw3f$secondaryArchSuffix = $libVersionCompat
"
REQUIRES_devel="
fftw$secondaryArchSuffix == $portVersion base
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libgfortran$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:gcc$secondaryArchSuffix
cmd:ld$secondaryArchSuffix
cmd:awk
cmd:cmp
cmd:diff
cmd:find
cmd:make
cmd:perl
"
defineDebugInfoPackage fftw$secondaryArchSuffix \
$libDir/libfftw3.so.$libVersion \
$libDir/libfftw3f.so.$libVersion
BUILD()
{
make clean && make distclean || true
# build double-precision version
runConfigure ./configure --enable-shared
make $jobArgs
make install
make clean && make distclean || true
# build float-precision version
runConfigure ./configure --enable-float --enable-shared
make $jobArgs
make install
}
INSTALL()
{
rm $libDir/libfftw*.la
prepareInstalledDevelLibs \
libfftw3 \
libfftw3f
fixPkgconfig
packageEntries devel \
$developDir \
$libDir/cmake
}
TEST()
{
make check
}

View File

@@ -0,0 +1,24 @@
From 4ee5a540f1e7f19940217378031cd4a4360b435a Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Tue, 2 Aug 2016 22:25:47 +0200
Subject: gcc2 patch
diff --git a/kernel/stride.c b/kernel/stride.c
index 689fdc8..27b631b 100644
--- a/kernel/stride.c
+++ b/kernel/stride.c
@@ -26,8 +26,9 @@ const INT X(an_INT_guaranteed_to_be_zero) = 0;
stride X(mkstride)(INT n, INT s)
{
int i;
+ INT *p;
A(n >= 0);
- INT *p = (INT *) MALLOC((size_t)n * sizeof(INT), STRIDES);
+ p = (INT *) MALLOC((size_t)n * sizeof(INT), STRIDES);
for (i = 0; i < n; ++i)
p[i] = s * i;
--
2.2.2