diff --git a/h4comp b/h4comp new file mode 100644 index 0000000000000000000000000000000000000000..aeb861bf5de5c6accd98eda46f1e4a6d67b94714 --- /dev/null +++ b/h4comp @@ -0,0 +1,6 @@ +#!/bin/bash + +BITS=32 +[ -d /usr/lib64 ] && BITS=64 + +exec $0-${BITS} "$@" diff --git a/hdf-4.2.14.tar.bz2 b/hdf-4.2.15.tar.bz2 similarity index 33% rename from hdf-4.2.14.tar.bz2 rename to hdf-4.2.15.tar.bz2 index 5c8a68922f4b0f4cc05267eb5b695f46dcacd251..457e217a35028216508252ca75849963fc6cd879 100644 Binary files a/hdf-4.2.14.tar.bz2 and b/hdf-4.2.15.tar.bz2 differ diff --git a/hdf-4.2.10-aarch64.patch b/hdf-aarch64.patch similarity index 51% rename from hdf-4.2.10-aarch64.patch rename to hdf-aarch64.patch index a2699c3a1cc6e5a4dae6bae85b8a176fe9f0ce40..1865e72b3a9d08f485958f2d1d738072c0aecf85 100644 --- a/hdf-4.2.10-aarch64.patch +++ b/hdf-aarch64.patch @@ -1,7 +1,6 @@ -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 +diff -up hdf-4.2.15/hdf/src/hconv.h.aarch64 hdf-4.2.15/hdf/src/hconv.h +--- hdf-4.2.15/hdf/src/hconv.h.aarch64 2020-04-30 21:16:25.325499508 -0600 ++++ hdf-4.2.15/hdf/src/hconv.h 2020-04-30 21:16:25.338499580 -0600 @@ -59,7 +59,7 @@ /* CONSTANT DEFINITIONS */ /*****************************************************************************/ @@ -11,10 +10,9 @@ Index: hdf-4.2.10/hdf/src/hconv.h # 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 +diff -up hdf-4.2.15/hdf/src/hdfi.h.aarch64 hdf-4.2.15/hdf/src/hdfi.h +--- hdf-4.2.15/hdf/src/hdfi.h.aarch64 2020-04-30 21:16:25.326499514 -0600 ++++ hdf-4.2.15/hdf/src/hdfi.h 2020-04-30 21:16:25.340499591 -0600 @@ -79,6 +79,7 @@ #define DFMT_LINUXSPARC 0x1111 #define DFMT_LINUX390 0x1111 @@ -23,7 +21,7 @@ Index: hdf-4.2.10/hdf/src/hdfi.h /* I/O library constants */ #define UNIXUNBUFIO 1 -@@ -1337,6 +1338,44 @@ typedef long hdf_pint_t; +@@ -1341,6 +1342,44 @@ typedef long hdf_pint_t; #endif /* IA64 */ @@ -68,22 +66,21 @@ Index: hdf-4.2.10/hdf/src/hdfi.h #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 +diff -up hdf-4.2.15/mfhdf/fortran/jackets.c.in.aarch64 hdf-4.2.15/mfhdf/fortran/jackets.c.in +--- hdf-4.2.15/mfhdf/fortran/jackets.c.in.aarch64 2020-04-30 21:16:25.318499470 -0600 ++++ hdf-4.2.15/mfhdf/fortran/jackets.c.in 2020-04-30 21:20:28.346831868 -0600 @@ -34,7 +34,7 @@ - struct ncfils { /* This will be a common block from Fortran */ + 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 +@@ -65,7 +65,7 @@ struct ncfils { /* This will - struct ncfils { /* This will be a common block from Fortran */ + 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__ @@ -100,127 +97,102 @@ Index: hdf-4.2.10/mfhdf/fortran/jackets.c.in * 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__ + 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; + 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__ + 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); + long *longs = itol (value, ncount, ndims); @@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri - tmpbasis = nctypelen(NC_LONG); + 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 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); + 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__ + 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); + long *longs = itolg (value, ncount, nbasis, ndims); @@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc - return; - } /* else */ - #endif /* FORTRAN_HAS_NO_SHORT */ + 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; + long longs; @@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value - return; - } /* else */ - #endif /* FORTRAN_HAS_NO_SHORT */ + 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 */ + long iocount = dimprod (ncount, ndims); /* product of dimensions */ @@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri - tmpbasis = nctypelen(NC_LONG); + 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 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); + 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__ + 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 */ + 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__ + 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); + 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__ + 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 +diff -up hdf-4.2.15/mfhdf/libsrc/array.c.aarch64 hdf-4.2.15/mfhdf/libsrc/array.c +diff -up hdf-4.2.15/mfhdf/libsrc/cdf.c.aarch64 hdf-4.2.15/mfhdf/libsrc/cdf.c +diff -up hdf-4.2.15/mfhdf/libsrc/netcdf.h.in.aarch64 hdf-4.2.15/mfhdf/libsrc/netcdf.h.in +--- hdf-4.2.15/mfhdf/libsrc/netcdf.h.in.aarch64 2020-04-30 21:16:25.347499629 -0600 ++++ hdf-4.2.15/mfhdf/libsrc/netcdf.h.in 2020-04-30 21:24:11.366838259 -0600 @@ -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__ @@ -228,33 +200,22 @@ Index: hdf-4.2.10/mfhdf/libsrc/netcdf.h.in /* * 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 ; +diff -up hdf-4.2.15/mfhdf/libsrc/putget.c.aarch64 hdf-4.2.15/mfhdf/libsrc/putget.c +--- hdf-4.2.15/mfhdf/libsrc/putget.c.aarch64 2020-04-30 21:16:25.349499640 -0600 ++++ hdf-4.2.15/mfhdf/libsrc/putget.c 2020-04-30 21:21:11.344052951 -0600 +@@ -665,7 +665,7 @@ Void *values ; + case NC_SHORT : + return( xdr_NCvshort(xdrs, (unsigned)rem/2, (short *)values) ) ; + case NC_LONG : +-#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__ + return( xdr_int(xdrs, (nclong *)values) ) ; #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; + return( xdr_long(xdrs, (nclong *)values) ) ; +diff -up hdf-4.2.15/mfhdf/libsrc/xdrposix.c.aarch64 hdf-4.2.15/mfhdf/libsrc/xdrposix.c +--- hdf-4.2.15/mfhdf/libsrc/xdrposix.c.aarch64 2020-04-30 21:16:25.321499486 -0600 ++++ hdf-4.2.15/mfhdf/libsrc/xdrposix.c 2020-04-30 21:23:48.397752506 -0600 +@@ -262,7 +262,7 @@ int nbytes; static bool_t xdrposix_getlong(); static bool_t xdrposix_putlong(); @@ -263,7 +224,7 @@ Index: hdf-4.2.10/mfhdf/libsrc/xdrposix.c static bool_t xdrposix_getint(); static bool_t xdrposix_putint(); #endif -@@ -264,7 +264,7 @@ static long * xdrposix_inline(); +@@ -276,7 +276,7 @@ static long * xdrposix_inline(); #if (defined __sun && defined _LP64) static rpc_inline_t * xdrposix_inline(); #else @@ -271,29 +232,29 @@ Index: hdf-4.2.10/mfhdf/libsrc/xdrposix.c +#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 = { + static netlong * xdrposix_inline(); +@@ -302,9 +302,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 */ +-#if !(defined __x86_64__) && !(defined __powerpc64__) && !(defined __s390x__) || (defined __sun && defined _LP64) /* i.e. we are on SUN/Intel in 64-bit mode */ ++#if !(defined __x86_64__) && !(defined __powerpc64__) && !(defined __s390x__) && !(defined __aarch64__) || (defined __sun && defined _LP64) /* i.e. we are on SUN/Intel in 64-bit mode */ NULL, /* no xdr_control function defined */ - #endif + #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* +@@ -560,7 +560,7 @@ static long * + #if (defined __sun && defined _LP64) + static rpc_inline_t * #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 * + static int32_t * #else - static netlong * -@@ -580,7 +580,7 @@ int + static netlong * +@@ -581,7 +581,7 @@ xdrposix_inline(xdrs, len) return (NULL); } @@ -302,29 +263,27 @@ Index: hdf-4.2.10/mfhdf/libsrc/xdrposix.c 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); - } +diff -up hdf-4.2.15/mfhdf/ncgen/ncgen.l.aarch64 hdf-4.2.15/mfhdf/ncgen/ncgen.l +--- hdf-4.2.15/mfhdf/ncgen/ncgen.l.aarch64 2020-04-30 21:16:25.376499789 -0600 ++++ hdf-4.2.15/mfhdf/ncgen/ncgen.l 2020-04-30 21:17:29.876854089 -0600 +@@ -113,7 +113,7 @@ FloatInf|Infinity|Inf { /* float m + 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) + 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 (dd < LONG_MIN || dd > LONG_MAX) +diff -up hdf-4.2.15/mfhdf/ncgen/ncgenyy.c.aarch64 hdf-4.2.15/mfhdf/ncgen/ncgenyy.c +--- hdf-4.2.15/mfhdf/ncgen/ncgenyy.c.aarch64 2020-04-30 21:16:25.382499822 -0600 ++++ hdf-4.2.15/mfhdf/ncgen/ncgenyy.c 2020-04-30 21:18:12.880090311 -0600 +@@ -991,7 +991,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) ++#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __powerpc64__ || __s390x__ || defined __aarch64__ + if (dd < INT_MIN || dd > INT_MAX) #else - if (dd < LONG_MIN || dd > LONG_MAX) + if (dd < LONG_MIN || dd > LONG_MAX) diff --git a/hdf-avoid_syntax_error_el6.patch b/hdf-avoid_syntax_error_el6.patch deleted file mode 100644 index 772af9c4d8c655db0db4c45e9bd19e77572b7778..0000000000000000000000000000000000000000 --- a/hdf-avoid_syntax_error_el6.patch +++ /dev/null @@ -1,17 +0,0 @@ ---- 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 diff --git a/hdf-build.patch b/hdf-build.patch new file mode 100644 index 0000000000000000000000000000000000000000..099dd83225f8773e90c727bee30149f7004d962d --- /dev/null +++ b/hdf-build.patch @@ -0,0 +1,67 @@ +diff -up hdf-4.2.15/java/examples/Makefile.am.build hdf-4.2.15/java/examples/Makefile.am +--- hdf-4.2.15/java/examples/Makefile.am.build 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/java/examples/Makefile.am 2020-04-30 21:34:13.856216928 -0600 +@@ -12,8 +12,8 @@ classes: + test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) + + pkgpath = examples +-hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar +-jarfile = jar$(PACKAGE_TARNAME)examples.jar ++hdfjarfile = $(PACKAGE_TARNAME).jar ++jarfile = $(PACKAGE_TARNAME)examples.jar + + CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/slf4j-api-1.7.25.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.25.jar:$$CLASSPATH + AM_JAVACFLAGS = $(H4_JAVACFLAGS) -deprecation +diff -up hdf-4.2.15/java/src/jni/Makefile.am.build hdf-4.2.15/java/src/jni/Makefile.am +--- hdf-4.2.15/java/src/jni/Makefile.am.build 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/java/src/jni/Makefile.am 2020-04-30 21:34:13.857216934 -0600 +@@ -16,7 +16,10 @@ AM_CPPFLAGS=-I$(top_srcdir)/hdf/src + $(JNIFLAGS) $(XDRINC) + + # This is our main target +-lib_LTLIBRARIES=libhdf_java.la ++pkglib_LTLIBRARIES=libhdf_java.la ++ ++# No soname for JNI library ++libhdf_java_la_LDFLAGS = -avoid-version + + # Source files for the library + libhdf_java_la_SOURCES=hdfanImp.c hdfdfpalImp.c \ +diff -up hdf-4.2.15/java/src/Makefile.am.build hdf-4.2.15/java/src/Makefile.am +--- hdf-4.2.15/java/src/Makefile.am.build 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/java/src/Makefile.am 2020-04-30 21:34:13.857216934 -0600 +@@ -13,8 +13,8 @@ JAVAROOT = .classes + classes: + test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) + +-jarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar +-hdf_javadir = $(libdir) ++jarfile = $(PACKAGE_TARNAME).jar ++hdf_javadir = $(prefix)/lib/java + + pkgpath = hdf/hdflib + CLASSPATH_ENV=CLASSPATH=.:$(top_srcdir)/java/lib/slf4j-api-1.7.25.jar:$$CLASSPATH +diff -up hdf-4.2.15/java/test/junit.sh.in.build hdf-4.2.15/java/test/junit.sh.in +--- hdf-4.2.15/java/test/junit.sh.in.build 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/java/test/junit.sh.in 2020-04-30 21:34:13.858216939 -0600 +@@ -40,7 +40,7 @@ HDFLIB_HOME="$top_srcdir/java/lib" + BLDLIBDIR="$top_builddir/hdf4/lib" + BLDDIR="." + HDFTEST_HOME="$top_srcdir/java/test" +-JARFILE=jar@PACKAGE_TARNAME@-@PACKAGE_VERSION@.jar ++JARFILE=@PACKAGE_TARNAME@.jar + TESTJARFILE=jar@PACKAGE_TARNAME@test.jar + test -d $BLDLIBDIR || mkdir -p $BLDLIBDIR + +diff -up hdf-4.2.15/java/test/Makefile.am.build hdf-4.2.15/java/test/Makefile.am +--- hdf-4.2.15/java/test/Makefile.am.build 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/java/test/Makefile.am 2020-04-30 21:41:47.966938811 -0600 +@@ -12,7 +12,7 @@ classes: + test -d $(@D)/$(JAVAROOT) || $(MKDIR_P) $(@D)/$(JAVAROOT) + + pkgpath = test +-hdfjarfile = jar$(PACKAGE_TARNAME)-$(PACKAGE_VERSION).jar ++hdfjarfile = $(PACKAGE_TARNAME).jar + CLASSPATH_ENV=CLASSPATH=.:$(JAVAROOT):$(top_builddir)/java/src/$(hdfjarfile):$(top_srcdir)/java/lib/junit.jar:$(top_srcdir)/java/lib/hamcrest-core.jar:$(top_srcdir)/java/lib/slf4j-api-1.7.25.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.25.jar:$$CLASSPATH + + jarfile = jar$(PACKAGE_TARNAME)test.jar diff --git a/hdf-ppc.patch b/hdf-ppc.patch index 87360fe68a5141606b7827de58c0d420afda3adb..039f876ff0adc8d312bae4c1baf6d6f384660169 100644 --- a/hdf-ppc.patch +++ b/hdf-ppc.patch @@ -1,6 +1,6 @@ -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 +diff -up hdf-4.2.15/hdf/src/hdfi.h.ppc hdf-4.2.15/hdf/src/hdfi.h +--- hdf-4.2.15/hdf/src/hdfi.h.ppc 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/hdf/src/hdfi.h 2020-04-30 21:04:01.529561298 -0600 @@ -75,6 +75,7 @@ #define DFMT_IA64 0x4441 #define DFMT_LINUX64 0x4441 @@ -9,7 +9,7 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc hdf-4.2.10/hdf/src/hdfi.h /* I/O library constants */ #define UNIXUNBUFIO 1 -@@ -1013,6 +1014,57 @@ typedef long hdf_pint_t; +@@ -1017,6 +1018,57 @@ typedef long hdf_pint_t; #endif /*Linux 64 */ @@ -67,21 +67,21 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc hdf-4.2.10/hdf/src/hdfi.h /*-----------------------------------------------------*/ /* 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 +diff -up hdf-4.2.15/mfhdf/fortran/jackets.c.in.ppc hdf-4.2.15/mfhdf/fortran/jackets.c.in +--- hdf-4.2.15/mfhdf/fortran/jackets.c.in.ppc 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/mfhdf/fortran/jackets.c.in 2020-04-30 21:06:39.500403641 -0600 @@ -34,7 +34,7 @@ - struct ncfils { /* This will be a common block from Fortran */ + 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 +@@ -65,7 +65,7 @@ struct ncfils { /* This will - struct ncfils { /* This will be a common block from Fortran */ + 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__ @@ -98,92 +98,92 @@ diff -up hdf-4.2.10/mfhdf/fortran/jackets.c.in.ppc hdf-4.2.10/mfhdf/fortran/jack * 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__ + 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; + 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__ + 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); + long *longs = itol (value, ncount, ndims); @@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri - tmpbasis = nctypelen(NC_LONG); + 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 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); + 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__ + 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); + long *longs = itolg (value, ncount, nbasis, ndims); @@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc - return; - } /* else */ - #endif /* FORTRAN_HAS_NO_SHORT */ + 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; + long longs; @@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value - return; - } /* else */ - #endif /* FORTRAN_HAS_NO_SHORT */ + 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 */ + long iocount = dimprod (ncount, ndims); /* product of dimensions */ @@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri - tmpbasis = nctypelen(NC_LONG); + 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 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); + 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__ + 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 */ + 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__ + 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); + 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__ + 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 diff --git a/hdf-ppc64le.patch b/hdf-ppc64le.patch index bf71a8b5337f6c5b2d76880d3a83374fda033e6b..e199a55824b71084133d59272290cdf3f157b0bc 100644 --- a/hdf-ppc64le.patch +++ b/hdf-ppc64le.patch @@ -1,6 +1,6 @@ -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 +diff -up hdf-4.2.15/hdf/src/hconv.h.ppc64le hdf-4.2.15/hdf/src/hconv.h +--- hdf-4.2.15/hdf/src/hconv.h.ppc64le 2020-04-30 21:25:25.183973672 -0600 ++++ hdf-4.2.15/hdf/src/hconv.h 2020-04-30 21:25:25.191973677 -0600 @@ -59,7 +59,7 @@ /* CONSTANT DEFINITIONS */ /*****************************************************************************/ @@ -10,9 +10,9 @@ diff -up hdf-4.2.10/hdf/src/hconv.h.ppc64le hdf-4.2.10/hdf/src/hconv.h # 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 +diff -up hdf-4.2.15/hdf/src/hdfi.h.ppc64le hdf-4.2.15/hdf/src/hdfi.h +--- hdf-4.2.15/hdf/src/hdfi.h.ppc64le 2020-04-30 21:25:25.183973672 -0600 ++++ hdf-4.2.15/hdf/src/hdfi.h 2020-04-30 21:25:25.192973677 -0600 @@ -75,6 +75,7 @@ #define DFMT_IA64 0x4441 #define DFMT_LINUX64 0x4441 @@ -21,7 +21,7 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc64le hdf-4.2.10/hdf/src/hdfi.h #define DFMT_LINUXPPC 0x1111 #define DFMT_LINUXSPARC 0x1111 #define DFMT_LINUX390 0x1111 -@@ -922,18 +923,24 @@ typedef int hdf_pint_t; +@@ -926,18 +927,24 @@ typedef int hdf_pint_t; /*-----------------------------------------------------*/ @@ -49,7 +49,7 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc64le hdf-4.2.10/hdf/src/hdfi.h typedef void VOID; typedef void *VOIDP; typedef char *_fcd; -@@ -969,8 +976,9 @@ typedef long hdf_pint_t; +@@ -973,8 +980,9 @@ typedef long hdf_pint_t; #define INCLUDES_ARE_ANSI #endif @@ -60,18 +60,19 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc64le hdf-4.2.10/hdf/src/hdfi.h /* 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 +diff -up hdf-4.2.15/mfhdf/libsrc/xdrposix.c.ppc64le hdf-4.2.15/mfhdf/libsrc/xdrposix.c +--- hdf-4.2.15/mfhdf/libsrc/xdrposix.c.ppc64le 2020-04-30 21:25:25.186973674 -0600 ++++ hdf-4.2.15/mfhdf/libsrc/xdrposix.c 2020-04-30 21:26:18.190001127 -0600 +@@ -442,7 +442,7 @@ xdrposix_getlong(xdrs, lp) + long *lp; { 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__)) +-#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) +@@ -465,7 +465,7 @@ xdrposix_putlong(xdrs, lp) netlong mycopy = htonl(*lp); up = (unsigned char *)&mycopy; #endif @@ -79,3 +80,4 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.ppc64le hdf-4.2.10/hdf/src/hdfi.h +#if (defined AIX5L64 || (defined __powerpc64__ && !defined __LITTLE_ENDIAN__) || defined __s390x__ || (defined __hpux && __LP64__)) up += (sizeof(long) - 4) ; #endif + diff --git a/hdf-s390.patch b/hdf-s390.patch index 7593dd78a01ae990c13d8b96e7eea085ce436ae3..ea21e037048ad0cb7e96eb72310083b5d22e9fbe 100644 --- a/hdf-s390.patch +++ b/hdf-s390.patch @@ -1,6 +1,6 @@ -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 +diff -up hdf-4.2.15/hdf/src/hdfi.h.s390 hdf-4.2.15/hdf/src/hdfi.h +--- hdf-4.2.15/hdf/src/hdfi.h.s390 2020-04-30 21:07:16.946922845 -0600 ++++ hdf-4.2.15/hdf/src/hdfi.h 2020-04-30 21:07:16.950922901 -0600 @@ -77,6 +77,7 @@ #define DFMT_POWERPC64 0x1111 #define DFMT_LINUXPPC 0x1111 @@ -9,7 +9,7 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.s390 hdf-4.2.10/hdf/src/hdfi.h /* I/O library constants */ #define UNIXUNBUFIO 1 -@@ -1126,6 +1127,66 @@ typedef int hdf_pint_t; +@@ -1130,6 +1131,66 @@ typedef int hdf_pint_t; #endif /* Linux Sparc32/64 */ @@ -76,21 +76,21 @@ diff -up hdf-4.2.10/hdf/src/hdfi.h.s390 hdf-4.2.10/hdf/src/hdfi.h /*-----------------------------------------------------*/ /* 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 +diff -up hdf-4.2.15/mfhdf/fortran/jackets.c.in.s390 hdf-4.2.15/mfhdf/fortran/jackets.c.in +--- hdf-4.2.15/mfhdf/fortran/jackets.c.in.s390 2020-04-30 21:07:16.942922790 -0600 ++++ hdf-4.2.15/mfhdf/fortran/jackets.c.in 2020-04-30 21:10:30.030640644 -0600 @@ -34,7 +34,7 @@ - struct ncfils { /* This will be a common block from Fortran */ + 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 +@@ -65,7 +65,7 @@ struct ncfils { /* This will - struct ncfils { /* This will be a common block from Fortran */ + 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__ @@ -107,124 +107,102 @@ diff -up hdf-4.2.10/mfhdf/fortran/jackets.c.in.s390 hdf-4.2.10/mfhdf/fortran/jac * 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__ + 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; + 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__ + 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); + long *longs = itol (value, ncount, ndims); @@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri - tmpbasis = nctypelen(NC_LONG); + 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 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); + 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__ + 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); + long *longs = itolg (value, ncount, nbasis, ndims); @@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc - return; - } /* else */ - #endif /* FORTRAN_HAS_NO_SHORT */ + 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; + long longs; @@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value - return; - } /* else */ - #endif /* FORTRAN_HAS_NO_SHORT */ + 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 */ + long iocount = dimprod (ncount, ndims); /* product of dimensions */ @@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri - tmpbasis = nctypelen(NC_LONG); + 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 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); + 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__ + 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 */ + 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__ + 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); + 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__ + 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 +diff -up hdf-4.2.15/mfhdf/libsrc/array.c.s390 hdf-4.2.15/mfhdf/libsrc/array.c +diff -up hdf-4.2.15/mfhdf/libsrc/cdf.c.s390 hdf-4.2.15/mfhdf/libsrc/cdf.c +diff -up hdf-4.2.15/mfhdf/libsrc/netcdf.h.in.s390 hdf-4.2.15/mfhdf/libsrc/netcdf.h.in +--- hdf-4.2.15/mfhdf/libsrc/netcdf.h.in.s390 2020-04-30 21:07:16.957922998 -0600 ++++ hdf-4.2.15/mfhdf/libsrc/netcdf.h.in 2020-04-30 21:15:23.731467288 -0600 @@ -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__ @@ -232,31 +210,22 @@ diff -up hdf-4.2.10/mfhdf/libsrc/netcdf.h.in.s390 hdf-4.2.10/mfhdf/libsrc/netcdf /* * 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 ; +diff -up hdf-4.2.15/mfhdf/libsrc/putget.c.s390 hdf-4.2.15/mfhdf/libsrc/putget.c +--- hdf-4.2.15/mfhdf/libsrc/putget.c.s390 2020-04-30 21:07:16.959923025 -0600 ++++ hdf-4.2.15/mfhdf/libsrc/putget.c 2020-04-30 21:12:13.612268179 -0600 +@@ -665,7 +665,7 @@ Void *values ; + case NC_SHORT : + return( xdr_NCvshort(xdrs, (unsigned)rem/2, (short *)values) ) ; + case NC_LONG : +-#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__ + return( xdr_int(xdrs, (nclong *)values) ) ; #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; + return( xdr_long(xdrs, (nclong *)values) ) ; +diff -up hdf-4.2.15/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.15/mfhdf/libsrc/xdrposix.c +--- hdf-4.2.15/mfhdf/libsrc/xdrposix.c.s390 2020-03-03 10:40:50.000000000 -0700 ++++ hdf-4.2.15/mfhdf/libsrc/xdrposix.c 2020-04-30 21:14:47.574557550 -0600 +@@ -262,7 +262,7 @@ int nbytes; static bool_t xdrposix_getlong(); static bool_t xdrposix_putlong(); @@ -265,7 +234,7 @@ diff -up hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.10/mfhdf/libsrc/xdrposi static bool_t xdrposix_getint(); static bool_t xdrposix_putint(); #endif -@@ -264,7 +264,7 @@ static long * xdrposix_inline(); +@@ -276,7 +276,7 @@ static long * xdrposix_inline(); #if (defined __sun && defined _LP64) static rpc_inline_t * xdrposix_inline(); #else @@ -273,8 +242,8 @@ diff -up hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.10/mfhdf/libsrc/xdrposi +#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 = { + static netlong * xdrposix_inline(); +@@ -302,9 +302,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 */ @@ -282,20 +251,20 @@ diff -up hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.10/mfhdf/libsrc/xdrposi +#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 */ ++#if !(defined __x86_64__) && !(defined __powerpc64__) && !(defined __s390x__) || (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 + /* Solaris 64-bit (arch=v9 and arch=amd64) has 64 bits long and 32 bits int. */ +@@ -442,7 +442,7 @@ xdrposix_getlong(xdrs, lp) + long *lp; { unsigned char *up = (unsigned char *)lp ; --#if (defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__)) -+#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__)) +-#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) +@@ -465,7 +465,7 @@ xdrposix_putlong(xdrs, lp) netlong mycopy = htonl(*lp); up = (unsigned char *)&mycopy; #endif @@ -304,16 +273,16 @@ diff -up hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.10/mfhdf/libsrc/xdrposi up += (sizeof(long) - 4) ; #endif -@@ -552,7 +552,7 @@ static rpc_inline_t * - #if (defined __alpha) - static int* +@@ -560,7 +560,7 @@ static long * + #if (defined __sun && defined _LP64) + static rpc_inline_t * #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 * + static int32_t * #else - static netlong * -@@ -580,7 +580,7 @@ int + static netlong * +@@ -581,7 +581,7 @@ xdrposix_inline(xdrs, len) return (NULL); } @@ -322,27 +291,27 @@ diff -up hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.10/mfhdf/libsrc/xdrposi 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); - } +diff -up hdf-4.2.15/mfhdf/ncgen/ncgen.l.s390 hdf-4.2.15/mfhdf/ncgen/ncgen.l +--- hdf-4.2.15/mfhdf/ncgen/ncgen.l.s390 2020-04-30 21:07:16.961923053 -0600 ++++ hdf-4.2.15/mfhdf/ncgen/ncgen.l 2020-04-30 21:08:10.175628593 -0600 +@@ -113,7 +113,7 @@ FloatInf|Infinity|Inf { /* float m + 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) + 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 (dd < LONG_MIN || dd > LONG_MAX) +diff -up hdf-4.2.15/mfhdf/ncgen/ncgenyy.c.s390 hdf-4.2.15/mfhdf/ncgen/ncgenyy.c +--- hdf-4.2.15/mfhdf/ncgen/ncgenyy.c.s390 2020-04-30 21:07:16.963923081 -0600 ++++ hdf-4.2.15/mfhdf/ncgen/ncgenyy.c 2020-04-30 21:08:53.818030313 -0600 +@@ -991,7 +991,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) + if (dd < INT_MIN || dd > INT_MAX) #else - if (dd < LONG_MIN || dd > LONG_MAX) + if (dd < LONG_MIN || dd > LONG_MAX) diff --git a/hdf.spec b/hdf.spec index 07ccbcf6d1d9d6f5b0e9c56eae6990d687755f07..acff50466739b431c12453b9c30fa54ee7ea8a1a 100644 --- a/hdf.spec +++ b/hdf.spec @@ -1,10 +1,17 @@ -Name: hdf -Version: 4.2.14 -Release: 2 +%ifarch %{java_arches} +%bcond_without java +%else +%bcond_with java +%endif + +Name: hdf +Version: 4.2.15 +Release: 1 Summary: A general purpose library and file format for storing scientific data -License: IJG -URL: https://portal.hdfgroup.org/ +License: BSD +URL: https://portal.hdfgroup.org/ Source0: https://support.hdfgroup.org/ftp/HDF/releases/HDF%{version}/src/%{name}-%{version}.tar.bz2 +Source1: h4comp Patch0: hdf-4.2.5-maxavailfiles.patch Patch1: hdf-ppc.patch Patch2: hdf-4.2.4-sparc.patch @@ -15,45 +22,79 @@ Patch5: hdf-destdir.patch # Install examples into the right location Patch6: hdf-examplesdir.patch # Add AArch64 definitions -Patch8: hdf-4.2.10-aarch64.patch +Patch8: hdf-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 +# Fix java build +Patch11: hdf-build.patch # For destdir/examplesdir patches BuildRequires: automake, libtool, gcc, gcc-c++ +BuildRequires: chrpath BuildRequires: flex byacc libjpeg-devel zlib-devel %{!?el6:libaec-devel} BuildRequires: libtirpc-devel BuildRequires: gcc-gfortran, gcc +%if %{with java} +BuildRequires: java-devel +BuildRequires: javapackages-tools +%else +Obsoletes: java-hdf < %{version}-%{release} +%endif +BuildRequires: hamcrest +BuildRequires: junit +BuildRequires: slf4j +BuildRequires: make +Requires: %{name}-libs%{?_isa} = %{version}-%{release} %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. +HDF4 is a general purpose library and file format for storing scientific data. +HDF4 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 HDF4 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 HDF4 files according to your needs. + %package devel -Summary: HDF development files +Summary: HDF4 development files Provides: %{name}-static = %{version}-%{release} -Requires: %{name}%{?_isa} = %{version}-%{release} +Requires: %{name}-libs%{?_isa} = %{version}-%{release} Requires: libjpeg-devel%{?_isa} Requires: libtirpc-devel%{?_isa} Requires: zlib-devel%{?_isa} %description devel -HDF development headers and libraries. +HDF4 development headers and libraries. + +%package libs +Summary: HDF4 shared libraries + +%description libs +HDF4 shared libraries. + +%package static +Summary: HDF4 static libraries +Requires: %{name}-devel = %{version}-%{release} + +%description static +HDF4 static libraries. + +%if %{with java} +%package -n java-hdf +Summary: HDF4 java library +Requires: slf4j +Obsoletes: jhdf < 3.3.1-2 + +%description -n java-hdf +HDF4 java library +%endif %prep %setup -q -%patch0 -p1 -b .maxavailfiles +#patch0 -p1 -b .maxavailfiles %patch1 -p1 -b .ppc %patch2 -p1 -b .sparc %patch3 -p1 -b .s390 @@ -62,6 +103,27 @@ HDF development headers and libraries. %patch6 -p1 -b .examplesdir %patch8 -p1 -b .aarch64 %patch9 -p1 -b .ppc64le +%patch11 -p1 -b .build + +%if %{with java} +# Replace jars with system versions +# hamcrest-core is obsoleted in hamcrest-2.2 +# Junit tests are failing with junit-4.13.1 +%if 0%{?rhel} >= 9 || 0%{?fedora} +find . ! -name junit.jar -name "*.jar" -delete +ln -s %{_javadir}/hamcrest/hamcrest.jar java/lib/hamcrest-core.jar +%else +find . -name "*.jar" -delete +ln -s %{_javadir}/hamcrest/core.jar java/lib/hamcrest-core.jar +ln -s %{_javadir}/junit.jar java/lib/junit.jar +# Fix test output +junit_ver=$(sed -n '//{s/^.*>\([0-9]\.[0-9.]*\)<.*/\1/;p;q}' /usr/share/maven-poms/junit.pom) +sed -i -e "s/JUnit version .*/JUnit version $junit_ver/" java/test/testfiles/JUnit-*.txt +%endif +ln -s %{_javadir}/slf4j/api.jar java/lib/slf4j-api-1.7.25.jar +ln -s %{_javadir}/slf4j/nop.jar java/lib/ext/slf4j-nop-1.7.25.jar +ln -s %{_javadir}/slf4j/simple.jar java/lib/ext/slf4j-simple-1.7.25.jar +%endif find . -type f -name "*.h" -exec chmod 0644 '{}' \; find . -type f -name "*.c" -exec chmod 0644 '{}' \; @@ -73,18 +135,38 @@ touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h # 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" +# libmfhdf.so is link to libdf.so +export CFLAGS="%{optflags} -I%{_includedir}/tirpc" export LIBS="-ltirpc" -export FFLAGS="%{optflags} -fPIC -ffixed-line-length-none -fallow-argument-mismatch" +%global _configure ../configure +# Java test needs this but doesn't create it +mkdir -p build-shared/java/lib +cd build-shared +# Java requires shared libraries, fortran requires static +%configure --disable-production %{?with_java:--enable-java} --disable-netcdf \ + --enable-shared=yes --enable-static=no --disable-fortran %{!?el6:--with-szlib} \ + --includedir=%{_includedir}/%{name} +%make_build +cd - +mkdir build-static +cd build-static +# Java requires shared libraries, fortran requires static + +# Temporary workaround for compiling on GCC-10 +%if 0%{?fedora} || 0%{?rhel} > 8 +export FCFLAGS="%{build_fflags} -fallow-argument-mismatch" +export FFLAGS="%{build_fflags} -fallow-argument-mismatch" +%endif %configure --disable-production --disable-java --disable-netcdf \ --enable-shared=no --enable-static=yes --enable-fortran %{!?el6:--with-szlib} \ - --includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name} + --includedir=%{_includedir}/%{name} %make_build +cd - # correct the timestamps based on files used to generate the header files touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90 @@ -92,8 +174,11 @@ 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 +%make_install -C build-static +%make_install -C build-shared +chrpath --delete --keepgoing %{buildroot}%{_bindir}/* %{buildroot}%{_libdir}/%{name}/*.so.* %{buildroot}%{_libdir}/*.so.* || : install -pm 644 MANIFEST README.txt release_notes/*.txt %{buildroot}%{_pkgdocdir}/ @@ -118,22 +203,65 @@ touch -c -r h4config.h h4config.h.tmp mv h4config.h.tmp h4config.h popd +#Fixup headers and scripts for multiarch +%if "%{_lib}" == "lib64" +#sed -i -e s/H5pubconf.h/H5pubconf-64.h/ %{buildroot}%{_includedir}/H5public.h +#mv %{buildroot}%{_includedir}/H5pubconf.h \ + #%{buildroot}%{_includedir}/H5pubconf-64.h +for x in h4cc h4fc +do + mv %{buildroot}%{_bindir}/${x} \ + %{buildroot}%{_bindir}/${x}-64 + install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x} +done +%else +#sed -i -e s/H5pubconf.h/H5pubconf-32.h/ %{buildroot}%{_includedir}/H5public.h +#mv %{buildroot}%{_includedir}/H5pubconf.h \ + #%{buildroot}%{_includedir}/H5pubconf-32.h +for x in h4cc h4fc +do + mv %{buildroot}%{_bindir}/${x} \ + %{buildroot}%{_bindir}/${x}-32 + install -m 0755 %SOURCE1 %{buildroot}%{_bindir}/${x} +done +%endif + %check -make -j1 check +make -j1 -C build-shared check +make -j1 -C build-static check %files %license COPYING %{_pkgdocdir}/ %exclude %{_pkgdocdir}/examples %{_bindir}/* +%exclude %{_bindir}/h4?c* +%{_libdir}/*.so.0* %{_mandir}/man1/*.gz %files devel +%{_bindir}/h4?c* %{_includedir}/%{name}/ -%{_libdir}/%{name}/ +%{_libdir}/*.so +%{_libdir}/*.settings %{_pkgdocdir}/examples/ +%files libs +%{_libdir}/*.so.0* + +%files static +%{_libdir}/*.a + +%if %{with java} +%files -n java-hdf +%{_jnidir}/hdf.jar +%{_libdir}/%{name}/libhdf_java.so +%endif + %changelog +* Tue Nov 15 2022 hkgy - 4.2.15-1 +- Upgrade to v4.2.15 + * Tue Aug 10 2021 wangyue - 4.2.14-2 - fix build error with gcc-10