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: 405abf8d94b618befd44b2cb60a90c0e
17 Patch0: %{name}-float16.patch
18 Patch1: %{name}-no-avx.patch
19 URL: https://github.com/google/highway
20 BuildRequires: cmake >= 3.10
21 %{?with_tests:BuildRequires: gtest-devel}
22 BuildRequires: libstdc++-devel >= 6:4.7
23 BuildRequires: rpm-build >= 4.6
24 BuildRequires: rpmbuild(macros) >= 1.742
25 %{?with_sse2:Requires: cpuinfo(sse2)}
26 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29 Highway is a C++ library for SIMD (Single Instruction, Multiple Data),
30 i.e. applying the same operation to multiple 'lanes' using a single
33 %description -l pl.UTF-8
34 Highway to biblioteka C++ do operacji SIMD (Single Instruction,
35 Multiple Data), czyli wykonywania tej samej operacji na wielu "pasach"
36 przy użyciu pojedynczej instrukcji procesora.
39 Summary: Header files for Highway library
40 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway
41 Group: Development/Libraries
42 Requires: %{name} = %{version}-%{release}
45 Header files for Highway library.
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki Highway.
51 Summary: Highway test helper library
52 Summary(pl.UTF-8): Biblioteka pomocnicza testów z użyciem biblioteki Highway
54 Requires: %{name} = %{version}-%{release}
57 Highway test helper library.
59 %description test -l pl.UTF-8
60 Biblioteka pomocnicza testów z użyciem biblioteki Highway.
63 Summary: Header files for Highway test library
64 Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway test
65 Group: Development/Libraries
66 Requires: %{name}-devel = %{version}-%{release}
67 Requires: %{name}-test = %{version}-%{release}
70 %description test-devel
71 Header files for Highway test library.
73 %description test-devel -l pl.UTF-8
74 Pliki nagłówkowe biblioteki Highway test.
77 Summary: API documentation for Highway library
78 Summary(pl.UTF-8): Dokumentacja API biblioteki Highway
83 API documentation for Highway library.
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API biblioteki Highway.
97 CXXFLAGS="%{rpmcxxflags} -msse2"
100 %{cmake_on_off tests BUILD_TESTING} \
101 -DCMAKE_INSTALL_INCLUDEDIR=include \
102 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
103 -DHWY_SYSTEM_GTEST=ON
108 rm -rf $RPM_BUILD_ROOT
110 %{__make} -C build install \
111 DESTDIR=$RPM_BUILD_ROOT
114 rm -rf $RPM_BUILD_ROOT
116 %post -p /sbin/ldconfig
117 %postun -p /sbin/ldconfig
119 %post test -p /sbin/ldconfig
120 %postun test -p /sbin/ldconfig
123 %defattr(644,root,root,755)
125 %attr(755,root,root) %{_libdir}/libhwy.so.*.*.*
126 %attr(755,root,root) %ghost %{_libdir}/libhwy.so.1
127 %attr(755,root,root) %{_libdir}/libhwy_contrib.so.*.*.*
128 %attr(755,root,root) %ghost %{_libdir}/libhwy_contrib.so.1
131 %defattr(644,root,root,755)
132 %attr(755,root,root) %{_libdir}/libhwy.so
133 %attr(755,root,root) %{_libdir}/libhwy_contrib.so
134 %dir %{_includedir}/hwy
135 %{_includedir}/hwy/contrib
136 %{_includedir}/hwy/ops
137 %{_includedir}/hwy/*.h
138 %{_pkgconfigdir}/libhwy.pc
139 %{_pkgconfigdir}/libhwy-contrib.pc
143 %defattr(644,root,root,755)
144 %attr(755,root,root) %{_libdir}/libhwy_test.so.*.*.*
145 %attr(755,root,root) %ghost %{_libdir}/libhwy_test.so.1
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/libhwy_test.so
150 %{_includedir}/hwy/tests
151 %{_pkgconfigdir}/libhwy-test.pc
155 %defattr(644,root,root,755)
156 %doc g3doc/*.{md,pdf}