Source: openni Version: 1.5.4.0-10 Tags: patch
Here's a patch, rather similar to the ppc one.
diff -N -ru openni-1.5.4.0.orig/Include/Linux-AArch64/XnPlatformLinux-AArch64.h openni-1.5.4.0/Include/Linux-AArch64/XnPlatformLinux-AArch64.h --- openni-1.5.4.0.orig/Include/Linux-AArch64/XnPlatformLinux-AArch64.h 1970-01-01 01:00:00.000000000 +0100 +++ openni-1.5.4.0/Include/Linux-AArch64/XnPlatformLinux-AArch64.h 2015-06-06 00:05:38.000000000 +0100 @@ -0,0 +1,43 @@ +/**************************************************************************** +* * +* OpenNI 1.x Alpha * +* Copyright (C) 2011 PrimeSense Ltd. * +* * +* This file is part of OpenNI. * +* * +* OpenNI is free software: you can redistribute it and/or modify * +* it under the terms of the GNU Lesser General Public License as published * +* by the Free Software Foundation, either version 3 of the License, or * +* (at your option) any later version. * +* * +* OpenNI is distributed in the hope that it will be useful, * +* but WITHOUT ANY WARRANTY; without even the implied warranty of * +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * +* GNU Lesser General Public License for more details. * +* * +* You should have received a copy of the GNU Lesser General Public License * +* along with OpenNI. If not, see <http://www.gnu.org/licenses/>. * +* * +****************************************************************************/ +#ifndef _XN_PLATFORM_LINUX_AARCH64_H_ +#define _XN_PLATFORM_LINUX_AARCH64_H_ + +// Start with Linux-x86, and override what's different +#include "../Linux-x86/XnPlatformLinux-x86.h" + +//--------------------------------------------------------------------------- +// Platform Basic Definition +//--------------------------------------------------------------------------- +#undef XN_PLATFORM +#undef XN_PLATFORM_STRING +#undef XN_PLATFORM_ENDIAN_TYPE +#define XN_PLATFORM XN_PLATFORM_LINUX_AARCH64 +#define XN_PLATFORM_STRING "Linux-AArch64" + +#ifdef __AARCH64EB__ +#define XN_PLATFORM_ENDIAN_TYPE XN_PLATFORM_IS_BIG_ENDIAN +#else +#define XN_PLATFORM_ENDIAN_TYPE XN_PLATFORM_IS_LITTLE_ENDIAN +#endif // __AARCH64EB__ + +#endif //_XN_PLATFORM_LINUX_AARCH64_H_ diff -N -ru openni-1.5.4.0.orig/Include/XnOS.h openni-1.5.4.0/Include/XnOS.h --- openni-1.5.4.0.orig/Include/XnOS.h 2015-06-06 00:13:43.000000000 +0100 +++ openni-1.5.4.0/Include/XnOS.h 2015-06-06 00:06:31.000000000 +0100 @@ -44,7 +44,7 @@ //--------------------------------------------------------------------------- #if (XN_PLATFORM == XN_PLATFORM_WIN32) #include "Win32/XnOSWin32.h" -#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) +#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) #include "Linux-x86/XnOSLinux-x86.h" #elif defined(_ARC) #include "ARC/XnOSARC.h" diff -N -ru openni-1.5.4.0.orig/Include/XnPlatform.h openni-1.5.4.0/Include/XnPlatform.h --- openni-1.5.4.0.orig/Include/XnPlatform.h 2015-06-06 00:13:43.000000000 +0100 +++ openni-1.5.4.0/Include/XnPlatform.h 2015-06-06 00:07:21.000000000 +0100 @@ -36,6 +36,7 @@ #define XN_PLATFORM_MACOSX 8 #define XN_PLATFORM_ANDROID_ARM 9 #define XN_PLATFORM_LINUX_POWERPC 10 +#define XN_PLATFORM_LINUX_AARCH64 11 #define XN_PLATFORM_IS_LITTLE_ENDIAN 1 #define XN_PLATFORM_IS_BIG_ENDIAN 2 @@ -67,6 +68,8 @@ #include "Linux-x86/XnPlatformLinux-x86.h" #elif (__linux__ && __arm__) #include "Linux-Arm/XnPlatformLinux-Arm.h" +#elif (__linux__ && __aarch64__) + #include "Linux-AArch64/XnPlatformLinux-AArch64.h" #elif (__linux__ && __powerpc__) #include "Linux-Powerpc/XnPlatformLinux-Powerpc.h" #elif _ARC diff -N -ru openni-1.5.4.0.orig/Include/XnUSBDevice.h openni-1.5.4.0/Include/XnUSBDevice.h --- openni-1.5.4.0.orig/Include/XnUSBDevice.h 2015-06-06 00:13:43.000000000 +0100 +++ openni-1.5.4.0/Include/XnUSBDevice.h 2015-06-06 00:07:56.000000000 +0100 @@ -48,7 +48,7 @@ #define USB_DT_DEVICE_SIZE 0 #define USB_DT_DEVICE 0 -#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) +#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) #include <linux/usb/ch9.h> typedef struct usb_endpoint_descriptor XnUSBEndpointDescriptor; typedef struct usb_interface_descriptor XnUSBInterfaceDescriptor; diff -N -ru openni-1.5.4.0.orig/Platform/Linux/Build/Common/CommonDefs.mak openni-1.5.4.0/Platform/Linux/Build/Common/CommonDefs.mak --- openni-1.5.4.0.orig/Platform/Linux/Build/Common/CommonDefs.mak 2015-06-06 00:13:43.000000000 +0100 +++ openni-1.5.4.0/Platform/Linux/Build/Common/CommonDefs.mak 2015-06-06 00:08:30.000000000 +0100 @@ -18,6 +18,8 @@ HOST_PLATFORM = x86 else ifneq (,$(findstring arm,$(MACHINE))) HOST_PLATFORM = Arm +else ifneq (,$(findstring aarch64,$(MACHINE))) + HOST_PLATFORM = AArch64 else ifneq (,$(findstring ppc,$(MACHINE))) HOST_PLATFORM = Powerpc else diff -N -ru openni-1.5.4.0.orig/Platform/Linux/Build/Common/Platform.AArch64 openni-1.5.4.0/Platform/Linux/Build/Common/Platform.AArch64 --- openni-1.5.4.0.orig/Platform/Linux/Build/Common/Platform.AArch64 1970-01-01 01:00:00.000000000 +0100 +++ openni-1.5.4.0/Platform/Linux/Build/Common/Platform.AArch64 2015-06-06 00:09:33.000000000 +0100 @@ -0,0 +1,11 @@ +export GLUT_SUPPORTED=1 + +ifeq "$(CFG)" "Release" + + # Optimization level, minus currently buggy optimizing methods (which break bit-exact) + CFLAGS += -O3 -fno-tree-pre -fno-strict-aliasing + + # More optimization flags + CFLAGS += -ftree-vectorize -ffast-math -funsafe-math-optimizations -fsingle-precision-constant + +endif diff -N -ru openni-1.5.4.0.orig/Platform/Linux/CreateRedist/Redist_OpenNi.py openni-1.5.4.0/Platform/Linux/CreateRedist/Redist_OpenNi.py --- openni-1.5.4.0.orig/Platform/Linux/CreateRedist/Redist_OpenNi.py 2015-06-06 00:13:43.000000000 +0100 +++ openni-1.5.4.0/Platform/Linux/CreateRedist/Redist_OpenNi.py 2015-06-06 00:12:07.000000000 +0100 @@ -186,6 +186,8 @@ PLATFORM = "x86" elif machinetype[:3] == "arm": PLATFORM = "Arm" + elif machinetype == "aarch64": + PLATFORM = "AArch64" elif machinetype[:3] == "ppc": PLATFORM = "Powerpc" else: @@ -335,6 +337,7 @@ shutil.copytree("../../Include/Linux-x86", REDIST_DIR + "/Include/Linux-x86") shutil.copytree("../../Include/Linux-Arm", REDIST_DIR + "/Include/Linux-Arm") +shutil.copytree("../../Include/Linux-AArch64", REDIST_DIR + "/Include/Linux-AArch64") shutil.copytree("../../Include/Linux-Powerpc", REDIST_DIR + "/Include/Linux-Powerpc") shutil.copytree("../../Include/MacOSX", REDIST_DIR + "/Include/MacOSX") shutil.copytree("Build/Common", REDIST_DIR + "/Samples/Build/Common") diff -N -ru openni-1.5.4.0.orig/Samples/NiViewer/NiViewer.cpp openni-1.5.4.0/Samples/NiViewer/NiViewer.cpp --- openni-1.5.4.0.orig/Samples/NiViewer/NiViewer.cpp 2015-06-06 00:13:43.000000000 +0100 +++ openni-1.5.4.0/Samples/NiViewer/NiViewer.cpp 2015-06-06 00:12:44.000000000 +0100 @@ -49,7 +49,7 @@ // -------------------------------- #include <XnCppWrapper.h> -#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) +#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) #define UNIX #define GLX_GLXEXT_LEGACY #endif @@ -79,7 +79,7 @@ #if (XN_PLATFORM == XN_PLATFORM_WIN32) #include <conio.h> #include <direct.h> -#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM_LINUX_POWERPC) +#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM_LINUX_POWERPC) #define _getch() getchar() #endif diff -N -ru openni-1.5.4.0.orig/Source/OpenNI/XnOpenNI.cpp openni-1.5.4.0/Source/OpenNI/XnOpenNI.cpp --- openni-1.5.4.0.orig/Source/OpenNI/XnOpenNI.cpp 2015-06-06 00:13:43.000000000 +0100 +++ openni-1.5.4.0/Source/OpenNI/XnOpenNI.cpp 2015-06-06 00:13:13.000000000 +0100 @@ -7062,7 +7062,7 @@ #define XN_OPEN_NI_FILES_LOCATION "\\Data\\" #elif (CE4100) #define XN_OPEN_NI_FILES_LOCATION "/usr/etc/ni/" -#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) +#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) #define XN_OPEN_NI_FILES_LOCATION "/var/lib/ni/" #elif (XN_PLATFORM == XN_PLATFORM_ANDROID_ARM) #define XN_OPEN_NI_FILES_LOCATION "/data/ni/"
_______________________________________________ pkg-multimedia-maintainers mailing list pkg-multimedia-maintainers@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers