- new bugfix upstream

----------------------------------------------------------------------
    Modified Files: EL-4/.cvsignore EL-4/hdf.spec EL-4/sources Added Files:
    EL-4/hdf-4.2r2-libm.patch EL-4/hdf-4.2r2-s390.patch
    EL-4/hdf-4.2r2-sparc.patch EL-4/hdf-4.2r3-ppc.patch Removed Files:
    EL-4/hdf-4.2r1-ppc.patch
----------------------------------------------------------------------
This commit is contained in:
Balint Cristian 2008-05-28 17:47:31 +00:00
parent f47bf1ea27
commit 870e8be3c1
7 changed files with 1659 additions and 37 deletions

View File

@ -1 +1 @@
4.2r1-hrepack-p4.tar.gz HDF4.2r3.tar.gz

22
hdf-4.2r2-libm.patch Normal file
View File

@ -0,0 +1,22 @@
--- HDF4.2r2/mfhdf/hdiff/Makefile.in.libm 2008-02-05 14:36:29.000000000 -0700
+++ HDF4.2r2/mfhdf/hdiff/Makefile.in 2008-02-05 14:36:52.000000000 -0700
@@ -196,7 +196,7 @@
hdiff_mattbl.c hdiff_gattr.c hdiff_misc.c hdiff_sds.c \
hdiff_table.c hdiff_vs.c hdiff_dim.c
-hdiff_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdiff_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a -lm
hdiff_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
#############################################################################
--- HDF4.2r2/mfhdf/hrepack/Makefile.in.libm 2007-09-18 09:12:00.000000000 -0600
+++ HDF4.2r2/mfhdf/hrepack/Makefile.in 2008-02-05 14:58:41.000000000 -0700
@@ -232,7 +232,7 @@
../hdiff/hdiff_sds.c ../hdiff/hdiff_table.c \
../hdiff/hdiff_vs.c ../hdiff/hdiff_dim.c
-test_hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+test_hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a -lm
test_hrepack_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
hrepack_check_SOURCES = hrepack_check.c
hrepack_check_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a

339
hdf-4.2r2-s390.patch Normal file
View File

@ -0,0 +1,339 @@
--- HDF4.2r2/hdf/src/hdfi.h.orig 2008-02-04 17:27:04.000000000 +0100
+++ HDF4.2r2/hdf/src/hdfi.h 2008-02-04 17:29:54.000000000 +0100
@@ -78,6 +78,7 @@
#define DFMT_POWERPC64 0x1111
#define DFMT_LINUXPPC 0x1111
#define DFMT_LINUXSPARC 0x1111
+#define DFMT_LINUX390 0x1111
/* I/O library constants */
#define UNIXUNBUFIO 1
@@ -1505,6 +1506,66 @@
#endif /* Linux Sparc32/64 */
+/* Linux s390/s390x */
+#if defined __s390__ || defined __s390x__
+
+#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
+
+#include <sys/file.h> /* for unbuffered i/o stuff */
+#include <sys/stat.h>
+#define DF_MT DFMT_LINUX390
+typedef void VOID;
+typedef void *VOIDP;
+typedef char *_fcd;
+typedef char char8;
+typedef unsigned char uchar8;
+typedef char int8;
+typedef unsigned char uint8;
+typedef short int int16;
+typedef unsigned short int uint16;
+#ifdef __s390x__ /* 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 int intf; /* size of INTEGERs in Fortran compiler */
+typedef float float32;
+typedef double float64;
+#ifdef __s390x__ /* 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)
+#ifdef HAVE_FMPOOL
+#define FILELIB PAGEBUFIO /* enable page buffering */
+#else
+#define FILELIB UNIXBUFIO
+#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
+
+#ifdef __GNUC__
+#define HAVE_STDC
+#define INCLUDES_ARE_ANSI
+#endif
+
+#endif /* Linux s390/s390x */
+
/*#ifndef GOT_MACHINE
No machine type has been defined. Your Makefile needs to have someing like
-DSUN or -DUNICOS in order for the HDF internal structures to be defined
--- HDF4.2r2/mfhdf/libsrc/netcdf.h.in.orig 2008-02-04 18:38:14.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/netcdf.h.in 2008-02-04 18:39:00.000000000 +0100
@@ -295,7 +295,7 @@
*/
#if defined _CRAYMPP
typedef short nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 || defined __powerpc64__ || defined __s390x__
typedef int nclong;
#else
typedef long nclong; /* default, compatible type */
--- HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h.orig 2008-02-04 18:40:01.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h 2008-02-04 18:40:29.000000000 +0100
@@ -304,7 +304,7 @@
*/
#if defined _CRAYMPP
typedef short nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
typedef int nclong;
#else
typedef long nclong; /* default, compatible type */
--- HDF4.2r2/mfhdf/fortran/config/jackets-linux.c.orig 2008-02-04 18:42:44.000000000 +0100
+++ HDF4.2r2/mfhdf/fortran/config/jackets-linux.c 2008-02-04 18:44:19.000000000 +0100
@@ -34,7 +34,7 @@
struct ncfils { /* This will be a common block from Fortran */
double dd;
-#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 __s390x__
int ll;
#else
long ll;
@@ -65,7 +65,7 @@
struct ncfils { /* This will be a common block from Fortran */
double dd;
-#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 __s390x__
int ll;
#else
long ll;
@@ -430,7 +430,7 @@
}
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
/*
* Convert multi-dimensional array of NCLONGs stored in ints to packed
* array of longs, in malloc'ed space. Returns pointer to longs or NULL
@@ -916,7 +916,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long longs = *(int *)value;
@@ -1030,7 +1030,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itol (value, ncount, ndims);
@@ -1141,7 +1141,7 @@
tmpbasis = nctypelen(NC_LONG);
else
#endif
-#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 __s390x__
if (datatype == NC_LONG)
tmpbasis = sizeof(int);
else
@@ -1198,7 +1198,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1334,7 +1334,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long longs;
@@ -1476,7 +1476,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long iocount = dimprod (ncount, ndims); /* product of dimensions */
@@ -1614,7 +1614,7 @@
tmpbasis = nctypelen(NC_LONG);
else
#endif
-#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 __s390x__
if (datatype == NC_LONG)
tmpbasis = sizeof(int);
else
@@ -1685,7 +1685,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long iocount = dimprod (ncount, ndims); /* product of dimensions */
@@ -1851,7 +1851,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itol (value, attlen, 1);
@@ -2016,7 +2016,7 @@
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
-#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 __s390x__
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
/* EIP We need to use int buffer to read data in on the platforms where long is 8 bytes
--- HDF4.2r2/mfhdf/ncgen/ncgen.l.orig 2008-02-04 18:45:37.000000000 +0100
+++ HDF4.2r2/mfhdf/ncgen/ncgen.l 2008-02-04 18:45:53.000000000 +0100
@@ -134,7 +134,7 @@
yyerror(errstr);
}
-#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 __s390x__
if (dd < INT_MIN || dd > INT_MAX)
#else
#if defined (_CRAYMPP)
--- HDF4.2r2/mfhdf/libsrc/putget.c.orig 2008-02-04 18:53:56.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/putget.c 2008-02-04 18:53:13.000000000 +0100
@@ -594,7 +594,7 @@
case NC_LONG :
#if defined _CRAYMPP
return( xdr_short(xdrs, (nclong *)values) ) ;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
return( xdr_int(xdrs, (nclong *)values) ) ;
#else
return( xdr_long(xdrs, (nclong *)values) ) ;
@@ -1896,7 +1896,7 @@
case NC_LONG :
#if defined _CRAYMPP
xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
xdr_NC_fnct = xdr_int ;
#else
xdr_NC_fnct = xdr_long ;
--- HDF4.2r2/mfhdf/libsrc/array.c.orig 2008-02-04 18:54:30.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/array.c 2008-02-04 18:54:39.000000000 +0100
@@ -622,7 +622,7 @@
case NC_LONG :
#if defined _CRAYMPP
xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
xdr_NC_fnct = xdr_int ;
#else
xdr_NC_fnct = xdr_long ;
--- HDF4.2r2/mfhdf/libsrc/cdf.c.orig 2008-02-04 18:55:23.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/cdf.c 2008-02-04 18:55:38.000000000 +0100
@@ -3664,7 +3664,7 @@
alen /= 4 ;
#if defined _CRAYMPP
xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
xdr_NC_fnct = xdr_int ;
#else
xdr_NC_fnct = xdr_long ;
--- HDF4.2r2/mfhdf/libsrc/xdrposix.c.orig 2008-02-04 18:56:24.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/xdrposix.c 2008-02-04 18:58:43.000000000 +0100
@@ -284,7 +284,7 @@
static bool_t xdrposix_getlong();
static bool_t xdrposix_putlong();
-#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
static bool_t xdrposix_getint();
static bool_t xdrposix_putint();
#endif
@@ -301,7 +301,7 @@
#if (defined __sun && defined _LP64)
static rpc_inline_t * xdrposix_inline();
#else
-#if ((defined __x86_64__ ) && !(defined __sun && defined _LP64)) || defined __powerpc64__
+#if ((defined __x86_64__ ) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__
static int32_t * xdrposix_inline();
#else
#if (defined __alpha )
@@ -332,9 +332,9 @@
xdrposix_getpos, /* get offset in the stream */
xdrposix_setpos, /* set offset in the stream */
xdrposix_inline, /* prime stream for inline macros */
-#if (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__
+#if (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
xdrposix_destroy, /* destroy stream */
-#if !(defined __x86_64__) && !(defined __powerpc64__) || (defined __sun && defined _LP64) /* i.e. we are on SUN/Intel in 64-bit mode */
+#if !(defined __s390x__) && !(defined __x86_64__) && !(defined __powerpc64__) || (defined __sun && defined _LP64) /* i.e. we are on SUN/Intel in 64-bit mode */
NULL, /* no xdr_control function defined */
#endif
/* Solaris 64-bit (arch=v9 and arch=amd64) has 64 bits long and 32 bits int. */
@@ -469,7 +469,7 @@
#endif
{
unsigned char *up = (unsigned char *)lp ;
-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__))
+#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
*lp = 0 ;
up += (sizeof(long) - 4) ;
#endif
@@ -496,7 +496,7 @@
netlong mycopy = htonl(*lp);
up = (unsigned char *)&mycopy;
#endif
-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__))
+#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
up += (sizeof(long) - 4) ;
#endif
@@ -593,7 +593,7 @@
#if (defined __alpha)
static int*
#else
-#if ((defined __x86_64__) && !(defined __sun && defined _LP64)) || defined __powerpc64__
+#if ((defined __x86_64__) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__
static int32_t *
#else
static netlong *
@@ -622,7 +622,7 @@
return (NULL);
}
-#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
static bool_t
xdrposix_getint(xdrs, lp)

