#
# Conditional build:
%bcond_without apidocs # do not build and package API docs
+%bcond_without fzapi # Fotonic FZ API support
%bcond_with sse # SSE/SSE2/SSE3 support
+%bcond_with tawara # Tawara video output (pcl_video)
%bcond_without vtk # VTK support in libpcl_{io,surface} + libpcl_{apps,visualization} libs
-#
+
Summary: Point Cloud Library - library for point cloud processing
Summary(pl.UTF-8): Point Cloud Library - biblioteka do operacji na chmurze punktów
Name: pcl
-Version: 1.7.0
-Release: 1
+Version: 1.7.2
+Release: 12
License: BSD
Group: Libraries
#Source0Download: http://pointclouds.org/downloads/
Source0: https://github.com/PointCloudLibrary/pcl/archive/%{name}-%{version}.tar.gz
-# Source0-md5: e2ac2d2e72825d991c6d194f9586b5d8
-Patch0: %{name}-openni.patch
-Patch1: %{name}-vtk6.patch
+# Source0-md5: 02c72eb6760fcb1f2e359ad8871b9968
+Patch0: %{name}-fz_api.patch
+Patch1: %{name}-tawara.patch
+Patch2: %{name}-openni.patch
+Patch3: eigen-dependency.patch
+Patch4: vtk7.patch
+Patch5: vtk71.patch
+Patch6: vtkOpenGL2.patch
+Patch7: fix-return-type.patch
URL: http://pointclouds.org/
+BuildRequires: OpenGL-devel
+BuildRequires: OpenGL-GLU-devel
BuildRequires: OpenNI-devel
-BuildRequires: boost-devel >= 1.40
+BuildRequires: OpenNI2-devel
+BuildRequires: QtCore-devel >= 4
+BuildRequires: QtOpenGL-devel >= 4
+BuildRequires: boost-devel >= 1.43
BuildRequires: cmake >= 2.8
BuildRequires: eigen3 >= 3
-BuildRequires: flann-devel
+BuildRequires: flann-devel >= 1.7.0
+%{?with_fzapi:BuildRequires: fz-api-devel}
BuildRequires: gcc-c++ >= 6:4.2
BuildRequires: libgomp-devel
+BuildRequires: libpcap-devel
+BuildRequires: libpng-devel
BuildRequires: libstdc++-devel
BuildRequires: libusb-devel >= 1.0
BuildRequires: qhull-devel
+BuildRequires: qt4-build >= 4
BuildRequires: python
BuildRequires: sed >= 4.0
+%{?with_tawara:BuildRequires: tawara-devel}
# FIXME: only vtk-devel is really required, the rest (java,python,tcl runtimes) only because of checks in VTK cmake files
-%{?with_vtk:BuildRequires: vtk-devel}
-%{?with_vtk:BuildRequires: vtk-java}
-%{?with_vtk:BuildRequires: vtk-python}
-%{?with_vtk:BuildRequires: vtk-tcl}
+%{?with_vtk:BuildRequires: vtk-devel >= 6}
+%{?with_vtk:BuildRequires: vtk-java >= 6}
+%{?with_vtk:BuildRequires: vtk-python >= 6}
+%{?with_vtk:BuildRequires: vtk-tcl >= 6}
%if %{with apidocs}
BuildRequires: doxygen
-BuildRequires: python-sphinxcontrib-doxylink >= 1.3
-BuildRequires: sphinx-pdg
+BuildRequires: python3-sphinxcontrib-doxylink >= 1.3
+BuildRequires: sphinx-pdg >= 1.3.3-2
%endif
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary(pl.UTF-8): Pliki nagłówkowe biblioteki PCL
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
-%{?with_vtk:Requires: vtk-devel}
+Requires: boost-devel >= 1.44
+Requires: eigen3 >= 3
+%{?with_vtk:Requires: vtk-devel >= 6}
%description devel
Header files for PCL library.
Summary: PCL API documentation and tutorials
Summary(pl.UTF-8): Dokumentacja API oraz wprowadzenie do biblioteki PCL
Group: Documentation
+%if "%{_rpmversion}" >= "5"
+BuildArch: noarch
+%endif
%description apidocs
API documentation and tutorials for PCL library.
%setup -q -n pcl-pcl-%{version}
%patch0 -p1
%patch1 -p1
-
-# don't use SSE/SSE2/SSE3 just because compiler and builder host supports it
-#%{__sed} -i -e '/^PCL_CHECK_FOR_SSE/d' CMakeLists.txt
+%patch2 -p1
+%patch3 -p1
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
%build
mkdir build
# LIB_INSTALL_DIR specified by PLD cmake macro is incompatible with what PCL expects
%cmake .. \
-DLIB_INSTALL_DIR=%{_lib} \
+%if %{with fzapi}
+ -DFZAPI_DIR=/usr \
+ -DFZAPI_INCLUDE_DIR=/usr/include \
+ -DFZAPI_LIBS=%{_libdir}/libfz_api.so \
+%endif
+%if %{with apidocs}
+ -DWITH_DOCS=ON \
+ -DWITH_TUTORIALS=ON \
+%endif
%{!?with_sse:-DPCL_ENABLE_SSE=OFF}
# NOTE: -j1 because of OOM on th-x86_64
%{__make} -j1
-# why it's not called on build?
-%if %{with apidocs}
-cd doc/doxygen
-doxygen doxyfile
-cd ../tutorials
-sphinx-build -b html -a -d doctrees ../../../doc/tutorials/content html
-%endif
-
%install
rm -rf $RPM_BUILD_ROOT
%files
%defattr(644,root,root,755)
%doc AUTHORS.txt LICENSE.txt
+%attr(755,root,root) %{_bindir}/pcl_compute_hausdorff
%attr(755,root,root) %{_bindir}/pcl_compute_hull
%attr(755,root,root) %{_bindir}/pcl_concatenate_points_pcd
%attr(755,root,root) %{_bindir}/pcl_convert_pcd_ascii_binary
%attr(755,root,root) %{_bindir}/pcl_demean_cloud
%attr(755,root,root) %{_bindir}/pcl_fast_bilateral_filter
+%attr(755,root,root) %{_bindir}/pcl_generate
+%attr(755,root,root) %{_bindir}/pcl_grid_min
%attr(755,root,root) %{_bindir}/pcl_hdl_grabber
%attr(755,root,root) %{_bindir}/pcl_linemod_detection
+%attr(755,root,root) %{_bindir}/pcl_local_max
%attr(755,root,root) %{_bindir}/pcl_lum
%attr(755,root,root) %{_bindir}/pcl_match_linemod_template
+%attr(755,root,root) %{_bindir}/pcl_morph
%attr(755,root,root) %{_bindir}/pcl_ndt2d
%attr(755,root,root) %{_bindir}/pcl_ndt3d
+%attr(755,root,root) %{_bindir}/pcl_obj2pcd
%attr(755,root,root) %{_bindir}/pcl_oni2pcd
%attr(755,root,root) %{_bindir}/pcl_openni_grabber_depth_example
%attr(755,root,root) %{_bindir}/pcl_openni_grabber_example
%attr(755,root,root) %{_bindir}/pcl_ply2ply
%attr(755,root,root) %{_bindir}/pcl_ply2raw
%attr(755,root,root) %{_bindir}/pcl_plyheader
+%attr(755,root,root) %{_bindir}/pcl_progressive_morphological_filter
%attr(755,root,root) %{_bindir}/pcl_radius_filter
%attr(755,root,root) %{_bindir}/pcl_sac_segmentation_plane
%attr(755,root,root) %{_bindir}/pcl_train_linemod_template
%attr(755,root,root) %{_bindir}/pcl_outlier_removal
%attr(755,root,root) %{_bindir}/pcl_passthrough_filter
%attr(755,root,root) %{_bindir}/pcl_pcd2ply
+%attr(755,root,root) %{_bindir}/pcl_pcd2png
%attr(755,root,root) %{_bindir}/pcl_pcd2vtk
%attr(755,root,root) %{_bindir}/pcl_pcd_grabber_viewer
%attr(755,root,root) %{_bindir}/pcl_pcd_image_viewer
%attr(755,root,root) %{_bindir}/pcl_transform_from_viewpoint
%attr(755,root,root) %{_bindir}/pcl_transform_point_cloud
%attr(755,root,root) %{_bindir}/pcl_vfh_estimation
+%if %{with vtk}
+%attr(755,root,root) %{_bindir}/pcl_video
+%endif
%attr(755,root,root) %{_bindir}/pcl_viewer
%attr(755,root,root) %{_bindir}/pcl_virtual_scanner
%attr(755,root,root) %{_bindir}/pcl_voxel_grid
%{_pkgconfigdir}/pcl_common-1.7.pc
%{_pkgconfigdir}/pcl_features-1.7.pc
%{_pkgconfigdir}/pcl_filters-1.7.pc
+%{_pkgconfigdir}/pcl_geometry-1.7.pc
%{_pkgconfigdir}/pcl_io-1.7.pc
%{_pkgconfigdir}/pcl_kdtree-1.7.pc
%{_pkgconfigdir}/pcl_keypoints-1.7.pc
%files apidocs
%defattr(644,root,root,755)
%dir %{_docdir}/pcl-1.7
+%{_docdir}/pcl-1.7/advanced
%{_docdir}/pcl-1.7/html
%{_docdir}/pcl-1.7/tutorials
%endif