blob: be4ac241168f47235cb91ab694e6a4a719b156f2 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
# Modified from https://src.fedoraproject.org/rpms/volk/blob/rawhide/f/volk.spec
Name: volk
Version: 3.1.2
Release: 1
Summary: The Vector Optimized Library of Kernels
License: GPL-3.0-or-later
URL: https://github.com/gnuradio/%{name}
Source0: https://github.com/gnuradio/%{name}/releases/download/v%{version}/%{name}-%{version}.tar.gz
BuildRequires: gnupg2
BuildRequires: make
BuildRequires: cmake
BuildRequires: doxygen
BuildRequires: gcc-c++
BuildRequires: python3-devel
BuildRequires: python3-mako
BuildRequires: orc-devel
BuildRequires: sed
%ifnarch s390x
BuildRequires: google-cpu_features-devel
%endif
Conflicts: python3-gnuradio < 3.9.0.0
Conflicts: gnuradio-devel < 3.9.0.0
%description
VOLK is the Vector-Optimized Library of Kernels. It is a library that contains
kernels of hand-written SIMD code for different mathematical operations.
Since each SIMD architecture can be very different and no compiler has yet
come along to handle vectorization properly or highly efficiently, VOLK
approaches the problem differently. VOLK is a sub-project of GNU Radio.
%package devel
Summary: Development files for VOLK
Requires: %{name}%{?_isa} = %{version}-%{release}
Conflicts: vulkan-volk-devel
%description devel
%{summary}.
%ifarch s390x
Conflicts: google-cpu_features-devel
%endif
%package doc
Summary: Documentation files for VOLK
Requires: %{name} = %{version}-%{release}
BuildArch: noarch
%description doc
%{summary}.
%prep
%autosetup -p1
# fix shebangs
pushd python/volk_modtool
sed -i '1 {/#!\s*\/usr\/bin\/env\s\+python/ d}' __init__.py cfg.py
popd
%build
# workaround, the code is not yet compatible with the strict-aliasing
export CFLAGS="%{optflags} -fno-strict-aliasing"
export CXXFLAGS="$CFLAGS"
cmake -DCMAKE_INSTALL_PREFIX=/usr .
cmake --build .
# Use make_build for EL8 compat
make -C . volk_doc
# temporally disabled the testsuite due to https://github.com/gnuradio/volk/issues/442
# gnuradio (and all volk consumers) could coredump on s390x and ppc64le under some
# circumstances, see https://bugzilla.redhat.com/show_bug.cgi?id=1917625#c6
#%%check
#cd %{__cmake_builddir}
#make test
%install
DESTDIR="%{buildroot}" cmake --install .
# docs
mkdir -p %{buildroot}%{_docdir}/%{name}
cp -a ./html %{buildroot}%{_docdir}/%{name}
%files
%license COPYING
%doc README.md docs/CHANGELOG.md
%{_bindir}/volk-config-info
%{_bindir}/volk_modtool
%{_bindir}/volk_profile
%{_libdir}/libvolk*.so.*
%{python3_sitearch}/volk_modtool
%files devel
%{_includedir}/volk
%{_libdir}/libvolk.so
%{_libdir}/cmake/volk
%{_libdir}/pkgconfig/*.pc
%files doc
%doc %{_docdir}/%{name}/html
%changelog
* Thu Nov 21 2024 Suyun <ziyu.oerv@isrc.iscas.ac.cn> - 3.1.2-1
- Init package at 3.1.2
|