[packages/libfreenect2] - new
qboosh
qboosh at pld-linux.org
Mon Mar 16 18:15:39 CET 2020
commit 7d969f9c6bb8df7c3ae3f50ff9368976645cf848
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Mon Mar 16 18:16:33 2020 +0100
- new
libfreenect2-c++.patch | 11 +++++
libfreenect2-link.patch | 11 +++++
libfreenect2-pc.patch | 10 +++++
libfreenect2.spec | 113 ++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 145 insertions(+)
---
diff --git a/libfreenect2.spec b/libfreenect2.spec
new file mode 100644
index 0000000..4a1cfa2
--- /dev/null
+++ b/libfreenect2.spec
@@ -0,0 +1,113 @@
+# TODO: CUDA (on bcond)
+#
+# Conditional build:
+%bcond_without openni2 # OpenNI2 driver
+#
+Summary: Driver for Kinect for Windows v2 (K4W2) devices
+Summary(pl.UTF-8): Sterownik dla urządzeń Kinect for Windows v2 (K4W2)
+Name: libfreenect2
+Version: 0.2.0
+Release: 1
+License: Apache v2.0 or GPL v2
+Group: Libraries
+#Source0Download: https://github.com/OpenKinect/libfreenect2/releases
+Source0: https://github.com/OpenKinect/libfreenect2/archive/v%{version}/%{name}-%{version}.tar.gz
+# Source0-md5: 54bde616ede3cff23eaeb2a736ca6e45
+Patch0: %{name}-c++.patch
+Patch1: %{name}-link.patch
+Patch2: %{name}-pc.patch
+URL: https://openkinect.org/wiki/Main_Page
+BuildRequires: OpenCL-devel >= 1.1
+BuildRequires: OpenGL-devel >= 3.1
+%{?with_openni2:BuildRequires: OpenNI2-devel >= 2.2.0.33}
+BuildRequires: cmake >= 2.8.12.1
+BuildRequires: glfw-devel >= 3
+BuildRequires: libjpeg-turbo-devel
+BuildRequires: libstdc++-devel >= 6:4.7
+BuildRequires: libusb-devel >= 1.0.20
+BuildRequires: libva-devel
+BuildRequires: libva-drm-devel
+BuildRequires: pkgconfig
+Requires: libusb >= 1.0.20
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+Driver for Kinect for Windows v2 (K4W2) devices.
+
+%description -l pl.UTF-8
+Sterownik dla urządzeń Kinect for Windows v2 (K4W2).
+
+%package devel
+Summary: Header files for libfreenect libraries
+Summary(pl.UTF-8): Pliki nagłówkowe bibliotek libfreenect
+Group: Development/Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: libusb-devel >= 1.0.20
+
+%description devel
+Header files for libfreenect libraries.
+
+%description devel -l pl.UTF-8
+Pliki nagłówkowe bibliotek libfreenect.
+
+%package -n OpenNI2-driver-freenect2
+Summary: OpenNI2 driver for Microsoft Kinect
+Summary(pl.UTF-8): Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2
+Group: Libraries
+Requires: %{name} = %{version}-%{release}
+Requires: OpenNI2 >= 2.2.0.33
+
+%description -n OpenNI2-driver-freenect2
+OpenNI2 driver for Microsoft Kinect.
+
+%description -n OpenNI2-driver-freenect2 -l pl.UTF-8
+Sterownik do kontrolera Microsoft Kinect dla platformy OpenNI2.
+
+%prep
+%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
+
+%build
+install -d build
+cd build
+%cmake .. \
+ -DBUILD_EXAMPLES=OFF \
+ %{!?with_openni2:-DBUILD_OPENNI2_DRIVER=OFF} \
+ -DENABLE_CUDA=OFF \
+ -DENABLE_CXX11=ON \
+ -DLIBFREENECT2_THREADING_LIBRARIES=pthread
+
+%{__make}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} -C build install \
+ DESTDIR=$RPM_BUILD_ROOT
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post -p /sbin/ldconfig
+%postun -p /sbin/ldconfig
+
+%files
+%defattr(644,root,root,755)
+%doc CONTRIB README.md
+%attr(755,root,root) %{_libdir}/libfreenect2.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libfreenect2.so.0.2
+
+%files devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libfreenect2.so
+%{_includedir}/libfreenect2
+%{_pkgconfigdir}/freenect2.pc
+%{_libdir}/cmake/freenect2
+
+%if %{with openni2}
+%files -n OpenNI2-driver-freenect2
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/OpenNI2/Drivers/libfreenect2-openni2.so*
+%endif
diff --git a/libfreenect2-c++.patch b/libfreenect2-c++.patch
new file mode 100644
index 0000000..86dd7e9
--- /dev/null
+++ b/libfreenect2-c++.patch
@@ -0,0 +1,11 @@
+--- libfreenect2-0.2.0/src/frame_listener_impl.cpp.orig 2016-04-27 22:34:51.000000000 +0200
++++ libfreenect2-0.2.0/src/frame_listener_impl.cpp 2020-03-15 19:08:33.919386454 +0100
+@@ -26,6 +26,8 @@
+
+ /** @file frame_listener_impl.cpp Implementation classes for frame listeners. */
+
++#include <functional>
++
+ #include <libfreenect2/frame_listener_impl.h>
+ #include <libfreenect2/threading.h>
+
diff --git a/libfreenect2-link.patch b/libfreenect2-link.patch
new file mode 100644
index 0000000..d812324
--- /dev/null
+++ b/libfreenect2-link.patch
@@ -0,0 +1,11 @@
+--- libfreenect2-0.2.0/cmake_modules/SetupLibfreenect2Threading.cmake.orig 2016-04-27 22:34:51.000000000 +0200
++++ libfreenect2-0.2.0/cmake_modules/SetupLibfreenect2Threading.cmake 2020-03-15 20:29:56.216270115 +0100
+@@ -25,7 +25,7 @@
+ SET(LIBFREENECT2_THREADING "stdlib")
+ SET(LIBFREENECT2_THREADING_INCLUDE_DIR "")
+ SET(LIBFREENECT2_THREADING_SOURCE "")
+- SET(LIBFREENECT2_THREADING_LIBRARIES "")
++ SET(LIBFREENECT2_THREADING_LIBRARIES "pthread")
+ SET(LIBFREENECT2_THREADING_STDLIB 1)
+ SET(HAVE_Threading std::thread)
+ ELSE(LIBFREENECT2_THREADING_STDLIB)
diff --git a/libfreenect2-pc.patch b/libfreenect2-pc.patch
new file mode 100644
index 0000000..dcc4ff8
--- /dev/null
+++ b/libfreenect2-pc.patch
@@ -0,0 +1,10 @@
+--- libfreenect2-0.2.0/freenect2.pc.in.orig 2016-04-27 22:34:51.000000000 +0200
++++ libfreenect2-0.2.0/freenect2.pc.in 2020-03-15 20:33:15.555190204 +0100
+@@ -1,6 +1,6 @@
+ prefix=@CMAKE_INSTALL_PREFIX@
+ exec_prefix=@CMAKE_INSTALL_PREFIX@
+-libdir=${prefix}/lib
++libdir=${prefix}/lib at LIB_SUFFIX@
+ includedir=${prefix}/include
+
+ Name: freenect2
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/libfreenect2.git/commitdiff/7d969f9c6bb8df7c3ae3f50ff9368976645cf848
More information about the pld-cvs-commit
mailing list