3 %bcond_without apidocs # API documentation
4 %bcond_with sse2 # SSE2 instructions on x86/x32
5 %bcond_without tests # don't build tests
7 Summary: Efficient and performance-portable SIMD
8 Summary(pl.UTF-8): Wydajne i przenośne operacje SIMD
14 #Source0Download: https://github.com/google/highway/releases
15 Source0: https://github.com/google/highway/archive/%{version}/%{name}-%{version}.tar.gz
16 # Source0-md5: 6a5d433b66626afbd3fcc5884d2f270a
17 Patch0: %{name}-no-avx.patch
18 URL: https://github.com/google/highway
19 BuildRequires: cmake >= 3.10
20 %{?with_tests:BuildRequires: gtest-devel}
21 BuildRequires: libstdc++-devel >= 6:4.7
22 BuildRequires: rpm-build >= 4.6
23 BuildRequires: rpmbuild(macros) >= 1.742
24 %{?with_sse2:Requires: cpuinfo(sse2)}
25 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
28 Highway is a C++ library for SIMD (Single Instruction, Multiple Data),
29 i.e. applying the same operation to multiple 'lanes' using a single
32 %description -l pl.UTF-8
33 Highway to biblioteka C++ do operacji SIMD (Single Instruction,
34 Multiple Data), czyli wykonywania tej samej operacji na wielu "pasach"
35 przy użyciu pojedynczej instrukcji procesora.
38 Summary: Header files for Highway library
39 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway
40 Group: Development/Libraries
41 Requires: %{name} = %{version}-%{release}
44 Header files for Highway library.
46 %description devel -l pl.UTF-8
47 Pliki nagłówkowe biblioteki Highway.
50 Summary: Highway test helper library
51 Summary(pl.UTF-8): Biblioteka pomocnicza testów z użyciem biblioteki Highway
53 Requires: %{name} = %{version}-%{release}
56 Highway test helper library.
58 %description test -l pl.UTF-8
59 Biblioteka pomocnicza testów z użyciem biblioteki Highway.
62 Summary: Header files for Highway test library
63 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway test
64 Group: Development/Libraries
65 Requires: %{name}-devel = %{version}-%{release}
66 Requires: %{name}-test = %{version}-%{release}
69 %description test-devel
70 Header files for Highway test library.
72 %description test-devel -l pl.UTF-8
73 Pliki nagłówkowe biblioteki Highway test.
76 Summary: API documentation for Highway library
77 Summary(pl.UTF-8): Dokumentacja API biblioteki Highway
82 API documentation for Highway library.
84 %description apidocs -l pl.UTF-8
85 Dokumentacja API biblioteki Highway.
92 # gcc 13.2 fails with allocation error
93 %{__sed} -i -e '/hwy\/tests\/arithmetic_test.cc/d' CMakeLists.txt
100 CXXFLAGS="%{rpmcxxflags} -msse2"
103 %{cmake_on_off tests BUILD_TESTING} \
104 -DCMAKE_INSTALL_INCLUDEDIR=include \
105 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
106 -DHWY_SYSTEM_GTEST=ON
111 rm -rf $RPM_BUILD_ROOT
113 %{__make} -C build install \
114 DESTDIR=$RPM_BUILD_ROOT
117 rm -rf $RPM_BUILD_ROOT
119 %post -p /sbin/ldconfig
120 %postun -p /sbin/ldconfig
122 %post test -p /sbin/ldconfig
123 %postun test -p /sbin/ldconfig
126 %defattr(644,root,root,755)
128 %attr(755,root,root) %{_libdir}/libhwy.so.*.*.*
129 %attr(755,root,root) %ghost %{_libdir}/libhwy.so.1
130 %attr(755,root,root) %{_libdir}/libhwy_contrib.so.*.*.*
131 %attr(755,root,root) %ghost %{_libdir}/libhwy_contrib.so.1
134 %defattr(644,root,root,755)
135 %attr(755,root,root) %{_libdir}/libhwy.so
136 %attr(755,root,root) %{_libdir}/libhwy_contrib.so
137 %dir %{_includedir}/hwy
138 %{_includedir}/hwy/contrib
139 %{_includedir}/hwy/ops
140 %{_includedir}/hwy/*.h
141 %{_pkgconfigdir}/libhwy.pc
142 %{_pkgconfigdir}/libhwy-contrib.pc
146 %defattr(644,root,root,755)
147 %attr(755,root,root) %{_libdir}/libhwy_test.so.*.*.*
148 %attr(755,root,root) %ghost %{_libdir}/libhwy_test.so.1
151 %defattr(644,root,root,755)
152 %attr(755,root,root) %{_libdir}/libhwy_test.so
153 %{_includedir}/hwy/tests
154 %{_pkgconfigdir}/libhwy-test.pc
158 %defattr(644,root,root,755)
159 %doc g3doc/*.{md,pdf}