libfftw/libfftw.spec
Silvan Calarco 7847ff514f install FFTW3LibraryDepends.cmake required by krita
added debug package and specfile cleanups [release 3.3.10-2mamba;Mon Feb 05 2024]
2024-02-07 09:29:47 +01:00

201 lines
6.4 KiB
RPMSpec

%define pkgver %(echo %version | tr _ -)
Name: libfftw
Version: 3.3.10
Release: 2mamba
Summary: Fast Fourier Transform library
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.fftw.org/
Source: http://www.fftw.org/fftw-%{pkgver}.tar.gz
License: GPL
## 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.
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.
%package devel
Summary: Static libraries and headers for %{name}
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
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.
%debug_package
%prep
%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
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
for precision in single double long-double
do
pushd $precision
%configure \
--enable-shared \
--disable-dependency-tracking \
--enable-threads \
--enable-$precision
sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool
sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool
popd
%make -C $precision
done
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
for dir in single double long-double
do
%makeinstall -C $dir
done
# Clean up buildroot
rm -f %{buildroot}%{_infodir}/dir
# install missing FFTW3LibraryDepends.cmake
install -D -m0644 build/FFTW3LibraryDepends.cmake %{buildroot}%{_libdir}/cmake/fftw3/FFTW3LibraryDepends.cmake
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -p /sbin/ldconfig
%postun -p /sbin/ldconfig
%post devel
%install_info fftw3.info
:
%preun devel
%uninstall_info fftw3.info
:
%files
%defattr(-,root,root)
%{_libdir}/libfftw3*.so.*
%doc double/AUTHORS double/COPYRIGHT double/COPYING
%files devel
%defattr(-,root,root)
%{_bindir}/fftw*
%{_includedir}/*.h
%{_includedir}/*.f
%{_includedir}/fftw*.f03
%{_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
* Tue Dec 15 2020 Automatic Build System <autodist@mambasoft.it> 3.3.9-1mamba
- automatic version update by autodist
* Tue May 29 2018 Automatic Build System <autodist@mambasoft.it> 3.3.8-1mamba
- automatic version update by autodist
* Sun Dec 24 2017 Automatic Build System <autodist@mambasoft.it> 3.3.7-1mamba
- automatic version update by autodist
* Thu Jun 22 2017 Silvan Calarco <silvan.calarco@mambasoft.it> 3.3.6_pl2-1mamba
- update to 3.3.6_pl2
* Sat Aug 06 2016 Automatic Build System <autodist@mambasoft.it> 3.3.5-1mamba
- automatic version update by autodist
* Wed Apr 09 2014 Automatic Build System <autodist@mambasoft.it> 3.3.4-1mamba
- automatic version update by autodist
* Sun Feb 03 2013 Automatic Build System <autodist@mambasoft.it> 3.3.3-1mamba
- automatic version update by autodist
* Sun Dec 02 2012 Automatic Build System <autodist@mambasoft.it> 3.3.2-1mamba
- automatic version update by autodist
* Wed Oct 06 2010 Stefano Cotta Ramusino <stefano.cotta@openmamba.org> 3.2.2-2mamba
- specfile updated
* Wed Jun 09 2010 gil <puntogil@libero.it> 3.2.2-1mamba
- update to 3.2.2
- edit spec file
- added check section
* Sun Mar 01 2009 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2.1-1mamba
- automatic update by autodist
* Thu Dec 11 2008 Silvan Calarco <silvan.calarco@mambasoft.it> 3.2-1mamba
- automatic update by autodist
* Mon Jun 23 2008 Tiziana Ferro <tiziana.ferro@email.it> 3.1.2-2mamba
- update Vendor, Distribution, mantainer, buildrequirements list
* Fri Feb 09 2007 Davide Madrisan <davide.madrisan@qilinux.it> 3.1.2-1qilnx
- update to version 3.1.2 by autospec
* Fri May 26 2006 Silvan Calarco <silvan.calarco@mambasoft.it> 3.1.1-2qilnx
- build both double and floating point precision libraries
* Thu May 04 2006 Stefano Cotta Ramusino <stefano.cotta@qilinux.it> 3.1.1-1qilnx
- update to version 3.1.1 by autospec
* Tue Sep 14 2004 Silvan Calarco <silvan.calarco@mambasoft.it> 0.103-2qilnx
- renamed from fftw to libfftw and moved from contrib to main repository
* Fri Sep 10 2004 Matteo Bernasconi <voyagernm@virgilio.it> 0.103-1qilnx
- First Build