Compare commits
29 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1f69cb7539 | ||
|
|
42509b7498 | ||
|
|
ee4496ce03 | ||
|
|
afa6666ec3 | ||
|
|
efd58e5baa | ||
|
|
126791156c | ||
|
|
44bf89d545 | ||
|
|
dcf7f68d15 | ||
|
|
82cdb292a3 | ||
|
|
6475407250 | ||
|
|
2c0e95bf9e | ||
|
|
80f39ba0f4 | ||
|
|
f12a983f14 | ||
|
|
1dd8ebc2f8 | ||
|
|
d4f1291e35 | ||
|
|
40010c080a | ||
|
|
0584e9ef13 | ||
|
|
2ed534fa00 | ||
|
|
f55eb6d562 | ||
|
|
1ef45bc200 | ||
|
|
8d93c5893e | ||
|
|
68d7a67de3 | ||
|
|
c24c1822bd | ||
|
|
bc489b16d6 | ||
|
|
ec86d1cb9f | ||
|
|
1fb2d065b1 | ||
|
|
e746e2a26d | ||
|
|
f0320677ae | ||
|
|
1354f136ab |
11 changed files with 269 additions and 315 deletions
|
|
@ -1,66 +0,0 @@
|
|||
From 9e98a0b11fddeabab6ef5e0915b96c950597e53e Mon Sep 17 00:00:00 2001
|
||||
From: Rich Mattes <richmattes@gmail.com>
|
||||
Date: Sat, 26 May 2018 16:11:11 -0400
|
||||
Subject: [PATCH 1/2] Build libfreenect_cv and cvdemo as C++ sources
|
||||
|
||||
Signed-off-by: Rich Mattes <richmattes@gmail.com>
|
||||
---
|
||||
wrappers/opencv/CMakeLists.txt | 4 ++--
|
||||
wrappers/opencv/{cvdemo.c => cvdemo.cpp} | 0
|
||||
wrappers/opencv/{libfreenect_cv.c => libfreenect_cv.cpp} | 0
|
||||
wrappers/opencv/libfreenect_cv.h | 4 ++--
|
||||
4 files changed, 4 insertions(+), 4 deletions(-)
|
||||
rename wrappers/opencv/{cvdemo.c => cvdemo.cpp} (100%)
|
||||
rename wrappers/opencv/{libfreenect_cv.c => libfreenect_cv.cpp} (100%)
|
||||
|
||||
diff --git a/wrappers/opencv/CMakeLists.txt b/wrappers/opencv/CMakeLists.txt
|
||||
index 0239075..bc5df19 100644
|
||||
--- a/wrappers/opencv/CMakeLists.txt
|
||||
+++ b/wrappers/opencv/CMakeLists.txt
|
||||
@@ -2,7 +2,7 @@
|
||||
# OpenCV Interface
|
||||
######################################################################################
|
||||
find_package(OpenCV REQUIRED)
|
||||
-add_library (freenect_cv SHARED libfreenect_cv.c)
|
||||
+add_library (freenect_cv SHARED libfreenect_cv.cpp)
|
||||
set_target_properties (freenect_cv PROPERTIES
|
||||
VERSION ${PROJECT_VER}
|
||||
SOVERSION ${PROJECT_APIVER})
|
||||
@@ -16,7 +16,7 @@ install (TARGETS freenect_cv
|
||||
install (FILES "libfreenect_cv.h"
|
||||
DESTINATION ${PROJECT_INCLUDE_INSTALL_DIR})
|
||||
|
||||
-add_executable(freenect-cvdemo cvdemo.c)
|
||||
+add_executable(freenect-cvdemo cvdemo.cpp)
|
||||
target_link_libraries(freenect-cvdemo freenect freenect_sync freenect_cv ${OpenCV_LIBS})
|
||||
install (TARGETS freenect-cvdemo
|
||||
DESTINATION bin)
|
||||
diff --git a/wrappers/opencv/cvdemo.c b/wrappers/opencv/cvdemo.cpp
|
||||
similarity index 100%
|
||||
rename from wrappers/opencv/cvdemo.c
|
||||
rename to wrappers/opencv/cvdemo.cpp
|
||||
diff --git a/wrappers/opencv/libfreenect_cv.c b/wrappers/opencv/libfreenect_cv.cpp
|
||||
similarity index 100%
|
||||
rename from wrappers/opencv/libfreenect_cv.c
|
||||
rename to wrappers/opencv/libfreenect_cv.cpp
|
||||
diff --git a/wrappers/opencv/libfreenect_cv.h b/wrappers/opencv/libfreenect_cv.h
|
||||
index b73b60c..55e3582 100644
|
||||
--- a/wrappers/opencv/libfreenect_cv.h
|
||||
+++ b/wrappers/opencv/libfreenect_cv.h
|
||||
@@ -1,11 +1,11 @@
|
||||
#pragma once
|
||||
|
||||
+#include <opencv/cv.h>
|
||||
+
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
-#include <opencv/cv.h>
|
||||
-
|
||||
IplImage *freenect_sync_get_depth_cv(int index);
|
||||
IplImage *freenect_sync_get_rgb_cv(int index);
|
||||
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
@ -1,51 +0,0 @@
|
|||
From db0e1825ff93133f3ca5735524d78279ede824db Mon Sep 17 00:00:00 2001
|
||||
From: Rich Mattes <richmattes@gmail.com>
|
||||
Date: Sat, 26 May 2018 16:14:01 -0400
|
||||
Subject: [PATCH 2/2] Fix bugs in sync library error handling
|
||||
|
||||
fnusb_open_subdevices checked for camera==NULL or res < 0 before
|
||||
jumping to the failure case. If camera was NULL but res was not
|
||||
0, the function would return 0 indicating success. This occurs
|
||||
when a kinect is not plugged into the PC. Forcing res to be
|
||||
negative when the camera == NULL case allows the failure to open
|
||||
a device to propagate through an application.
|
||||
|
||||
alloc_kinect in freenect_sync has a check for if freenect_open_device
|
||||
fails, but the logic is incorrect. freenect_open_device returns 0 on
|
||||
success and < 0 on error, so adding a check to see if the return is
|
||||
< 0 corrects detection of the failure case.
|
||||
|
||||
Signed-off-by: Rich Mattes <richmattes@gmail.com>
|
||||
---
|
||||
src/usb_libusb10.c | 1 +
|
||||
wrappers/c_sync/libfreenect_sync.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/usb_libusb10.c b/src/usb_libusb10.c
|
||||
index 11de86a..614aeee 100644
|
||||
--- a/src/usb_libusb10.c
|
||||
+++ b/src/usb_libusb10.c
|
||||
@@ -465,6 +465,7 @@ FN_INTERNAL int fnusb_open_subdevices(freenect_device *dev, int index)
|
||||
}
|
||||
|
||||
if (res < 0 || camera == NULL) {
|
||||
+ res = -1;
|
||||
goto failure;
|
||||
}
|
||||
|
||||
diff --git a/wrappers/c_sync/libfreenect_sync.c b/wrappers/c_sync/libfreenect_sync.c
|
||||
index 1b2e049..26a2261 100644
|
||||
--- a/wrappers/c_sync/libfreenect_sync.c
|
||||
+++ b/wrappers/c_sync/libfreenect_sync.c
|
||||
@@ -249,7 +249,7 @@ static int change_depth_format(sync_kinect_t *kinect, freenect_resolution res, f
|
||||
static sync_kinect_t *alloc_kinect(int index)
|
||||
{
|
||||
sync_kinect_t *kinect = (sync_kinect_t*)malloc(sizeof(sync_kinect_t));
|
||||
- if (freenect_open_device(ctx, &kinect->dev, index)) {
|
||||
+ if (freenect_open_device(ctx, &kinect->dev, index) < 0) {
|
||||
free(kinect);
|
||||
return NULL;
|
||||
}
|
||||
--
|
||||
2.17.0
|
||||
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
diff -up ./wrappers/python/CMakeLists.txt.cmake30 ./wrappers/python/CMakeLists.txt
|
||||
--- ./wrappers/python/CMakeLists.txt.cmake30 2015-01-26 22:01:37.000000000 -0500
|
||||
+++ ./wrappers/python/CMakeLists.txt 2016-02-21 11:19:40.995391145 -0500
|
||||
@@ -2,19 +2,18 @@
|
||||
# Python extension builder
|
||||
######################################################################################
|
||||
|
||||
-include(FindPythonInterp)
|
||||
-include(FindPythonLibs)
|
||||
-
|
||||
+include(FindPkgConfig)
|
||||
+pkg_check_modules(PYTHON python2)
|
||||
find_program(CYTHON_EXECUTABLE cython)
|
||||
|
||||
# Figure out installation path
|
||||
execute_process(COMMAND
|
||||
- ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(prefix='${CMAKE_INSTALL_PREFIX}')"
|
||||
+ ${PYTHON_EXECUTABLE} -c "from distutils.sysconfig import get_python_lib; print (get_python_lib(1))"
|
||||
OUTPUT_VARIABLE PYTHON_SITE_PACKAGES OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Figure out numpy include path
|
||||
execute_process(COMMAND
|
||||
- ${PYTHON_EXECUTABLE} -c "import numpy; print numpy.get_include()"
|
||||
+ ${PYTHON_EXECUTABLE} -c "import numpy; print (numpy.get_include())"
|
||||
OUTPUT_VARIABLE NUMPY_INCLUDE_PATH OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# How to Cython the .pyx file
|
||||
@@ -29,11 +28,13 @@ set_target_properties(cython_freenect PR
|
||||
OUTPUT_NAME "freenect"
|
||||
LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
|
||||
target_link_libraries(cython_freenect freenect_sync ${PYTHON_LIBRARIES})
|
||||
-include_directories(${PYTHON_INCLUDE_PATH} ../c_sync/ ${NUMPY_INCLUDE_PATH})
|
||||
+include_directories(${PYTHON_INCLUDE_DIRS} ../c_sync/ ${NUMPY_INCLUDE_PATH})
|
||||
|
||||
# Install the extension
|
||||
install(TARGETS cython_freenect
|
||||
- DESTINATION ${PYTHON_SITE_PACKAGES})
|
||||
+ ARCHIVE DESTINATION ${PYTHON_SITE_PACKAGES}
|
||||
+ LIBRARY DESTINATION ${PYTHON_SITE_PACKAGES}
|
||||
+ COMPONENT library)
|
||||
|
||||
# TODO: decide on what to do with demo_ scripts and were to install
|
||||
# them
|
||||
|
|
@ -1,43 +0,0 @@
|
|||
diff -up ./OpenNI2-FreenectDriver/src/ColorStream.hpp.cpp11 ./OpenNI2-FreenectDriver/src/ColorStream.hpp
|
||||
--- ./OpenNI2-FreenectDriver/src/ColorStream.hpp.cpp11 2016-02-21 12:18:01.412029788 -0500
|
||||
+++ ./OpenNI2-FreenectDriver/src/ColorStream.hpp 2016-02-21 12:18:21.272807345 -0500
|
||||
@@ -13,9 +13,9 @@ namespace FreenectDriver
|
||||
{
|
||||
public:
|
||||
// from NUI library & converted to radians
|
||||
- static const float DIAGONAL_FOV = 73.9 * (M_PI / 180);
|
||||
- static const float HORIZONTAL_FOV = 62 * (M_PI / 180);
|
||||
- static const float VERTICAL_FOV = 48.6 * (M_PI / 180);
|
||||
+ static constexpr float DIAGONAL_FOV = 73.9 * (M_PI / 180);
|
||||
+ static constexpr float HORIZONTAL_FOV = 62 * (M_PI / 180);
|
||||
+ static constexpr float VERTICAL_FOV = 48.6 * (M_PI / 180);
|
||||
|
||||
private:
|
||||
typedef std::map< OniVideoMode, std::pair<freenect_video_format, freenect_resolution> > FreenectVideoModeMap;
|
||||
diff -up ./OpenNI2-FreenectDriver/src/DepthStream.hpp.cpp11 ./OpenNI2-FreenectDriver/src/DepthStream.hpp
|
||||
--- ./OpenNI2-FreenectDriver/src/DepthStream.hpp.cpp11 2016-02-21 12:22:59.048682374 -0500
|
||||
+++ ./OpenNI2-FreenectDriver/src/DepthStream.hpp 2016-02-21 12:23:27.387791861 -0500
|
||||
@@ -17,9 +17,9 @@ namespace FreenectDriver
|
||||
{
|
||||
public:
|
||||
// from NUI library and converted to radians
|
||||
- static const float DIAGONAL_FOV = 70 * (M_PI / 180);
|
||||
- static const float HORIZONTAL_FOV = 58.5 * (M_PI / 180);
|
||||
- static const float VERTICAL_FOV = 45.6 * (M_PI / 180);
|
||||
+ static constexpr float DIAGONAL_FOV = 70 * (M_PI / 180);
|
||||
+ static constexpr float HORIZONTAL_FOV = 58.5 * (M_PI / 180);
|
||||
+ static constexpr float VERTICAL_FOV = 45.6 * (M_PI / 180);
|
||||
// from DepthKinectStream.cpp
|
||||
static const int MAX_VALUE = 10000;
|
||||
static const unsigned long long GAIN_VAL = 42;
|
||||
@@ -28,8 +28,8 @@ namespace FreenectDriver
|
||||
static const unsigned long long PARAM_COEFF_VAL = 4;
|
||||
static const unsigned long long SHIFT_SCALE_VAL = 10;
|
||||
static const unsigned long long ZERO_PLANE_DISTANCE_VAL = 120;
|
||||
- static const double ZERO_PLANE_PIXEL_SIZE_VAL = 0.10520000010728836;
|
||||
- static const double EMITTER_DCMOS_DISTANCE_VAL = 7.5;
|
||||
+ static constexpr double ZERO_PLANE_PIXEL_SIZE_VAL = 0.10520000010728836;
|
||||
+ static constexpr double EMITTER_DCMOS_DISTANCE_VAL = 7.5;
|
||||
|
||||
private:
|
||||
typedef std::map< OniVideoMode, std::pair<freenect_depth_format, freenect_resolution> > FreenectDepthModeMap;
|
||||
|
|
@ -1,18 +0,0 @@
|
|||
diff -up ./wrappers/cpp/cppview.cpp.noabort ./wrappers/cpp/cppview.cpp
|
||||
--- ./wrappers/cpp/cppview.cpp.noabort 2016-02-21 11:03:00.653334752 -0500
|
||||
+++ ./wrappers/cpp/cppview.cpp 2016-02-21 11:04:51.022655752 -0500
|
||||
@@ -348,7 +348,13 @@ void *gl_threadfunc(void *arg)
|
||||
}
|
||||
|
||||
int main(int argc, char **argv) {
|
||||
- device = &freenect.createDevice<MyFreenectDevice>(0);
|
||||
+ try {
|
||||
+ device = &freenect.createDevice<MyFreenectDevice>(0);
|
||||
+ }
|
||||
+ catch (std::exception &e) {
|
||||
+ std::cerr << std::endl << "Exception starting Freenect device : " << e.what() << std::endl;
|
||||
+ exit(1);
|
||||
+ }
|
||||
device->startVideo();
|
||||
device->startDepth();
|
||||
gl_threadfunc(NULL);
|
||||
|
|
@ -1,46 +0,0 @@
|
|||
diff -up libfreenect-0.6.2/src/fwfetcher.py.py3 libfreenect-0.6.2/src/fwfetcher.py
|
||||
--- libfreenect-0.6.2/src/fwfetcher.py.py3 2021-02-12 00:51:27.000000000 +0100
|
||||
+++ libfreenect-0.6.2/src/fwfetcher.py 2021-03-04 14:35:02.568905434 +0100
|
||||
@@ -1,5 +1,3 @@
|
||||
-#!/usr/bin/env python2
|
||||
-
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
import hashlib
|
||||
@@ -10,10 +8,10 @@ import sys
|
||||
import time
|
||||
import zipfile
|
||||
|
||||
-try:
|
||||
+if sys.version_info[0] > 2:
|
||||
# Python 3
|
||||
from urllib.request import Request, URLError, urlopen
|
||||
-except ImportError:
|
||||
+else:
|
||||
# Python 2
|
||||
from urllib2 import Request, URLError, urlopen
|
||||
|
||||
diff -up libfreenect-0.6.2/wrappers/python/CMakeLists.txt.py3 libfreenect-0.6.2/wrappers/python/CMakeLists.txt
|
||||
--- libfreenect-0.6.2/wrappers/python/CMakeLists.txt.py3 2021-02-12 00:51:27.000000000 +0100
|
||||
+++ libfreenect-0.6.2/wrappers/python/CMakeLists.txt 2021-03-04 14:32:52.382237690 +0100
|
||||
@@ -21,7 +21,7 @@ find_program(CYTHON_EXECUTABLE cython)
|
||||
# CMake populates this var automatically but we need to specify prefix
|
||||
execute_process(COMMAND
|
||||
${Python${Python_BUILD_VERSION}_EXECUTABLE}
|
||||
- -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=False, standard_lib=False, prefix='${CMAKE_INSTALL_PREFIX}'))"
|
||||
+ -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))"
|
||||
OUTPUT_VARIABLE Python${Python_BUILD_VERSION}_SITELIB OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
# Figure out numpy include path
|
||||
@@ -56,7 +56,10 @@ target_include_directories(cython${Pytho
|
||||
|
||||
# Install the extension
|
||||
install(TARGETS cython${Python_BUILD_VERSION}_freenect
|
||||
- DESTINATION ${Python${Python_BUILD_VERSION}_SITELIB})
|
||||
+ DESTINATION ${Python${Python_BUILD_VERSION}_SITELIB}
|
||||
+ ARCHIVE DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES}
|
||||
+ LIBRARY DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES}
|
||||
+ )
|
||||
|
||||
# TODO: decide on what to do with demo_ scripts and were to install
|
||||
# them
|
||||
12
libfreenect-0.7.5-notimestamp.patch
Normal file
12
libfreenect-0.7.5-notimestamp.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
diff -up libfreenect-0.7.5/doc/Doxyfile.tstamp libfreenect-0.7.5/doc/Doxyfile
|
||||
--- libfreenect-0.7.5/doc/Doxyfile.tstamp 2024-01-06 17:57:12.000000000 +0100
|
||||
+++ libfreenect-0.7.5/doc/Doxyfile 2025-11-24 23:51:39.844958326 +0100
|
||||
@@ -875,7 +875,7 @@ HTML_COLORSTYLE_GAMMA = 80
|
||||
# page will contain the date and time when the page was generated. Setting
|
||||
# this to NO can help when comparing the output of multiple runs.
|
||||
|
||||
-HTML_TIMESTAMP = YES
|
||||
+HTML_TIMESTAMP = NO
|
||||
|
||||
# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
|
||||
# files or namespaces will be aligned in HTML using tables. If set to
|
||||
61
libfreenect-0.7.5-py3.patch
Normal file
61
libfreenect-0.7.5-py3.patch
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
diff -up libfreenect-0.7.5/src/fwfetcher.py.py3 libfreenect-0.7.5/src/fwfetcher.py
|
||||
--- libfreenect-0.7.5/src/fwfetcher.py.py3 2024-01-06 17:57:12.000000000 +0100
|
||||
+++ libfreenect-0.7.5/src/fwfetcher.py 2025-11-25 00:20:24.085725755 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
|
||||
from __future__ import absolute_import, division, print_function
|
||||
|
||||
@@ -10,10 +10,10 @@ import sys
|
||||
import time
|
||||
import zipfile
|
||||
|
||||
-try:
|
||||
+if sys.version_info[0] > 2:
|
||||
# Python 3
|
||||
from urllib.request import Request, URLError, urlopen
|
||||
-except ImportError:
|
||||
+else:
|
||||
# Python 2
|
||||
from urllib2 import Request, URLError, urlopen
|
||||
|
||||
diff -up libfreenect-0.7.5/wrappers/python/CMakeLists.txt.py3 libfreenect-0.7.5/wrappers/python/CMakeLists.txt
|
||||
--- libfreenect-0.7.5/wrappers/python/CMakeLists.txt.py3 2024-01-06 17:57:12.000000000 +0100
|
||||
+++ libfreenect-0.7.5/wrappers/python/CMakeLists.txt 2025-11-11 09:48:50.045686564 +0100
|
||||
@@ -19,10 +19,7 @@ find_program(CYTHON_EXECUTABLE cython)
|
||||
|
||||
# Figure out installation path
|
||||
# CMake populates this var automatically but we need to specify prefix
|
||||
-execute_process(COMMAND
|
||||
- ${Python${Python_BUILD_VERSION}_EXECUTABLE}
|
||||
- -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(plat_specific=False, standard_lib=False, prefix='${CMAKE_INSTALL_PREFIX}'))"
|
||||
- OUTPUT_VARIABLE Python${Python_BUILD_VERSION}_SITELIB OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
+set(Python${Python_BUILD_VERSION}_SITELIB "${Python${Python_BUILD_VERSION}_SITEARCH}")
|
||||
|
||||
# Figure out numpy include path
|
||||
# todo: CMake >= 3.14 populates this var automatically when using COMPONENTS NumPy
|
||||
@@ -73,7 +70,10 @@ target_include_directories(cython${Pytho
|
||||
|
||||
# Install the extension
|
||||
install(TARGETS cython${Python_BUILD_VERSION}_freenect
|
||||
- DESTINATION ${Python${Python_BUILD_VERSION}_SITELIB})
|
||||
+ DESTINATION ${Python${Python_BUILD_VERSION}_SITELIB}
|
||||
+ ARCHIVE DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES}
|
||||
+ LIBRARY DESTINATION ${PYTHON${Python_BUILD_VERSION}_SITE_PACKAGES}
|
||||
+ )
|
||||
|
||||
# TODO: decide on what to do with demo_ scripts and were to install
|
||||
# them
|
||||
diff -up libfreenect-0.7.5/wrappers/python/setup.py.py3 libfreenect-0.7.5/wrappers/python/setup.py
|
||||
--- libfreenect-0.7.5/wrappers/python/setup.py.py3 2024-01-06 17:57:12.000000000 +0100
|
||||
+++ libfreenect-0.7.5/wrappers/python/setup.py 2025-11-11 09:48:50.045794539 +0100
|
||||
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env python
|
||||
-from distutils.core import setup
|
||||
-from distutils.extension import Extension
|
||||
+from setuptools import setup
|
||||
+from setuptools import Extension
|
||||
import re
|
||||
import numpy as np
|
||||
|
||||
176
libfreenect.spec
176
libfreenect.spec
|
|
@ -1,13 +1,13 @@
|
|||
%global __provides_exclude %{python3_sitearch}/.*\.so$
|
||||
|
||||
Name: libfreenect
|
||||
Version: 0.6.4
|
||||
Release: 1%{?dist}
|
||||
Version: 0.7.5
|
||||
Release: 4%{?dist}
|
||||
Summary: Device driver for the Kinect
|
||||
# Core libfreenect is available as ASL 2.0 OR GPLv2
|
||||
# OpenNI driver is available as ASL 2.0
|
||||
License: ASL 2.0 and (GPLv2 or ASL 2.0)
|
||||
URL: http://www.openkinect.org/
|
||||
# Core libfreenect is available as Apache-2.0 OR GPL-2.0-only
|
||||
# OpenNI driver is available as Apache-2.0
|
||||
# fakenect/parson.{c,h} is MIT
|
||||
# fwfetcher.py is BSD-2-Clause
|
||||
License: Apache-2.0 AND (GPL-2.0-only OR Apache-2.0) AND MIT AND BSD-2-Clause
|
||||
URL: https://github.com/OpenKinect/
|
||||
|
||||
Source0: https://github.com/OpenKinect/%{name}/archive/v%{version}/%{name}-%{version}.tar.gz
|
||||
# Edit udev rule to only allow access to the device from the video group
|
||||
|
|
@ -19,7 +19,12 @@ Patch3: %{name}-0.4.2-libdir.patch
|
|||
# BZ: https://bugzilla.redhat.com/show_bug.cgi?id=1143912
|
||||
Patch4: secarch.patch
|
||||
# Fix the installation path for python libs
|
||||
Patch5: %{name}-0.6.2-py3.patch
|
||||
Patch5: %{name}-0.7.5-py3.patch
|
||||
# Avoid timestamps in generated docs
|
||||
Patch6: %{name}-0.7.5-notimestamp.patch
|
||||
|
||||
# https://fedoraproject.org/wiki/Changes/EncourageI686LeafRemoval
|
||||
ExcludeArch: %{ix86}
|
||||
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake3
|
||||
|
|
@ -60,6 +65,8 @@ developing applications that use %{name}.
|
|||
%package fakenect
|
||||
Summary: Library to play back recorded data for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
# upstream commit f1bb6e7fbe347754fbfc4613bf43000ef0b0c2b2
|
||||
Provides: bundled(parson)
|
||||
|
||||
%description fakenect
|
||||
Fakenect consists of a "record" program to save dumps from the kinect sensor
|
||||
|
|
@ -79,7 +86,6 @@ library for OpenCV development.
|
|||
Summary: Python 3 bindings for %{name}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: python3-numpy
|
||||
%{?python_provide:%python_provide python3-%{name}}
|
||||
|
||||
%description -n python3-%{name}
|
||||
The %{name}-python package contains python 3 bindings for %{name}
|
||||
|
|
@ -93,17 +99,18 @@ OpenNI2 driver. It allows OpenNI2 to use Kinect hardware on Linux and OSX.
|
|||
It was originally a separate project but is now distributed with libfreenect.
|
||||
|
||||
%prep
|
||||
%setup -qn %{name}-%{version}
|
||||
rm -rf platform/windows
|
||||
%setup -q
|
||||
rm -rv platform/windows
|
||||
|
||||
%patch0 -p0 -b .videogroup
|
||||
%patch1 -p1 -b .openni2
|
||||
%patch3 -p0 -b .libdir
|
||||
%patch4 -p1 -b .secarch
|
||||
%patch5 -p1 -b .py3
|
||||
%patch -P 0 -p0 -b .videogroup
|
||||
%patch -P 1 -p1 -b .openni2
|
||||
%patch -P 3 -p0 -b .libdir
|
||||
%patch -P 4 -p1 -b .secarch
|
||||
%patch -P 5 -p1 -b .py3
|
||||
%patch -P 6 -p1 -b .tstamp
|
||||
|
||||
%build
|
||||
%cmake3 \
|
||||
%cmake \
|
||||
-DBUILD_AUDIO=ON \
|
||||
-DBUILD_C_SYNC=ON \
|
||||
-DBUILD_CV=ON \
|
||||
|
|
@ -115,26 +122,27 @@ rm -rf platform/windows
|
|||
-DBUILD_PYTHON3=ON \
|
||||
-DBUILD_OPENNI2_DRIVER=ON
|
||||
|
||||
%cmake3_build
|
||||
%cmake_build
|
||||
|
||||
pushd doc
|
||||
doxygen Doxyfile
|
||||
popd
|
||||
|
||||
%install
|
||||
%cmake3_install
|
||||
%cmake_install
|
||||
|
||||
# Install the kinect udev rule
|
||||
mkdir -p %{buildroot}/lib/udev/rules.d
|
||||
mkdir -p %{buildroot}%{_udevrulesdir}
|
||||
mkdir -p %{buildroot}%{_libdir}/openni2
|
||||
install -p -m 0644 platform/linux/udev/51-kinect.rules %{buildroot}/lib/udev/rules.d
|
||||
install -p -m 0644 platform/linux/udev/51-kinect.rules %{buildroot}%{_udevrulesdir}
|
||||
|
||||
# Delete libtool archives
|
||||
find %{buildroot} -name '*.la' -exec rm -f {} ';'
|
||||
|
||||
# Move the fwfetcher script to the correct datadir
|
||||
mkdir -p %{buildroot}%{_datadir}/%{name}
|
||||
mv %{buildroot}%{_datadir}/fwfetcher.py %{buildroot}%{_datadir}/%{name}
|
||||
mv %{buildroot}%{_datadir}/fwfetcher.py %{buildroot}%{_datadir}/%{name}
|
||||
chmod +x %{buildroot}%{_datadir}/%{name}/fwfetcher.py
|
||||
|
||||
# Move openni plugin: rhbz#1094787
|
||||
mv %{buildroot}%{_libdir}/OpenNI2-FreenectDriver %{buildroot}%{_libdir}/openni2/Drivers
|
||||
|
|
@ -142,43 +150,137 @@ mv %{buildroot}%{_libdir}/OpenNI2-FreenectDriver %{buildroot}%{_libdir}/openni2/
|
|||
%files
|
||||
%license APACHE20 GPL2
|
||||
%doc README.md CONTRIB
|
||||
/lib/udev/rules.d/*
|
||||
%{_libdir}/libfreenect.so.0*
|
||||
%{_libdir}/libfreenect_sync.so.0*
|
||||
%exclude %{_bindir}/freenect-cvdemo
|
||||
%exclude %{_bindir}/fakenect
|
||||
%{_bindir}/freenect-*
|
||||
%{_udevrulesdir}/51-kinect.rules
|
||||
%{_libdir}/libfreenect.so.0{,.*}
|
||||
%{_libdir}/libfreenect_sync.so.0{,.*}
|
||||
%{_bindir}/freenect-camtest
|
||||
%{_bindir}/freenect-chunkview
|
||||
%{_bindir}/freenect-cpp_pcview
|
||||
%{_bindir}/freenect-cppview
|
||||
%{_bindir}/freenect-glpclview
|
||||
%{_bindir}/freenect-glview
|
||||
%{_bindir}/freenect-hiview
|
||||
%{_bindir}/freenect-micview
|
||||
%{_bindir}/freenect-regtest
|
||||
%{_bindir}/freenect-regview
|
||||
%{_bindir}/freenect-tiltdemo
|
||||
%{_bindir}/freenect-wavrecord
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%files opencv
|
||||
%{_bindir}/freenect-cvdemo
|
||||
%{_libdir}/libfreenect_cv.so.*
|
||||
%{_libdir}/libfreenect_cv.so.0{,.*}
|
||||
|
||||
%files devel
|
||||
%doc doc/html
|
||||
%doc examples/*.c wrappers/cpp/cppview.cpp
|
||||
%{_includedir}/libfreenect
|
||||
%{_libdir}/*.so
|
||||
%{_libdir}/pkgconfig/*
|
||||
%{_libdir}/fakenect/*.so
|
||||
%{_libdir}/libfreenect.so
|
||||
%{_libdir}/libfreenect_cv.so
|
||||
%{_libdir}/libfreenect_sync.so
|
||||
%{_libdir}/pkgconfig/libfreenect.pc
|
||||
%{_libdir}/fakenect/libfakenect.so
|
||||
|
||||
%files static
|
||||
%{_libdir}/*.a
|
||||
%{_libdir}/libfreenect.a
|
||||
%{_libdir}/libfreenect_sync.a
|
||||
|
||||
%files -n python3-%{name}
|
||||
%{python3_sitearch}/*.so
|
||||
%{python3_sitearch}/freenect.so
|
||||
|
||||
%files fakenect
|
||||
%dir %{_libdir}/fakenect
|
||||
%{_bindir}/fakenect-record
|
||||
%{_libdir}/fakenect/*.so.*
|
||||
%{_libdir}/fakenect/libfakenect.so.0{,.*}
|
||||
%{_bindir}/fakenect
|
||||
%{_mandir}/man1/fakenect*1.*
|
||||
%{_mandir}/man1/fakenect-record.1.*
|
||||
%{_mandir}/man1/fakenect.1.*
|
||||
|
||||
%files openni
|
||||
%license APACHE20 GPL2
|
||||
%{_libdir}/openni2
|
||||
|
||||
%changelog
|
||||
* Fri Jan 02 2026 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> - 0.7.5-4
|
||||
- Add OpenNI2 driver on riscv64
|
||||
|
||||
* Wed Dec 10 2025 Nicolas Chauvet <kwizart@gmail.com> - 0.7.5-3
|
||||
- Rebuilt for OpenCV-4.12
|
||||
|
||||
* Mon Nov 24 2025 Dominik Mierzejewski <dominik@greysector.net> - 0.7.5-2
|
||||
- fixed duplicate files warning
|
||||
- made file lists more explicit
|
||||
- corrected License tag
|
||||
- added missing Provides: for bundled parson
|
||||
- added executable bit to fwfetcher.py script and fixed shebang
|
||||
- avoid timestamps in generated docs for reproducibility
|
||||
|
||||
* Tue Nov 11 2025 Dominik Mierzejewski <dominik@greysector.net> - 0.7.5-1
|
||||
- Updated to 0.7.5
|
||||
- Dropped obsolete patches
|
||||
- Updated URL
|
||||
|
||||
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-16
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Wed Jun 04 2025 Python Maint <python-maint@redhat.com> - 0.7.0-15
|
||||
- Rebuilt for Python 3.14
|
||||
|
||||
* Tue Feb 04 2025 Sérgio Basto <sergio@serjux.com> - 0.7.0-14
|
||||
- Rebuild for opencv-4.11.0
|
||||
|
||||
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-13
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* Tue Dec 24 2024 Orion Poplawski <orion@nwra.com> - 0.7.0-12
|
||||
- Rebuild with numpy 2.x (rhbz#2333776)
|
||||
|
||||
* Thu Jul 25 2024 Sérgio Basto <sergio@serjux.com> - 0.7.0-11
|
||||
- Rebuild for opencv 4.10.0
|
||||
|
||||
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-10
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Sun Jun 09 2024 Python Maint <python-maint@redhat.com> - 0.7.0-9
|
||||
- Rebuilt for Python 3.13
|
||||
|
||||
* Mon Feb 05 2024 Sérgio Basto <sergio@serjux.com> - 0.7.0-8
|
||||
- Rebuild for opencv 4.9.0
|
||||
|
||||
* Thu Jan 25 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-7
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-6
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
* Thu Jan 04 2024 Florian Weimer <fweimer@redhat.com> - 0.7.0-5
|
||||
- Fix C compatibility issue in Cython wrapper
|
||||
|
||||
* Mon Aug 07 2023 Rich Mattes <richmattes@gmail.com> - 0.7.0-4
|
||||
- Fix build error with cython 3
|
||||
|
||||
* Mon Aug 07 2023 Sérgio Basto <sergio@serjux.com> - 0.7.0-4
|
||||
- Rebuild for opencv 4.8.0
|
||||
|
||||
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.7.0-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
||||
|
||||
* Thu Jul 13 2023 Rich Mattes <richmattes@gmail.com> - 0.7.0-2
|
||||
- Updates for Python 3.12 compatibility
|
||||
- Resolves: rhbz#2220025
|
||||
|
||||
* Sat Jun 17 2023 Python Maint <python-maint@redhat.com> - 0.7.0-2
|
||||
- Rebuilt for Python 3.12
|
||||
|
||||
* Thu May 04 2023 Nicolas Chauvet <kwizart@gmail.com> - 0.7.0-1
|
||||
- Update to 0.7.0
|
||||
|
||||
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 0.6.4-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
||||
|
||||
* Mon Jan 16 2023 Sérgio Basto <sergio@serjux.com> - 0.6.4-2
|
||||
- Rebuild for opencv 4.7.0
|
||||
|
||||
* Sat Sep 24 2022 Phil Wyett <philip.wyett@kathenas.org> - 0.6.4-1
|
||||
- New upstream version 0.6.4
|
||||
- Remove old globals
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
diff -urN libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-ppc/OniPlatformLinux-PPC.h libfreenect.new/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-ppc/OniPlatformLinux-PPC.h
|
||||
--- libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-ppc/OniPlatformLinux-PPC.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libfreenect.new/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-ppc/OniPlatformLinux-PPC.h 2014-09-18 11:54:01.405363509 +0200
|
||||
Index: libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-ppc/OniPlatformLinux-PPC.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-ppc/OniPlatformLinux-PPC.h
|
||||
@@ -0,0 +1,41 @@
|
||||
+/*****************************************************************************
|
||||
+* *
|
||||
|
|
@ -43,9 +44,10 @@ diff -urN libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/In
|
|||
+
|
||||
+#endif //_ONI_PLATFORM_LINUX_PPC_H_
|
||||
+
|
||||
diff -urN libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-s390/OniPlatformLinux-s390.h libfreenect.new/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-s390/OniPlatformLinux-s390.h
|
||||
--- libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-s390/OniPlatformLinux-s390.h 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ libfreenect.new/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-s390/OniPlatformLinux-s390.h 2014-09-18 11:55:06.169556389 +0200
|
||||
Index: libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-s390/OniPlatformLinux-s390.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-s390/OniPlatformLinux-s390.h
|
||||
@@ -0,0 +1,42 @@
|
||||
+/*****************************************************************************
|
||||
+* *
|
||||
|
|
@ -89,9 +91,10 @@ diff -urN libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/In
|
|||
+
|
||||
+#endif //_ONI_PLATFORM_LINUX_s390_H_
|
||||
+
|
||||
diff -urN libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h libfreenect.new/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h
|
||||
--- libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h 2014-09-18 11:51:35.428923550 +0200
|
||||
+++ libfreenect.new/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h 2014-09-18 11:52:50.242149667 +0200
|
||||
Index: libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h
|
||||
===================================================================
|
||||
--- libfreenect-0.7.5.orig/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h
|
||||
+++ libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/OniPlatform.h
|
||||
@@ -27,6 +27,8 @@
|
||||
#define ONI_PLATFORM_LINUX_ARM 3
|
||||
#define ONI_PLATFORM_MACOSX 4
|
||||
|
|
@ -101,14 +104,57 @@ diff -urN libfreenect/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/In
|
|||
|
||||
#if (defined _WIN32)
|
||||
# ifndef RC_INVOKED
|
||||
@@ -41,6 +43,10 @@
|
||||
@@ -41,6 +43,12 @@
|
||||
# include "Linux-x86/OniPlatformLinux-x86.h"
|
||||
#elif (__linux__ && (__arm__ || __aarch64__))
|
||||
# include "Linux-Arm/OniPlatformLinux-Arm.h"
|
||||
+#elif (__linux__ && (__powerpc__ || __powerpc64__))
|
||||
+# include "Linux-ppc/OniPlatformLinux-PPC.h"
|
||||
+#elif (__linux__ && (__riscv))
|
||||
+# include "Linux-riscv/OniPlatformLinux-RISCV.h"
|
||||
+#elif (__linux__ && (__s390__ || __s390x__ ))
|
||||
+# include "Linux-s390/OniPlatformLinux-s390.h"
|
||||
#elif _ARC
|
||||
# include "ARC/OniPlaformARC.h"
|
||||
#elif (__APPLE__)
|
||||
Index: libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-riscv/OniPlatformLinux-RISCV.h
|
||||
===================================================================
|
||||
--- /dev/null
|
||||
+++ libfreenect-0.7.5/OpenNI2-FreenectDriver/extern/OpenNI-Linux-x64-2.2.0.33/Include/Linux-riscv/OniPlatformLinux-RISCV.h
|
||||
@@ -0,0 +1,36 @@
|
||||
+/*****************************************************************************
|
||||
+* *
|
||||
+* OpenNI 2.x Alpha *
|
||||
+* Copyright (C) 2012 PrimeSense Ltd. *
|
||||
+* *
|
||||
+* This file is part of OpenNI. *
|
||||
+* *
|
||||
+* Licensed under the Apache License, Version 2.0 (the "License"); *
|
||||
+* you may not use this file except in compliance with the License. *
|
||||
+* You may obtain a copy of the License at *
|
||||
+* *
|
||||
+* http://www.apache.org/licenses/LICENSE-2.0 *
|
||||
+* *
|
||||
+* Unless required by applicable law or agreed to in writing, software *
|
||||
+* distributed under the License is distributed on an "AS IS" BASIS, *
|
||||
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. *
|
||||
+* See the License for the specific language governing permissions and *
|
||||
+* limitations under the License. *
|
||||
+* *
|
||||
+*****************************************************************************/
|
||||
+#ifndef _ONI_PLATFORM_LINUX_RISCV_H_
|
||||
+#define _ONI_PLATFORM_LINUX_RISCV_H_
|
||||
+
|
||||
+// Start with Linux-x86, and override what's different
|
||||
+#include "../Linux-x86/OniPlatformLinux-x86.h"
|
||||
+
|
||||
+//---------------------------------------------------------------------------
|
||||
+// Platform Basic Definition
|
||||
+//---------------------------------------------------------------------------
|
||||
+#undef ONI_PLATFORM
|
||||
+#undef ONI_PLATFORM_STRING
|
||||
+#define ONI_PLATFORM ONI_PLATFORM_LINUX_RISCV
|
||||
+#define ONI_PLATFORM_STRING "Linux-RISCV"
|
||||
+
|
||||
+#endif //_ONI_PLATFORM_LINUX_RISCV_H_
|
||||
+
|
||||
|
|
|
|||
2
sources
2
sources
|
|
@ -1 +1 @@
|
|||
SHA512 (libfreenect-0.6.4.tar.gz) = 761f81331fa5d2b3366eeb96716b270c35490501e30659db8bc5940ae50ccc5996773f0b339ece31779e57ccf1755e547f83d6a31b40f156e6e60b6269ae9feb
|
||||
SHA512 (libfreenect-0.7.5.tar.gz) = 6ba9ba632d9021b84a8c137837226fadc6e0e091cf89bf092e8ee805610c227c31da95b50c05d5882357cb80d7e4275693d13d1511eb2eb45f15ffffc2d549bf
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue