From d5cb1f9e6ee4bd9e6b0d498a7991bf6ddecf670e Mon Sep 17 00:00:00 2001 From: thomaskluiters Date: Wed, 26 Jun 2024 17:16:49 +0200 Subject: [PATCH 1/2] Add Apple Silicon support for FFTW Thanks to @andrej5elin I was able to get this working locally. This commit will add Apple Silicon support for FFTW 3.3.10. --- fftw/cppbuild.sh | 13 +++++++++++-- fftw/fftw-macosx_arm64.patch | 4 ++++ .../{fftw-macosx.patch => fftw-macosx_x86_64.patch} | 0 fftw/platform/pom.xml | 6 ++++++ 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 fftw/fftw-macosx_arm64.patch rename fftw/{fftw-macosx.patch => fftw-macosx_x86_64.patch} (100%) diff --git a/fftw/cppbuild.sh b/fftw/cppbuild.sh index c2b7e183116..da3f8a612f8 100755 --- a/fftw/cppbuild.sh +++ b/fftw/cppbuild.sh @@ -132,8 +132,8 @@ case $PLATFORM in make -j $MAKEJ V=0 make install-strip ;; - macosx-*) - patch -Np1 < ../../../fftw-macosx.patch + macosx-x86_64) + patch -Np1 < ../../../fftw-macosx_x64_64.patch ./configure --prefix=$INSTALL_PATH --disable-fortran --enable-shared --enable-threads --with-combined-threads --enable-sse2 make -j $MAKEJ V=0 make install-strip @@ -141,6 +141,15 @@ case $PLATFORM in make -j $MAKEJ V=0 make install-strip ;; + macosx-arm64) + patch configure ../../../fftw-macosx_arm64.patch + ./configure --prefix=$INSTALL_PATH --enable-threads --enable-neon --enable-armv8-cntvct-el0 + make -j $MAKEJ V=0 + make install-strip + ./configure --prefix=$INSTALL_PATH --enable-threads --enable-neon --enable-armv8-cntvct-el0 --enable-float + make -j $MAKEJ V=0 + make install-strip + ;; windows-x86) ./configure --prefix=$INSTALL_PATH --disable-fortran --enable-shared --enable-threads --with-combined-threads --enable-sse2 --enable-avx CC="gcc -m32" --with-our-malloc make -j $MAKEJ V=0 diff --git a/fftw/fftw-macosx_arm64.patch b/fftw/fftw-macosx_arm64.patch new file mode 100644 index 00000000000..07ae90e1c26 --- /dev/null +++ b/fftw/fftw-macosx_arm64.patch @@ -0,0 +1,4 @@ +3934c3934 +< aarch64) +--- +> arm) diff --git a/fftw/fftw-macosx.patch b/fftw/fftw-macosx_x86_64.patch similarity index 100% rename from fftw/fftw-macosx.patch rename to fftw/fftw-macosx_x86_64.patch diff --git a/fftw/platform/pom.xml b/fftw/platform/pom.xml index 6f6a9a54899..b9a0a1f7f0d 100644 --- a/fftw/platform/pom.xml +++ b/fftw/platform/pom.xml @@ -84,6 +84,12 @@ ${project.version} ${javacpp.platform.linux-ppc64le} + + ${project.groupId} + ${javacpp.moduleId} + ${project.version} + ${javacpp.platform.macosx-arm64} + ${project.groupId} ${javacpp.moduleId} From 7574e6d1ca0dae0681d3e5d894b5f631a2468e65 Mon Sep 17 00:00:00 2001 From: thomaskluiters Date: Thu, 27 Jun 2024 11:31:34 +0200 Subject: [PATCH 2/2] Rename fftw-macosx_x64_64 to fftw-macosx_x86_64 --- fftw/cppbuild.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fftw/cppbuild.sh b/fftw/cppbuild.sh index da3f8a612f8..1570ec7534a 100755 --- a/fftw/cppbuild.sh +++ b/fftw/cppbuild.sh @@ -133,7 +133,7 @@ case $PLATFORM in make install-strip ;; macosx-x86_64) - patch -Np1 < ../../../fftw-macosx_x64_64.patch + patch -Np1 < ../../../fftw-macosx_x86_64.patch ./configure --prefix=$INSTALL_PATH --disable-fortran --enable-shared --enable-threads --with-combined-threads --enable-sse2 make -j $MAKEJ V=0 make install-strip