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
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
|
%global apiversion 1.12
%global soversion 1.12
Name: pcl
Version: 1.12.1
Release: 3
Summary: Library for point cloud processing
License: BSD
URL: http://pointclouds.org/
Source0: %{name}-%{version}.tar.gz
# Look for external metslib, not upstream
Patch0: %{name}-1.12.0-metslib.patch
# Patch for PCLConfig.cmake to find pcl
Patch1: %{name}-1.12.0-fedora.patch
Patch2: %{name}-1.12.1-boost.patch
# Fix CVE-2025-4638 / CVE-2025-4640 (opennurbs vendored zlib)
Patch8: CVE-2025-4638.patch
# For plain building
BuildRequires: cmake, gcc-c++, boost-devel
# Documentation
#BuildRequires: doxygen, graphviz, /usr/bin/sphinx-build
BuildRequires: doxygen, graphviz
# mandatory
#BuildRequires: eigen3-static, flann-devel, vtk-devel, gl2ps-devel, hdf5-devel, libxml2-devel, netcdf-cxx-devel, jsoncpp-devel, metslib-static, libXext-devel
BuildRequires: eigen3-static, flann-devel, gl2ps-devel, hdf5-devel, libxml2-devel, jsoncpp-devel, metslib-static, libXext-devel, flann-static
BuildRequires: texlive-latex
# To fix Imported target "VTK::Java" includes non-existent path "/usr/lib/jvm/java/include" in its INTERFACE_INCLUDE_DIRECTORIES
%ifarch %{java_arches}
BuildRequires: java-devel
%endif
# optional
BuildRequires: qt5-qtbase-devel, qhull-devel, libusbx-devel, gtest-devel, qt5-qtwebkit-devel
%ifarch %{ix86} x86_64
BuildRequires: openni-devel
%endif
%description
The Point Cloud Library (or PCL) is a large scale, open project for point
cloud processing.
The PCL framework contains numerous state-of-the art algorithms including
filtering, feature estimation, surface reconstruction, registration, model
fitting and segmentation.
%package devel
Summary: Development files for %{name}
Requires: %{name} = %{version}-%{release}
Requires: libusb-devel
Requires: flann-static
Requires: pkgconfig
#Requires: eigen3-devel, qhull-devel, flann-devel, vtk-devel
Requires: eigen3-devel, qhull-devel, flann-devel
%ifarch %{ix86} x86_64
Requires: openni-devel
%endif
%description devel
The %{name}-devel package contains libraries and header files for
developing applications that use %{name}.
%package tools
Summary: Point cloud tools and viewers
Requires: %{name} = %{version}-%{release}
%description tools
This package contains tools for point cloud file processing and viewers
for point cloud files and live Kinect data.
%package doc
Summary: PCL API documentation
BuildArch: noarch
%description doc
The %{name}-doc package contains API documentation for the Point Cloud
Library.
%prep
%setup -qn %{name}-%{name}-%{version}
%patch0 -p1 -b .metslib
%patch1 -p0 -b .fedora
%patch2 -p1 -b .boost
%patch8 -p1 -b .zlib
# Just to make it obvious we're not using any of these
rm -fr recognition/include/pcl/recognition/3rdparty/metslib
rm -fr surface/src/3rdparty/opennurbs
rm -rf surface/include/pcl/surface/3rdparty/opennurbs
%build
# try to reduce memory usage of compile process (can cause OOM errors
# esp. on ARM builders)
%global optflags %(echo %{optflags} | sed -e 's/-g /-g1 /' -e 's/-pipe //' -e's/-ffat-lto-objects/-fno-fat-lto-objects/')
mkdir build && cd build
%cmake \
-DCMAKE_BUILD_TYPE=None \
-DWITH_DOCS=ON \
-DWITH_CUDA=OFF \
-DWITH_VTK=OFF \
-DWITH_TUTORIALS=ON \
-DBUILD_apps=ON \
-DBUILD_global_tests=OFF \
-DOPENNI_INCLUDE_DIR:PATH=/usr/include/ni \
-DLIB_INSTALL_DIR=%{_lib} \
%ifarch x86_64
-DPCL_ENABLE_SSE=ON \
%else
-DPCL_ENABLE_SSE=OFF \
%endif
-DPCL_PKGCONFIG_SUFFIX:STRING="" \
-DBUILD_documentation=ON \
-DCMAKE_SKIP_RPATH=ON \
..
%make_build
%install
cd build
%make_install
# Just a dummy test
rm -f $RPM_BUILD_ROOT%{_bindir}/timed_trigger_test
mkdir -p $RPM_BUILD_ROOT%{_libdir}/cmake/pcl
mv $RPM_BUILD_ROOT%{_datadir}/%{name}-*/*.cmake $RPM_BUILD_ROOT%{_libdir}/cmake/pcl/
mv $RPM_BUILD_ROOT%{_datadir}/%{name}-*/Modules $RPM_BUILD_ROOT%{_libdir}/cmake/pcl/
%check
cd build
make test || true
%ldconfig_scriptlets
%files
%license LICENSE.txt
%doc AUTHORS.txt
%{_libdir}/*.so.%{version}
%{_libdir}/*.so.%{soversion}
%{_datadir}/%{name}-%{apiversion}
%files devel
%{_includedir}/*
%{_libdir}/*.so
%{_libdir}/pkgconfig/*.pc
%{_libdir}/cmake/pcl
%files tools
%{_bindir}/pcl_*
# There are no .desktop files because the GUI tools are rather examples
# to understand a particular feature of PCL.
%files doc
%doc %{_datadir}/doc
%changelog
* Fri Oct 16 2026 kuyan_kubuds <kuyan@kubuds.cn> - 1.12.1-3
- Fix CVE-2025-4638 CVE-2025-4640
* Mon Sep 11 2023 will_niutao <niutao2@huawei.com> - 1.12.1-2
- delete unused build require
* Fri Apr 28 2023 will_niutao <niutao2@huawei.com> - 1.12.1-1
- init package for openEuler
|