Compare commits

...

65 Commits

Author SHA1 Message Date
Björn Esser c0de79838c
Bump release 2020-04-02 13:30:19 +02:00
Björn Esser 018885023d
Fix string quoting for rpm >= 4.16 2020-04-02 12:58:46 +02:00
sagitter c711f74cfd Export FFLAGS too 2020-02-02 19:06:03 +01:00
sagitter 4a8a1b17e2 Temporary workaround for compiling with GCC-10 2020-02-02 18:58:21 +01:00
Fedora Release Engineering 6151ec0d1c - Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2020-01-29 04:10:47 +00:00
Orion Poplawski 63e06769d6 Move compile scripts to hdf-devel and allow multilib install (bz#1769326)
Split shared libraries into hdf-libs sub-package
2019-11-08 21:43:44 -07:00
Fedora Release Engineering 3a6fc8f089 - Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-07-25 08:20:48 +00:00
Orion Poplawski 26c3da695e Move libraries into %{_libdir} 2019-04-10 20:53:19 -06:00
Orion Poplawski 48393863d3 Update to 4.2.14
Build shared libraries
Enable java
2019-04-09 22:20:33 -06:00
Fedora Release Engineering 94fa2edf7d - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2019-02-01 02:10:11 +00:00
Igor Gnatenko d1c9c8e199
Fix RHEL conditions
0%{?rhel} on Fedora expands to 0 which makes condition 0 < 7 true. You don't want that.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
2019-01-28 08:23:44 +01:00
sagitter 17f9b88dac Release 4.2.14 2018-11-06 12:55:09 +01:00
Orion Poplawski 5a3082c485 Use LIBS instead of LDFLAGS for -ltirpc 2018-10-07 12:09:16 -06:00
sagitter 8174dd8556 Add gcc gcc-c++ BR 2018-07-20 11:23:51 +02:00
Fedora Release Engineering 9038f99b94 - Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-07-13 04:54:31 +00:00
sagitter 4c62c88afb Add gcc BR 2018-02-22 18:17:37 +01:00
Fedora Release Engineering d02b717335 - Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
Signed-off-by: Fedora Release Engineering <releng@fedoraproject.org>
2018-02-07 16:10:29 +00:00
Orion Poplawski e5ad736e30 Make hdf-devel require libtirpc-devel 2018-02-05 10:23:55 -07:00
Orion Poplawski 7fdff1deaf Rebuild for gcc 8.0 2018-02-02 08:33:04 -07:00
sagitter 63668bb95e Enable szlib support 2018-01-21 14:20:46 +01:00
Pavel Raiskup 55d0b25462 sunrpc code moved from glibc to libtirpc
Per https://fedoraproject.org/wiki/Changes/SunRPCRemoval

Resolves: rhbz#1535245
Version: 4.2.13-4
2018-01-17 07:50:01 +01:00
Fedora Release Engineering fff01b7f2c - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild 2017-08-02 23:24:36 +00:00
Fedora Release Engineering f075f55b81 - Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild 2017-07-26 12:35:27 +00:00
sagitter d734a5fec0 Update to 4.2.13 2017-07-21 22:27:53 +02:00
Fedora Release Engineering 60421e559c - Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild 2017-02-10 12:35:10 +00:00
Orion Poplawski 2e6c8ec1ab Update to 4.2.12 2017-01-31 15:36:17 -07:00
Orion Poplawski 76238697af Cleanup spec
- Remove .la files
- Use %license
2016-05-25 21:45:53 -06:00
Dennis Gilmore 5afb49ca43 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild 2016-02-03 23:44:25 +00:00
Orion Poplawski 1fbb00e2b1 Drop %defattr() 2016-01-25 18:44:54 -07:00
Dennis Gilmore 475dc4862f - Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild 2015-06-17 10:21:18 +00:00
Orion Poplawski ee88e568b8 Update to 4.2.11
- Drop format patch applied upstream
- Update destdir patch
2015-02-13 14:51:38 -07:00
Orion Poplawski e234585ce0 Updated patch for ppc64le support (bug #1134385) 2014-09-08 14:59:49 -06:00
Orion Poplawski d224626ef6 Error test failures on ppc64le for now 2014-09-05 08:46:38 -06:00
Orion Poplawski 07a787f8a7 Add initial attempt at ppc64le support (bug #1134385) 2014-09-03 20:50:29 -06:00
Peter Robinson ebcf45eb31 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild 2014-08-16 20:18:45 +00:00
Peter Robinson e27becf9ab fix date 2014-06-25 14:07:48 +01:00
Peter Robinson 2029323bc0 move autoreconf to build section 2014-06-25 14:07:14 +01:00
Marcin Juszkiewicz 8804e81682 Add AArch64 support 2014-06-25 14:06:07 +01:00
Dennis Gilmore 68d9ac9568 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild 2014-06-07 14:56:00 -05:00
Jakub Čajka 18459c8167 Fixed s390x build, enabled test on ppc 2014-05-22 11:37:10 +02:00
Orion Poplawski 18b70bd0d4 Upload 4.2.10 2014-02-14 10:39:34 -07:00
Orion Poplawski d0def9a165 Update to 4.2.10
- Rebase arm, ppc, and s390 patches
- Add destdir, examplesdir patches to fix installation of examples
2014-02-14 10:35:08 -07:00
Orion Poplawski 21f0493147 Fix build with -Werror=format-security (bug #1037120) 2014-02-01 09:11:30 -07:00
Karsten Hopp 0904fbf3d4 skip checks on ppc* (#961007) 2013-08-13 16:09:14 +02:00
Dennis Gilmore 54de3e023a - Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild 2013-08-03 12:34:30 -05:00
Orion Poplawski 6357fcae37 Use uint32 for 32-bit 2013-02-16 20:34:03 -07:00
Orion Poplawski 14eb82c4ad Add patch to fix integer wrapping in test 2013-02-16 20:23:13 -07:00
Orion Poplawski 5e3477da5c Add patch to add some missing declarations 2013-02-15 16:57:42 -07:00
Orion Poplawski 8e0c506c99 Update to 4.2.9 2013-02-15 16:18:04 -07:00
Dennis Gilmore 5a83e98a2b - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild 2013-02-13 19:01:53 -06:00
Adam Tkac befc50b8e5 Rebuild due to "jpeg8-ABI" feature drop
Signed-off-by: Adam Tkac <atkac@redhat.com>
2013-01-18 18:18:28 +01:00
Adam Tkac 43f863106f rebuild against new libjpeg
Signed-off-by: Adam Tkac <vonsch@gmail.com>
2012-12-21 17:20:56 +01:00
Orion Poplawski 20312533a4 Update to 4.2.8 2012-08-15 09:19:22 -06:00
Dennis Gilmore e36f3cd23f - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild 2012-07-19 07:37:58 -05:00
Peter Robinson 294a0cb1a6 fix FTBFS on ARM 2012-03-14 20:28:41 +00:00
Peter Robinson fac61862b3 fix FTBFS on ARM 2012-03-14 20:28:17 +00:00
Orion Poplawski e7420547ed Update to 4.2.7 2012-02-15 10:16:12 -07:00
Dennis Gilmore 56395a1594 - Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild 2012-01-12 22:49:51 -06:00
Orion Poplawski f8ab28a789 Update to 4.2.6
Drop jpeg patch, fixed upstream
Update ppc,s390 patches
2011-06-21 16:49:38 -06:00
Dennis Gilmore 8fb3e8b950 - Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild 2011-02-09 02:59:30 -06:00
Orion Poplawski c8791fc46e - Add patch to disable jpeg tests due to change to jpeg-turbo, FTBFS bug 631337 2010-12-10 10:40:06 -07:00
Fedora Release Engineering 4f31a0ef04 dist-git conversion 2010-07-28 17:39:53 +00:00
Orion Poplawski 7692aebfe8 Update patches 2010-03-02 20:49:05 +00:00
Orion Poplawski 4030299c39 - Update to 4.2.5 2010-03-02 20:45:51 +00:00
Bill Nottingham 2a6712b5c7 Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-25 22:54:51 +00:00
20 changed files with 1392 additions and 1372 deletions

View File

@ -1 +0,0 @@
HDF4.2r4.tar.gz

10
.gitignore vendored Normal file
View File

@ -0,0 +1,10 @@
hdf-4.2.5.tar.bz2
/hdf-4.2.6.tar.bz2
/hdf-4.2.7.tar.bz2
/hdf-4.2.8.tar.bz2
/hdf-4.2.9.tar.bz2
/hdf-4.2.10.tar.bz2
/hdf-4.2.11.tar.bz2
/hdf-4.2.12.tar.bz2
/hdf-4.2.13.tar.bz2
/hdf-4.2.14.tar.bz2

View File

@ -1,21 +0,0 @@
# Makefile for source rpm: hdf
# $Id$
NAME := hdf
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attept a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

6
h4comp Normal file
View File

@ -0,0 +1,6 @@
#!/bin/bash
BITS=32
[ -d /usr/lib64 ] && BITS=64
exec $0-${BITS} "$@"

330
hdf-4.2.10-aarch64.patch Normal file
View 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)

View File

@ -1,6 +1,6 @@
diff -Nru HDF4.2r2.orig/hdf/src/hdfi.h HDF4.2r2/hdf/src/hdfi.h
--- HDF4.2r2.orig/hdf/src/hdfi.h 2007-09-17 18:45:17.000000000 +0300
+++ HDF4.2r2/hdf/src/hdfi.h 2008-01-06 07:23:42.000000000 +0200
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
@ -9,7 +9,7 @@ diff -Nru HDF4.2r2.orig/hdf/src/hdfi.h HDF4.2r2/hdf/src/hdfi.h
/* I/O library constants */
#define UNIXUNBUFIO 1
@@ -1444,6 +1445,66 @@
@@ -1392,6 +1393,66 @@ typedef long hdf_pint_t;
#endif /*Linux PPC */
@ -73,6 +73,6 @@ diff -Nru HDF4.2r2.orig/hdf/src/hdfi.h HDF4.2r2/hdf/src/hdfi.h
+
+#endif /* Linux Sparc32/64 */
+
/*#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
/*-----------------------------------------------------*/
/* 64-bit Free BSD */

View 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

View File

@ -1,11 +0,0 @@
--- HDF4.2r3/mfhdf/libsrc/file.c.maxavailfiles 2008-01-27 09:47:11.000000000 -0700
+++ HDF4.2r3/mfhdf/libsrc/file.c 2008-10-01 11:48:53.000000000 -0600
@@ -45,7 +45,7 @@
/* Maximum number of files can be opened at one time; subtract 3 from
the system allowed to account for stdin, stdout, and stderr */
-#define MAX_AVAIL_OPENFILES (MAX_SYS_OPENFILES - 3)
+#define 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

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +0,0 @@
--- HDF4.2r4/mfhdf/libsrc/tncunlim.c.buffer 2009-01-10 19:34:26.000000000 -0700
+++ HDF4.2r4/mfhdf/libsrc/tncunlim.c 2009-02-25 11:08:46.000000000 -0700
@@ -646,7 +646,7 @@
long dimsize = 0, /* unlimited dimension size */
dimsize1 = 0, dimsize2 = 0; /* other dimension sizes */
short outdata[DIM0][DIM1][DIM2]; /* data read back */
- char varname[10]; /* variable name */
+ char varname[12]; /* variable name */
nc_type rh_type; /* variable type */
int rh_ndims; /* number of dims */
int rh_dims[H4_MAX_VAR_DIMS]; /* variable shape */

81
hdf-arm.patch Normal file
View 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 */

View 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

67
hdf-build.patch Normal file
View File

@ -0,0 +1,67 @@
diff -up hdf-4.2.14/java/examples/Makefile.am.build hdf-4.2.14/java/examples/Makefile.am
--- hdf-4.2.14/java/examples/Makefile.am.build 2018-06-26 22:42:58.000000000 -0600
+++ hdf-4.2.14/java/examples/Makefile.am 2019-04-10 20:01:42.336828053 -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.5.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.5.jar:$$CLASSPATH
AM_JAVACFLAGS = $(H4_JAVACFLAGS) -deprecation
diff -up hdf-4.2.14/java/src/jni/Makefile.am.build hdf-4.2.14/java/src/jni/Makefile.am
--- hdf-4.2.14/java/src/jni/Makefile.am.build 2018-06-26 22:42:58.000000000 -0600
+++ hdf-4.2.14/java/src/jni/Makefile.am 2019-04-10 20:47:55.397873538 -0600
@@ -14,7 +14,10 @@ AM_CPPFLAGS=-I$(top_srcdir)/hdf/src
-I$(top_builddir)/mfhdf/libsrc -I$(top_srcdir)/java/src/jni $(JNIFLAGS)
# 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.14/java/src/Makefile.am.build hdf-4.2.14/java/src/Makefile.am
--- hdf-4.2.14/java/src/Makefile.am.build 2018-06-26 22:42:58.000000000 -0600
+++ hdf-4.2.14/java/src/Makefile.am 2019-04-10 20:01:42.336828053 -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.5.jar:$$CLASSPATH
diff -up hdf-4.2.14/java/test/junit.sh.in.build hdf-4.2.14/java/test/junit.sh.in
--- hdf-4.2.14/java/test/junit.sh.in.build 2018-06-26 22:42:58.000000000 -0600
+++ hdf-4.2.14/java/test/junit.sh.in 2019-04-10 20:01:42.337828056 -0600
@@ -40,7 +40,7 @@ HDFLIB_HOME="$top_srcdir/java/lib"
BLDLIBDIR="$top_builddir/java/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.14/java/test/Makefile.am.build hdf-4.2.14/java/test/Makefile.am
--- hdf-4.2.14/java/test/Makefile.am.build 2018-06-26 22:42:58.000000000 -0600
+++ hdf-4.2.14/java/test/Makefile.am 2019-04-10 20:01:42.337828056 -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.5.jar:$(top_srcdir)/java/lib/ext/slf4j-simple-1.7.5.jar:$$CLASSPATH
jarfile = jar$(PACKAGE_TARNAME)test.jar

70
hdf-destdir.patch Normal file
View 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
View 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
View 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
View 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

View File

@ -1,6 +1,7 @@
--- HDF4.2r2/hdf/src/hdfi.h.orig 2008-02-04 17:27:04.000000000 +0100
+++ HDF4.2r2/hdf/src/hdfi.h 2008-02-04 17:29:54.000000000 +0100
@@ -78,6 +78,7 @@
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
@ -8,7 +9,7 @@
/* I/O library constants */
#define UNIXUNBUFIO 1
@@ -1505,6 +1506,66 @@
@@ -1126,6 +1127,66 @@ typedef int hdf_pint_t;
#endif /* Linux Sparc32/64 */
@ -72,33 +73,12 @@
+
+#endif /* Linux s390/s390x */
+
/*#ifndef GOT_MACHINE
No machine type has been defined. Your Makefile needs to have someing like
-DSUN or -DUNICOS in order for the HDF internal structures to be defined
--- HDF4.2r2/mfhdf/libsrc/netcdf.h.in.orig 2008-02-04 18:38:14.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/netcdf.h.in 2008-02-04 18:39:00.000000000 +0100
@@ -295,7 +295,7 @@
*/
#if defined _CRAYMPP
typedef short nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64 || defined __powerpc64__ || defined __s390x__
typedef int nclong;
#else
typedef long nclong; /* default, compatible type */
--- HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h.orig 2008-02-04 18:40:01.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/config/netcdf-linux.h 2008-02-04 18:40:29.000000000 +0100
@@ -304,7 +304,7 @@
*/
#if defined _CRAYMPP
typedef short nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
typedef int nclong;
#else
typedef long nclong; /* default, compatible type */
--- HDF4.2r2/mfhdf/fortran/config/jackets-linux.c.orig 2008-02-04 18:42:44.000000000 +0100
+++ HDF4.2r2/mfhdf/fortran/config/jackets-linux.c 2008-02-04 18:44:19.000000000 +0100
/*-----------------------------------------------------*/
/* 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 */
@ -108,7 +88,7 @@
int ll;
#else
long ll;
@@ -65,7 +65,7 @@
@@ -65,7 +65,7 @@ struct ncfils { /* This will be a comm
struct ncfils { /* This will be a common block from Fortran */
double dd;
@ -117,7 +97,7 @@
int ll;
#else
long ll;
@@ -430,7 +430,7 @@
@@ -420,7 +420,7 @@ stoig(shorts, ints, dims, basis, ndims)
}
#endif /* FORTRAN_HAS_NO_SHORT */
@ -126,7 +106,7 @@
/*
* Convert multi-dimensional array of NCLONGs stored in ints to packed
* array of longs, in malloc'ed space. Returns pointer to longs or NULL
@@ -916,7 +916,7 @@
@@ -908,7 +908,7 @@ nncvpt1(cdfid, varid, indices, value, rc
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -135,7 +115,7 @@
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long longs = *(int *)value;
@@ -1030,7 +1030,7 @@
@@ -1022,7 +1022,7 @@ nncvpt(cdfid, varid, start, count, value
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -144,7 +124,7 @@
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itol (value, ncount, ndims);
@@ -1141,7 +1141,7 @@
@@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri
tmpbasis = nctypelen(NC_LONG);
else
#endif
@ -153,7 +133,7 @@
if (datatype == NC_LONG)
tmpbasis = sizeof(int);
else
@@ -1198,7 +1198,7 @@
@@ -1190,7 +1190,7 @@ nncvptg(cdfid, varid, start, count, stri
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -162,7 +142,7 @@
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1334,7 +1334,7 @@
@@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -171,7 +151,7 @@
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long longs;
@@ -1476,7 +1476,7 @@
@@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -180,7 +160,7 @@
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long iocount = dimprod (ncount, ndims); /* product of dimensions */
@@ -1614,7 +1614,7 @@
@@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri
tmpbasis = nctypelen(NC_LONG);
else
#endif
@ -189,7 +169,7 @@
if (datatype == NC_LONG)
tmpbasis = sizeof(int);
else
@@ -1685,7 +1685,7 @@
@@ -1677,7 +1677,7 @@ nncvgtg(cdfid, varid, start, count, stri
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -198,7 +178,7 @@
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long iocount = dimprod (ncount, ndims); /* product of dimensions */
@@ -1851,7 +1851,7 @@
@@ -1843,7 +1843,7 @@ nncapt(cdfid, varid, attname, datatype,
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -207,7 +187,7 @@
#ifdef HDF
if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itol (value, attlen, 1);
@@ -2016,7 +2016,7 @@
@@ -2008,7 +2008,7 @@ nncagt(cdfid, varid, attname, value, rco
return;
} /* else */
#endif /* FORTRAN_HAS_NO_SHORT */
@ -216,62 +196,67 @@
#ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
/* EIP We need to use int buffer to read data in on the platforms where long is 8 bytes
--- HDF4.2r2/mfhdf/ncgen/ncgen.l.orig 2008-02-04 18:45:37.000000000 +0100
+++ HDF4.2r2/mfhdf/ncgen/ncgen.l 2008-02-04 18:45:53.000000000 +0100
@@ -134,7 +134,7 @@
yyerror(errstr);
}
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
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__
if (dd < INT_MIN || dd > INT_MAX)
#else
#if defined (_CRAYMPP)
--- HDF4.2r2/mfhdf/libsrc/putget.c.orig 2008-02-04 18:53:56.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/putget.c 2008-02-04 18:53:13.000000000 +0100
@@ -594,7 +594,7 @@
case NC_LONG :
#if defined _CRAYMPP
return( xdr_short(xdrs, (nclong *)values) ) ;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
return( xdr_int(xdrs, (nclong *)values) ) ;
#else
return( xdr_long(xdrs, (nclong *)values) ) ;
@@ -1896,7 +1896,7 @@
case NC_LONG :
#if defined _CRAYMPP
xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
xdr_NC_fnct = xdr_int ;
#else
xdr_NC_fnct = xdr_long ;
--- HDF4.2r2/mfhdf/libsrc/array.c.orig 2008-02-04 18:54:30.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/array.c 2008-02-04 18:54:39.000000000 +0100
@@ -622,7 +622,7 @@
case NC_LONG :
#if defined _CRAYMPP
xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
xdr_NC_fnct = xdr_int ;
#else
xdr_NC_fnct = xdr_long ;
--- HDF4.2r2/mfhdf/libsrc/cdf.c.orig 2008-02-04 18:55:23.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/cdf.c 2008-02-04 18:55:38.000000000 +0100
@@ -3664,7 +3664,7 @@
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 _CRAYMPP
xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
-#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 ;
--- HDF4.2r2/mfhdf/libsrc/xdrposix.c.orig 2008-02-04 18:56:24.000000000 +0100
+++ HDF4.2r2/mfhdf/libsrc/xdrposix.c 2008-02-04 18:58:43.000000000 +0100
@@ -284,7 +284,7 @@
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();
@ -280,7 +265,7 @@
static bool_t xdrposix_getint();
static bool_t xdrposix_putint();
#endif
@@ -301,7 +301,7 @@
@@ -264,7 +264,7 @@ static long * xdrposix_inline();
#if (defined __sun && defined _LP64)
static rpc_inline_t * xdrposix_inline();
#else
@ -289,7 +274,7 @@
static int32_t * xdrposix_inline();
#else
#if (defined __alpha )
@@ -332,9 +332,9 @@
@@ -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 */
@ -301,25 +286,25 @@
NULL, /* no xdr_control function defined */
#endif
/* Solaris 64-bit (arch=v9 and arch=amd64) has 64 bits long and 32 bits int. */
@@ -469,7 +469,7 @@
@@ -431,7 +431,7 @@ xdrposix_getlong(xdrs, lp)
#endif
{
unsigned char *up = (unsigned char *)lp ;
-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__))
+#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
-#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
@@ -496,7 +496,7 @@
@@ -458,7 +458,7 @@ xdrposix_putlong(xdrs, lp)
netlong mycopy = htonl(*lp);
up = (unsigned char *)&mycopy;
#endif
-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__))
+#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
-#if (defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__))
+#if (defined AIX5L64 || defined __powerpc64__ || defined __s390x__ || (defined __hpux && __LP64__))
up += (sizeof(long) - 4) ;
#endif
@@ -593,7 +593,7 @@
@@ -552,7 +552,7 @@ static rpc_inline_t *
#if (defined __alpha)
static int*
#else
@ -328,7 +313,7 @@
static int32_t *
#else
static netlong *
@@ -622,7 +622,7 @@
@@ -580,7 +580,7 @@ int
return (NULL);
}
@ -337,3 +322,27 @@
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)

418
hdf.spec
View File

@ -1,120 +1,426 @@
%if 0%{?rhel} && 0%{?rhel} < 7
%{!?__global_ldflags: %global __global_ldflags -Wl,-z,relro}
%endif
Name: hdf
Version: 4.2r4
Release: 5%{?dist}
Version: 4.2.14
Release: 9%{?dist}
Summary: A general purpose library and file format for storing scientific data
License: BSD
Group: System Environment/Libraries
URL: http://hdfgroup.org/products/hdf4/index.html
Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/HDF%{version}.tar.gz
Patch0: hdf-4.2r3-maxavailfiles.patch
Patch1: hdf-4.2r3-ppc.patch
Patch2: hdf-4.2r2-sparc.patch
Patch3: hdf-4.2r2-s390.patch
# Reported upstream to help@hdfgroup.org
Patch4: hdf-4.2r4-buffer.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: flex byacc libjpeg-devel zlib-devel
%if "%{?dist}" != ".el4"
BuildRequires: gcc-gfortran
%else
BuildRequires: gcc-g77
%endif
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
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
# 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
BuildRequires: java-devel
BuildRequires: javapackages-tools
BuildRequires: hamcrest
BuildRequires: junit
BuildRequires: slf4j
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
Group: Development/Libraries
Summary: HDF4 development files
Provides: %{name}-static = %{version}-%{release}
Requires: %{name} = %{version}-%{release}
Requires: libjpeg-devel zlib-devel
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.
%package -n java-hdf
Summary: HDF4 java library
Requires: slf4j
Obsoletes: jhdf < 3.3.1-2
%description -n java-hdf
HDF4 java library
%prep
%setup -q -n HDF%{version}
%setup -q
%patch0 -p1 -b .maxavailfiles
%patch1 -p1 -b .ppc
%patch2 -p1 -b .sparc
%patch3 -p1 -b .s390
%patch4 -p1 -b .buffer
%patch4 -p1 -b .arm
%patch5 -p1 -b .destdir
%patch6 -p1 -b .examplesdir
%patch8 -p1 -b .aarch64
%patch9 -p1 -b .ppc64le
%patch11 -p1 -b .build
# Replace jars with system versions
find -name \*.jar -delete
ln -s %{_javadir}/hamcrest/core.jar java/lib/hamcrest-core.jar
ln -s %{_javadir}/junit.jar java/lib/junit.jar
ln -s %{_javadir}/slf4j/api.jar java/lib/slf4j-api-1.7.5.jar
ln -s %{_javadir}/slf4j/nop.jar java/lib/ext/slf4j-nop-1.7.5.jar
ln -s %{_javadir}/slf4j/simple.jar java/lib/ext/slf4j-simple-1.7.5.jar
# Fix test output
junit_ver=$(sed -n '/<version>/{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
## Fix syntax error bacause 'CLASSPATH_ENV=$H4_CLASSPATH' line on epel6 builds
# Use only if java is disabled
%if 0%{?rhel} && 0%{?rhel} < 7
%patch10 -p0
%endif
find . -type f -name "*.h" -exec chmod 0644 '{}' \;
find . -type f -name "*.c" -exec chmod 0644 '{}' \;
chmod a-x *hdf/*/*.c hdf/*/*.h
# restore include file timestamps modified by patching
touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
touch -c -r ./mfhdf/libsrc/config/netcdf-linux.h.ppc ./mfhdf/libsrc/config/netcdf-linux.h
%build
# For destdir/examplesdir patches
autoreconf -vif
# avoid upstream compiler flags settings
rm config/*linux-gnu
export CFLAGS="$RPM_OPT_FLAGS -fPIC"
export FFLAGS="$RPM_OPT_FLAGS -fPIC -ffixed-line-length-none"
%configure --disable-production --disable-netcdf \
--includedir=%{_includedir}/%{name} --libdir=%{_libdir}/%{name}
make
# TODO: upstream fix
# libmfhdf.so is link to libdf.so
export CFLAGS="%{optflags} -I%{_includedir}/tirpc"
export LIBS="-ltirpc"
%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 --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%{?fedora} > 31
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}
%make_build
cd -
# correct the timestamps based on files used to generate the header files
touch -c -r ./mfhdf/fortran/config/netcdf-linux.inc mfhdf/fortran/netcdf.inc
touch -c -r hdf/src/hdf.inc hdf/src/hdf.f90
touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90
touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90
# netcdf fortran include need same treatement, but they are not shipped
%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
%make_install -C build-static
%make_install -C build-shared
chrpath --delete --keepgoing %{buildroot}%{_bindir}/* %{buildroot}%{_libdir}/%{name}/*.so.* || :
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
#rm $RPM_BUILD_ROOT%{_bindir}/nc* $RPM_BUILD_ROOT%{_mandir}/man1/nc*
for file in ncdump ncgen; do
mv $RPM_BUILD_ROOT%{_bindir}/$file $RPM_BUILD_ROOT%{_bindir}/h$file
mv %{buildroot}%{_bindir}/$file %{buildroot}%{_bindir}/h$file
# man pages are the same than netcdf ones
rm $RPM_BUILD_ROOT%{_mandir}/man1/${file}.1
rm %{buildroot}%{_mandir}/man1/${file}.1
done
# this is done to have the same timestamp on multiarch setups
touch -c -r README $RPM_BUILD_ROOT/%{_includedir}/hdf/h4config.h
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 $RPM_BUILD_ROOT/%{_includedir}/hdf
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
#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 check
%clean
rm -rf $RPM_BUILD_ROOT
make -j1 -C build-shared check
make -j1 -C build-static check
%files
%defattr(-,root,root,0755)
%doc COPYING MANIFEST README release_notes/*.txt
%license COPYING
%{_pkgdocdir}/
%exclude %{_pkgdocdir}/examples
%{_bindir}/*
%exclude %{_bindir}/h4?c*
%{_libdir}/*.so.0*
%{_mandir}/man1/*.gz
%files devel
%defattr(-,root,root,0755)
%{_bindir}/h4?c*
%{_includedir}/%{name}/
%{_libdir}/%{name}/
%{_libdir}/*.so
%{_libdir}/*.settings
%{_pkgdocdir}/examples/
%files libs
%{_libdir}/*.so.0*
%files static
%{_libdir}/*.a
%files -n java-hdf
%{_jnidir}/hdf.jar
%{_libdir}/%{name}/libhdf_java.so
%changelog
* Thu Apr 02 2020 Björn Esser <besser82@fedoraproject.org> - 4.2.14-9
- Fix string quoting for rpm >= 4.16
* Sun Feb 02 2020 Antonio Trande <sagitter@fedoraproject.org> 4.2.14-8
- Temporary workaround for compiling with GCC-10
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.14-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Fri Nov 8 2019 Orion Poplawski <orion@nwra.com> - 4.2.14-6
- Move compile scripts to hdf-devel and allow multilib install (bz#1769326)
- Split shared libraries into hdf-libs sub-package
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.14-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Apr 10 2019 Orion Poplawski <orion@nwra.com> - 4.2.14-4
- Move libraries into %%{_libdir}
* Tue Apr 9 2019 Orion Poplawski <orion@nwra.com> - 4.2.14-3
- Build shared libraries
- Enable java
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.14-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Sat Nov 03 2018 Antonio Trande <sagitter@fedoraproject.org> 4.2.14-1
- Release 4.2.14
* Sun Oct 7 2018 Orion Poplawski <orion@nwra.com> - 4.2.13-11
- Use LIBS instead of LDFLAGS for -ltirpc
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.13-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Thu Feb 22 2018 Antonio Trande <sagitter@fedoraproject.org> - 4.2.13-9
- Add gcc BR
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.13-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Mon Feb 5 2018 Orion Poplawski <orion@nwra.com> - 4.2.13-7
- Make hdf-devel require libtirpc-devel
* Fri Feb 02 2018 Orion Poplawski <orion@cora.nwra.com> - 4.2.13-6
- Rebuild for gcc 8.0
* Sat Jan 20 2018 Antonio Trande <sagitter@fedoraproject.org> 4.2.13-5
- Enable szlib support
* Wed Jan 17 2018 Pavel Raiskup <praiskup@redhat.com> - 4.2.13-4
- rpc api moved from glibc to libtirpc:
https://fedoraproject.org/wiki/Changes/SunRPCRemoval
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.13-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Fri Jul 21 2017 Antonio Trande <sagitter@fedoraproject.org> 4.2.13-1
- Update to 4.2.13
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Tue Jan 31 2017 Orion Poplawski <orion@cora.nwra.com> 4.2.12-1
- Update to 4.2.12
* Wed May 25 2016 Orion Poplawski <orion@cora.nwra.com> 4.2.11-4
- Cleanup spec
- Remove .la files
- Use %%license
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 4.2.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.11-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Fri Feb 13 2015 Orion Poplawski <orion@cora.nwra.com> 4.2.11-1
- Update to 4.2.11
- Drop format patch applied upstream
- Update destdir patch
* Mon Sep 8 2014 Orion Poplawski <orion@cora.nwra.com> - 4.2.10-7
- Updated patch for ppc64le support (bug #1134385)
* Wed Sep 3 2014 Orion Poplawski <orion@cora.nwra.com> - 4.2.10-6
- Add initial attempt at ppc64le support (bug #1134385)
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.10-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Wed Jun 25 2014 Marcin Juszkiewicz <mjuszkiewicz@redhat.com> 4.2.10-4
- Add AArch64 support.
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.10-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
* Thu May 22 2014 Jakub Čajka <jcajka@redhat.com> 4.2.10-2
- Fixed build/tests on s390x
- Tests enabled on ppc
* Fri Feb 14 2014 Orion Poplawski <orion@cora.nwra.com> 4.2.10-1
- Update to 4.2.10
- Rebase arm, ppc, and s390 patches
- Add destdir, examplesdir patches to fix installation of examples
* Sat Feb 1 2014 Orion Poplawski <orion@cora.nwra.com> 4.2.9-4
- Fix build with -Werror=format-security (bug #1037120)
* Tue Aug 13 2013 Karsten Hopp <karsten@redhat.com> 4.2.9-3
- temporarily skip checks on ppc* (#961007)
* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
* Fri Feb 15 2013 Orion Poplawski <orion@cora.nwra.com> 4.2.9-1
- Update to 4.2.9
- Add patch for some missing declarations
- Add patch to fix integer wrapping in test
* Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.8-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
* Fri Jan 18 2013 Adam Tkac <atkac redhat com> - 4.2.8-3
- rebuild due to "jpeg8-ABI" feature drop
* Fri Dec 21 2012 Adam Tkac <atkac redhat com> - 4.2.8-2
- rebuild against new libjpeg
* Wed Aug 15 2012 Orion Poplawski <orion@cora.nwra.com> 4.2.8-1
- Update to 4.2.8
* Thu Jul 19 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.7-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
* Tue Mar 06 2012 DJ Delorie <dj@redhat.com> 4.2.7-2
- Add patch for ARM support
* Wed Feb 15 2012 Orion Poplawski <orion@cora.nwra.com> 4.2.7-1
- Update to 4.2.7
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
* Tue Jun 21 2011 Orion Poplawski <orion@cora.nwra.com> 4.2.6-1
- Update to 4.2.6
- Drop jpeg patch, fixed upstream
- Update ppc,s390 patches
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 4.2.5-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
* Fri Dec 10 2010 Orion Poplawski <orion@cora.nwra.com> 4.2.5-2
- Add patch to disable jpeg tests due to change to jpeg-turbo, FTBFS bug 631337
* Tue Mar 2 2010 Orion Poplawski <orion@cora.nwra.com> 4.2.5-1
- Update to 4.2.5
* Fri Sep 18 2009 Orion Poplawski <orion@cora.nwra.com> 4.2r4-5
- Add EL4 build conditionals

View File

@ -1 +1 @@
cbcfcdb65f27b743c6001c17619704a8 HDF4.2r4.tar.gz
SHA512 (hdf-4.2.14.tar.bz2) = 5689525e18bfc6be205a0a21cded68d66630020c9a1445ce5afae41d58246e26ed9ba349da1bb197c31557aba127f51a2b697a868ec7e2747ac6153858171718