]> git.pld-linux.org Git - packages/highway.git/blame - highway.spec
- workaround x32 gcc failure
[packages/highway.git] / highway.spec
CommitLineData
a15f1265
JB
1#
2# Conditional build:
3%bcond_without apidocs # API documentation
96fad748 4%bcond_with sse2 # SSE2 instructions on x86/x32
8390db53 5%bcond_without tests # don't build tests
a15f1265
JB
6#
7Summary: Efficient and performance-portable SIMD
8Summary(pl.UTF-8): Wydajne i przenośne operacje SIMD
9Name: highway
383afe8f
JB
10Version: 1.1.0
11Release: 1
a15f1265
JB
12License: Apache v2.0
13Group: Libraries
14#Source0Download: https://github.com/google/highway/releases
15Source0: https://github.com/google/highway/archive/%{version}/%{name}-%{version}.tar.gz
383afe8f
JB
16# Source0-md5: 6a5d433b66626afbd3fcc5884d2f270a
17Patch0: %{name}-no-avx.patch
a15f1265
JB
18URL: https://github.com/google/highway
19BuildRequires: cmake >= 3.10
8390db53 20%{?with_tests:BuildRequires: gtest-devel}
a15f1265
JB
21BuildRequires: libstdc++-devel >= 6:4.7
22BuildRequires: rpm-build >= 4.6
8390db53 23BuildRequires: rpmbuild(macros) >= 1.742
96fad748 24%{?with_sse2:Requires: cpuinfo(sse2)}
a15f1265
JB
25BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
26
27%description
28Highway is a C++ library for SIMD (Single Instruction, Multiple Data),
29i.e. applying the same operation to multiple 'lanes' using a single
30CPU instruction.
31
32%description -l pl.UTF-8
33Highway to biblioteka C++ do operacji SIMD (Single Instruction,
34Multiple Data), czyli wykonywania tej samej operacji na wielu "pasach"
35przy użyciu pojedynczej instrukcji procesora.
36
37%package devel
27467171
JB
38Summary: Header files for Highway library
39Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway
a15f1265 40Group: Development/Libraries
27467171 41Requires: %{name} = %{version}-%{release}
a15f1265
JB
42
43%description devel
27467171 44Header files for Highway library.
a15f1265
JB
45
46%description devel -l pl.UTF-8
27467171
JB
47Pliki nagłówkowe biblioteki Highway.
48
49%package test
50Summary: Highway test helper library
51Summary(pl.UTF-8): Biblioteka pomocnicza testów z użyciem biblioteki Highway
52Group: Libraries
53Requires: %{name} = %{version}-%{release}
54
55%description test
56Highway test helper library.
57
58%description test -l pl.UTF-8
59Biblioteka pomocnicza testów z użyciem biblioteki Highway.
60
61%package test-devel
62Summary: Header files for Highway test library
63Summary(pl.UTF-8): Pliki nagłówkowe biblioteki Highway test
64Group: Development/Libraries
65Requires: %{name}-devel = %{version}-%{release}
66Requires: %{name}-test = %{version}-%{release}
67Requires: gtest-devel
68
69%description test-devel
70Header files for Highway test library.
71
72%description test-devel -l pl.UTF-8
73Pliki nagłówkowe biblioteki Highway test.
a15f1265
JB
74
75%package apidocs
76Summary: API documentation for Highway library
77Summary(pl.UTF-8): Dokumentacja API biblioteki Highway
78Group: Documentation
79BuildArch: noarch
80
81%description apidocs
82API documentation for Highway library.
83
84%description apidocs -l pl.UTF-8
85Dokumentacja API biblioteki Highway.
86
87%prep
88%setup -q
96fad748 89%patch0 -p1
a15f1265 90
16afce94
JB
91%ifarch x32
92# gcc 13.2 fails with allocation error
93%{__sed} -i -e '/hwy\/tests\/arithmetic_test.cc/d' CMakeLists.txt
94%endif
95
a15f1265
JB
96%build
97install -d build
98cd build
96fad748
JB
99%if %{with sse2}
100CXXFLAGS="%{rpmcxxflags} -msse2"
101%endif
a15f1265 102%cmake .. \
8390db53 103 %{cmake_on_off tests BUILD_TESTING} \
a15f1265 104 -DCMAKE_INSTALL_INCLUDEDIR=include \
8564459d
JB
105 -DCMAKE_INSTALL_LIBDIR=%{_lib} \
106 -DHWY_SYSTEM_GTEST=ON
a15f1265
JB
107
108%{__make}
109
110%install
111rm -rf $RPM_BUILD_ROOT
112
113%{__make} -C build install \
114 DESTDIR=$RPM_BUILD_ROOT
115
116%clean
117rm -rf $RPM_BUILD_ROOT
118
27467171
JB
119%post -p /sbin/ldconfig
120%postun -p /sbin/ldconfig
121
122%post test -p /sbin/ldconfig
123%postun test -p /sbin/ldconfig
124
125%files
a15f1265
JB
126%defattr(644,root,root,755)
127%doc README.md
27467171 128%attr(755,root,root) %{_libdir}/libhwy.so.*.*.*
782104e1 129%attr(755,root,root) %ghost %{_libdir}/libhwy.so.1
27467171 130%attr(755,root,root) %{_libdir}/libhwy_contrib.so.*.*.*
782104e1 131%attr(755,root,root) %ghost %{_libdir}/libhwy_contrib.so.1
27467171
JB
132
133%files devel
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
a15f1265
JB
141%{_pkgconfigdir}/libhwy.pc
142%{_pkgconfigdir}/libhwy-contrib.pc
b20a5102 143%{_libdir}/cmake/hwy
27467171
JB
144
145%files test
146%defattr(644,root,root,755)
147%attr(755,root,root) %{_libdir}/libhwy_test.so.*.*.*
782104e1 148%attr(755,root,root) %ghost %{_libdir}/libhwy_test.so.1
27467171
JB
149
150%files test-devel
151%defattr(644,root,root,755)
152%attr(755,root,root) %{_libdir}/libhwy_test.so
153%{_includedir}/hwy/tests
a15f1265
JB
154%{_pkgconfigdir}/libhwy-test.pc
155
156%if %{with apidocs}
157%files apidocs
158%defattr(644,root,root,755)
159%doc g3doc/*.{md,pdf}
160%endif
This page took 0.179566 seconds and 5 git commands to generate.