2017-07-15 12:56:26 +00:00
#
# spec file for package clFFT
#
2022-05-23 13:37:35 +00:00
# Copyright (c) 2022 SUSE LLC
2017-07-15 12:56:26 +00:00
# Copyright (c) 2017, Martin Hauke <mardnh@gmx.de>
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
2021-07-02 17:11:56 +00:00
# Please submit bugfixes or comments via https://bugs.opensuse.org/
2017-07-15 12:56:26 +00:00
#
%define sover 2
2017-07-18 12:37:32 +00:00
%define libclfft lib%{name}%{sover}
%define libtimer libStatTimer%{sover}
2017-07-15 12:56:26 +00:00
Name : clFFT
Version : 2.12.2
Release : 0
Summary : OpenCL FFT library
License : Apache-2.0
2017-07-21 19:37:34 +00:00
Group : Productivity/Scientific/Math
2021-07-02 17:11:56 +00:00
URL : https://github.com/clMathLibraries/clFFT
2017-07-15 12:56:26 +00:00
#Git-Clone: https://github.com/clMathLibraries/clFFT.git
Source : https://github.com/clMathLibraries/clFFT/archive/v%{version} .tar.gz#/%{name}-%{version}.tar.gz
Source1 : clFFT-client.1
Patch0 : fix-client-no-symlink.patch
2017-10-23 14:21:51 +00:00
Patch1 : clFFT-fix-aarm64.patch
2021-07-02 17:11:56 +00:00
# PATCH-FIX-UPSTREAM clFFT-avoid-rvalue-address.patch gh#clMathLibraries/clFFT#237 badshah400@gmail.com -- Fix building with gcc11 (which is stricter about referencing rvalue addresses) by using ostringstream object directly rather its pointer
Patch2 : clFFT-avoid-rvalue-address.patch
2017-07-15 12:56:26 +00:00
BuildRequires : cmake
BuildRequires : gcc-c++
BuildRequires : opencl-headers
BuildRequires : pkgconfig
BuildRequires : pkgconfig(OpenCL)
BuildRequires : pkgconfig(fftw3)
2017-07-18 12:37:32 +00:00
ExcludeArch : %{ix86} %{arm}
2017-10-11 14:53:46 +00:00
%if 0%{?suse_version} > 1315
BuildRequires : libboost_program_options-devel
%else
BuildRequires : boost-devel
%endif
2017-07-15 12:56:26 +00:00
%description
2017-07-25 06:41:04 +00:00
The clFFT library is an OpenCL implementation of discrete
Fast Fourier Transforms which:
2017-07-15 12:56:26 +00:00
* Works on CPU or GPU backends.
* Supports in-place or out-of-place transforms.
* Supports 1D, 2D, and 3D transforms with a batch size that can be greater
than 1.
* Supports planar (real and complex components in separate arrays) and
interleaved (real and complex components as a pair contiguous in memory)
formats.
* Supports dimension lengths that can be any mix of powers of 2, 3, and 5.
* Supports single and double precision floating point formats.
%package devel
Summary : Development files for libclfft
Group : Development/Libraries/C and C++
2017-07-18 12:37:32 +00:00
Requires : %{libclfft} = %{version}
Requires : %{libtimer} = %{version}
2021-07-02 17:11:56 +00:00
Requires : opencl-headers
Requires : pkgconfig(OpenCL)
2017-07-15 12:56:26 +00:00
%description devel
Libraries and header files for developing applications that want to
make use of libclFFT.
2017-07-18 12:37:32 +00:00
%package -n %{libclfft}
2017-07-15 12:56:26 +00:00
Summary : Library for libclfft
Group : System/Libraries
2017-07-18 12:37:32 +00:00
%description -n %{libclfft}
2017-07-25 06:41:04 +00:00
The clFFT library is an OpenCL implementation of discrete
Fast Fourier Transforms which:
2017-07-15 12:56:26 +00:00
* Works on CPU or GPU backends.
* Supports in-place or out-of-place transforms.
* Supports 1D, 2D, and 3D transforms with a batch size that can be greater
than 1.
* Supports planar (real and complex components in separate arrays) and
interleaved (real and complex components as a pair contiguous in memory)
formats.
* Supports dimension lengths that can be any mix of powers of 2, 3, and 5.
* Supports single and double precision floating point formats.
2017-07-18 12:37:32 +00:00
This subpackage provides shared library clFFT library
%package -n %{libtimer}
Summary : Library for libclfft
Group : System/Libraries
%description -n %{libtimer}
2017-07-25 06:41:04 +00:00
The clFFT library is an OpenCL implementation of discrete
Fast Fourier Transforms which:
2017-07-18 12:37:32 +00:00
* Works on CPU or GPU backends.
* Supports in-place or out-of-place transforms.
* Supports 1D, 2D, and 3D transforms with a batch size that can be greater
than 1.
* Supports planar (real and complex components in separate arrays) and
interleaved (real and complex components as a pair contiguous in memory)
formats.
* Supports dimension lengths that can be any mix of powers of 2, 3, and 5.
* Supports single and double precision floating point formats.
This subpackage provides shared libStatTimer library
2017-07-15 12:56:26 +00:00
%prep
%setup -q
2024-02-26 13:48:32 +00:00
%patch -P 0 -p1
2022-05-23 13:37:35 +00:00
%ifarch aarch64 riscv64
2024-02-26 13:48:32 +00:00
%patch -P 1 -p1
2017-10-23 14:21:51 +00:00
%endif
2021-07-02 17:11:56 +00:00
%if 0%{?suse_version} >= 1550
2024-02-26 13:48:32 +00:00
%patch -P 2 -p1
2021-07-02 17:11:56 +00:00
%endif
2017-07-15 12:56:26 +00:00
%build
cd src
%cmake \
2017-07-18 12:37:32 +00:00
-DBoost_USE_STATIC_LIBS=OFF \
-DBUILD_CLIENT=ON \
-DBUILD_EXAMPLES=OFF \
-DBUILD_LOADLIBRARIES=ON \
-DBUILD_RUNTIME=ON \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_TEST=OFF
2019-11-21 06:29:09 +00:00
%cmake_build
2017-07-15 12:56:26 +00:00
%install
cd src
%cmake_install
2017-07-18 12:37:32 +00:00
install -Dpm0644 %{SOURCE1} \
%{buildroot} %{_mandir} /man1/clFFT-client.1
2017-07-15 12:56:26 +00:00
2017-07-18 12:37:32 +00:00
%post -n %{libclfft} -p /sbin/ldconfig
%post -n %{libtimer} -p /sbin/ldconfig
%postun -n %{libclfft} -p /sbin/ldconfig
%postun -n %{libtimer} -p /sbin/ldconfig
2017-07-15 12:56:26 +00:00
%files
%{_bindir} /clFFT-client
%{_mandir} /man1/clFFT-client.1%{ext_man}
2017-07-18 12:37:32 +00:00
%files -n %{libclfft}
2021-07-02 17:11:56 +00:00
%license LICENSE
%doc CHANGELOG NOTICE ReleaseNotes.txt
2017-07-15 12:56:26 +00:00
%{_libdir} /libclFFT.so.%{sover} *
2017-07-18 12:37:32 +00:00
%files -n %{libtimer}
2021-07-02 17:11:56 +00:00
%license LICENSE
%doc CHANGELOG NOTICE ReleaseNotes.txt
2017-07-18 12:37:32 +00:00
%{_libdir} /libStatTimer.so.%{sover} *
2017-07-15 12:56:26 +00:00
%files devel
%{_libdir} /libclFFT.so
%{_libdir} /libStatTimer.so
%{_includedir} /clAmdFft*.h
%{_includedir} /clFFT*.h
%{_libdir} /pkgconfig/clFFT.pc
%{_libdir} /cmake/clFFT
%changelog