Package: openni-sensor-primesense Version: 5.1.0.41-3 Severity: important Tags: patch User: debian-powerpc...@breakpoint.cc Usertags: powerpcspe
Hi, on powerpc and powerpcspe, openni-sensor-primesense FTBFS like this: ... make[1]: Leaving directory `/«PKGBUILDDIR»' debian/rules build-arch dh build-arch --buildsystem=makefile dh_testdir -a -O--buildsystem=makefile dh_auto_configure -a -O--buildsystem=makefile debian/rules override_dh_auto_build make[1]: Entering directory `/«PKGBUILDDIR»' cd Platform/Linux/CreateRedist && bash RedistMaker Unknown machine type: 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-sensor-primesense-5.1.0.41/Platform/Linux/CreateRedist/RedistMaker =================================================================== --- openni-sensor-primesense-5.1.0.41.orig/Platform/Linux/CreateRedist/RedistMaker 2014-01-04 10:34:00.000000000 +0100 +++ openni-sensor-primesense-5.1.0.41/Platform/Linux/CreateRedist/RedistMaker 2014-01-04 10:34:00.000000000 +0100 @@ -29,6 +29,8 @@ PLATFORM="x64" ;; arm) PLATFORM="Arm" ;; + ppc) + PLATFORM="Powerpc" ;; *) echo "Unknown machine type: $MACHINE_TYPE" exit 1 Index: openni-sensor-primesense-5.1.0.41/Platform/Linux/Build/Common/CommonDefs.mak =================================================================== --- openni-sensor-primesense-5.1.0.41.orig/Platform/Linux/Build/Common/CommonDefs.mak 2014-01-04 10:34:00.000000000 +0100 +++ openni-sensor-primesense-5.1.0.41/Platform/Linux/Build/Common/CommonDefs.mak 2014-01-04 10:34:00.000000000 +0100 @@ -15,6 +15,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 Index: openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnDeviceSensorInit.h =================================================================== --- openni-sensor-primesense-5.1.0.41.orig/Source/XnDeviceSensorV2/XnDeviceSensorInit.h 2014-01-04 10:34:00.000000000 +0100 +++ openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnDeviceSensorInit.h 2014-01-04 10:34:00.000000000 +0100 @@ -57,7 +57,7 @@ #define XN_SENSOR_USB_MISC_BUFFER_SIZE 0x1000 #define XN_SENSOR_USB_MISC_BUFFERS 1 -#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_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM) #define XN_SENSOR_USB_IMAGE_BUFFER_SIZE_MULTIPLIER_ISO 32 #define XN_SENSOR_USB_IMAGE_BUFFER_SIZE_MULTIPLIER_BULK 40 #define XN_SENSOR_USB_IMAGE_BUFFER_SIZE_MULTIPLIER_LOWBAND_ISO 16 Index: openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnSensorClient.cpp =================================================================== --- openni-sensor-primesense-5.1.0.41.orig/Source/XnDeviceSensorV2/XnSensorClient.cpp 2014-01-04 10:34:00.000000000 +0100 +++ openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnSensorClient.cpp 2014-01-04 10:34:00.000000000 +0100 @@ -882,7 +882,7 @@ #if (XN_PLATFORM == XN_PLATFORM_WIN32) nRetVal = GetModuleDir(strServerDir); -#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_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_MACOSX) sprintf(strServerDir, "/usr/lib/libopenni-sensor-primesense0"); #endif Index: openni-sensor-primesense-5.1.0.41/Source/Utils/XnSensorServer/SensorServer.cpp =================================================================== --- openni-sensor-primesense-5.1.0.41.orig/Source/Utils/XnSensorServer/SensorServer.cpp 2014-01-04 10:34:00.000000000 +0100 +++ openni-sensor-primesense-5.1.0.41/Source/Utils/XnSensorServer/SensorServer.cpp 2014-01-04 10:34:00.000000000 +0100 @@ -56,7 +56,7 @@ nRetVal = XnSensorServerGetGlobalConfigFile(strConfigDir, strConfigFile, XN_FILE_MAX_PATH); XN_CHECK_RC(nRetVal, "Resolving global config file"); -#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_MACOSX) +#if (XN_PLATFORM == XN_PLATFORM_LINUX_X86 || XN_PLATFORM == XN_PLATFORM_LINUX_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_MACOSX) xnLogSetOutputFolder("/var/log/primesense/XnSensorServer/"); #endif Index: openni-sensor-primesense-5.1.0.41/Platform/Linux/Build/Common/Platform.Powerpc =================================================================== --- /dev/null 1970-01-01 00:00:00.000000000 +0000 +++ openni-sensor-primesense-5.1.0.41/Platform/Linux/Build/Common/Platform.Powerpc 2014-01-04 10:43:20.000000000 +0100 @@ -0,0 +1,9 @@ +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