Source: openni Version: 1.5.4.0-6 Severity: important Tags: patch User: debian-powerpc...@breakpoint.cc Usertags: powerpcspe
Hi, on powerpc and powerpcspe, openni FTBFS like this: ... make[1]: Entering directory `/«PKGBUILDDIR»' cd Platform/Linux/CreateRedist && ./RedistMaker Unknown platform: ppc make[1]: *** [override_dh_auto_build] Error 1 make[1]: Leaving directory `/«PKGBUILDDIR»' make: *** [build-arch] Error 2 ... The attached patch fixes this. Roland -- System Information: Debian Release: 7.0 APT prefers unreleased APT policy: (500, 'unreleased'), (500, 'unstable') Architecture: powerpcspe (ppc) Kernel: Linux 3.9.0-dirty (SMP w/2 CPU cores) Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_GB.UTF-8) Shell: /bin/sh linked to /bin/dash
Index: openni-1.5.4.0/Platform/Linux/CreateRedist/Redist_OpenNi.py =================================================================== --- openni-1.5.4.0.orig/Platform/Linux/CreateRedist/Redist_OpenNi.py 2014-01-03 22:14:57.168620189 +0100 +++ openni-1.5.4.0/Platform/Linux/CreateRedist/Redist_OpenNi.py 2014-01-03 22:14:57.156620118 +0100 @@ -186,6 +186,8 @@ PLATFORM = "x86" elif machinetype[:3] == "arm": PLATFORM = "Arm" + elif machinetype[:3] == "ppc": + PLATFORM = "Powerpc" else: print "Unknown platform:", machinetype finish_script(1) @@ -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-Powerpc", REDIST_DIR + "/Include/Linux-Powerpc") shutil.copytree("../../Include/MacOSX", REDIST_DIR + "/Include/MacOSX") shutil.copytree("Build/Common", REDIST_DIR + "/Samples/Build/Common") Index: openni-1.5.4.0/Platform/Linux/Build/Common/CommonDefs.mak =================================================================== --- openni-1.5.4.0.orig/Platform/Linux/Build/Common/CommonDefs.mak 2014-01-03 22:14:57.168620189 +0100 +++ openni-1.5.4.0/Platform/Linux/Build/Common/CommonDefs.mak 2014-01-03 22:14:57.144620048 +0100 @@ -18,6 +18,8 @@ HOST_PLATFORM = x86 else ifneq (,$(findstring arm,$(MACHINE))) HOST_PLATFORM = Arm +else ifneq (,$(findstring ppc,$(MACHINE))) + HOST_PLATFORM = Powerpc else DUMMY:=$(error Can't determine host platform) endif @@ -59,4 +61,4 @@ # platform specific args include $(COMMON_MAK_DIR)Platform.$(PLATFORM) -endif # _COMMON_DEFS_MAKE_ \ No newline at end of file +endif # _COMMON_DEFS_MAKE_ Index: openni-1.5.4.0/Platform/Linux/Build/Common/Platform.Powerpc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ openni-1.5.4.0/Platform/Linux/Build/Common/Platform.Powerpc 2014-01-03 22:14:57.144620048 +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 Index: openni-1.5.4.0/Include/Linux-Powerpc/XnPlatformLinux-Powerpc.h =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ openni-1.5.4.0/Include/Linux-Powerpc/XnPlatformLinux-Powerpc.h 2014-01-03 22:14:57.144620048 +0100 @@ -0,0 +1,39 @@ +/**************************************************************************** +* * +* 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_POWERPC_H_ +#define _XN_PLATFORM_LINUX_POWERPC_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_POWERPC +#define XN_PLATFORM_STRING "Linux-Powerpc" +#define XN_PLATFORM_ENDIAN_TYPE XN_PLATFORM_IS_BIG_ENDIAN + +#endif //_XN_PLATFORM_LINUX_POWERPC_H_ + Index: openni-1.5.4.0/Include/XnOS.h =================================================================== --- openni-1.5.4.0.orig/Include/XnOS.h 2014-01-03 22:14:57.168620189 +0100 +++ openni-1.5.4.0/Include/XnOS.h 2014-01-03 22:14:57.144620048 +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) +#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) #include "Linux-x86/XnOSLinux-x86.h" #elif defined(_ARC) #include "ARC/XnOSARC.h" Index: openni-1.5.4.0/Include/XnPlatform.h =================================================================== --- openni-1.5.4.0.orig/Include/XnPlatform.h 2014-01-03 22:14:57.168620189 +0100 +++ openni-1.5.4.0/Include/XnPlatform.h 2014-01-03 22:14:57.148620071 +0100 @@ -35,6 +35,7 @@ #define XN_PLATFORM_LINUX_ARM 7 #define XN_PLATFORM_MACOSX 8 #define XN_PLATFORM_ANDROID_ARM 9 +#define XN_PLATFORM_LINUX_POWERPC 10 #define XN_PLATFORM_IS_LITTLE_ENDIAN 1 #define XN_PLATFORM_IS_BIG_ENDIAN 2 @@ -66,6 +67,8 @@ #include "Linux-x86/XnPlatformLinux-x86.h" #elif (__linux__ && __arm__) #include "Linux-Arm/XnPlatformLinux-Arm.h" +#elif (__linux__ && __powerpc__) + #include "Linux-Powerpc/XnPlatformLinux-Powerpc.h" #elif _ARC #include "ARC/XnPlatformARC.h" #elif (__APPLE__) Index: openni-1.5.4.0/Source/OpenNI/XnOpenNI.cpp =================================================================== --- openni-1.5.4.0.orig/Source/OpenNI/XnOpenNI.cpp 2014-01-03 22:14:57.168620189 +0100 +++ openni-1.5.4.0/Source/OpenNI/XnOpenNI.cpp 2014-01-03 22:14:57.152620094 +0100 @@ -7062,7 +7062,7 @@ #define XN_OPEN_NI_FILES_LOCATION "\\Data\\" #elif (CE4100) #define XN_OPEN_NI_FILES_LOCATION "/etc/openni/" -#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX) +#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) #define XN_OPEN_NI_FILES_LOCATION "/etc/openni/" #elif (XN_PLATFORM == XN_PLATFORM_ANDROID_ARM) #define XN_OPEN_NI_FILES_LOCATION "/data/ni/" Index: openni-1.5.4.0/Samples/NiViewer/NiViewer.cpp =================================================================== --- openni-1.5.4.0.orig/Samples/NiViewer/NiViewer.cpp 2014-01-03 22:14:57.168620189 +0100 +++ openni-1.5.4.0/Samples/NiViewer/NiViewer.cpp 2014-01-03 22:14:57.156620118 +0100 @@ -49,7 +49,7 @@ // -------------------------------- #include <XnCppWrapper.h> -#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM) +#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || 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) +#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM_LINUX_POWERPC) #define _getch() getchar() #endif Index: openni-1.5.4.0/Include/XnUSBDevice.h =================================================================== --- openni-1.5.4.0.orig/Include/XnUSBDevice.h 2014-01-03 22:14:57.168620189 +0100 +++ openni-1.5.4.0/Include/XnUSBDevice.h 2014-01-03 22:14:57.156620118 +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) +#elif (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC) #include <linux/usb/ch9.h> typedef struct usb_endpoint_descriptor XnUSBEndpointDescriptor; typedef struct usb_interface_descriptor XnUSBInterfaceDescriptor;