!1 package init
From: @yangshaoxing1001 Reviewed-by: @small_leek Signed-off-by: @small_leek
This commit is contained in:
commit
09e34edf13
37
README.md
37
README.md
@ -1,37 +0,0 @@
|
|||||||
# hdf
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
HDF is a general purpose library and file format for storing scientific data.
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee 官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解 Gitee 上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是 Gitee 最有价值开源项目,是综合评定出的优秀开源项目
|
|
||||||
5. Gitee 官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. Gitee 封面人物是一档用来展示 Gitee 会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
330
hdf-4.2.10-aarch64.patch
Normal file
330
hdf-4.2.10-aarch64.patch
Normal file
@ -0,0 +1,330 @@
|
|||||||
|
Index: hdf-4.2.10/hdf/src/hconv.h
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/hdf/src/hconv.h
|
||||||
|
+++ hdf-4.2.10/hdf/src/hconv.h
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
/* CONSTANT DEFINITIONS */
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* 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__) && !defined(__arm__)
|
||||||
|
+#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !defined(__arm__) && !defined(__AARCH64EL__)
|
||||||
|
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
|
||||||
|
# define UI8_OUT DFKnb1b
|
||||||
|
# define SI16_IN DFKnb2b /* S = Signed */
|
||||||
|
Index: hdf-4.2.10/hdf/src/hdfi.h
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/hdf/src/hdfi.h
|
||||||
|
+++ hdf-4.2.10/hdf/src/hdfi.h
|
||||||
|
@@ -79,6 +79,7 @@
|
||||||
|
#define DFMT_LINUXSPARC 0x1111
|
||||||
|
#define DFMT_LINUX390 0x1111
|
||||||
|
#define DFMT_LINUXARM 0x4441
|
||||||
|
+#define DFMT_LINUXAARCH64 0x4441
|
||||||
|
|
||||||
|
/* I/O library constants */
|
||||||
|
#define UNIXUNBUFIO 1
|
||||||
|
@@ -1337,6 +1338,44 @@ typedef long hdf_pint_t;
|
||||||
|
|
||||||
|
#endif /* IA64 */
|
||||||
|
|
||||||
|
+/* Linux AArch64 */
|
||||||
|
+#if defined __aarch64__
|
||||||
|
+
|
||||||
|
+#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_LINUXAARCH64
|
||||||
|
+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;
|
||||||
|
+typedef int int32;
|
||||||
|
+typedef unsigned int uint32;
|
||||||
|
+typedef int intn;
|
||||||
|
+typedef unsigned int uintn;
|
||||||
|
+typedef int intf; /* size of INTEGERs in Fortran compiler */
|
||||||
|
+typedef float float32;
|
||||||
|
+typedef double float64;
|
||||||
|
+typedef long hdf_pint_t; /* an integer the same size as a pointer */
|
||||||
|
+#define FNAME_POST_UNDERSCORE
|
||||||
|
+#define _fcdtocp(desc) (desc)
|
||||||
|
+#ifdef HAVE_FMPOOL
|
||||||
|
+#define FILELIB PAGEBUFIO /* enable page buffering */
|
||||||
|
+#else
|
||||||
|
+#define FILELIB UNIXBUFIO
|
||||||
|
+#endif
|
||||||
|
+#endif /* Linux AArch64 */
|
||||||
|
+
|
||||||
|
#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
|
||||||
|
Index: hdf-4.2.10/mfhdf/fortran/jackets.c.in
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/fortran/jackets.c.in
|
||||||
|
+++ hdf-4.2.10/mfhdf/fortran/jackets.c.in
|
||||||
|
@@ -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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
int ll;
|
||||||
|
#else
|
||||||
|
long ll;
|
||||||
|
@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm
|
||||||
|
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
int ll;
|
||||||
|
#else
|
||||||
|
long ll;
|
||||||
|
@@ -420,7 +420,7 @@ stoig(shorts, ints, dims, basis, ndims)
|
||||||
|
}
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
/*
|
||||||
|
* Convert multi-dimensional array of NCLONGs stored in ints to packed
|
||||||
|
* array of longs, in malloc'ed space. Returns pointer to longs or NULL
|
||||||
|
@@ -908,7 +908,7 @@ nncvpt1(cdfid, varid, indices, value, rc
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long longs = *(int *)value;
|
||||||
|
@@ -1022,7 +1022,7 @@ nncvpt(cdfid, varid, start, count, value
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long *longs = itol (value, ncount, ndims);
|
||||||
|
@@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
if (datatype == NC_LONG)
|
||||||
|
tmpbasis = sizeof(int);
|
||||||
|
else
|
||||||
|
@@ -1190,7 +1190,7 @@ nncvptg(cdfid, varid, start, count, stri
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long *longs = itolg (value, ncount, nbasis, ndims);
|
||||||
|
@@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long longs;
|
||||||
|
@@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long iocount = dimprod (ncount, ndims); /* product of dimensions */
|
||||||
|
@@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
if (datatype == NC_LONG)
|
||||||
|
tmpbasis = sizeof(int);
|
||||||
|
else
|
||||||
|
@@ -1677,7 +1677,7 @@ nncvgtg(cdfid, varid, start, count, stri
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long iocount = dimprod (ncount, ndims); /* product of dimensions */
|
||||||
|
@@ -1843,7 +1843,7 @@ nncapt(cdfid, varid, attname, datatype,
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long *longs = itol (value, attlen, 1);
|
||||||
|
@@ -2008,7 +2008,7 @@ nncagt(cdfid, varid, attname, value, rco
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
#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
|
||||||
|
Index: hdf-4.2.10/mfhdf/libsrc/array.c
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/libsrc/array.c
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/array.c
|
||||||
|
@@ -620,7 +620,7 @@ xdr_NC_array(xdrs, app)
|
||||||
|
xdr_NC_fnct = xdr_shorts ;
|
||||||
|
goto func ;
|
||||||
|
case NC_LONG :
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
xdr_NC_fnct = xdr_int ;
|
||||||
|
#else
|
||||||
|
xdr_NC_fnct = xdr_long ;
|
||||||
|
Index: hdf-4.2.10/mfhdf/libsrc/cdf.c
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/libsrc/cdf.c
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/cdf.c
|
||||||
|
@@ -3662,7 +3662,7 @@ NC_var *vp ;
|
||||||
|
break ;
|
||||||
|
case NC_LONG :
|
||||||
|
alen /= 4 ;
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
xdr_NC_fnct = xdr_int ;
|
||||||
|
#else
|
||||||
|
xdr_NC_fnct = xdr_long ;
|
||||||
|
Index: hdf-4.2.10/mfhdf/libsrc/netcdf.h.in
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/libsrc/netcdf.h.in
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/netcdf.h.in
|
||||||
|
@@ -293,7 +293,7 @@ typedef double ncdouble;
|
||||||
|
/*
|
||||||
|
* 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__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
/*
|
||||||
|
* LP64 (also known as 4/8/8) denotes long and pointer as 64 bit types.
|
||||||
|
* http://www.unix.org/version2/whatsnew/lp64_wp.html
|
||||||
|
Index: hdf-4.2.10/mfhdf/libsrc/putget.c
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/libsrc/putget.c
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/putget.c
|
||||||
|
@@ -664,7 +664,7 @@ Void *values ;
|
||||||
|
case NC_SHORT :
|
||||||
|
return( xdr_NCvshort(xdrs, (unsigned)rem/2, (short *)values) ) ;
|
||||||
|
case NC_LONG :
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
return( xdr_int(xdrs, (nclong *)values) ) ;
|
||||||
|
#else
|
||||||
|
return( xdr_long(xdrs, (nclong *)values) ) ;
|
||||||
|
@@ -1975,7 +1975,7 @@ Void *values ;
|
||||||
|
} /* else */
|
||||||
|
return(TRUE) ;
|
||||||
|
case NC_LONG :
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
xdr_NC_fnct = xdr_int ;
|
||||||
|
#else
|
||||||
|
xdr_NC_fnct = xdr_long ;
|
||||||
|
Index: hdf-4.2.10/mfhdf/libsrc/xdrposix.c
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/libsrc/xdrposix.c
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/xdrposix.c
|
||||||
|
@@ -250,7 +250,7 @@ int nbytes;
|
||||||
|
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
static bool_t xdrposix_getint();
|
||||||
|
static bool_t xdrposix_putint();
|
||||||
|
#endif
|
||||||
|
@@ -264,7 +264,7 @@ static long * xdrposix_inline();
|
||||||
|
#if (defined __sun && defined _LP64)
|
||||||
|
static rpc_inline_t * xdrposix_inline();
|
||||||
|
#else
|
||||||
|
-#if ((defined __x86_64__ ) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if ((defined __x86_64__ ) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
static int32_t * xdrposix_inline();
|
||||||
|
#else
|
||||||
|
#if (defined __alpha )
|
||||||
|
@@ -294,9 +294,9 @@ static struct xdr_ops xdrposix_ops = {
|
||||||
|
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__ || defined __s390x__
|
||||||
|
+#if (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
xdrposix_destroy, /* destroy stream */
|
||||||
|
-#if !(defined __s390x__) && !(defined __x86_64__) && !(defined __powerpc64__) || (defined __sun && defined _LP64) /* i.e. we are on SUN/Intel in 64-bit mode */
|
||||||
|
+#if !(defined __aarch64__) && !(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. */
|
||||||
|
@@ -552,7 +552,7 @@ static rpc_inline_t *
|
||||||
|
#if (defined __alpha)
|
||||||
|
static int*
|
||||||
|
#else
|
||||||
|
-#if ((defined __x86_64__) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if ((defined __x86_64__) && !(defined __sun && defined _LP64)) || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
static int32_t *
|
||||||
|
#else
|
||||||
|
static netlong *
|
||||||
|
@@ -580,7 +580,7 @@ int
|
||||||
|
return (NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
|
||||||
|
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
|
||||||
|
static bool_t
|
||||||
|
xdrposix_getint(xdrs, lp)
|
||||||
|
Index: hdf-4.2.10/mfhdf/ncgen/ncgen.l
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/ncgen/ncgen.l
|
||||||
|
+++ hdf-4.2.10/mfhdf/ncgen/ncgen.l
|
||||||
|
@@ -113,7 +113,7 @@ FloatInf|Infinity|Inf { /* float miss
|
||||||
|
yyerror(errstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || defined __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || defined __s390x__ || defined __aarch64__
|
||||||
|
if (dd < INT_MIN || dd > INT_MAX)
|
||||||
|
#else
|
||||||
|
if (dd < LONG_MIN || dd > LONG_MAX)
|
||||||
|
Index: hdf-4.2.10/mfhdf/ncgen/ncgenyy.c
|
||||||
|
===================================================================
|
||||||
|
--- hdf-4.2.10.orig/mfhdf/ncgen/ncgenyy.c
|
||||||
|
+++ hdf-4.2.10/mfhdf/ncgen/ncgenyy.c
|
||||||
|
@@ -989,7 +989,7 @@ YY_RULE_SETUP
|
||||||
|
yyerror(errstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || __s390x__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || __s390x__ || __aarch64__
|
||||||
|
if (dd < INT_MIN || dd > INT_MAX)
|
||||||
|
#else
|
||||||
|
if (dd < LONG_MIN || dd > LONG_MAX)
|
||||||
BIN
hdf-4.2.14.tar.bz2
Normal file
BIN
hdf-4.2.14.tar.bz2
Normal file
Binary file not shown.
78
hdf-4.2.4-sparc.patch
Normal file
78
hdf-4.2.4-sparc.patch
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
diff -up hdf-4.2.4-snap8/hdf/src/hdfi.h.sparc hdf-4.2.4-snap8/hdf/src/hdfi.h
|
||||||
|
--- hdf-4.2.4-snap8/hdf/src/hdfi.h.sparc 2010-02-01 13:28:25.361387271 -0700
|
||||||
|
+++ hdf-4.2.4-snap8/hdf/src/hdfi.h 2010-02-01 13:31:46.343387138 -0700
|
||||||
|
@@ -77,6 +77,7 @@
|
||||||
|
#define DFMT_LINUX64 0x4441
|
||||||
|
#define DFMT_POWERPC64 0x1111
|
||||||
|
#define DFMT_LINUXPPC 0x1111
|
||||||
|
+#define DFMT_LINUXSPARC 0x1111
|
||||||
|
|
||||||
|
/* I/O library constants */
|
||||||
|
#define UNIXUNBUFIO 1
|
||||||
|
@@ -1392,6 +1393,66 @@ typedef long hdf_pint_t;
|
||||||
|
|
||||||
|
#endif /*Linux PPC */
|
||||||
|
|
||||||
|
+/* Linux Sparc32/64 */
|
||||||
|
+#if defined __sparc__ || defined __sparc64__
|
||||||
|
+
|
||||||
|
+#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_LINUXPPC
|
||||||
|
+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 _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 int intf; /* size of INTEGERs in Fortran compiler */
|
||||||
|
+typedef float float32;
|
||||||
|
+typedef double float64;
|
||||||
|
+#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)
|
||||||
|
+#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 Sparc32/64 */
|
||||||
|
+
|
||||||
|
/*-----------------------------------------------------*/
|
||||||
|
/* 64-bit Free BSD */
|
||||||
|
|
||||||
11
hdf-4.2.5-maxavailfiles.patch
Normal file
11
hdf-4.2.5-maxavailfiles.patch
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- hdf-4.2.5-pre1/mfhdf/libsrc/file.c.maxavailfiles 2010-02-06 10:40:42.000000000 -0700
|
||||||
|
+++ hdf-4.2.5-pre1/mfhdf/libsrc/file.c 2010-02-09 13:53:09.600285597 -0700
|
||||||
|
@@ -51,7 +51,7 @@
|
||||||
|
be in hlimits.h file in the future. EIP 2010-02-01*/
|
||||||
|
|
||||||
|
#define H4_MAX_AVAIL_OPENFILES 20000
|
||||||
|
-#define MAX_AVAIL_OPENFILES (((MAX_SYS_OPENFILES - 3) > H4_MAX_AVAIL_OPENFILES) ? H4_MAX_AVAIL_OPENFILES : (MAX_SYS_OPENFILES - 3))
|
||||||
|
+#define MAX_AVAIL_OPENFILES (((MAX_SYS_OPENFILES - 10) > H4_MAX_AVAIL_OPENFILES) ? H4_MAX_AVAIL_OPENFILES : (MAX_SYS_OPENFILES - 10))
|
||||||
|
|
||||||
|
static int _curr_opened = 0 ; /* the number of files currently opened */
|
||||||
|
/* NOTE: _ncdf might have been the number of files currently opened, yet it
|
||||||
81
hdf-arm.patch
Normal file
81
hdf-arm.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
diff -up hdf-4.2.10/hdf/src/hconv.h.arm hdf-4.2.10/hdf/src/hconv.h
|
||||||
|
--- hdf-4.2.10/hdf/src/hconv.h.arm 2014-02-14 09:28:56.692514796 -0700
|
||||||
|
+++ hdf-4.2.10/hdf/src/hconv.h 2014-02-14 09:30:03.882212944 -0700
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
/* CONSTANT DEFINITIONS */
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* 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(__arm__)
|
||||||
|
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
|
||||||
|
# define UI8_OUT DFKnb1b
|
||||||
|
# define SI16_IN DFKnb2b /* S = Signed */
|
||||||
|
diff -up hdf-4.2.10/hdf/src/hdfi.h.arm hdf-4.2.10/hdf/src/hdfi.h
|
||||||
|
--- hdf-4.2.10/hdf/src/hdfi.h.arm 2014-02-14 09:28:56.685514824 -0700
|
||||||
|
+++ hdf-4.2.10/hdf/src/hdfi.h 2014-02-14 09:28:56.693514792 -0700
|
||||||
|
@@ -78,6 +78,7 @@
|
||||||
|
#define DFMT_LINUXPPC 0x1111
|
||||||
|
#define DFMT_LINUXSPARC 0x1111
|
||||||
|
#define DFMT_LINUX390 0x1111
|
||||||
|
+#define DFMT_LINUXARM 0x4441
|
||||||
|
|
||||||
|
/* I/O library constants */
|
||||||
|
#define UNIXUNBUFIO 1
|
||||||
|
@@ -1187,6 +1188,57 @@ typedef int hdf_pint_t;
|
||||||
|
|
||||||
|
#endif /* Linux s390/s390x */
|
||||||
|
|
||||||
|
+/* Linux ARM */
|
||||||
|
+#if defined __arm__
|
||||||
|
+
|
||||||
|
+#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_LINUXARM
|
||||||
|
+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;
|
||||||
|
+typedef long int int32;
|
||||||
|
+typedef unsigned long int uint32;
|
||||||
|
+typedef int intn;
|
||||||
|
+typedef unsigned int uintn;
|
||||||
|
+typedef int intf; /* size of INTEGERs in Fortran compiler */
|
||||||
|
+typedef float float32;
|
||||||
|
+typedef double float64;
|
||||||
|
+typedef int hdf_pint_t; /* an integer the same size as a pointer */
|
||||||
|
+#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 ARM */
|
||||||
|
+
|
||||||
|
/*-----------------------------------------------------*/
|
||||||
|
/* 64-bit Free BSD */
|
||||||
|
|
||||||
17
hdf-avoid_syntax_error_el6.patch
Normal file
17
hdf-avoid_syntax_error_el6.patch
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
--- configure.orig.ac 2017-06-24 23:00:04.000000000 +0200
|
||||||
|
+++ configure.ac 2017-07-21 22:13:19.695919835 +0200
|
||||||
|
@@ -264,10 +264,10 @@
|
||||||
|
JNIFLAGS="$JNIFLAGS -I$JNI_INCLUDE_DIR"
|
||||||
|
done
|
||||||
|
## Find junit for testing the JNI code
|
||||||
|
- AX_CHECK_CLASSPATH()
|
||||||
|
- CLASSPATH_ENV=$H4_CLASSPATH
|
||||||
|
- AX_CHECK_JUNIT()
|
||||||
|
- AX_CHECK_JAVA_HOME
|
||||||
|
+ ## AX_CHECK_CLASSPATH()
|
||||||
|
+ ## CLASSPATH_ENV=$H4_CLASSPATH
|
||||||
|
+ ## AX_CHECK_JUNIT()
|
||||||
|
+ ## AX_CHECK_JAVA_HOME
|
||||||
|
|
||||||
|
AC_MSG_RESULT([yes])
|
||||||
|
else
|
||||||
70
hdf-destdir.patch
Normal file
70
hdf-destdir.patch
Normal file
@ -0,0 +1,70 @@
|
|||||||
|
diff -up hdf-4.2.11/config/examples.am.destdir hdf-4.2.11/config/examples.am
|
||||||
|
--- hdf-4.2.11/config/examples.am.destdir 2015-02-09 09:43:05.000000000 -0700
|
||||||
|
+++ hdf-4.2.11/config/examples.am 2015-02-13 13:24:09.008230956 -0700
|
||||||
|
@@ -44,7 +44,7 @@ CHECK_CLEANFILES+= *.hdf
|
||||||
|
CLEANFILES=$(EXAMPLE_PROG)
|
||||||
|
|
||||||
|
# How to create EXAMPLEDIR if it doesn't already exist
|
||||||
|
-$(EXAMPLEDIR):
|
||||||
|
+$(DESTDIR)$(EXAMPLEDIR):
|
||||||
|
mkdir -p $@
|
||||||
|
|
||||||
|
# Install and uninstall rules. We install the source files, not the
|
||||||
|
@@ -54,42 +54,42 @@ install-data-local:
|
||||||
|
uninstall-local:
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) uninstall-examples
|
||||||
|
|
||||||
|
-install-examples: $(EXAMPLEDIR)
|
||||||
|
+install-examples: $(DESTDIR)$(EXAMPLEDIR)
|
||||||
|
@for f in X $(INSTALL_FILES); do \
|
||||||
|
if test $$f != X; then \
|
||||||
|
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
|
||||||
|
- chmod a-x $(EXAMPLEDIR)/$$f; \
|
||||||
|
+ (set -x; $(INSTALL) $(srcdir)/$$f $(DESTDIR)$(EXAMPLEDIR)/. || exit 1); \
|
||||||
|
+ chmod a-x $(DESTDIR)$(EXAMPLEDIR)/$$f; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@for f in X $(INSTALL_SCRIPT_FILES); do \
|
||||||
|
if test $$f != X; then \
|
||||||
|
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLEDIR)/. || exit 1); \
|
||||||
|
+ (set -x; $(INSTALL) $(srcdir)/$$f $(DESTDIR)$(EXAMPLEDIR)/. || exit 1); \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@for f in X $(INSTALL_TOP_FILES); do \
|
||||||
|
if test $$f != X; then \
|
||||||
|
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
|
||||||
|
- chmod a-x $(EXAMPLETOPDIR)/$$f; \
|
||||||
|
+ (set -x; $(INSTALL) $(srcdir)/$$f $(DESTDIR)$(EXAMPLETOPDIR)/. || exit 1); \
|
||||||
|
+ chmod a-x $(DESTDIR)$(EXAMPLETOPDIR)/$$f; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
@for f in X $(INSTALL_TOP_SCRIPT_FILES); do \
|
||||||
|
if test $$f != X; then \
|
||||||
|
- (set -x; $(INSTALL) $(srcdir)/$$f $(EXAMPLETOPDIR)/. || exit 1); \
|
||||||
|
+ (set -x; $(INSTALL) $(srcdir)/$$f $(DESTDIR)$(EXAMPLETOPDIR)/. || exit 1); \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-examples:
|
||||||
|
- @if test -n "$(INSTALL_FILES)" -a -d $(EXAMPLEDIR); then \
|
||||||
|
- set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
|
||||||
|
+ @if test -n "$(INSTALL_FILES)" -a -d $(DESTDIR)$(EXAMPLEDIR); then \
|
||||||
|
+ set -x; cd $(DESTDIR)$(EXAMPLEDIR) && $(RM) $(INSTALL_FILES); \
|
||||||
|
fi
|
||||||
|
- @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(EXAMPLEDIR); then \
|
||||||
|
- set -x; cd $(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
|
||||||
|
+ @if test -n "$(INSTALL_SCRIPT_FILES)" -a -d $(DESTDIR)$(EXAMPLEDIR); then \
|
||||||
|
+ set -x; cd $(DESTDIR)$(EXAMPLEDIR) && $(RM) $(INSTALL_SCRIPT_FILES); \
|
||||||
|
fi
|
||||||
|
- @if test -n "$(INSTALL_TOP_FILES)" -a -d $(EXAMPLETOPDIR); then \
|
||||||
|
- set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
|
||||||
|
+ @if test -n "$(INSTALL_TOP_FILES)" -a -d $(DESTDIR)$(EXAMPLETOPDIR); then \
|
||||||
|
+ set -x; cd $$(DESTDIR)(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_FILES); \
|
||||||
|
fi
|
||||||
|
- @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(EXAMPLETOPDIR); then \
|
||||||
|
- set -x; cd $(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
|
||||||
|
+ @if test -n "$(INSTALL_TOP_SCRIPT_FILES)" -a -d $(DESTDIR)$(EXAMPLETOPDIR); then \
|
||||||
|
+ set -x; cd $(DESTDIR)$(EXAMPLETOPDIR) && $(RM) $(INSTALL_TOP_SCRIPT_FILES); \
|
||||||
|
fi
|
||||||
|
|
||||||
|
installcheck-local:
|
||||||
50
hdf-examplesdir.patch
Normal file
50
hdf-examplesdir.patch
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
diff -up a/hdf/examples/Makefile.am b/hdf/examples/Makefile.am
|
||||||
|
--- a/hdf/examples/Makefile.am 2017-01-31 14:41:51.947802481 -0700
|
||||||
|
+++ b/hdf/examples/Makefile.am 2017-01-31 14:42:34.883572782 -0700
|
||||||
|
@@ -46,8 +46,8 @@
|
||||||
|
INSTALL_TOP_FILES = README
|
||||||
|
|
||||||
|
# Where to install example files
|
||||||
|
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/c
|
||||||
|
-EXAMPLETOPDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples
|
||||||
|
+EXAMPLEDIR=$(docdir)/examples/c
|
||||||
|
+EXAMPLETOPDIR=$(docdir)/examples
|
||||||
|
|
||||||
|
# How to build C programs using h4cc
|
||||||
|
$(EXTRA_PROG): $(H4CC)
|
||||||
|
diff -up a/hdf/fortran/examples/Makefile.am b/hdf/fortran/examples/Makefile.am
|
||||||
|
--- a/hdf/fortran/examples/Makefile.am 2017-01-31 14:41:51.949802471 -0700
|
||||||
|
+++ b/hdf/fortran/examples/Makefile.am 2017-01-31 14:43:07.968395906 -0700
|
||||||
|
@@ -41,7 +41,7 @@
|
||||||
|
INSTALL_SCRIPT_FILES = run-fortran-ex.sh
|
||||||
|
|
||||||
|
# Where to install Fortran example files
|
||||||
|
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/fortran
|
||||||
|
+EXAMPLEDIR=$(docdir)/examples/fortran
|
||||||
|
|
||||||
|
# How to build Fortran programs using h4fc
|
||||||
|
$(EXTRA_PROG): $(H4FC)
|
||||||
|
diff -up a/mfhdf/examples/Makefile.am b/mfhdf/examples/Makefile.am
|
||||||
|
--- a/mfhdf/examples/Makefile.am 2017-01-31 14:41:51.950802465 -0700
|
||||||
|
+++ b/mfhdf/examples/Makefile.am 2017-01-31 14:43:23.376314066 -0700
|
||||||
|
@@ -23,7 +23,7 @@
|
||||||
|
SD_get_info.c SD_find_sds_by_name.c SD_set_get_dim_info.c \
|
||||||
|
SD_dimscale_vs_sds.c SD_set_attr.c SD_get_attr.c SD_chunking_example.c
|
||||||
|
|
||||||
|
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/c
|
||||||
|
+EXAMPLEDIR=$(docdir)/examples/c
|
||||||
|
|
||||||
|
# How to build programs using h4cc
|
||||||
|
$(EXTRA_PROG): $(H4CC)
|
||||||
|
diff -up a/mfhdf/fortran/examples/Makefile.am b/mfhdf/fortran/examples/Makefile.am
|
||||||
|
--- a/mfhdf/fortran/examples/Makefile.am 2017-01-31 14:41:51.952802455 -0700
|
||||||
|
+++ b/mfhdf/fortran/examples/Makefile.am 2017-01-31 14:43:40.206224672 -0700
|
||||||
|
@@ -24,7 +24,7 @@
|
||||||
|
SD_set_attr.f SD_get_attr.f SD_compress_sds.f SD_chunking_example.f
|
||||||
|
|
||||||
|
# Where to install example files
|
||||||
|
-EXAMPLEDIR=${DESTDIR}$(exec_prefix)/share/hdf4_examples/fortran
|
||||||
|
+EXAMPLEDIR=$(docdir)/examples/fortran
|
||||||
|
|
||||||
|
# How to build Fortran programs using h4fc
|
||||||
|
$(EXTRA_PROG): $(H4FC)
|
||||||
189
hdf-ppc.patch
Normal file
189
hdf-ppc.patch
Normal file
@ -0,0 +1,189 @@
|
|||||||
|
diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc hdf-4.2.10/hdf/src/hdfi.h
|
||||||
|
--- hdf-4.2.10/hdf/src/hdfi.h.ppc 2014-02-09 19:28:49.000000000 -0700
|
||||||
|
+++ hdf-4.2.10/hdf/src/hdfi.h 2014-02-14 09:14:52.564082472 -0700
|
||||||
|
@@ -75,6 +75,7 @@
|
||||||
|
#define DFMT_IA64 0x4441
|
||||||
|
#define DFMT_LINUX64 0x4441
|
||||||
|
#define DFMT_POWERPC64 0x1111
|
||||||
|
+#define DFMT_LINUXPPC 0x1111
|
||||||
|
|
||||||
|
/* I/O library constants */
|
||||||
|
#define UNIXUNBUFIO 1
|
||||||
|
@@ -1013,6 +1014,57 @@ typedef long hdf_pint_t;
|
||||||
|
|
||||||
|
#endif /*Linux 64 */
|
||||||
|
|
||||||
|
+/* Linux PPC */
|
||||||
|
+#if defined __powerpc__ && !defined __powerpc64__
|
||||||
|
+
|
||||||
|
+#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_LINUXPPC
|
||||||
|
+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;
|
||||||
|
+typedef int int32;
|
||||||
|
+typedef unsigned int uint32;
|
||||||
|
+typedef int intn;
|
||||||
|
+typedef unsigned int uintn;
|
||||||
|
+typedef int intf; /* size of INTEGERs in Fortran compiler */
|
||||||
|
+typedef float float32;
|
||||||
|
+typedef double float64;
|
||||||
|
+typedef long hdf_pint_t; /* an integer the same size as a pointer */
|
||||||
|
+#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 PPC */
|
||||||
|
+
|
||||||
|
/*-----------------------------------------------------*/
|
||||||
|
/* 64-bit Free BSD */
|
||||||
|
|
||||||
|
diff -up hdf-4.2.10/mfhdf/fortran/jackets.c.in.ppc hdf-4.2.10/mfhdf/fortran/jackets.c.in
|
||||||
|
--- hdf-4.2.10/mfhdf/fortran/jackets.c.in.ppc 2014-02-09 19:28:44.000000000 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/fortran/jackets.c.in 2014-02-14 09:18:29.860919811 -0700
|
||||||
|
@@ -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__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
int ll;
|
||||||
|
#else
|
||||||
|
long ll;
|
||||||
|
@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm
|
||||||
|
|
||||||
|
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__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
int ll;
|
||||||
|
#else
|
||||||
|
long ll;
|
||||||
|
@@ -420,7 +420,7 @@ stoig(shorts, ints, dims, basis, ndims)
|
||||||
|
}
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
/*
|
||||||
|
* Convert multi-dimensional array of NCLONGs stored in ints to packed
|
||||||
|
* array of longs, in malloc'ed space. Returns pointer to longs or NULL
|
||||||
|
@@ -908,7 +908,7 @@ nncvpt1(cdfid, varid, indices, value, rc
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long longs = *(int *)value;
|
||||||
|
@@ -1022,7 +1022,7 @@ nncvpt(cdfid, varid, start, count, value
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long *longs = itol (value, ncount, ndims);
|
||||||
|
@@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri
|
||||||
|
tmpbasis = nctypelen(NC_LONG);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
if (datatype == NC_LONG)
|
||||||
|
tmpbasis = sizeof(int);
|
||||||
|
else
|
||||||
|
@@ -1190,7 +1190,7 @@ nncvptg(cdfid, varid, start, count, stri
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long *longs = itolg (value, ncount, nbasis, ndims);
|
||||||
|
@@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long longs;
|
||||||
|
@@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long iocount = dimprod (ncount, ndims); /* product of dimensions */
|
||||||
|
@@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri
|
||||||
|
tmpbasis = nctypelen(NC_LONG);
|
||||||
|
else
|
||||||
|
#endif
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
if (datatype == NC_LONG)
|
||||||
|
tmpbasis = sizeof(int);
|
||||||
|
else
|
||||||
|
@@ -1677,7 +1677,7 @@ nncvgtg(cdfid, varid, start, count, stri
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long iocount = dimprod (ncount, ndims); /* product of dimensions */
|
||||||
|
@@ -1843,7 +1843,7 @@ nncapt(cdfid, varid, attname, datatype,
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#ifdef HDF
|
||||||
|
if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
|
||||||
|
long *longs = itol (value, attlen, 1);
|
||||||
|
@@ -2008,7 +2008,7 @@ nncagt(cdfid, varid, attname, value, rco
|
||||||
|
return;
|
||||||
|
} /* else */
|
||||||
|
#endif /* FORTRAN_HAS_NO_SHORT */
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
|
||||||
|
#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
|
||||||
81
hdf-ppc64le.patch
Normal file
81
hdf-ppc64le.patch
Normal file
@ -0,0 +1,81 @@
|
|||||||
|
diff -up hdf-4.2.10/hdf/src/hconv.h.ppc64le hdf-4.2.10/hdf/src/hconv.h
|
||||||
|
--- hdf-4.2.10/hdf/src/hconv.h.ppc64le 2014-09-03 20:30:36.598974138 -0600
|
||||||
|
+++ hdf-4.2.10/hdf/src/hconv.h 2014-09-03 20:30:36.608974327 -0600
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
/* CONSTANT DEFINITIONS */
|
||||||
|
/*****************************************************************************/
|
||||||
|
/* 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__) && !defined(__arm__) && !defined(__AARCH64EL__)
|
||||||
|
+#if !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !(defined(__ia64) && !(defined(hpux) || defined(__hpux))) && !defined(__x86_64__) && !defined(__arm__) && !defined(__AARCH64EL__) && !defined(__LITTLE_ENDIAN__)
|
||||||
|
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
|
||||||
|
# define UI8_OUT DFKnb1b
|
||||||
|
# define SI16_IN DFKnb2b /* S = Signed */
|
||||||
|
diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc64le hdf-4.2.10/hdf/src/hdfi.h
|
||||||
|
--- hdf-4.2.10/hdf/src/hdfi.h.ppc64le 2014-09-03 20:30:36.599974157 -0600
|
||||||
|
+++ hdf-4.2.10/hdf/src/hdfi.h 2014-02-09 19:28:49.000000000 -0700
|
||||||
|
@@ -75,6 +75,7 @@
|
||||||
|
#define DFMT_IA64 0x4441
|
||||||
|
#define DFMT_LINUX64 0x4441
|
||||||
|
#define DFMT_POWERPC64 0x1111
|
||||||
|
+#define DFMT_POWERPC64LE 0x4441
|
||||||
|
#define DFMT_LINUXPPC 0x1111
|
||||||
|
#define DFMT_LINUXSPARC 0x1111
|
||||||
|
#define DFMT_LINUX390 0x1111
|
||||||
|
@@ -922,18 +923,24 @@ typedef int hdf_pint_t;
|
||||||
|
|
||||||
|
|
||||||
|
/*-----------------------------------------------------*/
|
||||||
|
-/* Power PC 5 64 */
|
||||||
|
#if defined __powerpc64__
|
||||||
|
-
|
||||||
|
+/* powerpc 64 bits */
|
||||||
|
#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
|
||||||
|
|
||||||
|
+#ifdef __LITTLE_ENDIAN__
|
||||||
|
+/* Power PC 8 64 little endian */
|
||||||
|
+#define DF_MT DFMT_POWERPC64LE
|
||||||
|
+#else
|
||||||
|
+/* Power PC 5 64 */
|
||||||
|
+#define DF_MT DFMT_POWERPC64
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
#include <sys/file.h> /* for unbuffered i/o stuff */
|
||||||
|
#include <sys/stat.h>
|
||||||
|
-#define DF_MT DFMT_POWERPC64
|
||||||
|
typedef void VOID;
|
||||||
|
typedef void *VOIDP;
|
||||||
|
typedef char *_fcd;
|
||||||
|
@@ -969,8 +976,9 @@ typedef long hdf_pint_t;
|
||||||
|
#define INCLUDES_ARE_ANSI
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#endif /* powerpc 64 bits */
|
||||||
|
+
|
||||||
|
/*-----------------------------------------------------*/
|
||||||
|
-#endif /*power PC 5 64 */
|
||||||
|
/* Linux 64 */
|
||||||
|
#if defined(__linux__) && defined __x86_64__ && !(defined SUN) /* i.e. 64-bit Linux but not SunOS on Intel */
|
||||||
|
|
||||||
|
--- hdf-4.2.10/mfhdf/libsrc/xdrposix.c.patched
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/xdrposix.c
|
||||||
|
@@ -431,7 +431,7 @@ xdrposix_getlong(xdrs, lp)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
unsigned char *up = (unsigned char *)lp ;
|
||||||
|
-#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
|
||||||
|
+#if (defined AIX5L64 || (defined __powerpc64__ && !defined __LITTLE_ENDIAN__) || defined __s390x__ || (defined __hpux && __LP64__))
|
||||||
|
*lp = 0 ;
|
||||||
|
up += (sizeof(long) - 4) ;
|
||||||
|
#endif
|
||||||
|
@@ -458,7 +458,7 @@ xdrposix_putlong(xdrs, lp)
|
||||||
|
netlong mycopy = htonl(*lp);
|
||||||
|
up = (unsigned char *)&mycopy;
|
||||||
|
#endif
|
||||||
|
-#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
|
||||||
|
+#if (defined AIX5L64 || (defined __powerpc64__ && !defined __LITTLE_ENDIAN__) || defined __s390x__ || (defined __hpux && __LP64__))
|
||||||
|
up += (sizeof(long) - 4) ;
|
||||||
|
#endif
|
||||||
348
hdf-s390.patch
Normal file
348
hdf-s390.patch
Normal file
@ -0,0 +1,348 @@
|
|||||||
|
diff -up hdf-4.2.10/hdf/src/hdfi.h.s390 hdf-4.2.10/hdf/src/hdfi.h
|
||||||
|
--- hdf-4.2.10/hdf/src/hdfi.h.s390 2014-02-14 09:20:40.521202091 -0700
|
||||||
|
+++ hdf-4.2.10/hdf/src/hdfi.h 2014-02-14 09:20:40.525202067 -0700
|
||||||
|
@@ -77,6 +77,7 @@
|
||||||
|
#define DFMT_POWERPC64 0x1111
|
||||||
|
#define DFMT_LINUXPPC 0x1111
|
||||||
|
#define DFMT_LINUXSPARC 0x1111
|
||||||
|
+#define DFMT_LINUX390 0x1111
|
||||||
|
|
||||||
|
/* I/O library constants */
|
||||||
|
#define UNIXUNBUFIO 1
|
||||||
|
@@ -1126,6 +1127,66 @@ typedef int hdf_pint_t;
|
||||||
|
|
||||||
|
#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 */
|
||||||
|
+
|
||||||
|
/*-----------------------------------------------------*/
|
||||||
|
/* 64-bit Free BSD */
|
||||||
|
|
||||||
|
diff -up hdf-4.2.10/mfhdf/fortran/jackets.c.in.s390 hdf-4.2.10/mfhdf/fortran/jackets.c.in
|
||||||
|
--- hdf-4.2.10/mfhdf/fortran/jackets.c.in.s390 2014-02-14 09:20:40.518202109 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/fortran/jackets.c.in 2014-02-14 09:23:08.002375061 -0700
|
||||||
|
@@ -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 comm
|
||||||
|
|
||||||
|
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;
|
||||||
|
@@ -420,7 +420,7 @@ stoig(shorts, ints, dims, basis, ndims)
|
||||||
|
}
|
||||||
|
#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
|
||||||
|
@@ -908,7 +908,7 @@ nncvpt1(cdfid, varid, indices, value, rc
|
||||||
|
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;
|
||||||
|
@@ -1022,7 +1022,7 @@ nncvpt(cdfid, varid, start, count, value
|
||||||
|
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);
|
||||||
|
@@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri
|
||||||
|
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
|
||||||
|
@@ -1190,7 +1190,7 @@ nncvptg(cdfid, varid, start, count, stri
|
||||||
|
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);
|
||||||
|
@@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc
|
||||||
|
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;
|
||||||
|
@@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value
|
||||||
|
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 */
|
||||||
|
@@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri
|
||||||
|
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
|
||||||
|
@@ -1677,7 +1677,7 @@ nncvgtg(cdfid, varid, start, count, stri
|
||||||
|
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 */
|
||||||
|
@@ -1843,7 +1843,7 @@ nncapt(cdfid, varid, attname, datatype,
|
||||||
|
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);
|
||||||
|
@@ -2008,7 +2008,7 @@ nncagt(cdfid, varid, attname, value, rco
|
||||||
|
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
|
||||||
|
diff -up hdf-4.2.10/mfhdf/libsrc/array.c.s390 hdf-4.2.10/mfhdf/libsrc/array.c
|
||||||
|
--- hdf-4.2.10/mfhdf/libsrc/array.c.s390 2014-02-14 09:20:50.693141452 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/array.c 2014-02-14 09:26:40.897231851 -0700
|
||||||
|
@@ -620,7 +620,7 @@ xdr_NC_array(xdrs, app)
|
||||||
|
xdr_NC_fnct = xdr_shorts ;
|
||||||
|
goto func ;
|
||||||
|
case NC_LONG :
|
||||||
|
-#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__
|
||||||
|
xdr_NC_fnct = xdr_int ;
|
||||||
|
#else
|
||||||
|
xdr_NC_fnct = xdr_long ;
|
||||||
|
diff -up hdf-4.2.10/mfhdf/libsrc/cdf.c.s390 hdf-4.2.10/mfhdf/libsrc/cdf.c
|
||||||
|
--- hdf-4.2.10/mfhdf/libsrc/cdf.c.s390 2014-02-14 09:20:50.694141447 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/cdf.c 2014-02-14 09:27:33.826948531 -0700
|
||||||
|
@@ -3662,7 +3662,7 @@ NC_var *vp ;
|
||||||
|
break ;
|
||||||
|
case NC_LONG :
|
||||||
|
alen /= 4 ;
|
||||||
|
-#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__
|
||||||
|
xdr_NC_fnct = xdr_int ;
|
||||||
|
#else
|
||||||
|
xdr_NC_fnct = xdr_long ;
|
||||||
|
diff -up hdf-4.2.10/mfhdf/libsrc/netcdf.h.in.s390 hdf-4.2.10/mfhdf/libsrc/netcdf.h.in
|
||||||
|
--- hdf-4.2.10/mfhdf/libsrc/netcdf.h.in.s390 2014-02-14 09:20:51.260138101 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/netcdf.h.in 2014-02-14 09:27:06.286095942 -0700
|
||||||
|
@@ -293,7 +293,7 @@ typedef double ncdouble;
|
||||||
|
/*
|
||||||
|
* 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 __s390x__
|
||||||
|
/*
|
||||||
|
* LP64 (also known as 4/8/8) denotes long and pointer as 64 bit types.
|
||||||
|
* http://www.unix.org/version2/whatsnew/lp64_wp.html
|
||||||
|
diff -up hdf-4.2.10/mfhdf/libsrc/putget.c.s390 hdf-4.2.10/mfhdf/libsrc/putget.c
|
||||||
|
--- hdf-4.2.10/mfhdf/libsrc/putget.c.s390 2014-02-14 09:20:51.261138095 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/putget.c 2014-02-14 09:24:03.676074745 -0700
|
||||||
|
@@ -664,7 +664,7 @@ Void *values ;
|
||||||
|
case NC_SHORT :
|
||||||
|
return( xdr_NCvshort(xdrs, (unsigned)rem/2, (short *)values) ) ;
|
||||||
|
case NC_LONG :
|
||||||
|
-#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__
|
||||||
|
return( xdr_int(xdrs, (nclong *)values) ) ;
|
||||||
|
#else
|
||||||
|
return( xdr_long(xdrs, (nclong *)values) ) ;
|
||||||
|
@@ -1975,7 +1975,7 @@ Void *values ;
|
||||||
|
} /* else */
|
||||||
|
return(TRUE) ;
|
||||||
|
case NC_LONG :
|
||||||
|
-#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__
|
||||||
|
xdr_NC_fnct = xdr_int ;
|
||||||
|
#else
|
||||||
|
xdr_NC_fnct = xdr_long ;
|
||||||
|
diff -up hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.10/mfhdf/libsrc/xdrposix.c
|
||||||
|
--- hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 2014-02-09 19:28:45.000000000 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/libsrc/xdrposix.c 2014-02-14 09:26:17.898354986 -0700
|
||||||
|
@@ -250,7 +250,7 @@ int nbytes;
|
||||||
|
|
||||||
|
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
|
||||||
|
@@ -264,7 +264,7 @@ static long * xdrposix_inline();
|
||||||
|
#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 )
|
||||||
|
@@ -294,9 +294,9 @@ static struct xdr_ops xdrposix_ops = {
|
||||||
|
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. */
|
||||||
|
@@ -431,7 +431,7 @@ xdrposix_getlong(xdrs, lp)
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
unsigned char *up = (unsigned char *)lp ;
|
||||||
|
-#if (defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__))
|
||||||
|
+#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
|
||||||
|
*lp = 0 ;
|
||||||
|
up += (sizeof(long) - 4) ;
|
||||||
|
#endif
|
||||||
|
@@ -458,7 +458,7 @@ xdrposix_putlong(xdrs, lp)
|
||||||
|
netlong mycopy = htonl(*lp);
|
||||||
|
up = (unsigned char *)&mycopy;
|
||||||
|
#endif
|
||||||
|
-#if (defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__))
|
||||||
|
+#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
|
||||||
|
up += (sizeof(long) - 4) ;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -552,7 +552,7 @@ static rpc_inline_t *
|
||||||
|
#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 *
|
||||||
|
@@ -580,7 +580,7 @@ int
|
||||||
|
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)
|
||||||
|
diff -up hdf-4.2.10/mfhdf/ncgen/ncgen.l.s390 hdf-4.2.10/mfhdf/ncgen/ncgen.l
|
||||||
|
--- hdf-4.2.10/mfhdf/ncgen/ncgen.l.s390 2014-02-14 09:20:51.262138089 -0700
|
||||||
|
+++ hdf-4.2.10/mfhdf/ncgen/ncgen.l 2014-02-14 09:27:53.015845830 -0700
|
||||||
|
@@ -113,7 +113,7 @@ FloatInf|Infinity|Inf { /* float miss
|
||||||
|
yyerror(errstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || defined __s390x__
|
||||||
|
if (dd < INT_MIN || dd > INT_MAX)
|
||||||
|
#else
|
||||||
|
if (dd < LONG_MIN || dd > LONG_MAX)
|
||||||
|
diff -up hdf-4.2.10/mfhdf/ncgen/ncgenyy.c.s390 hdf-4.2.10/mfhdf/ncgen/ncgenyy.c
|
||||||
|
--- hdf-4.2.10/mfhdf/ncgen/ncgenyy.c.s390 2014-05-22 08:33:21.700132543 -0400
|
||||||
|
+++ hdf-4.2.10/mfhdf/ncgen/ncgenyy.c 2014-05-22 08:33:50.990132543 -0400
|
||||||
|
@@ -989,7 +989,7 @@ YY_RULE_SETUP
|
||||||
|
yyerror(errstr);
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__
|
||||||
|
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || __s390x__
|
||||||
|
if (dd < INT_MIN || dd > INT_MAX)
|
||||||
|
#else
|
||||||
|
if (dd < LONG_MIN || dd > LONG_MAX)
|
||||||
138
hdf.spec
Normal file
138
hdf.spec
Normal file
@ -0,0 +1,138 @@
|
|||||||
|
Name: hdf
|
||||||
|
Version: 4.2.14
|
||||||
|
Release: 1
|
||||||
|
Summary: A general purpose library and file format for storing scientific data
|
||||||
|
License: IJG
|
||||||
|
URL: https://portal.hdfgroup.org/
|
||||||
|
Source0: https://support.hdfgroup.org/ftp/HDF/releases/HDF%{version}/src/%{name}-%{version}.tar.bz2
|
||||||
|
Patch0: hdf-4.2.5-maxavailfiles.patch
|
||||||
|
Patch1: hdf-ppc.patch
|
||||||
|
Patch2: hdf-4.2.4-sparc.patch
|
||||||
|
Patch3: hdf-s390.patch
|
||||||
|
Patch4: hdf-arm.patch
|
||||||
|
# Support DESTDIR in install-examples
|
||||||
|
Patch5: hdf-destdir.patch
|
||||||
|
# Install examples into the right location
|
||||||
|
Patch6: hdf-examplesdir.patch
|
||||||
|
# Add AArch64 definitions
|
||||||
|
Patch8: hdf-4.2.10-aarch64.patch
|
||||||
|
# ppc64le support
|
||||||
|
# https://bugzilla.redhat.com/show_bug.cgi?id=1134385
|
||||||
|
Patch9: hdf-ppc64le.patch
|
||||||
|
|
||||||
|
# Fix syntax error on epel6 builds
|
||||||
|
# Use only if java is disabled
|
||||||
|
# Patch10: hdf-avoid_syntax_error_el6.patch
|
||||||
|
|
||||||
|
# For destdir/examplesdir patches
|
||||||
|
BuildRequires: automake, libtool, gcc, gcc-c++
|
||||||
|
BuildRequires: flex byacc libjpeg-devel zlib-devel %{!?el6:libaec-devel}
|
||||||
|
BuildRequires: libtirpc-devel
|
||||||
|
BuildRequires: gcc-gfortran, gcc
|
||||||
|
|
||||||
|
%description
|
||||||
|
HDF is a general purpose library and file format for storing scientific data.
|
||||||
|
HDF can store two primary objects: datasets and groups. A dataset is
|
||||||
|
essentially a multidimensional array of data elements, and a group is a
|
||||||
|
structure for organizing objects in an HDF file. Using these two basic
|
||||||
|
objects, one can create and store almost any kind of scientific data
|
||||||
|
structure, such as images, arrays of vectors, and structured and unstructured
|
||||||
|
grids. You can also mix and match them in HDF files according to your needs.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: HDF development files
|
||||||
|
Provides: %{name}-static = %{version}-%{release}
|
||||||
|
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||||
|
Requires: libjpeg-devel%{?_isa}
|
||||||
|
Requires: libtirpc-devel%{?_isa}
|
||||||
|
Requires: zlib-devel%{?_isa}
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
HDF development headers and libraries.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -q
|
||||||
|
|
||||||
|
%patch0 -p1 -b .maxavailfiles
|
||||||
|
%patch1 -p1 -b .ppc
|
||||||
|
%patch2 -p1 -b .sparc
|
||||||
|
%patch3 -p1 -b .s390
|
||||||
|
%patch4 -p1 -b .arm
|
||||||
|
%patch5 -p1 -b .destdir
|
||||||
|
%patch6 -p1 -b .examplesdir
|
||||||
|
%patch8 -p1 -b .aarch64
|
||||||
|
%patch9 -p1 -b .ppc64le
|
||||||
|
|
||||||
|
find . -type f -name "*.h" -exec chmod 0644 '{}' \;
|
||||||
|
find . -type f -name "*.c" -exec chmod 0644 '{}' \;
|
||||||
|
|
||||||
|
# restore include file timestamps modified by patching
|
||||||
|
touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
# For destdir/examplesdir patches
|
||||||
|
autoreconf -vif
|
||||||
|
# avoid upstream compiler flags settings
|
||||||
|
rm config/*linux-gnu
|
||||||
|
# TODO: upstream fix
|
||||||
|
# Shared libraries disabled: libmfhdf.so is not correctly compiled
|
||||||
|
# for missing link to libdf.so
|
||||||
|
export CFLAGS="%{optflags} -fPIC -I%{_includedir}/tirpc"
|
||||||
|
export LIBS="-ltirpc"
|
||||||
|
export FFLAGS="%{optflags} -fPIC -ffixed-line-length-none"
|
||||||
|
%configure --disable-production --disable-java --disable-netcdf \
|
||||||
|
--enable-shared=no --enable-static=yes --enable-fortran %{!?el6:--with-szlib} \
|
||||||
|
--includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name}
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
# correct the timestamps based on files used to generate the header files
|
||||||
|
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
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
install -pm 644 MANIFEST README.txt release_notes/*.txt %{buildroot}%{_pkgdocdir}/
|
||||||
|
|
||||||
|
rm -f %{buildroot}%{_libdir}/%{name}/*.la
|
||||||
|
rm -f %{buildroot}%{_libdir}/*.la
|
||||||
|
|
||||||
|
#Don't conflict with netcdf
|
||||||
|
for file in ncdump ncgen; do
|
||||||
|
mv %{buildroot}%{_bindir}/$file %{buildroot}%{_bindir}/h$file
|
||||||
|
# man pages are the same than netcdf ones
|
||||||
|
rm %{buildroot}%{_mandir}/man1/${file}.1
|
||||||
|
done
|
||||||
|
|
||||||
|
# this is done to have the same timestamp on multiarch setups
|
||||||
|
touch -c -r README.txt %{buildroot}%{_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 %{buildroot}%{_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
|
||||||
|
make -j1 check
|
||||||
|
|
||||||
|
%files
|
||||||
|
%license COPYING
|
||||||
|
%{_pkgdocdir}/
|
||||||
|
%exclude %{_pkgdocdir}/examples
|
||||||
|
%{_bindir}/*
|
||||||
|
%{_mandir}/man1/*.gz
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{_includedir}/%{name}/
|
||||||
|
%{_libdir}/%{name}/
|
||||||
|
%{_pkgdocdir}/examples/
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Web Feb 03 2021 yangshaoxing <yangshaoxing@uniontech> - 4.2.14-1
|
||||||
|
- Package init
|
||||||
Loading…
x
Reference in New Issue
Block a user