Package: nvidia-texture-tools
Version: 2.0.8-1+dfsg-5
Severity: wishlist
User: debian-...@lists.debian.org
Usertags: arm64

It would be great if this package would be built for ARM64, too.
I understand that this is mostly an upstream issue.  I have an initial
patch and I'll forward it to upstream soon, so you may want to hold
off.

But I do have a patch with which the Debian package builds.  Let me
know what you think.

Note that I'm not sure about how to name NV_CPU_.  I used NV_CPU_ARM64
because most people use "ARM64" to refer to this platform, but
technically it's called AARCH64, so maybe NV_CPU_AARCH64 would be
better.  But it seems that's not exposed to the -dev package anyway,
so it shouldn't matter for Debian.

I'll add the upstream URL once I filed a bug there.

-- 
Martin Michlmayr
Linux for HP Helion OpenStack, Hewlett-Packard
diff -urN a/nvidia-texture-tools-2.0.8-1+dfsg/debian/control nvidia-texture-tools-2.0.8-1+dfsg/debian/control
--- a/nvidia-texture-tools-2.0.8-1+dfsg/debian/control	2014-10-03 19:28:24.000000000 +0000
+++ nvidia-texture-tools-2.0.8-1+dfsg/debian/control	2015-06-27 23:33:21.040000000 +0000
@@ -20,7 +20,7 @@
 Homepage: http://code.google.com/p/nvidia-texture-tools/
 
 Package: libnvtt2
-Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
+Architecture: amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
 Multi-Arch: same
 Pre-Depends: multiarch-support, ${misc:Pre-Depends}
 Depends:
@@ -33,7 +33,7 @@
  normal map generation, format conversion and DXT compression.
 
 Package: libnvtt-bin
-Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
+Architecture: amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
 Multi-Arch: foreign
 Depends:
  ${misc:Depends},
@@ -49,7 +49,7 @@
  This package contains the nvidia texture tools.
 
 Package: libnvtt-dev
-Architecture: amd64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
+Architecture: amd64 arm64 armel armhf i386 kfreebsd-amd64 kfreebsd-i386 powerpc ppc64
 Section: libdevel
 Depends:
  libnvtt2 (= ${binary:Version}),
diff -urN a/nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/11-arm64-support.patch nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/11-arm64-support.patch
--- a/nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/11-arm64-support.patch	1970-01-01 00:00:00.000000000 +0000
+++ nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/11-arm64-support.patch	2015-06-27 23:46:20.830000000 +0000
@@ -0,0 +1,59 @@
+Description: Add ARM64 support
+Author: Martin Michlmayr <t...@cyrius.com>
+
+---
+
+--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvcore/Debug.cpp
++++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvcore/Debug.cpp
+@@ -221,6 +221,9 @@ namespace
+ #		elif NV_CPU_PPC
+ 			ucontext_t * ucp = (ucontext_t *)secret;
+ 			return (void *) ucp->uc_mcontext.regs->nip;
++#		elif NV_CPU_ARM64
++			ucontext_t * ucp = (ucontext_t *)secret;
++			return (void *) ucp->uc_mcontext.pc;
+ #		endif
+ #	endif
+ 		
+--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvcore/nvcore.h
++++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvcore/nvcore.h
+@@ -65,6 +65,7 @@
+ // NV_CPU_X86_64
+ // NV_CPU_PPC
+ // NV_CPU_ARM
++// NV_CPU_ARM64
+ 
+ #define NV_CPU_STRING 	POSH_CPU_STRING
+ 
+@@ -76,6 +77,8 @@
+ #	define NV_CPU_PPC 1
+ #elif defined POSH_CPU_STRONGARM
+ #	define NV_CPU_ARM 1
++#elif defined POSH_CPU_AARCH64
++#	define NV_CPU_ARM64 1
+ #else
+ #	error "Unsupported CPU"
+ #endif
+--- nvidia-texture-tools-2.0.8-1+dfsg.orig/src/nvcore/poshlib/posh.h
++++ nvidia-texture-tools-2.0.8-1+dfsg/src/nvcore/poshlib/posh.h
+@@ -485,6 +485,11 @@ Metrowerks:
+ #  define POSH_CPU_STRING "ARM"
+ #endif
+ 
++#if defined __aarch64__
++#  define POSH_CPU_AARCH64 1
++#  define POSH_CPU_STRING "ARM64"
++#endif
++
+ #if defined mips || defined __mips__ || defined __MIPS__ || defined _MIPS
+ #  define POSH_CPU_MIPS 1 
+ #  if defined _R5900
+@@ -658,7 +663,7 @@ Metrowerks:
+ ** the MIPS series, so we have to be careful about those.
+ ** ----------------------------------------------------------------------------
+ */
+-#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__
++#if defined POSH_CPU_X86 || defined POSH_CPU_AXP || defined POSH_CPU_STRONGARM || POSH_CPU_AARCH64 || defined POSH_OS_WIN32 || defined POSH_OS_WINCE || defined __MIPSEL__
+ #  define POSH_ENDIAN_STRING "little"
+ #  define POSH_LITTLE_ENDIAN 1
+ #else
diff -urN a/nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series
--- a/nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series	2014-10-03 19:28:24.000000000 +0000
+++ nvidia-texture-tools-2.0.8-1+dfsg/debian/patches/series	2015-06-27 23:41:51.940000000 +0000
@@ -8,3 +8,4 @@
 08-fix-wordsize-warning.patch
 09-arm-fix.patch
 10-fix-cxxflags.patch
+11-arm64-support.patch

Reply via email to