[pcl] pcl: Library for point cloud processing
Tim Niemueller
timn at fedoraproject.org
Tue Dec 27 10:54:41 UTC 2011
commit 25911544e701c313137d604197f782bb6088cac4
Author: Tim Niemueller <niemueller at kbsg.rwth-aachen.de>
Date: Tue Dec 27 11:54:14 2011 +0100
pcl: Library for point cloud processing
.gitignore | 5 +
PCL-1.3.1-Source-fedora.patch | 91 ++++++++++++++++++
pcl.spec | 202 +++++++++++++++++++++++++++++++++++++++++
sources | 1 +
4 files changed, 299 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..432d283 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1,5 @@
+*.log
+*.rpm
+/x86_64
+/PCL-1.3.1-Source.tar.bz2
+/PCL-1.3.1-Source
diff --git a/PCL-1.3.1-Source-fedora.patch b/PCL-1.3.1-Source-fedora.patch
new file mode 100644
index 0000000..1f48044
--- /dev/null
+++ b/PCL-1.3.1-Source-fedora.patch
@@ -0,0 +1,91 @@
+diff -urN PCL-1.3.1-Source/cmake/pcl_targets.cmake PCL-1.3.1-Source-fedora/cmake/pcl_targets.cmake
+--- PCL-1.3.1-Source/cmake/pcl_targets.cmake 2011-12-03 00:35:48.000000000 +0100
++++ PCL-1.3.1-Source-fedora/cmake/pcl_targets.cmake 2011-12-04 12:37:45.827377186 +0100
+@@ -1,5 +1,7 @@
+ include(${PROJECT_SOURCE_DIR}/cmake/pcl_utils.cmake)
+
++set(PCL_PKGCONFIG_SUFFIX "-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}" CACHE STRING "Suffix to append to pkg-config files")
++
+ ###############################################################################
+ # Add an option to build a subsystem or not.
+ # _var The name of the variable to store the option in.
+@@ -331,14 +333,14 @@
+ LIST_TO_STRING(_ext_deps_str "${_ext_deps}")
+ set(PKG_EXTERNAL_DEPS ${_ext_deps_str})
+ foreach(_dep ${_pcl_deps})
+- set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} pcl_${_dep}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}")
++ set(PKG_EXTERNAL_DEPS "${PKG_EXTERNAL_DEPS} pcl_${_dep}${PCL_PKGCONFIG_SUFFIX}")
+ endforeach(_dep)
+ set(PKG_INTERNAL_DEPS "")
+ foreach(_dep ${_int_deps})
+ set(PKG_INTERNAL_DEPS "${PKG_INTERNAL_DEPS} -l${_dep}")
+ endforeach(_dep)
+
+- set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}.pc)
++ set(_pc_file ${CMAKE_CURRENT_BINARY_DIR}/${_name}${PCL_PKGCONFIG_SUFFIX}.pc)
+ configure_file(${PROJECT_SOURCE_DIR}/cmake/pkgconfig.cmake.in ${_pc_file}
+ @ONLY)
+ install(FILES ${_pc_file} DESTINATION ${PKGCFG_INSTALL_DIR}
+diff -urN PCL-1.3.1-Source/cmake/pcl_utils.cmake PCL-1.3.1-Source-fedora/cmake/pcl_utils.cmake
+--- PCL-1.3.1-Source/cmake/pcl_utils.cmake 2011-12-03 00:35:48.000000000 +0100
++++ PCL-1.3.1-Source-fedora/cmake/pcl_utils.cmake 2011-12-04 12:25:43.779363356 +0100
+@@ -81,7 +81,7 @@
+ # subdirectory named after the library in question (e.g.
+ # "registration/blorgle.h")
+ macro(SET_INSTALL_DIRS)
+- set(LIB_INSTALL_DIR "lib")
++ set(LIB_INSTALL_DIR "lib${LIB_SUFFIX}")
+ set(INCLUDE_INSTALL_ROOT
+ "include/${PROJECT_NAME_LOWER}-${PCL_MAJOR_VERSION}.${PCL_MINOR_VERSION}")
+ set(INCLUDE_INSTALL_DIR "${INCLUDE_INSTALL_ROOT}/pcl")
+diff -urN PCL-1.3.1-Source/CMakeLists.txt PCL-1.3.1-Source-fedora/CMakeLists.txt
+--- PCL-1.3.1-Source/CMakeLists.txt 2011-12-03 00:35:48.000000000 +0100
++++ PCL-1.3.1-Source-fedora/CMakeLists.txt 2011-12-04 12:25:43.780363354 +0100
+@@ -96,11 +96,11 @@
+ ###
+ SET(CMAKE_SKIP_BUILD_RPATH FALSE)
+ SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+-SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
++SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+ SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+-LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib" is_system_dir)
++LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}" is_system_dir)
+ IF("${is_system_dir}" STREQUAL "-1")
+- SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib")
++ SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}")
+ ENDIF("${is_system_dir}" STREQUAL "-1")
+
+ ### ---[ Find universal dependencies
+diff -urN PCL-1.3.1-Source/io/CMakeLists.txt PCL-1.3.1-Source-fedora/io/CMakeLists.txt
+--- PCL-1.3.1-Source/io/CMakeLists.txt 2011-12-03 00:35:48.000000000 +0100
++++ PCL-1.3.1-Source-fedora/io/CMakeLists.txt 2011-12-04 12:25:43.781363351 +0100
+@@ -112,9 +112,10 @@
+ endif(OPENNI_FOUND)
+
+ set(EXT_DEPS eigen3)
+- if(OPENNI_FOUND)
+- list(APPEND EXT_DEPS openni-dev)
+- endif(OPENNI_FOUND)
++ # Disable on Fedora, there is no pkg-config file
++ #if(OPENNI_FOUND)
++ # list(APPEND EXT_DEPS openni-dev)
++ #endif(OPENNI_FOUND)
+ PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
+ "${SUBSYS_DEPS}" "${EXT_DEPS}" "" "" "")
+
+diff -urN PCL-1.3.1-Source/visualization/CMakeLists.txt PCL-1.3.1-Source-fedora/visualization/CMakeLists.txt
+--- PCL-1.3.1-Source/visualization/CMakeLists.txt 2011-12-03 00:35:48.000000000 +0100
++++ PCL-1.3.1-Source-fedora/visualization/CMakeLists.txt 2011-12-04 12:25:43.782363348 +0100
+@@ -81,9 +81,9 @@
+ target_link_libraries(${LIB_NAME} pcl_io pcl_kdtree pcl_range_image
+ vtkCommon vtkWidgets vtkHybrid)
+ set(EXT_DEPS "")
+- if(OPENNI_FOUND)
+- list(APPEND EXT_DEPS openni-dev)
+- endif(OPENNI_FOUND)
++ #if(OPENNI_FOUND)
++ # list(APPEND EXT_DEPS openni-dev)
++ #endif(OPENNI_FOUND)
+ PCL_MAKE_PKGCONFIG(${LIB_NAME} ${SUBSYS_NAME} "${SUBSYS_DESC}"
+ "${SUBSYS_DEPS}" "${EXT_DEPS}" "" "" "")
+
diff --git a/pcl.spec b/pcl.spec
new file mode 100644
index 0000000..100aec9
--- /dev/null
+++ b/pcl.spec
@@ -0,0 +1,202 @@
+Name: pcl
+Version: 1.3.1
+Release: 2%{?dist}
+Summary: Library for point cloud processing
+
+Group: System Environment/Libraries
+License: BSD
+URL: http://pointclouds.org/
+Source0: http://dev.pointclouds.org/attachments/download/572/PCL-1.3.1-Source.tar.bz2
+Patch0: PCL-1.3.1-Source-fedora.patch
+BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+
+# For plain building
+BuildRequires: cmake, gcc-c++, boost-devel
+# Documentation
+BuildRequires: doxygen, graphviz, python-sphinx
+%if ! 0%{?rhel} || 0%{?rhel} >= 6
+BuildRequires: texlive-latex
+%else
+BuildRequires: tetex-latex
+%endif
+
+# mandatory
+BuildRequires: eigen3-devel, flann-devel, cminpack-devel, vtk-devel, gl2ps-devel
+# optional
+BuildRequires: qhull-devel, openni-devel, libusb1-devel, gtest-devel
+
+%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}
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: pkgconfig
+Requires: eigen3-devel, qhull-devel, openni-devel, cminpack-devel, flann-devel, vtk-devel
+
+%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
+Group: Development/Tools
+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
+Group: Documentation
+%if ! 0%{?rhel} || 0%{?rhel} >= 6
+BuildArch: noarch
+%endif
+
+%description doc
+The %{name}-doc package contains API documentation for the Point Cloud
+Library.
+
+
+%prep
+%setup -q -n PCL-%{version}-Source
+%patch0 -p1
+
+# Just to make it obvious we're not using any of these
+rm -rf 3rdparty
+
+
+%build
+echo SMP FLAGS: %{?_smp_mflags}
+mkdir build
+pushd build
+%cmake \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DOPENNI_INCLUDE_DIR:PATH=/usr/include/ni \
+ -DPCL_PKGCONFIG_SUFFIX:STRING="" \
+ -DBUILD_documentation=ON \
+ -DCMAKE_SKIP_RPATH=ON \
+ ..
+
+make %{?_smp_mflags}
+make doc
+popd
+
+pushd doc/overview
+make
+popd
+
+pushd doc/tutorials
+sed -i "s/, 'sphinxcontrib.doxylink.doxylink'//" content/conf.py
+make
+popd
+
+pushd doc/advanced
+make
+popd
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+pushd build
+make install DESTDIR=$RPM_BUILD_ROOT
+find $RPM_BUILD_ROOT -name '*.la' -exec rm -f {} ';'
+
+# Just a dummy test
+rm $RPM_BUILD_ROOT%{_bindir}/timed_trigger_test
+
+#mv $RPM_BUILD_ROOT%{_datadir}/doc/%{name} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}-%{version}
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
+mv doc/doxygen/html doc/doxygen/api
+
+popd
+
+mv doc/tutorials/html doc/tutorials/tutorials
+
+for f in $RPM_BUILD_ROOT%{_bindir}/*; do
+ mv $f $RPM_BUILD_ROOT%{_bindir}/pcl_$(basename $f)
+done
+
+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%{_libdir}/pcl/*.cmake $RPM_BUILD_ROOT%{_libdir}/cmake/pcl
+#rmdir $RPM_BUILD_ROOT%{_libdir}/pcl
+
+# This is required to fix crashes in programs linked against pcl_visualization lib
+#sed -i -e 's/vtkWidgets/vtkRendering/' $RPM_BUILD_ROOT%{_libdir}/cmake/pcl/PCLDepends-release.cmake
+
+# At the moment fails due to RPATH problem
+# (RPATH not built into test apps as required)
+#%check
+#cd build
+#make test
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%post -p /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+
+%files
+%defattr(-,root,root,-)
+%doc AUTHORS.txt LICENSE.txt
+%{_libdir}/*.so.*
+%{_datadir}/%{name}-1.3
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/*
+%{_libdir}/*.so
+%{_libdir}/pkgconfig/*.pc
+%{_libdir}/cmake/pcl
+
+%files tools
+%defattr(-,root,root,-)
+%{_bindir}/pcl_*
+# There are no .desktop files because the GUI tools are rather examples
+# to understand a particular feature of PCL.
+
+%files doc
+%defattr(-,root,root,-)
+%doc build/doc/doxygen/api
+%doc doc/tutorials/tutorials
+
+
+%changelog
+* Fri Dec 23 2011 Tim Niemueller <tim at niemueller.de> - 1.3.1-2
+- Make sure documentation is not in main package
+
+* Sat Dec 04 2011 Tim Niemueller <tim at niemueller.de> - 1.3.1-1
+- Update to 1.3.1
+
+* Tue Nov 22 2011 Tim Niemueller <tim at niemueller.de> - 1.3.0-1
+- Update to 1.3.0
+
+* Tue Oct 22 2011 Tim Niemueller <tim at niemueller.de> - 1.2.0-1
+- Update to 1.2.0
+
+* Tue Oct 04 2011 Tim Niemueller <tim at niemueller.de> - 1.1.1-2
+- Change vtkWidgets to vtkRendering as import library flags to fix crash
+ for binaries compiled with the installed PCL
+
+* Tue Sep 20 2011 Tim Niemueller <tim at niemueller.de> - 1.1.1-1
+- Update to 1.1.1
+
+* Wed Jul 27 2011 Tim Niemueller <tim at niemueller.de> - 1.1.0-1
+- Update to 1.1.0
+
+* Wed Apr 06 2011 Tim Niemueller <tim at niemueller.de> - 1.0.0-0.1.svn366
+- Initial package
+
diff --git a/sources b/sources
index e69de29..25988d6 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+a20953ed241fc7eb7d105878b01fa6c5 PCL-1.3.1-Source.tar.bz2
More information about the scm-commits
mailing list