diff --git a/libs/libfftw/libfftw-win32-aligned-malloc.patch b/libs/libfftw/libfftw-win32-aligned-malloc.patch index fd9f4f6f..e6f7db7c 100644 --- a/libs/libfftw/libfftw-win32-aligned-malloc.patch +++ b/libs/libfftw/libfftw-win32-aligned-malloc.patch @@ -1,11 +1,29 @@ ---- cmake.config.h.in 2018-05-24 14:03:22.000000000 +0200 -+++ cmake.config.h.in 2019-02-18 14:35:29.545430800 +0100 +--- cmake.config.h.in 2018-05-24 05:03:22.000000000 -0700 ++++ cmake.config.h.in 2020-04-22 14:02:58.361548500 -0700 +@@ -38,7 +38,7 @@ + /* #undef FFTW_DEBUG */ + + /* Define to enable the use of alloca(). */ +-#define FFTW_ENABLE_ALLOCA 1 ++#cmakedefine FFTW_ENABLE_ALLOCA 1 + + /* Define to compile in long-double precision. */ + #cmakedefine FFTW_LDOUBLE 1 +@@ -369,7 +369,7 @@ + #define VERSION "@FFTW_VERSION@" + + /* Use common Windows Fortran mangling styles for the Fortran interfaces. */ +-/* #undef WINDOWS_F77_MANGLING */ ++#cmakedefine WINDOWS_F77_MANGLING 1 + + /* Include g77-compatible wrappers in addition to any other Fortran wrappers. + */ @@ -377,7 +377,7 @@ /* Use our own aligned malloc routine; mainly helpful for Windows systems lacking aligned allocation system-library routines. */ -/* #undef WITH_OUR_MALLOC */ -+#cmakedefine WITH_OUR_MALLOC ++#cmakedefine WITH_OUR_MALLOC 1 /* Use low-precision timers, making planner very slow */ /* #undef WITH_SLOW_TIMER */ diff --git a/libs/libfftw/libfftw.py b/libs/libfftw/libfftw.py index 5eeadc0b..3b3e4a3b 100644 --- a/libs/libfftw/libfftw.py +++ b/libs/libfftw/libfftw.py @@ -1,30 +1,33 @@ # -*- coding: utf-8 -*- import info class subinfo(info.infoclass): def setTargets(self): self.targets['3.3.8'] = 'http://www.fftw.org/fftw-3.3.8.tar.gz' - self.patchToApply['3.3.8'] = ('libfftw-win32-aligned-malloc.patch', 0) + if CraftCore.compiler.isWindows: + self.patchToApply['3.3.8'] = ('libfftw-win32-aligned-malloc.patch', 0) self.targetDigests['3.3.8'] = '59831bd4b2705381ee395e54aa6e0069b10c3626' self.targetInstSrc['3.3.8'] = "fftw-3.3.8" self.description = "a C subroutine library for computing the discrete Fourier transform (DFT)" self.defaultTarget = '3.3.8' def setDependencies(self): self.buildDependencies["virtual/base"] = None from Package.CMakePackageBase import * class Package(CMakePackageBase): def __init__(self): CMakePackageBase.__init__(self) self.supportsNinja = False - self.subinfo.options.configure.args += ' -DBUILD_TESTS=OFF' - # -DENABLE_THREADS=ON -DENABLE_OPENMP=ON' - self.subinfo.options.configure.args += ' -DENABLE_SSE2=ON -DENABLE_AVX=ON' + self.subinfo.options.configure.args += \ + ' -DENABLE_SSE2=ON -DENABLE_AVX=OFF ' \ + ' -DENABLE_THREADS=ON -DWITH_COMBINED_THREADS=ON ' if CraftCore.compiler.isWindows: - self.subinfo.options.configure.args += ' -DWITH_OUR_MALLOC=1' + self.subinfo.options.configure.args += \ + ' -DWITH_OUR_MALLOC=ON -DFFTW_ENABLE_ALLOCA=OFF ' \ + ' -DWINDOWS_F77_MANGLING=ON '