summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO18
-rw-r--r--PKGBUILD50
-rw-r--r--XnSensorDepthGenerator.patch109
-rw-r--r--sensorkinect.install15
4 files changed, 192 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..80630fb74920
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,18 @@
+pkgbase = sensorkinect
+ pkgdesc = PrimeSensor Modules for OpenNI
+ pkgver = 0.93.5.1.2.1
+ pkgrel = 1
+ url = https://github.com/avin2/SensorKinect
+ install = sensorkinect.install
+ arch = i686
+ arch = x86_64
+ license = GPL
+ depends = openni
+ conflicts = sensorkinect-git
+ source = SensorKinect.tar.gz::https://github.com/avin2/SensorKinect/archive/v0.93-5.1.2.1.tar.gz
+ source = XnSensorDepthGenerator.patch
+ md5sums = de701b5bd7a7ee087c1078c777564bfa
+ md5sums = 618ad209969f870a43d628e80ac835fd
+
+pkgname = sensorkinect
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..cadca6cd1433
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,50 @@
+_name=SensorKinect
+pkgname=sensorkinect
+pkgver=0.93.5.1.2.1
+_pkgver=0.93-5.1.2.1
+pkgrel=1
+pkgdesc="PrimeSensor Modules for OpenNI"
+arch=('i686' 'x86_64')
+url="https://github.com/avin2/SensorKinect"
+license=('GPL')
+depends=('openni')
+conflicts=('sensorkinect-git')
+install=sensorkinect.install
+source=("${_name}.tar.gz::https://github.com/avin2/${_name}/archive/v${_pkgver}.tar.gz"
+ "XnSensorDepthGenerator.patch")
+md5sums=('de701b5bd7a7ee087c1078c777564bfa'
+ '618ad209969f870a43d628e80ac835fd')
+
+pkgver() {
+ echo ${_pkgver} | sed 's/-/./'
+}
+
+build() {
+ # apply patch
+ cd "$srcdir/$_name-$_pkgver"
+ patch -p1 -i ${srcdir}/XnSensorDepthGenerator.patch
+
+ cd "$srcdir/$_name-$_pkgver/Platform/Linux/Build"
+ make NI_CONF_DIR=/etc
+}
+
+package() {
+ install -d -m755 ${pkgdir}/usr/{lib,bin}
+
+ cd $srcdir/$_name-$_pkgver/Platform/Linux/Bin/
+ [[ "${CARCH}" = "x86_64" ]] && cd x64-Release || cd x86-Release
+ install XnSensorServer ${pkgdir}/usr/bin
+ install libXnCore.so libXnDDK.so libXnDeviceFile.so libXnDeviceSensorV2KM.so libXnFormats.so ${pkgdir}/usr/lib
+ chmod +s ${pkgdir}/usr/bin/XnSensorServer
+
+ cd $srcdir/$_name-$_pkgver/Platform/Linux/Install
+ install -d -m755 ${pkgdir}/etc/udev/rules.d
+ sed -i 's/SYSFS/ATTR/g' 55-primesense-usb.rules
+ install 55-primesense-usb.rules ${pkgdir}/etc/udev/rules.d
+
+ cd $srcdir/$_name-$_pkgver/Data
+ install -d -m755 ${pkgdir}/etc/primesense
+ install GlobalDefaultsKinect.ini ${pkgdir}/etc/primesense
+
+ install -d -m777 ${pkgdir}/var/log/primesense/XnSensorServer
+}
diff --git a/XnSensorDepthGenerator.patch b/XnSensorDepthGenerator.patch
new file mode 100644
index 000000000000..da026f209a78
--- /dev/null
+++ b/XnSensorDepthGenerator.patch
@@ -0,0 +1,109 @@
+From 94d6ed38751571051b3acbdad4ea874f41deb375 Mon Sep 17 00:00:00 2001
+From: Tu-Hoa Pham <pham.main@gmail.com>
+Date: Thu, 24 Oct 2013 14:53:52 +0200
+Subject: [PATCH] Fixed missing virtual function
+
+---
+ Source/XnDeviceSensorV2/XnSensorDepthGenerator.cpp | 15 ++++++++++-----
+ Source/XnDeviceSensorV2/XnSensorDepthGenerator.h | 9 +++++----
+ 2 files changed, 15 insertions(+), 9 deletions(-)
+
+diff --git a/Source/XnDeviceSensorV2/XnSensorDepthGenerator.cpp b/Source/XnDeviceSensorV2/XnSensorDepthGenerator.cpp
+index 546b3f7..a972b08 100644
+--- a/Source/XnDeviceSensorV2/XnSensorDepthGenerator.cpp
++++ b/Source/XnDeviceSensorV2/XnSensorDepthGenerator.cpp
+@@ -50,11 +50,11 @@ XnSensorDepthGenerator::~XnSensorDepthGenerator()
+ XnStatus XnSensorDepthGenerator::Init()
+ {
+ XnStatus nRetVal = XN_STATUS_OK;
+-
++
+ nRetVal = XnSensorMapGenerator::Init();
+ XN_IS_STATUS_OK(nRetVal);
+
+- const XnChar* aProps[] =
++ const XnChar* aProps[] =
+ {
+ XN_STREAM_PROPERTY_ZERO_PLANE_DISTANCE,
+ XN_STREAM_PROPERTY_ZERO_PLANE_PIXEL_SIZE,
+@@ -180,7 +180,7 @@ XnStatus XnSensorDepthGenerator::GetUserPosition(XnUInt32 nIndex, XnBoundingBox3
+
+ XnStatus XnSensorDepthGenerator::RegisterToUserPositionChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
+ {
+- const XnChar* aProps[] =
++ const XnChar* aProps[] =
+ {
+ XN_STREAM_PROPERTY_AGC_BIN,
+ NULL
+@@ -244,6 +244,11 @@ XnStatus XnSensorDepthGenerator::SetViewPoint(xn::ProductionNode& OtherNode)
+ }
+ }
+
++XnStatus XnSensorDepthGenerator::GetPixelCoordinatesInViewPoint(xn::ProductionNode& other, XnUInt32 x, XnUInt32 y, XnUInt32& altX, XnUInt32& altY)
++{
++ return 0;
++}
++
+ XnStatus XnSensorDepthGenerator::ResetViewPoint()
+ {
+ return SetIntProperty(XN_STREAM_PROPERTY_REGISTRATION, FALSE);
+@@ -259,7 +264,7 @@ XnBool XnSensorDepthGenerator::IsViewPointAs(xn::ProductionNode& OtherNode)
+
+ XnStatus XnSensorDepthGenerator::RegisterToViewPointChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
+ {
+- const XnChar* aProps[] =
++ const XnChar* aProps[] =
+ {
+ XN_STREAM_PROPERTY_REGISTRATION,
+ NULL
+@@ -306,7 +311,7 @@ XnBool XnSensorDepthGenerator::IsFrameSyncedWith(xn::ProductionNode& OtherNode)
+
+ XnStatus XnSensorDepthGenerator::RegisterToFrameSyncChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback)
+ {
+- const XnChar* aProps[] =
++ const XnChar* aProps[] =
+ {
+ XN_MODULE_PROPERTY_FRAME_SYNC,
+ NULL
+diff --git a/Source/XnDeviceSensorV2/XnSensorDepthGenerator.h b/Source/XnDeviceSensorV2/XnSensorDepthGenerator.h
+index 66b6f50..070bf75 100644
+--- a/Source/XnDeviceSensorV2/XnSensorDepthGenerator.h
++++ b/Source/XnDeviceSensorV2/XnSensorDepthGenerator.h
+@@ -36,8 +36,8 @@
+ #pragma warning (push)
+ #pragma warning (disable: 4250)
+
+-class XnSensorDepthGenerator :
+- public XnSensorMapGenerator,
++class XnSensorDepthGenerator :
++ public XnSensorMapGenerator,
+ virtual public xn::ModuleDepthGenerator,
+ virtual public xn::ModuleUserPositionInterface,
+ virtual public xn::ModuleAlternativeViewPointInterface,
+@@ -68,6 +68,7 @@ class XnSensorDepthGenerator :
+ xn::ModuleAlternativeViewPointInterface* GetAlternativeViewPointInterface() { return this; }
+ XnBool IsViewPointSupported(xn::ProductionNode& OtherNode);
+ XnStatus SetViewPoint(xn::ProductionNode& OtherNode);
++ XnStatus GetPixelCoordinatesInViewPoint(xn::ProductionNode& other, XnUInt32 x, XnUInt32 y, XnUInt32& altX, XnUInt32& altY);
+ XnStatus ResetViewPoint();
+ XnBool IsViewPointAs(xn::ProductionNode& OtherNode);
+ XnStatus RegisterToViewPointChange(XnModuleStateChangedHandler handler, void* pCookie, XnCallbackHandle& hCallback);
+@@ -83,7 +84,7 @@ class XnSensorDepthGenerator :
+
+ protected:
+ virtual void FilterProperties(XnActualPropertiesHash* pHash);
+-
++
+ private:
+ XnStatus UpdateRealWorldTranslationData();
+ XnBool IsSensorImageNode(xn::ProductionNode& Other);
+@@ -106,4 +107,4 @@ class XnExportedSensorDepthGenerator : public XnExportedSensorGenerator
+
+ #pragma warning (pop)
+
+-#endif // __XN_SENSOR_DEPTH_GENERATOR_H__
+\ No newline at end of file
++#endif // __XN_SENSOR_DEPTH_GENERATOR_H__
+--
+1.9.3
+
diff --git a/sensorkinect.install b/sensorkinect.install
new file mode 100644
index 000000000000..0928e3dd9339
--- /dev/null
+++ b/sensorkinect.install
@@ -0,0 +1,15 @@
+post_install() {
+ MODULES="libXnDeviceSensorV2KM.so libXnDeviceFile.so"
+ for module in $MODULES
+ do
+ /usr/bin/niReg -r /usr/lib/$module /etc/primesense
+ done
+}
+
+pre_remove() {
+ MODULES="libXnDeviceSensorV2KM.so libXnDeviceFile.so"
+ for module in $MODULES
+ do
+ /usr/bin/niReg -u /usr/lib/$module
+ done
+}