[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1050419: marked as done (openni: Please add support for arch Loongarch64)



Your message dated Wed, 15 Nov 2023 10:22:16 +0000
with message-id <E1r3D2G-002rXH-DE@fasolo.debian.org>
and subject line Bug#1050419: fixed in openni 1.5.4.0+dfsg-7
has caused the Debian Bug report #1050419,
regarding openni: Please add support for arch Loongarch64
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1050419: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1050419
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: openni
Version: 1.5.4.0+dfsg-6
Severity: wishlist
Tags: patch
User: debian-devel@lists.debian.org
Usertags: loongarch64

Dear maintainers,

   When I compiled openni for loongarch architecture, it reported 
missing architecture support.
   The error message is following:
cd Platform/Linux/CreateRedist && ./RedistMaker
Unknown platform: loongarch64
make[1]: *** [debian/rules:7: override_dh_auto_build] Error 1

We have added loongarch architecture support for openni, the patch 
can be found in the attachment.

If you have any questions, you can contact me at any time.
Index: openni-1.5.4.0+dfsg/Include/Linux-Loongarch64/XnPlatformLinux-Loongarch64.h
===================================================================
--- /dev/null
+++ openni-1.5.4.0+dfsg/Include/Linux-Loongarch64/XnPlatformLinux-Loongarch64.h
@@ -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_LOONGARCH64_H_
+#define _XN_PLATFORM_LINUX_LOONGARCH64_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_LOONGARCH64
+#define XN_PLATFORM_STRING "Linux-Loongarch64"
+
+#define XN_PLATFORM_ENDIAN_TYPE XN_PLATFORM_IS_LITTLE_ENDIAN
+
+#endif //_XN_PLATFORM_LINUX_LOONGARCH64_H_
Index: openni-1.5.4.0+dfsg/Include/XnOS.h
===================================================================
--- openni-1.5.4.0+dfsg.orig/Include/XnOS.h
+++ openni-1.5.4.0+dfsg/Include/XnOS.h
@@ -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_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_ANDROID_ARM || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64)
+#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 || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64 || XN_PLATFORM == XN_PLATFORM_LINUX_LOONGARCH64)
 	#include "Linux-x86/XnOSLinux-x86.h"
 #elif defined(_ARC)
 	#include "ARC/XnOSARC.h"
Index: openni-1.5.4.0+dfsg/Include/XnPlatform.h
===================================================================
--- openni-1.5.4.0+dfsg.orig/Include/XnPlatform.h
+++ openni-1.5.4.0+dfsg/Include/XnPlatform.h
@@ -39,6 +39,7 @@
 #define XN_PLATFORM_LINUX_AARCH64 11
 #define XN_PLATFORM_LINUX_MIPS 12
 #define XN_PLATFORM_LINUX_RISCV64 13
+#define XN_PLATFORM_LINUX_LOONGARCH64 14
 
 #define XN_PLATFORM_IS_LITTLE_ENDIAN 1
 #define XN_PLATFORM_IS_BIG_ENDIAN    2
@@ -78,6 +79,8 @@
 	#include "Linux-Mips/XnPlatformLinux-Mips.h"
 #elif (__linux__ && (__riscv && __riscv_xlen == 64))
 	#include "Linux-Riscv64/XnPlatformLinux-Riscv64.h"
+#elif (__linux__ && __loongarch__)
+	#include "Linux-Loongarch64/XnPlatformLinux-Loongarch64.h"
 #elif _ARC
 	#include "ARC/XnPlatformARC.h"
 #elif (__APPLE__)
Index: openni-1.5.4.0+dfsg/Include/XnUSBDevice.h
===================================================================
--- openni-1.5.4.0+dfsg.orig/Include/XnUSBDevice.h
+++ openni-1.5.4.0+dfsg/Include/XnUSBDevice.h
@@ -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_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64)
+#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_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64 || XN_PLATFORM == XN_PLATFORM_LINUX_LOONGARCH64)
 	#include <linux/usb/ch9.h>
 	typedef struct usb_endpoint_descriptor XnUSBEndpointDescriptor;
 	typedef struct usb_interface_descriptor XnUSBInterfaceDescriptor;
