[Git][debian-gis-team/hdf4][master] Manually apply changes for riscv64 support. (closes: #978099)

Bas Couwenberg gitlab at salsa.debian.org
Sat Dec 26 07:01:23 GMT 2020



Bas Couwenberg pushed to branch master at Debian GIS Project / hdf4


Commits:
1e3ea4d9 by Bas Couwenberg at 2020-12-26T08:01:13+01:00
Manually apply changes for riscv64 support. (closes: #978099)

- - - - -


5 changed files:

- debian/changelog
- debian/patches/64bit
- debian/patches/hdfi.h
- debian/patches/kfreebsd
- debian/rules


Changes:

=====================================
debian/changelog
=====================================
@@ -2,6 +2,8 @@ libhdf4 (4.2.15-4) UNRELEASED; urgency=medium
 
   * Team upload.
   * Bump Standards-Version to 4.5.1, no changes.
+  * Manually apply changes for riscv64 support.
+    (closes: #978099)
 
  -- Bas Couwenberg <sebastic at debian.org>  Sat, 28 Nov 2020 13:42:15 +0100
 


=====================================
debian/patches/64bit
=====================================
@@ -8,7 +8,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
   * Variables/attributes of type NC_LONG should use the C type 'nclong'
   */
 -#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
-+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || (defined __sparc__ && defined __arch64__) || defined __s390x__ || defined __aarch64__
++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || (defined __sparc__ && defined __arch64__) || defined __s390x__ || defined __aarch64__ || (defined __riscv && __riscv_xlen == 64)
  /*
   * LP64 (also known as 4/8/8) denotes long and pointer as 64 bit types.
   * http://www.unix.org/version2/whatsnew/lp64_wp.html


=====================================
debian/patches/hdfi.h
=====================================
@@ -19,7 +19,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
  #define     DFMT_PC             0x4441
  #define     DFMT_APPLE          0x1111
  #define     DFMT_APPLE_INTEL    0x4441
-@@ -75,6 +77,12 @@
+@@ -75,6 +77,13 @@
  #define     DFMT_IA64           0x4441
  #define     DFMT_LINUX64        0x4441
  #define     DFMT_POWERPC64      0x1111
@@ -27,12 +27,13 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
 +#define     DFMT_ARMV4L         0x4441
 +#define     DFMT_AARCH64        0x4441
 +#define     DFMT_X86_64         0x4441
-+#define     DFMT_SH		0x4441
-+#define     DFMT_SHEB		0x1111
++#define     DFMT_SH             0x4441
++#define     DFMT_SHEB           0x1111
++#define     DFMT_RISCV64        0x4441
  
  /* I/O library constants */
  #define UNIXUNBUFIO 1
-@@ -288,7 +296,7 @@ typedef int               hdf_pint_t;
+@@ -288,7 +297,7 @@ typedef int               hdf_pint_t;
  
  #endif /* IBM6000 */
  
@@ -41,7 +42,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
  
  #ifndef HP9000
  #define HP9000
-@@ -347,6 +355,10 @@ typedef int               hdf_pint_t;
+@@ -347,6 +356,10 @@ typedef int               hdf_pint_t;
  /*  what each does */
  #define JMEMSYS         MEM_ANSI
  
@@ -52,7 +53,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
  #endif /* HP9000 */
  
  
-@@ -670,6 +682,410 @@ typedef int               hdf_pint_t;
+@@ -670,6 +683,462 @@ typedef int               hdf_pint_t;
  #endif /* !(defined(__APPLE__)) */
  
  /*-----------------------------------------------------*/
@@ -459,11 +460,63 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
 +#define INCLUDES_ARE_ANSI
 +
 +#endif /* Linux/aarch64 */
++
++#if defined (__linux__) && defined (__riscv) && (__riscv_xlen == 64)
++
++#ifdef GOT_MACHINE
++If you get an error on this line more than one machine type has been defined.
++Please check your Makefile.
++#endif
++#define GOT_MACHINE 1
++
++#include <fcntl.h>
++#include <sys/types.h>      /* for unbuffered file I/O */
++#include <sys/stat.h>
++#include <unistd.h>
++#include <ctype.h>          /* for character macros */
++
++#define DF_MT             DFMT_RISCV64
++
++typedef void              VOID;
++typedef void *            VOIDP;
++typedef char *            _fcd;
++typedef char              char8;
++typedef unsigned char     uchar8;
++typedef signed char       int8;
++typedef unsigned char     uint8;
++typedef short int         int16;
++typedef unsigned short int uint16;
++typedef int               int32;
++typedef unsigned int      uint32;
++typedef int               intn;
++typedef unsigned int      uintn;
++typedef float             float32;
++typedef double            float64;
++typedef int               intf;     /* size of INTEGERs in Fortran compiler */
++typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
++#define FNAME_POST_UNDERSCORE
++#define _fcdtocp(desc) (desc)
++#define FILELIB UNIXBUFIO
++
++#ifndef BIG_LONGS
++#define BIG_LONGS
++#endif
++
++/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
++
++/* Determine the memory manager we are going to use. Valid values are: */
++/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
++/*  what each does */
++#define JMEMSYS         MEM_ANSI
++#define HAVE_STDC
++#define INCLUDES_ARE_ANSI
++
++#endif /* Linux/riscv64 */
 +
  #if defined(NEXT) || defined(NeXT)
  
  #ifndef NEXT
-@@ -932,7 +1348,11 @@ Please check your Makefile.
+@@ -932,7 +1401,11 @@ Please check your Makefile.
  
  #include <sys/file.h>               /* for unbuffered i/o stuff */
  #include <sys/stat.h>
@@ -476,7 +529,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
  typedef void              VOID;
  typedef void              *VOIDP;
  typedef char              *_fcd;
-@@ -956,6 +1376,11 @@ typedef long              hdf_pint_t;
+@@ -956,6 +1429,11 @@ typedef long              hdf_pint_t;
  #define _fcdtocp(desc) (desc)
  #define FILELIB UNIXBUFIO
  
@@ -488,7 +541,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
  /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
  
  /* Determine the memory manager we are going to use. Valid values are: */
-@@ -1101,6 +1526,8 @@ typedef long              hdf_pint_t;
+@@ -1101,6 +1579,8 @@ typedef long              hdf_pint_t;
  #define _fcdtocp(desc) (desc)
  #define FILELIB UNIXBUFIO
  
@@ -497,7 +550,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
  /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
  
  /* Determine the memory manager we are going to use. Valid values are: */
-@@ -1115,6 +1542,66 @@ typedef long              hdf_pint_t;
+@@ -1115,6 +1595,66 @@ typedef long              hdf_pint_t;
  
  #endif /* IA64 */
  
@@ -571,7 +624,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
  /*****************************************************************************/
  /* Generally Big-Endian machines */
 -#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__)
-+#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !(defined(__powerpc__) && defined(__LITTLE_ENDIAN__)) && !defined(__aarch64__) && !defined(__ARM_EABI__)
++#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !(defined(__powerpc__) && defined(__LITTLE_ENDIAN__)) && !defined(__aarch64__) && !defined(__ARM_EABI__) && !defined(__riscv)
  #       define UI8_IN     DFKnb1b   /* Unsigned Integer, 8 bits */
  #       define UI8_OUT    DFKnb1b
  #       define SI16_IN    DFKnb2b   /* S = Signed */


=====================================
debian/patches/kfreebsd
=====================================
@@ -14,7 +14,7 @@ Author: Francesco Paolo Lovergine <frankie at debian.org>
    sparc64-*-solaris2*)  BAR="solaris64"   ;;
 --- a/hdf/src/hdfi.h
 +++ b/hdf/src/hdfi.h
-@@ -1396,7 +1396,7 @@ typedef long              hdf_pint_t;
+@@ -1449,7 +1449,7 @@ typedef long              hdf_pint_t;
  /*-----------------------------------------------------*/
  #endif /*power PC 5 64 */
  /* Linux 64 */


=====================================
debian/rules
=====================================
@@ -37,7 +37,7 @@ ifneq (,$(findstring verbose,$(DEB_BUILD_OPTIONS)))
    export DH_VERBOSE
 endif
 
-ifneq (,$(filter $(DEB_BUILD_ARCH),s390x sparc64))
+ifneq (,$(filter $(DEB_BUILD_ARCH),s390x riscv64 sparc64))
    DISABLE_TESTS=1
 else
    DISABLE_TESTS=0



View it on GitLab: https://salsa.debian.org/debian-gis-team/hdf4/-/commit/1e3ea4d9385e1691adeab5daaf2f65e70b9667cb

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/hdf4/-/commit/1e3ea4d9385e1691adeab5daaf2f65e70b9667cb
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20201226/cb7b7dca/attachment-0001.html>


More information about the Pkg-grass-devel mailing list