Package: openni-sensor-primesense
Version: 5.1.0.41-3
Severity: important
Tags: sid + patch
Justification: FTBFS
User: debian-m...@lists.debian.org
Usertags: mips-patch

Hi,

Package openni-sensor-primesense FTBFS on mips* with following error:
> make[1]: Leaving directory '/«PKGBUILDDIR»'
>  debian/rules build-arch
> dh build-arch --buildsystem=makefile
>    dh_testdir -a -O--buildsystem=makefile
>    dh_update_autotools_config -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: mips
> debian/rules:8: recipe for target 'override_dh_auto_build' failed
> make[1]: *** [override_dh_auto_build] Error 1
> make[1]: Leaving directory '/«PKGBUILDDIR»'
> debian/rules:5: recipe for target 'build-arch' failed
> make: *** [build-arch] Error 2

build log:
https://buildd.debian.org/status/fetch.php?pkg=openni-sensor-primesense&arch=mips&ver=5.1.0.41-5&stamp=1461373695

The attached patch adds support for mips*.
With this patch I was able to build openni-sensor-primesense successfully for 
mips, mipsel and mips64el.
Could you please include this patch?

Thanks,
Daniel

--- openni-sensor-primesense-5.1.0.41.orig/Platform/Linux/Build/Common/CommonDefs.mak
+++ openni-sensor-primesense-5.1.0.41/Platform/Linux/Build/Common/CommonDefs.mak
@@ -19,6 +19,8 @@ else ifneq (,$(findstring aarch64,$(MACH
 	HOST_PLATFORM = AArch64
 else ifneq (,$(findstring ppc,$(MACHINE)))
 	HOST_PLATFORM = Powerpc
+else ifneq (,$(findstring mips,$(MACHINE)))
+        HOST_PLATFORM = Mips
 else
 	DUMMY:=$(error Can't determine host platform)
 endif
--- /dev/null
+++ openni-sensor-primesense-5.1.0.41/Platform/Linux/Build/Common/Platform.Mips
@@ -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
--- openni-sensor-primesense-5.1.0.41.orig/Platform/Linux/CreateRedist/RedistMaker
+++ openni-sensor-primesense-5.1.0.41/Platform/Linux/CreateRedist/RedistMaker
@@ -35,6 +35,8 @@ else
 		PLATFORM="Powerpc" ;;
 	arm*)
 		PLATFORM="Arm" ;;
+	mips*)
+		PLATFORM="Mips" ;;
 	*)
 		echo "Unknown machine type: $MACHINE_TYPE"
 		exit 1
--- openni-sensor-primesense-5.1.0.41.orig/Source/Utils/XnSensorServer/SensorServer.cpp
+++ openni-sensor-primesense-5.1.0.41/Source/Utils/XnSensorServer/SensorServer.cpp
@@ -56,7 +56,7 @@ int main(int argc, char* argv[])
 	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_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_MACOSX)
+#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 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS)
 	xnLogSetOutputFolder("/var/log/primesense/XnSensorServer/");
 #endif
 
--- openni-sensor-primesense-5.1.0.41.orig/Source/XnDeviceSensorV2/XnDeviceSensorInit.h
+++ openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnDeviceSensorInit.h
@@ -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_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || 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_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS)
 	#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
--- openni-sensor-primesense-5.1.0.41.orig/Source/XnDeviceSensorV2/XnSensorClient.cpp
+++ openni-sensor-primesense-5.1.0.41/Source/XnDeviceSensorV2/XnSensorClient.cpp
@@ -882,7 +882,7 @@ XnStatus XnSensorClient::StartServerProc
 	
 #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_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_MACOSX)
+#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 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS)
 	sprintf(strServerDir, "/usr/lib/libopenni-sensor-primesense0");
 #endif
 
_______________________________________________
pkg-multimedia-maintainers mailing list
pkg-multimedia-maintainers@lists.alioth.debian.org
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-multimedia-maintainers

Reply via email to