Index: openni-1.5.4.0+dfsg/Platform/Linux/Build/Common/CommonDefs.mak
===================================================================
--- openni-1.5.4.0+dfsg.orig/Platform/Linux/Build/Common/CommonDefs.mak
+++ openni-1.5.4.0+dfsg/Platform/Linux/Build/Common/CommonDefs.mak
@@ -26,6 +26,8 @@ else ifneq (,$(findstring mips,$(MACHINE
 	HOST_PLATFORM = Mips
 else ifneq (,$(findstring riscv64,$(MACHINE)))
 	HOST_PLATFORM = Riscv64
+else ifneq (,$(findstring loongarch64,$(MACHINE)))
+        HOST_PLATFORM = Loongarch64
 else
 	DUMMY:=$(error Can't determine host platform)
 endif
Index: openni-1.5.4.0+dfsg/Platform/Linux/Build/Common/Platform.Loongarch64
===================================================================
--- /dev/null
+++ openni-1.5.4.0+dfsg/Platform/Linux/Build/Common/Platform.Loongarch64
@@ -0,0 +1,12 @@
+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+dfsg/Platform/Linux/CreateRedist/Redist_OpenNi.py
===================================================================
--- openni-1.5.4.0+dfsg.orig/Platform/Linux/CreateRedist/Redist_OpenNi.py
+++ openni-1.5.4.0+dfsg/Platform/Linux/CreateRedist/Redist_OpenNi.py
@@ -194,6 +194,8 @@ else:
         PLATFORM = "Mips"
     elif machinetype == "riscv64":
         PLATFORM = "Riscv64"
+    elif machinetype == "loongarch64":
+        PLATFORM = "Loongarch64"
     else:
         print("Unknown platform:", machinetype)
         finish_script(1)
@@ -339,6 +341,7 @@ shutil.copytree("../../Include/Linux-AAr
 shutil.copytree("../../Include/Linux-Powerpc", REDIST_DIR + "/Include/Linux-Powerpc")
 shutil.copytree("../../Include/Linux-Mips", REDIST_DIR + "/Include/Linux-Mips")
 shutil.copytree("../../Include/Linux-Riscv64", REDIST_DIR + "/Include/Linux-Riscv64")
+shutil.copytree("../../Include/Linux-Loongarch64", REDIST_DIR + "/Include/Linux-Loongarch64")
 shutil.copytree("../../Include/MacOSX", REDIST_DIR + "/Include/MacOSX")
 shutil.copytree("Build/Common", REDIST_DIR + "/Samples/Build/Common")
 
Index: openni-1.5.4.0+dfsg/Samples/NiViewer/NiViewer.cpp
===================================================================
--- openni-1.5.4.0+dfsg.orig/Samples/NiViewer/NiViewer.cpp
+++ openni-1.5.4.0+dfsg/Samples/NiViewer/NiViewer.cpp
@@ -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_AARCH64 || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64)
+#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_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64 || XN_PLATFORM == XN_PLATFORM_LINUX_LOONGARCH64)
 	#define UNIX
 	#define GLX_GLXEXT_LEGACY
 #endif
@@ -79,7 +79,7 @@ using namespace glh;
 #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_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64)
+#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 || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64 || XN_PLATFORM == XN_PLATFORM_LINUX_LOONGARCH64)
 	#define _getch() getchar()
 #endif
 
Index: openni-1.5.4.0+dfsg/Source/OpenNI/XnOpenNI.cpp
===================================================================
--- openni-1.5.4.0+dfsg.orig/Source/OpenNI/XnOpenNI.cpp
+++ openni-1.5.4.0+dfsg/Source/OpenNI/XnOpenNI.cpp
@@ -7062,7 +7062,7 @@ XN_C_API XnStatus xnScriptNodeRun(XnNode
 	#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_LINUX_AARCH64 || XN_PLATFORM == XN_PLATFORM_MACOSX || XN_PLATFORM == XN_PLATFORM_LINUX_POWERPC || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64)
+#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 || XN_PLATFORM == XN_PLATFORM_LINUX_MIPS || XN_PLATFORM == XN_PLATFORM_LINUX_RISCV64 || XN_PLATFORM == XN_PLATFORM_LINUX_LOONGARCH64)
 	#define XN_OPEN_NI_FILES_LOCATION "/var/lib/ni/"
 #elif (XN_PLATFORM == XN_PLATFORM_ANDROID_ARM)
 	#define XN_OPEN_NI_FILES_LOCATION "/data/ni/"

--- End Message ---
--- Begin Message ---
Source: openni
Source-Version: 1.5.4.0+dfsg-7
Done: Jochen Sprickerhof <jspricke@debian.org>

We believe that the bug you reported is fixed in the latest version of
openni, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 1050419@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Jochen Sprickerhof <jspricke@debian.org> (supplier of updated openni package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Wed, 15 Nov 2023 11:05:03 +0100
Source: openni
Architecture: source
Version: 1.5.4.0+dfsg-7
Distribution: unstable
Urgency: medium
Maintainer: Debian Multimedia Maintainers <debian-multimedia@lists.debian.org>
Changed-By: Jochen Sprickerhof <jspricke@debian.org>
Closes: 1050419
Changes:
 openni (1.5.4.0+dfsg-7) unstable; urgency=medium
 .
   * Add loongarch64 support (Closes: #1050419)
   * Bump policy version (no changes)
Checksums-Sha1:
 a304071218b6e1812b0a72a90f233746f2df70b1 2297 openni_1.5.4.0+dfsg-7.dsc
 028b72029a125e62e3bdf2b107e8a9d1d9573914 652012 openni_1.5.4.0+dfsg-7.debian.tar.xz
 72fdd5c699cde303b937d9d2f7c9d24b6a758415 8781 openni_1.5.4.0+dfsg-7_source.buildinfo
Checksums-Sha256:
 b53058116190e9e6445aa7772d9e712322dbf9c9f745bb09eb09717b5ccf0f37 2297 openni_1.5.4.0+dfsg-7.dsc
 8941f05e6a1de653433eeb0689d3b2ddfb5ad7dc3364a6d270ef3c4ef7aa3e04 652012 openni_1.5.4.0+dfsg-7.debian.tar.xz
 e48a8cea95e8d4d9b87eb611360bbf1042b3a38d207c0dc34e8bffb67d509c51 8781 openni_1.5.4.0+dfsg-7_source.buildinfo
Files:
 a61948e1cabafb7eb0c5950d5ae2a406 2297 libs optional openni_1.5.4.0+dfsg-7.dsc
 d001f056a2e21fa8297d16f1ec34a037 652012 libs optional openni_1.5.4.0+dfsg-7.debian.tar.xz
 bdf03705584fc4b090f81eaf62c4c3e0 8781 libs optional openni_1.5.4.0+dfsg-7_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEc7KZy9TurdzAF+h6W//cwljmlDMFAmVUmAoACgkQW//cwljm
lDO2qBAAiTfWS87r1MaQ5oQsONqI/XsI9PdX6aSrRhgqN37zWFXAapyj282zdlXW
ChbGjZivJGDZ9r1t7/DctowQxG0O1EyCsCbab3NCgH22Hkg2/p/j7h3Qe+upUxFv
xKVfINkx8to419RHxXZlW6AeTuIkOO3+SiQpZ7dMizUhJ7QLHfYT7nGTxXJjD8CN
ix3tf5ZJU/uXaIvuAQeKejBs4hzNC7oazda9/qD/ty40vZzSJi8Pt76va3TXTzUC
SaXfMl5fhIhtiHO9xegM2mxX6+kbdQiFyxgA0T3PmntupU1vdNLsRtPBIIAsqmwd
2djW5/C5zAvNR1RZezLjxd40eVC6iOr4yo2trjYbjxvVjSaHzs4JP1pgKkCgwxMe
pdVzmb/tIJLcz9ltMDgZ7aQKEB07wtJlbzIq8KUcnvc6/H9cd0UY7CbP2F/NVftR
1vB7vdDBXUd6mmShb1iD7429KpjfKORwwMQQ291zrUuk1btWRekQaHdrdZEncCAj
H6DKd3vILSzycggLFAWMKTKp6Q+qLkKRZC0m9OEzh/KKCfTd1DTvVr8TLEfTqR33
IKG6FVVxKd+pNrHCPYlHHfHF25ALscmYopyVPRm2fwthTyuezu2+5c+3NfhDASOu
bTmeEndCsiMeZA8wwd7P4N/6Psz3VFT8kyXMnkEiiohL6PDEysQ=
=BgrP
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: