install FFTW3LibraryDepends.cmake required by krita

added debug package and specfile cleanups [release 3.3.10-2mamba;Mon Feb 05 2024]
This commit is contained in:
Silvan Calarco 2024-02-07 09:29:47 +01:00
parent c91dac2c1c
commit 7847ff514f

View File

@ -1,21 +1,21 @@
%define pkgver %(echo %version | tr _ -)
Name: libfftw
Version: 3.3.10
Release: 1mamba
Release: 2mamba
Summary: Fast Fourier Transform library
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Tiziana Ferro <tiziana.ferro@email.it>
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.fftw.org/
Source: http://www.fftw.org/fftw-%{pkgver}.tar.gz
License: GPL
Requires(post):%{__install_info}
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
## AUTOBUILDREQ-END
BuildRequires: gcc-fortran
BuildRequires: ocaml
Requires(post):%{__install_info}
%description
FFTW is a C subroutine library for computing the Discrete Fourier Transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size.
@ -31,11 +31,16 @@ Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
FFTW is a C subroutine library for computing the Discrete Fourier Transform (DFT) in one or more dimensions, of both real and complex data, and of arbitrary input size.
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.
This package contains static libraries and header files needed for development.
This package contains static libraries and header files need for development.
%debug_package
%prep
%setup -q -c %{name}-%{version}
%setup -q -c
#-D -T
#:<< __EOF
# fix wrong soname in FFTW3LibraryDepends.cmake
sed -i 's|3.6.9|3.6.10|' fftw-%{version}/CMakeLists.txt
for dir in single double long-double; do
cp -a fftw-%{pkgver} $dir
@ -43,6 +48,26 @@ done
rm -rf fftw-%{pkgver}
%build
#:<< __EOF
# create missing FFTW3LibraryDepends.cmake
%cmake -d build \
-S ../single \
-D CMAKE_BUILD_TYPE=None \
-D ENABLE_OPENMP=ON \
-D ENABLE_THREADS=ON \
-D ENABLE_FLOAT=ON \
-D ENABLE_LONG_DOUBLE=ON \
-D ENABLE_QUAD_PRECISION=ON \
-D ENABLE_SSE=ON \
-D ENABLE_SSE2=ON \
-D ENABLE_AVX=ON \
-D ENABLE_AVX2=ON
cd ..
# fix broken IMPORTED_LOCATION: https://github.com/FFTW/fftw3/issues/130#issuecomment-1030280157
sed -e 's|\(IMPORTED_LOCATION_NONE\).*|\1 "/usr/lib/libfftw3.so.3"|' -i build/FFTW3LibraryDepends.cmake
export F77=gfortran
# configure and build single, double and long double precision library
@ -70,14 +95,10 @@ do
done
# Clean up buildroot
rm -f %{buildroot}%{_libdir}/*.la
rm -f %{buildroot}%{_infodir}/dir
# %check
# export LD_LIBRARY_PATH=$PWD/single/.libs:$PWD/single/threads/.libs:$PWD/double/.libs:$PWD/double/threads/.libs:$PWD/long/.libs:$PWD/long/threads/.libs
# make -C single check
# make -C double check
# make -C long-double check
# install missing FFTW3LibraryDepends.cmake
install -D -m0644 build/FFTW3LibraryDepends.cmake %{buildroot}%{_libdir}/cmake/fftw3/FFTW3LibraryDepends.cmake
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
@ -94,27 +115,31 @@ rm -f %{buildroot}%{_infodir}/dir
:
%files
%defattr(-, root, root, 0755)
%{_libdir}/*.so.*
%defattr(-,root,root)
%{_libdir}/libfftw3*.so.*
%doc double/AUTHORS double/COPYRIGHT double/COPYING
%files devel
%defattr(-, root, root, 0755)
%{_bindir}/*
%defattr(-,root,root)
%{_bindir}/fftw*
%{_includedir}/*.h
%{_includedir}/*.f
%{_includedir}/fftw*.f03
%{_libdir}/*.a
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_mandir}/man?/*
%{_infodir}/*.info*
%{_libdir}/libfftw3*.a
%{_libdir}/libfftw3*.so
%{_libdir}/pkgconfig/fftw3*.pc
%dir %{_libdir}/cmake/fftw3
%{_libdir}/cmake/fftw3/FFTW3*.cmake
%{_infodir}/fftw3.info*
%{_mandir}/man1/fftw*.1*
%doc double/doc/*.pdf double/doc/FAQ/fftw-faq.html double/doc/html
%doc double/ChangeLog double/NEWS double/README* double/TODO
%changelog
* Mon Feb 05 2024 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.10-2mamba
- install FFTW3LibraryDepends.cmake required by krita
- added debug package and specfile cleanups
* Thu Sep 16 2021 Automatic Build System <autodist@mambasoft.it> 3.3.10-1mamba
- automatic version update by autodist