restructure #3

Merged
wyj merged 82 commits from dev into main 2026-01-18 20:12:27 -05:00
2 changed files with 120 additions and 0 deletions
Showing only changes of commit 2cff7f2ad2 - Show all commits

View File

@@ -0,0 +1,95 @@
pkgname=fftw
pkgver=3.3.10
pkgdesc="Fast C library for the Discrete Fourier Transform"
homepage="https://www.fftw.org/"
licenses=("GPL-2+")
_patches=("fftw-3.3.10-fixup-cmake-optional.patch")
_patch_sums=("517ea0d21ba360db7c9d2fe805dec9de30362a71a567e7b034f7c569433d206f6b3abae4a8dfb704970e02d8d9b30cb9a578946417b4c1986fbfee6db68267b0")
sources=("${pkgname}-${pkgver/_p/-pl}.tar.gz"
${_patches[@]}
)
urls=("https://www.fftw.org/${sources[0]}"
${_patches[@]}
)
sha512sums=("2d34b5ccac7b08740dbdacc6ebe451d8a34cf9d9bfec85a5e776e87adf94abfd803c222412d8e10fbaa4ed46f504aa87180396af1b108666cde4314a55610b40"
${_patch_sums[@]}
)
_multibuild=(single double longdouble)
src_prepare() {
tar -xf ${distdir}/${sources[0]} --strip-components=1
for _patch in ${_patches[@]}; do
patch -p1 -i ${filedir}/${_patch}
done
}
src_build() {
CFLAGS+=" -O3"
local conf_args=(
--prefix=/usr
--enable-shared
--disable-static
--enable-fma #cpu_flags_x86_fma3
--disable-fortran
--disable-mips-zbus-timer
--disable-threads
--enable-openmp
--disable-mpi
)
local conf_args_single=(
"${conf_args[@]}"
--enable-single
--disable-altivec
--enable-avx
--enable-avx2
--enable-sse
--enable-sse2
)
local conf_args_double=(
"${conf_args[@]}"
--enable-avx
--enable-avx2
--enable-sse2
)
local conf_args_longdouble=(
"${conf_args[@]}"
--enable-long-double
)
for _build in "${_multibuild[@]}"; do
mkdir -pv build-"${_build}"
pushd build-${_build}
case ${_build} in
single)
../configure "${conf_args_single[@]}"
;;
double)
../configure "${conf_args_double[@]}"
;;
longdouble)
../configure "${conf_args_longdouble[@]}"
;;
esac
popd
done
for _build in "${_multibuild[@]}"; do
make -C build-${_build}
done
}
src_check() {
for _build in "${_multibuild[@]}"; do
make smallcheck -C build-${_build}/tests
done
}
src_install() {
for _build in "${_multibuild[@]}"; do
make DESTDIR="$pkgdir" install -C build-${_build}
done
}
# vim:ft=sh syn=sh et sw=2:

View File

@@ -0,0 +1,25 @@
https://bugs.gentoo.org/913518
https://github.com/FFTW/fftw3/issues/130
https://github.com/FFTW/fftw3/pull/338
From f69fef7aa546d4477a2a3fd7f13fa8b2f6c54af7 Mon Sep 17 00:00:00 2001
From: Tobias Mayer <tobim@fastmail.fm>
Date: Tue, 24 Oct 2023 13:46:33 +0200
Subject: [PATCH] Fix the cmake config file when configured with autotools
When the autotools based build is used the FFTW3ConfigDeps.cmake file is
not generated, so including it fails with an error. By making the
include optional, the config file can still be used in a limited
fashion.
--- a/FFTW3Config.cmake.in
+++ b/FFTW3Config.cmake.in
@@ -10,7 +10,7 @@ set (FFTW3@PREC_SUFFIX@_LIBRARIES fftw3@PREC_SUFFIX@)
set (FFTW3@PREC_SUFFIX@_LIBRARY_DIRS @CMAKE_INSTALL_FULL_LIBDIR@)
set (FFTW3@PREC_SUFFIX@_INCLUDE_DIRS @CMAKE_INSTALL_FULL_INCLUDEDIR@)
-include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3LibraryDepends.cmake")
+include ("${CMAKE_CURRENT_LIST_DIR}/FFTW3LibraryDepends.cmake" OPTIONAL)
if (CMAKE_VERSION VERSION_LESS 2.8.3)
set (CMAKE_CURRENT_LIST_DIR)