Package: libhdf-eos4
Version: 4.2r4-12
Severity: important
Tags: patch
Justification: fails to build from source
User: debian-s...@lists.debian.org
Usertags: s390x

libhdf-eos4 fails to build on s390x, as it uses the definition of s390
which is only 32-bit. The patch below fixes the issues, and also fixes
a missing case for sparc64. Would it be possible to apply it in the next
upload? Thanks in advance.


diff -u libhdf4-4.2r4/debian/patches/64bit libhdf4-4.2r4/debian/patches/64bit
--- libhdf4-4.2r4/debian/patches/64bit
+++ libhdf4-4.2r4/debian/patches/64bit
@@ -7,7 +7,7 @@
  #if defined _CRAYMPP
  typedef short nclong;
 -#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined 
__sun__ && defined _LP64) || defined AIX5L64
-+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined 
__sun__ && defined _LP64) || defined AIX5L64 || defined __ia64__ || defined 
__x86_64__ || defined __powerpc64__
++#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined 
__sun__ && defined _LP64) || defined AIX5L64 || defined __ia64__ || defined 
__x86_64__ || defined __powerpc64__ || (defined __sparc__ && defined 
__arch64__) || defined __s390x__
 +
  typedef int     nclong;   
  #else
diff -u libhdf4-4.2r4/debian/patches/hdfi.h libhdf4-4.2r4/debian/patches/hdfi.h
--- libhdf4-4.2r4/debian/patches/hdfi.h
+++ libhdf4-4.2r4/debian/patches/hdfi.h
@@ -58,7 +58,7 @@
  
  #ifndef MIPSEL
  #define MIPSEL
-@@ -1039,6 +1049,349 @@
+@@ -1039,6 +1049,358 @@
  #endif /* INTEL86 */
  #endif /* !(defined(macintosh) || defined(MAC)) */
  
@@ -263,14 +263,23 @@
 +typedef unsigned char     uint8;
 +typedef short int         int16;
 +typedef unsigned short int uint16;
++#ifdef _LP64 /* 64-bit environment */
++typedef int               int32;
++typedef unsigned int      uint32;
++#else /* 32-bit environment */
 +typedef long int          int32;
 +typedef unsigned long int uint32;
++#endif
 +typedef int               intn;
 +typedef unsigned int      uintn;
 +typedef float             float32;
 +typedef double            float64;
 +typedef long              intf;     /* size of INTEGERs in Fortran compiler */
++#ifdef _LP64 /* 64-bit environment */
++typedef long              hdf_pint_t;   /* an integer the same size as a 
pointer */
++#else /* 32-bit environment */
 +typedef int               hdf_pint_t;   /* an integer the same size as a 
pointer */
++#endif
 +#define FNAME_POST_UNDERSCORE
 +#define _fcdtocp(desc) (desc)
 +


-- System Information:
Debian Release: wheezy/sid
  APT prefers unreleased
  APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: s390x

Kernel: Linux 3.0.0-1-s390x (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to