View File

@ -1,19 +1,20 @@
--- HDF4.2r1/hdf/src/hdfi.h.orig 2005-01-24 20:36:44.000000000 -0700 diff -Nru HDF4.2r2.orig/hdf/src/hdfi.h HDF4.2r2/hdf/src/hdfi.h
+++ HDF4.2r1/hdf/src/hdfi.h 2006-02-02 21:54:59.347516688 -0700 --- HDF4.2r2.orig/hdf/src/hdfi.h 2007-09-17 18:45:17.000000000 +0300
@@ -72,6 +72,7 @@ +++ HDF4.2r2/hdf/src/hdfi.h 2008-01-06 07:23:42.000000000 +0200
#define DFMT_CRAYMPP 0x1171 @@ -77,6 +77,7 @@
#define DFMT_IA64 0x4441
#define DFMT_LINUX64 0x4441 #define DFMT_LINUX64 0x4441
+#define DFMT_LINUXPPC 0x1111 #define DFMT_POWERPC64 0x1111
#define DFMT_LINUXPPC 0x1111
+#define DFMT_LINUXSPARC 0x1111
/* I/O library constants */ /* I/O library constants */
#define UNIXUNBUFIO 1 #define UNIXUNBUFIO 1
@@ -1326,6 +1327,57 @@ @@ -1444,6 +1445,66 @@
#endif /*Linux 64 */ #endif /*Linux PPC */
+/* Linux PPC */ +/* Linux Sparc32/64 */
+#if defined __PPC__ +#if defined __sparc__ || defined __sparc64__
+ +
+#ifdef GOT_MACHINE +#ifdef GOT_MACHINE
+If you get an error on this line more than one machine type has been defined. +If you get an error on this line more than one machine type has been defined.
@ -33,14 +34,23 @@
+typedef unsigned char uint8; +typedef unsigned char uint8;
+typedef short int int16; +typedef short int int16;
+typedef unsigned short int uint16; +typedef unsigned short int uint16;
+#ifdef _LP64 /* 64-bit environment */
+typedef int int32; +typedef int int32;
+typedef unsigned int uint32; +typedef unsigned int uint32;
+#else /* 32-bit environment */
+typedef long int int32;
+typedef unsigned long int uint32;
+#endif
+typedef int intn; +typedef int intn;
+typedef unsigned int uintn; +typedef unsigned int uintn;
+typedef int intf; /* size of INTEGERs in Fortran compiler */ +typedef int intf; /* size of INTEGERs in Fortran compiler */
+typedef float float32; +typedef float float32;
+typedef double float64; +typedef double float64;
+#ifdef _LP64 /* 64-bit environment */
+typedef long hdf_pint_t; /* an integer the same size as a pointer */ +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 FNAME_POST_UNDERSCORE
+#define _fcdtocp(desc) (desc) +#define _fcdtocp(desc) (desc)
+#ifdef HAVE_FMPOOL +#ifdef HAVE_FMPOOL
@ -61,7 +71,7 @@
+#define INCLUDES_ARE_ANSI +#define INCLUDES_ARE_ANSI
+#endif +#endif
+ +
+#endif /*Linux PPC */ +#endif /* Linux Sparc32/64 */
+ +
/*#ifndef GOT_MACHINE /*#ifndef GOT_MACHINE
No machine type has been defined. Your Makefile needs to have someing like No machine type has been defined. Your Makefile needs to have someing like

1163
hdf-4.2r3-ppc.patch Normal file

File diff suppressed because it is too large Load Diff

136
hdf.spec
View File

@ -1,17 +1,24 @@
Name: hdf Name: hdf
Version: 4.2r1 Version: 4.2r3
Release: 8%{?dist}.1 Release: 3%{?dist}
Summary: A general purpose library and file format for storing scientific data Summary: A general purpose library and file format for storing scientific data
License: BSD-ish License: BSD
Group: System Environment/Libraries Group: System Environment/Libraries
URL: http://hdf.ncsa.uiuc.edu/hdf4.html URL: http://hdf.ncsa.uiuc.edu/hdf4.html
#Source0: ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/HDF%{version}.tar.gz Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/HDF%{version}.tar.gz
Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/4.2r1-hrepack-p4.tar.gz
Patch0: hdf-4.2r1p4-maxavailfiles.patch Patch0: hdf-4.2r1p4-maxavailfiles.patch
Patch1: hdf-4.2r1-ppc.patch Patch1: hdf-4.2r3-ppc.patch
Patch2: hdf-4.2r2-sparc.patch
Patch3: hdf-4.2r2-s390.patch
Patch4: hdf-4.2r2-libm.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: autoconf flex byacc libjpeg-devel zlib-devel BuildRequires: flex byacc libjpeg-devel zlib-devel
%if "%{?dist}" != ".el4"
BuildRequires: gcc-gfortran
%else
BuildRequires: gcc-g77 BuildRequires: gcc-g77
%endif
%description %description
HDF is a general purpose library and file format for storing scientific data. HDF is a general purpose library and file format for storing scientific data.
@ -34,26 +41,61 @@ HDF development headers and libraries.
%prep %prep
#%setup -q -n HDF%{version} %setup -q -n HDF%{version}
%setup -q -n 4.2r1-hrepack-p4
%patch -p1 -b .maxavailfiles %patch -p1 -b .maxavailfiles
%patch1 -p1 -b .orig %patch1 -p1 -b .ppc
%patch2 -p1 -b .sparc
%patch3 -p1 -b .s390
%patch4 -p1 -b .libm
chmod a-x *hdf/*/*.c hdf/*/*.h
# restore include file timestamps modified by patching
touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
touch -c -r ./mfhdf/libsrc/config/netcdf-linux.h.ppc ./mfhdf/libsrc/config/netcdf-linux.h
%build %build
autoconf # avoid upstream compiler flags settings
export CFLAGS="$RPM_OPT_FLAGS -fPIC -DHAVE_NETCDF" rm config/*linux-gnu
%configure --disable-production export CFLAGS="$RPM_OPT_FLAGS -fPIC"
make export FFLAGS="$RPM_OPT_FLAGS -ffixed-line-length-none"
%configure --disable-production --disable-netcdf \
%if "%{?dist}" != ".el4"
F77=gfortran \
%else
F77=g77 \
--includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name}
%endif
make
# correct the timestamps based on files used to generate the header files
touch -c -r ./mfhdf/fortran/config/netcdf-linux.inc mfhdf/fortran/netcdf.inc
touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90
touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90
touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90
# netcdf fortran include need same treatement, but they are not shipped
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
%makeinstall includedir=${RPM_BUILD_ROOT}%{_includedir}/%{name} \ make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
libdir=$RPM_BUILD_ROOT%{_libdir}/%{name}
#Don't conflict with netcdf #Don't conflict with netcdf
rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc* #rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc*
for file in ncdump ncgen; do
mv $RPM_BUILD_ROOT%{_bindir}/$file $RPM_BUILD_ROOT%{_bindir}/h$file
# man pages are the same than netcdf ones
rm $RPM_BUILD_ROOT%{_mandir}/man1/${file}.1
done
# this is done to have the same timestamp on multiarch setups
touch -c -r README $RPM_BUILD_ROOT/%{_includedir}/hdf/h4config.h
# Remove an autoconf conditional from the API that is unused and cause
# the API to be different on x86 and x86_64
pushd $RPM_BUILD_ROOT/%{_includedir}/hdf
grep -v 'H4_SIZEOF_INTP' h4config.h > h4config.h.tmp
touch -c -r h4config.h h4config.h.tmp
mv h4config.h.tmp h4config.h
popd
%check %check
make check make check
@ -76,26 +118,72 @@ rm -rf $RPM_BUILD_ROOT
%changelog %changelog
* Thu May 24 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-8.1 * Wed May 28 2008 Balint Cristian <rezso@rdsor.ro> 4.2r3-3
- require gcc-g77 for fortran on RHEL4
* Sun Mar 2 2008 Patrice Dumas <pertusus@free.fr> 4.2r3-2
- don't ship an empty netcdf.h file. The related definitions are now
in hdf4_netcdf.h
* Tue Feb 5 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r3-1
- Update to 4.2r3
* Tue Feb 5 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r2-7
- Add patch to add -lm to hdiff link
* Tue Feb 5 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r2-6
- Add patch for s390 support (bug #431511)
* Mon Jan 7 2008 Orion Poplawski <orion@cora.nwra.com> 4.2.r2-5
- Add patches for sparc support (bug #427639)
* Mon Oct 29 2007 Patrice Dumas <pertusus@free.fr> 4.2r2-4
- install the netcdf.h file that describes the netcdf2 hdf enabled
API
* Mon Oct 29 2007 Patrice Dumas <pertusus@free.fr> 4.2r2-3
- ship hdf enabled nc* utils as hnc*
- add --disable-netcdf that replaces HAVE_NETCDF
- keep include files timestamps, and have the same accross arches
- fix multiarch difference in include files (#341491)
* Wed Oct 17 2007 Patrice Dumas <pertusus@free.fr> 4.2r2-2
- update to 4.2r2
* Fri Aug 24 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-15
- Update license tag to BSD
- Rebuild for BuildID
* Thu May 10 2007 Balint Cristian <cbalint@redhat.com> 4.2r1-14
- Fix ppc64 too.
* Thu May 10 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-13
- Remove netcdf-devel requires. (bug #239631) - Remove netcdf-devel requires. (bug #239631)
* Fri Apr 20 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-8 * Fri Apr 20 2007 Orion Poplawski <orion@cora.nwra.com> 4.2r1-12
- Use 4.2r1-hrepack-p4.tar.gz for hrepack patch - Use 4.2r1-hrepack-p4.tar.gz for hrepack patch
- Remove configure patch applied upstream - Remove configure patch applied upstream
- Use --disable-production configure flag to avoid stripping -g compile flag - Use --disable-production configure flag to avoid stripping -g compile flag
- Add patch to fix open file test when run under mock - Add patch to fix open file test when run under mock
* Thu Apr 19 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-7 * Tue Aug 29 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-11
- Rebuild for FC6
* Thu Apr 20 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-10
- Add Requires netcdf-devel for hdf-devel (bug #189337) - Add Requires netcdf-devel for hdf-devel (bug #189337)
* Fri Feb 24 2006 Patrice Dumas <pertusus@free.fr> 4.2r1-6.2 * Mon Feb 13 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-9
- use gcc-g77 instead of gcc-gfortran - Rebuild for gcc/glibc changes
- sync with FC-4 spec file instead of devel
* Mon Feb 20 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-6 * Wed Feb 8 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-8
- Compile with -DHAVE_NETCDF for gdl hdf/netcdf compatibility - Compile with -DHAVE_NETCDF for gdl hdf/netcdf compatibility
* Thu Feb 2 2006 Orion Poplawski <orion@cora.nwra.com> 4.2r1-7
- Add patch to build on ppc - Add patch to build on ppc
* Wed Dec 21 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-6
- Rebuild
* Wed Oct 05 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-5 * Wed Oct 05 2005 Orion Poplawski <orion@cora.nwra.com> 4.2r1-5
- Add Requires: libjpeg-devel zlib-devel to -devel package - Add Requires: libjpeg-devel zlib-devel to -devel package

View File

@ -1 +1 @@
47e42192b00814d8f815b7b4f8243b01 4.2r1-hrepack-p4.tar.gz 767382a31470e795f4c4217e33a689e8 HDF4.2r3.tar.gz