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