]> git.pld-linux.org Git - packages/highway.git/blob - highway.spec
- float16 patch to fix x86 build with gcc 12+ and sse2 not enabled
[packages/highway.git] / highway.spec
1 #
2 # Conditional build:
3 %bcond_without  apidocs         # API documentation
4 %bcond_with     sse2            # SSE2 instructions on x86/x32
5 %bcond_without  tests           # don't build tests
6 #
7 Summary:        Efficient and performance-portable SIMD
8 Summary(pl.UTF-8):      Wydajne i przenośne operacje SIMD
9 Name:           highway
10 Version:        1.0.6
11 Release:        2
12 License:        Apache v2.0
13 Group:          Libraries
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)
27
28 %description
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
31 CPU instruction.
32
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.
37
38 %package devel
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}
43
44 %description devel
45 Header files for Highway library.
46
47 %description devel -l pl.UTF-8
48 Pliki nagłówkowe biblioteki Highway.
49
50 %package test
51 Summary:        Highway test helper library
52 Summary(pl.UTF-8):      Biblioteka pomocnicza testów z użyciem biblioteki Highway
53 Group:          Libraries
54 Requires:       %{name} = %{version}-%{release}
55
56 %description test
57 Highway test helper library.
58
59 %description test -l pl.UTF-8
60 Biblioteka pomocnicza testów z użyciem biblioteki Highway.
61
62 %package test-devel
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}
68 Requires:       gtest-devel
69
70 %description test-devel
71 Header files for Highway test library.
72
73 %description test-devel -l pl.UTF-8
74 Pliki nagłówkowe biblioteki Highway test.
75
76 %package apidocs
77 Summary:        API documentation for Highway library
78 Summary(pl.UTF-8):      Dokumentacja API biblioteki Highway
79 Group:          Documentation
80 BuildArch:      noarch
81
82 %description apidocs
83 API documentation for Highway library.
84
85 %description apidocs -l pl.UTF-8
86 Dokumentacja API biblioteki Highway.
87
88 %prep
89 %setup -q
90 %patch0 -p1
91 %patch1 -p1
92
93 %build
94 install -d build
95 cd build
96 %if %{with sse2}
97 CXXFLAGS="%{rpmcxxflags} -msse2"
98 %endif
99 %cmake .. \
100         %{cmake_on_off tests BUILD_TESTING} \
101         -DCMAKE_INSTALL_INCLUDEDIR=include \
102         -DCMAKE_INSTALL_LIBDIR=%{_lib} \
103         -DHWY_SYSTEM_GTEST=ON
104
105 %{__make}
106
107 %install
108 rm -rf $RPM_BUILD_ROOT
109
110 %{__make} -C build install \
111         DESTDIR=$RPM_BUILD_ROOT
112
113 %clean
114 rm -rf $RPM_BUILD_ROOT
115
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
123 %defattr(644,root,root,755)
124 %doc README.md
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
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
138 %{_pkgconfigdir}/libhwy.pc
139 %{_pkgconfigdir}/libhwy-contrib.pc
140 %{_libdir}/cmake/hwy
141
142 %files test
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
146
147 %files test-devel
148 %defattr(644,root,root,755)
149 %attr(755,root,root) %{_libdir}/libhwy_test.so
150 %{_includedir}/hwy/tests
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.068514 seconds and 3 git commands to generate.