Blob Blame Raw
Name:           xsimd
Version:        7.2.3
Release:        4%{?dist}
Summary:        C++ wrappers for SIMD intrinsics
License:        BSD
URL:            https://xsimd.readthedocs.io/
%global github  https://github.com/QuantStack/xsimd
Source0:        %{github}/archive/%{version}/%{name}-%{version}.tar.gz

# Workaround for armv7hl build failures
# https://github.com/QuantStack/xsimd/pull/292 rebased
Patch1:         292.patch
# Workaround for ppc64le build failures
Patch2:         %{github}/pull/296.patch

BuildRequires:  cmake
BuildRequires:  gcc-c++
BuildRequires:  gtest-devel

# there is no actual arched content - this is a header only library
%global debug_package %{nil}

%global _description \
SIMD (Single Instruction, Multiple Data) is a feature of microprocessors that \
has been available for many years. SIMD instructions perform a single operation \
on a batch of values at once, and thus provide a way to significantly \
accelerate code execution. However, these instructions differ between \
microprocessor vendors and compilers. \
 \
xsimd provides a unified means for using these features for library authors. \
Namely, it enables manipulation of batches of numbers with the same arithmetic \
operators as for single values. It also provides accelerated implementation \
of common mathematical functions operating on batches. \

%description %_description

%package devel
Summary:        %{summary}
Provides:       %{name} = %{version}-%{release}
Provides:       %{name}-static = %{version}-%{release}
%description devel %_description


%prep
%autosetup -p1

%build
%cmake -DBUILD_TESTS=ON \
%ifarch armv7l armv7hl armv7hnl
-DXSIMD_FORCE_ARM_INSTR_SET=70000000 \
%endif
.
%make_build

%install
%make_install

%check
%make_build xtest

%files devel
%doc README.md
%license LICENSE
%{_includedir}/%{name}/
%{_libdir}/cmake/%{name}/

%changelog
* Sat Jul 27 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.2.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild

* Thu Jul 04 2019 Miro Hrončok <mhroncok@redhat.com> - 7.2.3-3
- Allow all architectures

* Wed Jul 03 2019 Miro Hrončok <mhroncok@redhat.com> - 7.2.3-2
- Apply upstream workaround for armv7
- Reenable tests (commented out by mistake)

* Fri Jun 28 2019 Miro Hrončok <mhroncok@redhat.com> - 7.2.3-1
- Initial package