Update to 4.2.10

- Rebase arm, ppc, and s390 patches
- Add destdir, examplesdir patches to fix installation of examples
epel9
Orion Poplawski 11 years ago
parent 21f0493147
commit d0def9a165

@ -1,19 +1,19 @@
diff -r -U 3 -p hdf-4.2.7.orig/hdf/src/hconv.h hdf-4.2.7/hdf/src/hconv.h diff -up hdf-4.2.10/hdf/src/hconv.h.arm hdf-4.2.10/hdf/src/hconv.h
--- hdf-4.2.7.orig/hdf/src/hconv.h 2012-02-06 09:02:43.000000000 -0500 --- hdf-4.2.10/hdf/src/hconv.h.arm 2014-02-14 09:28:56.692514796 -0700
+++ hdf-4.2.7/hdf/src/hconv.h 2012-03-07 01:58:21.713088567 -0500 +++ hdf-4.2.10/hdf/src/hconv.h 2014-02-14 09:30:03.882212944 -0700
@@ -63,7 +63,7 @@ @@ -59,7 +59,7 @@
/* CONSTANT DEFINITIONS */ /* CONSTANT DEFINITIONS */
/*****************************************************************************/ /*****************************************************************************/
/* Generally Big-Endian machines */ /* Generally Big-Endian machines */
-#if !defined(VMS) && !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__)
+#if !defined(VMS) && !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__)
# if !defined(UNICOS)
# define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */ # define UI8_IN DFKnb1b /* Unsigned Integer, 8 bits */
# define UI8_OUT DFKnb1b # define UI8_OUT DFKnb1b
diff -r -U 3 -p hdf-4.2.7.orig/hdf/src/hdfi.h hdf-4.2.7/hdf/src/hdfi.h # define SI16_IN DFKnb2b /* S = Signed */
--- hdf-4.2.7.orig/hdf/src/hdfi.h 2012-02-06 09:02:43.000000000 -0500 diff -up hdf-4.2.10/hdf/src/hdfi.h.arm hdf-4.2.10/hdf/src/hdfi.h
+++ hdf-4.2.7/hdf/src/hdfi.h 2012-03-06 23:12:43.941269780 -0500 --- hdf-4.2.10/hdf/src/hdfi.h.arm 2014-02-14 09:28:56.685514824 -0700
@@ -79,6 +79,7 @@ +++ 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_LINUXPPC 0x1111
#define DFMT_LINUXSPARC 0x1111 #define DFMT_LINUXSPARC 0x1111
#define DFMT_LINUX390 0x1111 #define DFMT_LINUX390 0x1111
@ -21,7 +21,7 @@ diff -r -U 3 -p hdf-4.2.7.orig/hdf/src/hdfi.h hdf-4.2.7/hdf/src/hdfi.h
/* I/O library constants */ /* I/O library constants */
#define UNIXUNBUFIO 1 #define UNIXUNBUFIO 1
@@ -1463,6 +1464,57 @@ typedef int hdf_pint_t; @@ -1187,6 +1188,57 @@ typedef int hdf_pint_t;
#endif /* Linux s390/s390x */ #endif /* Linux s390/s390x */

@ -1,76 +0,0 @@
diff -up hdf-4.2.9/hdf/src/df24ff.f.declaration hdf-4.2.9/hdf/src/df24ff.f
--- hdf-4.2.9/hdf/src/df24ff.f.declaration 2013-02-07 21:44:52.000000000 -0700
+++ hdf-4.2.9/hdf/src/df24ff.f 2013-02-15 16:48:08.490664851 -0700
@@ -117,7 +117,7 @@ C---------------------------------------
integer function d2rref(name, ref)
character*(*) name
- integer ref
+ integer ref, d2irref
d2rref = d2irref(name, ref, len(name))
return
@@ -136,6 +136,7 @@ C---------------------------------------
integer function d2nimg(name)
character*(*) name
+ integer d2inimg
d2nimg = d2inimg(name, len(name))
return
@@ -230,7 +231,7 @@ C---------------------------------------
integer function df24readref(name, ref)
character*(*) name
- integer ref
+ integer ref, d2irref
df24readref = d2irref(name, ref, len(name))
return
diff -up hdf-4.2.9/hdf/src/dfufp2iff.f.declaration hdf-4.2.9/hdf/src/dfufp2iff.f
--- hdf-4.2.9/hdf/src/dfufp2iff.f.declaration 2013-02-07 21:44:52.000000000 -0700
+++ hdf-4.2.9/hdf/src/dfufp2iff.f 2013-02-15 16:53:28.367159528 -0700
@@ -49,7 +49,7 @@ C---------------------------------------
real max, min, hscale, vscale, data
character*(*) palette
character*(*) outfile
- integer ctmethod, hres, vres, compress
+ integer ctmethod, hres, vres, compress, duif2i
duf2im = duif2i(hdim,vdim,max,min,hscale,vscale,data,palette,
* outfile,ctmethod,hres,vres,compress, len(outfile))
@@ -85,7 +85,7 @@ C---------------------------------------
real max, min, hscale, vscale, data
character*(*) palette
character*(*) outfile
- integer ctmethod, hres, vres, compress
+ integer ctmethod, hres, vres, compress, duif2i
dfufptoimage =
* duif2i(hdim,vdim,max,min,hscale,vscale,data,palette,
diff -up hdf-4.2.9/hdf/src/vg.c.declaration hdf-4.2.9/hdf/src/vg.c
--- hdf-4.2.9/hdf/src/vg.c.declaration 2013-02-07 21:44:52.000000000 -0700
+++ hdf-4.2.9/hdf/src/vg.c 2013-02-15 16:44:05.731947549 -0700
@@ -81,6 +81,7 @@ PRIVATE int32 matchnocase
(char *strx, char *stry);
#endif /* VDATA_FIELDS_ALL_UPPER */
+
#ifdef VDATA_FIELDS_ALL_UPPER
/*-----------------------------------------------------------------
NAME
@@ -116,6 +117,14 @@ matchnocase(char *strx, /* IN: first str
} /* matchnocase */
#endif /* VDATA_FIELDS_ALL_UPPER */
+/* Forward declarations */
+intn
+VSIgetvdatas(int32 id,
+ const char *vsclass,
+ const uintn start_vd,
+ const uintn n_vds,
+ uint16 *refarray);
+
/* ------------------------------------------------------------------
NAME
VSelts -- get number of elements in a vdata

@ -0,0 +1,66 @@
diff -up hdf-4.2.10/config/examples.am.destdir hdf-4.2.10/config/examples.am
--- hdf-4.2.10/config/examples.am.destdir 2014-02-09 19:28:50.000000000 -0700
+++ hdf-4.2.10/config/examples.am 2014-02-14 10:02:35.039386643 -0700
@@ -45,7 +45,7 @@ CLEANFILES=$(EXAMPLE_PROG)
# How to create EXAMPLEDIR if it doesn't already exist
$(EXAMPLEDIR):
- mkdir -p $@
+ mkdir -p $(DESTDIR)$@
# Install and uninstall rules. We install the source files, not the
# example programs themselves.
@@ -57,39 +57,39 @@ uninstall-local:
install-examples: $(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:

@ -0,0 +1,50 @@
diff -up hdf-4.2.10/hdf/examples/Makefile.am.examplesdir hdf-4.2.10/hdf/examples/Makefile.am
--- hdf-4.2.10/hdf/examples/Makefile.am.examplesdir 2014-02-09 19:28:50.000000000 -0700
+++ hdf-4.2.10/hdf/examples/Makefile.am 2014-02-14 10:10:17.854023687 -0700
@@ -46,8 +46,8 @@ INSTALL_TOP_SCRIPT_FILES = run-all-ex.sh
INSTALL_TOP_FILES = README
# Where to install example files
-EXAMPLEDIR=$(prefix)/examples/c
-EXAMPLETOPDIR=$(prefix)/examples
+EXAMPLEDIR=$(docdir)/examples/c
+EXAMPLETOPDIR=$(docdir)/examples
# How to build C programs using h4cc
$(EXTRA_PROG): $(H4CC)
diff -up hdf-4.2.10/hdf/fortran/examples/Makefile.am.examplesdir hdf-4.2.10/hdf/fortran/examples/Makefile.am
--- hdf-4.2.10/hdf/fortran/examples/Makefile.am.examplesdir 2014-02-09 19:28:49.000000000 -0700
+++ hdf-4.2.10/hdf/fortran/examples/Makefile.am 2014-02-14 10:10:30.082961395 -0700
@@ -41,7 +41,7 @@ INSTALL_FILES= VD_read_from_vdata.f VD_r
INSTALL_SCRIPT_FILES = run-fortran-ex.sh
# Where to install Fortran example files
-EXAMPLEDIR=$(prefix)/examples/fortran
+EXAMPLEDIR=$(docdir)/examples/fortran
# How to build Fortran programs using h4fc
$(EXTRA_PROG): $(H4FC)
diff -up hdf-4.2.10/mfhdf/examples/Makefile.am.examplesdir hdf-4.2.10/mfhdf/examples/Makefile.am
--- hdf-4.2.10/mfhdf/examples/Makefile.am.examplesdir 2014-02-09 19:28:45.000000000 -0700
+++ hdf-4.2.10/mfhdf/examples/Makefile.am 2014-02-14 10:09:41.465209051 -0700
@@ -23,7 +23,7 @@ INSTALL_FILES = SD_create_sds.c SD_write
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=$(prefix)/examples/c
+EXAMPLEDIR=$(docdir)/examples/c
# How to build programs using h4cc
$(EXTRA_PROG): $(H4CC)
diff -up hdf-4.2.10/mfhdf/fortran/examples/Makefile.am.examplesdir hdf-4.2.10/mfhdf/fortran/examples/Makefile.am
--- hdf-4.2.10/mfhdf/fortran/examples/Makefile.am.examplesdir 2014-02-09 19:28:44.000000000 -0700
+++ hdf-4.2.10/mfhdf/fortran/examples/Makefile.am 2014-02-14 10:09:52.818151212 -0700
@@ -24,7 +24,7 @@ INSTALL_FILES=SD_create_sds.f SD_write_t
SD_set_attr.f SD_get_attr.f SD_compress_sds.f SD_chunking_example.f
# Where to install example files
-EXAMPLEDIR=$(prefix)/examples/fortran
+EXAMPLEDIR=$(docdir)/examples/fortran
# How to build Fortran programs using h4fc
$(EXTRA_PROG): $(H4FC)

File diff suppressed because it is too large Load Diff

@ -1,7 +1,7 @@
diff -up hdf-4.2.6/hdf/src/hdfi.h.s390 hdf-4.2.6/hdf/src/hdfi.h diff -up hdf-4.2.10/hdf/src/hdfi.h.s390 hdf-4.2.10/hdf/src/hdfi.h
--- hdf-4.2.6/hdf/src/hdfi.h.s390 2011-06-21 16:31:39.106504782 -0600 --- hdf-4.2.10/hdf/src/hdfi.h.s390 2014-02-14 09:20:40.521202091 -0700
+++ hdf-4.2.6/hdf/src/hdfi.h 2011-06-21 16:31:39.142504332 -0600 +++ hdf-4.2.10/hdf/src/hdfi.h 2014-02-14 09:20:40.525202067 -0700
@@ -78,6 +78,7 @@ @@ -77,6 +77,7 @@
#define DFMT_POWERPC64 0x1111 #define DFMT_POWERPC64 0x1111
#define DFMT_LINUXPPC 0x1111 #define DFMT_LINUXPPC 0x1111
#define DFMT_LINUXSPARC 0x1111 #define DFMT_LINUXSPARC 0x1111
@ -9,7 +9,7 @@ diff -up hdf-4.2.6/hdf/src/hdfi.h.s390 hdf-4.2.6/hdf/src/hdfi.h
/* I/O library constants */ /* I/O library constants */
#define UNIXUNBUFIO 1 #define UNIXUNBUFIO 1
@@ -1402,6 +1403,66 @@ typedef int hdf_pint_t; @@ -1126,6 +1127,66 @@ typedef int hdf_pint_t;
#endif /* Linux Sparc32/64 */ #endif /* Linux Sparc32/64 */
@ -76,9 +76,9 @@ diff -up hdf-4.2.6/hdf/src/hdfi.h.s390 hdf-4.2.6/hdf/src/hdfi.h
/*-----------------------------------------------------*/ /*-----------------------------------------------------*/
/* 64-bit Free BSD */ /* 64-bit Free BSD */
diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c diff -up hdf-4.2.10/mfhdf/fortran/jackets.c.in.s390 hdf-4.2.10/mfhdf/fortran/jackets.c.in
--- hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 2011-06-21 16:31:39.080505105 -0600 --- hdf-4.2.10/mfhdf/fortran/jackets.c.in.s390 2014-02-14 09:20:40.518202109 -0700
+++ hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c 2011-06-21 16:31:39.149504243 -0600 +++ hdf-4.2.10/mfhdf/fortran/jackets.c.in 2014-02-14 09:23:08.002375061 -0700
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
struct ncfils { /* This will be a common block from Fortran */ struct ncfils { /* This will be a common block from Fortran */
@ -97,7 +97,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
int ll; int ll;
#else #else
long ll; long ll;
@@ -430,7 +430,7 @@ stoig(shorts, ints, dims, basis, ndims) @@ -420,7 +420,7 @@ stoig(shorts, ints, dims, basis, ndims)
} }
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -106,7 +106,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
/* /*
* Convert multi-dimensional array of NCLONGs stored in ints to packed * Convert multi-dimensional array of NCLONGs stored in ints to packed
* array of longs, in malloc'ed space. Returns pointer to longs or NULL * array of longs, in malloc'ed space. Returns pointer to longs or NULL
@@ -916,7 +916,7 @@ nncvpt1(cdfid, varid, indices, value, rc @@ -908,7 +908,7 @@ nncvpt1(cdfid, varid, indices, value, rc
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -115,7 +115,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long longs = *(int *)value; long longs = *(int *)value;
@@ -1030,7 +1030,7 @@ nncvpt(cdfid, varid, start, count, value @@ -1022,7 +1022,7 @@ nncvpt(cdfid, varid, start, count, value
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -124,7 +124,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itol (value, ncount, ndims); long *longs = itol (value, ncount, ndims);
@@ -1141,7 +1141,7 @@ nncvptg(cdfid, varid, start, count, stri @@ -1133,7 +1133,7 @@ nncvptg(cdfid, varid, start, count, stri
tmpbasis = nctypelen(NC_LONG); tmpbasis = nctypelen(NC_LONG);
else else
#endif #endif
@ -133,7 +133,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
if (datatype == NC_LONG) if (datatype == NC_LONG)
tmpbasis = sizeof(int); tmpbasis = sizeof(int);
else else
@@ -1198,7 +1198,7 @@ nncvptg(cdfid, varid, start, count, stri @@ -1190,7 +1190,7 @@ nncvptg(cdfid, varid, start, count, stri
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -142,7 +142,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { 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);
@@ -1334,7 +1334,7 @@ nncvgt1(cdfid, varid, indices, value, rc @@ -1326,7 +1326,7 @@ nncvgt1(cdfid, varid, indices, value, rc
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -151,7 +151,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long longs; long longs;
@@ -1476,7 +1476,7 @@ nncvgt(cdfid, varid, start, count, value @@ -1468,7 +1468,7 @@ nncvgt(cdfid, varid, start, count, value
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -160,7 +160,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { 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 */
@@ -1614,7 +1614,7 @@ nncvgtg(cdfid, varid, start, count, stri @@ -1606,7 +1606,7 @@ nncvgtg(cdfid, varid, start, count, stri
tmpbasis = nctypelen(NC_LONG); tmpbasis = nctypelen(NC_LONG);
else else
#endif #endif
@ -169,7 +169,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
if (datatype == NC_LONG) if (datatype == NC_LONG)
tmpbasis = sizeof(int); tmpbasis = sizeof(int);
else else
@@ -1685,7 +1685,7 @@ nncvgtg(cdfid, varid, start, count, stri @@ -1677,7 +1677,7 @@ nncvgtg(cdfid, varid, start, count, stri
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -178,7 +178,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { 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 */
@@ -1851,7 +1851,7 @@ nncapt(cdfid, varid, attname, datatype, @@ -1843,7 +1843,7 @@ nncapt(cdfid, varid, attname, datatype,
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -187,7 +187,7 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) { if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
long *longs = itol (value, attlen, 1); long *longs = itol (value, attlen, 1);
@@ -2016,7 +2016,7 @@ nncagt(cdfid, varid, attname, value, rco @@ -2008,7 +2008,7 @@ nncagt(cdfid, varid, attname, value, rco
return; return;
} /* else */ } /* else */
#endif /* FORTRAN_HAS_NO_SHORT */ #endif /* FORTRAN_HAS_NO_SHORT */
@ -196,79 +196,67 @@ diff -up hdf-4.2.6/mfhdf/fortran/config/jackets-linux.c.s390 hdf-4.2.6/mfhdf/for
#ifdef HDF #ifdef HDF
if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) { 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 /* EIP We need to use int buffer to read data in on the platforms where long is 8 bytes
diff -up hdf-4.2.6/mfhdf/libsrc/array.c.s390 hdf-4.2.6/mfhdf/libsrc/array.c diff -up hdf-4.2.10/mfhdf/libsrc/array.c.s390 hdf-4.2.10/mfhdf/libsrc/array.c
--- hdf-4.2.6/mfhdf/libsrc/array.c.s390 2007-11-15 16:40:57.000000000 -0700 --- hdf-4.2.10/mfhdf/libsrc/array.c.s390 2014-02-14 09:20:50.693141452 -0700
+++ hdf-4.2.6/mfhdf/libsrc/array.c 2011-06-21 16:31:39.150504231 -0600 +++ hdf-4.2.10/mfhdf/libsrc/array.c 2014-02-14 09:26:40.897231851 -0700
@@ -622,7 +622,7 @@ xdr_NC_array(xdrs, app) @@ -620,7 +620,7 @@ xdr_NC_array(xdrs, app)
xdr_NC_fnct = xdr_shorts ;
goto func ;
case NC_LONG : case NC_LONG :
#if defined _CRAYMPP -#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
xdr_NC_fnct = xdr_short; +#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
-#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 ; xdr_NC_fnct = xdr_int ;
#else #else
xdr_NC_fnct = xdr_long ; xdr_NC_fnct = xdr_long ;
diff -up hdf-4.2.6/mfhdf/libsrc/cdf.c.s390 hdf-4.2.6/mfhdf/libsrc/cdf.c diff -up hdf-4.2.10/mfhdf/libsrc/cdf.c.s390 hdf-4.2.10/mfhdf/libsrc/cdf.c
--- hdf-4.2.6/mfhdf/libsrc/cdf.c.s390 2011-04-13 12:51:13.000000000 -0600 --- hdf-4.2.10/mfhdf/libsrc/cdf.c.s390 2014-02-14 09:20:50.694141447 -0700
+++ hdf-4.2.6/mfhdf/libsrc/cdf.c 2011-06-21 16:31:39.155504169 -0600 +++ hdf-4.2.10/mfhdf/libsrc/cdf.c 2014-02-14 09:27:33.826948531 -0700
@@ -3660,7 +3660,7 @@ NC_var *vp ; @@ -3662,7 +3662,7 @@ NC_var *vp ;
break ;
case NC_LONG :
alen /= 4 ; alen /= 4 ;
#if defined _CRAYMPP -#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
xdr_NC_fnct = xdr_short; +#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
-#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 ; xdr_NC_fnct = xdr_int ;
#else #else
xdr_NC_fnct = xdr_long ; xdr_NC_fnct = xdr_long ;
diff -up hdf-4.2.6/mfhdf/libsrc/config/netcdf-linux.h.s390 hdf-4.2.6/mfhdf/libsrc/config/netcdf-linux.h diff -up hdf-4.2.10/mfhdf/libsrc/netcdf.h.in.s390 hdf-4.2.10/mfhdf/libsrc/netcdf.h.in
--- hdf-4.2.6/mfhdf/libsrc/config/netcdf-linux.h.s390 2011-04-13 12:51:13.000000000 -0600 --- hdf-4.2.10/mfhdf/libsrc/netcdf.h.in.s390 2014-02-14 09:20:51.260138101 -0700
+++ hdf-4.2.6/mfhdf/libsrc/config/netcdf-linux.h 2011-06-21 16:33:03.376451262 -0600 +++ hdf-4.2.10/mfhdf/libsrc/netcdf.h.in 2014-02-14 09:27:06.286095942 -0700
@@ -300,7 +300,7 @@ typedef double ncdouble; @@ -293,7 +293,7 @@ typedef double ncdouble;
*/ /*
#if defined _CRAYMPP * Variables/attributes of type NC_LONG should use the C type 'nclong'
typedef short nclong;
-#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__
typedef int nclong;
#else
diff -up hdf-4.2.6/mfhdf/libsrc/netcdf.h.in.s390 hdf-4.2.6/mfhdf/libsrc/netcdf.h.in
--- hdf-4.2.6/mfhdf/libsrc/netcdf.h.in.s390 2011-06-21 16:31:39.094504932 -0600
+++ hdf-4.2.6/mfhdf/libsrc/netcdf.h.in 2011-06-21 16:31:39.159504118 -0600
@@ -295,7 +295,7 @@ typedef double ncdouble;
*/ */
#if defined _CRAYMPP -#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
typedef short nclong; +#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
-#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__ * LP64 (also known as 4/8/8) denotes long and pointer as 64 bit types.
typedef int nclong; * http://www.unix.org/version2/whatsnew/lp64_wp.html
#else diff -up hdf-4.2.10/mfhdf/libsrc/putget.c.s390 hdf-4.2.10/mfhdf/libsrc/putget.c
typedef long nclong; /* default, compatible type */ --- hdf-4.2.10/mfhdf/libsrc/putget.c.s390 2014-02-14 09:20:51.261138095 -0700
diff -up hdf-4.2.6/mfhdf/libsrc/putget.c.s390 hdf-4.2.6/mfhdf/libsrc/putget.c +++ hdf-4.2.10/mfhdf/libsrc/putget.c 2014-02-14 09:24:03.676074745 -0700
--- hdf-4.2.6/mfhdf/libsrc/putget.c.s390 2009-09-07 15:02:22.000000000 -0600 @@ -664,7 +664,7 @@ Void *values ;
+++ hdf-4.2.6/mfhdf/libsrc/putget.c 2011-06-21 16:31:39.162504082 -0600 case NC_SHORT :
@@ -652,7 +652,7 @@ Void *values ; return( xdr_NCvshort(xdrs, (unsigned)rem/2, (short *)values) ) ;
case NC_LONG : case NC_LONG :
#if defined _CRAYMPP -#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
return( xdr_short(xdrs, (nclong *)values) ) ; +#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
-#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) ) ; return( xdr_int(xdrs, (nclong *)values) ) ;
#else #else
return( xdr_long(xdrs, (nclong *)values) ) ; return( xdr_long(xdrs, (nclong *)values) ) ;
@@ -1966,7 +1966,7 @@ Void *values ; @@ -1975,7 +1975,7 @@ Void *values ;
} /* else */
return(TRUE) ;
case NC_LONG : case NC_LONG :
#if defined _CRAYMPP -#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__
xdr_NC_fnct = xdr_short; +#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ || defined __s390x__
-#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 ; xdr_NC_fnct = xdr_int ;
#else #else
xdr_NC_fnct = xdr_long ; xdr_NC_fnct = xdr_long ;
diff -up hdf-4.2.6/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.6/mfhdf/libsrc/xdrposix.c diff -up hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.10/mfhdf/libsrc/xdrposix.c
--- hdf-4.2.6/mfhdf/libsrc/xdrposix.c.s390 2009-03-03 15:58:27.000000000 -0700 --- hdf-4.2.10/mfhdf/libsrc/xdrposix.c.s390 2014-02-09 19:28:45.000000000 -0700
+++ hdf-4.2.6/mfhdf/libsrc/xdrposix.c 2011-06-21 16:31:39.165504044 -0600 +++ hdf-4.2.10/mfhdf/libsrc/xdrposix.c 2014-02-14 09:26:17.898354986 -0700
@@ -283,7 +283,7 @@ int nbytes; @@ -250,7 +250,7 @@ int nbytes;
static bool_t xdrposix_getlong(); static bool_t xdrposix_getlong();
static bool_t xdrposix_putlong(); static bool_t xdrposix_putlong();
@ -277,7 +265,7 @@ diff -up hdf-4.2.6/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.6/mfhdf/libsrc/xdrposix.
static bool_t xdrposix_getint(); static bool_t xdrposix_getint();
static bool_t xdrposix_putint(); static bool_t xdrposix_putint();
#endif #endif
@@ -300,7 +300,7 @@ static long * xdrposix_inline(); @@ -264,7 +264,7 @@ static long * xdrposix_inline();
#if (defined __sun && defined _LP64) #if (defined __sun && defined _LP64)
static rpc_inline_t * xdrposix_inline(); static rpc_inline_t * xdrposix_inline();
#else #else
@ -286,7 +274,7 @@ diff -up hdf-4.2.6/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.6/mfhdf/libsrc/xdrposix.
static int32_t * xdrposix_inline(); static int32_t * xdrposix_inline();
#else #else
#if (defined __alpha ) #if (defined __alpha )
@@ -331,9 +331,9 @@ static struct xdr_ops xdrposix_ops = { @@ -294,9 +294,9 @@ static struct xdr_ops xdrposix_ops = {
xdrposix_getpos, /* get offset in the stream */ xdrposix_getpos, /* get offset in the stream */
xdrposix_setpos, /* set offset in the stream */ xdrposix_setpos, /* set offset in the stream */
xdrposix_inline, /* prime stream for inline macros */ xdrposix_inline, /* prime stream for inline macros */
@ -298,25 +286,25 @@ diff -up hdf-4.2.6/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.6/mfhdf/libsrc/xdrposix.
NULL, /* no xdr_control function defined */ NULL, /* no xdr_control function defined */
#endif #endif
/* Solaris 64-bit (arch=v9 and arch=amd64) has 64 bits long and 32 bits int. */ /* Solaris 64-bit (arch=v9 and arch=amd64) has 64 bits long and 32 bits int. */
@@ -468,7 +468,7 @@ xdrposix_getlong(xdrs, lp) @@ -431,7 +431,7 @@ xdrposix_getlong(xdrs, lp)
#endif #endif
{ {
unsigned char *up = (unsigned char *)lp ; unsigned char *up = (unsigned char *)lp ;
-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__)) -#if (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 __s390x__ || (defined __hpux && __LP64__))
*lp = 0 ; *lp = 0 ;
up += (sizeof(long) - 4) ; up += (sizeof(long) - 4) ;
#endif #endif
@@ -495,7 +495,7 @@ xdrposix_putlong(xdrs, lp) @@ -458,7 +458,7 @@ xdrposix_putlong(xdrs, lp)
netlong mycopy = htonl(*lp); netlong mycopy = htonl(*lp);
up = (unsigned char *)&mycopy; up = (unsigned char *)&mycopy;
#endif #endif
-#if (defined CRAY || defined AIX5L64 || defined __powerpc64__ || (defined __hpux && __LP64__)) -#if (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 __s390x__ || (defined __hpux && __LP64__))
up += (sizeof(long) - 4) ; up += (sizeof(long) - 4) ;
#endif #endif
@@ -592,7 +592,7 @@ static rpc_inline_t * @@ -552,7 +552,7 @@ static rpc_inline_t *
#if (defined __alpha) #if (defined __alpha)
static int* static int*
#else #else
@ -325,7 +313,7 @@ diff -up hdf-4.2.6/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.6/mfhdf/libsrc/xdrposix.
static int32_t * static int32_t *
#else #else
static netlong * static netlong *
@@ -621,7 +621,7 @@ int @@ -580,7 +580,7 @@ int
return (NULL); return (NULL);
} }
@ -334,15 +322,15 @@ diff -up hdf-4.2.6/mfhdf/libsrc/xdrposix.c.s390 hdf-4.2.6/mfhdf/libsrc/xdrposix.
static bool_t static bool_t
xdrposix_getint(xdrs, lp) xdrposix_getint(xdrs, lp)
diff -up hdf-4.2.6/mfhdf/ncgen/ncgen.l.s390 hdf-4.2.6/mfhdf/ncgen/ncgen.l diff -up hdf-4.2.10/mfhdf/ncgen/ncgen.l.s390 hdf-4.2.10/mfhdf/ncgen/ncgen.l
--- hdf-4.2.6/mfhdf/ncgen/ncgen.l.s390 2011-06-21 16:31:39.096504907 -0600 --- hdf-4.2.10/mfhdf/ncgen/ncgen.l.s390 2014-02-14 09:20:51.262138089 -0700
+++ hdf-4.2.6/mfhdf/ncgen/ncgen.l 2011-06-21 16:31:39.166504031 -0600 +++ hdf-4.2.10/mfhdf/ncgen/ncgen.l 2014-02-14 09:27:53.015845830 -0700
@@ -134,7 +134,7 @@ FloatInf|Infinity|Inf { /* float miss @@ -113,7 +113,7 @@ FloatInf|Infinity|Inf { /* float miss
yyerror(errstr); yyerror(errstr);
} }
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || defined __powerpc64__ -#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__ || __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__ || __powerpc64__ || defined __s390x__
if (dd < INT_MIN || dd > INT_MAX) if (dd < INT_MIN || dd > INT_MAX)
#else #else
#if defined (_CRAYMPP) if (dd < LONG_MIN || dd > LONG_MAX)

@ -1,35 +0,0 @@
diff -up hdf-4.2.9/hdf/test/sdmms.c.wrap hdf-4.2.9/hdf/test/sdmms.c
--- hdf-4.2.9/hdf/test/sdmms.c.wrap 2013-02-07 21:44:52.000000000 -0700
+++ hdf-4.2.9/hdf/test/sdmms.c 2013-02-16 20:33:39.118623828 -0700
@@ -63,9 +63,10 @@ static int32 ical5;
void
test_sdmms(void)
{
- int i, j, err, err1, err2, ret;
- intn rank;
- int32 dims[2];
+ uint32 i, j;
+ int err, err1, err2, ret;
+ intn rank;
+ int32 dims[2];
rank = 2;
dims[0] = 10;
@@ -87,7 +88,7 @@ test_sdmms(void)
ui16[i][j] = (uint16) ((i * 6000) + j); /* range: 0 ~ 60000 */
i32[i][j] = (int32) ((i * 60000) - 300000 + j); /* range: 0 ~ 2-billion */
- ui32[i][j] = (uint32) ((i * 400000000) + j); /* range: 0 ~ 4-billion */
+ ui32[i][j] = (uint32) ((i * 400000000U) + j); /* range: 0 ~ 4-billion */
}
f32scale[i] = (float32) ((i * 40) + j); /* range: 0 ~ 4-billion */
@@ -99,7 +100,7 @@ test_sdmms(void)
ui16scale[i] = (uint16) ((i * 6000) + j); /* range: 0 ~ 60000 */
i32scale[i] = (int32) ((i * 60000) - 300000 + j); /* range: 0 ~ 2-billion */
- ui32scale[i] = (uint32) ((i * 400000000) + j); /* range: 0 ~ 4-billion */
+ ui32scale[i] = (uint32) ((i * 400000000U) + j); /* range: 0 ~ 4-billion */
}
cal1 = (float64) 10.0;

@ -1,6 +1,6 @@
Name: hdf Name: hdf
Version: 4.2.9 Version: 4.2.10
Release: 4%{?dist} Release: 1%{?dist}
Summary: A general purpose library and file format for storing scientific data Summary: A general purpose library and file format for storing scientific data
License: BSD License: BSD
Group: System Environment/Libraries Group: System Environment/Libraries
@ -9,16 +9,18 @@ Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/%{name}-%{version}.tar.bz2
Patch0: hdf-4.2.5-maxavailfiles.patch Patch0: hdf-4.2.5-maxavailfiles.patch
Patch1: hdf-ppc.patch Patch1: hdf-ppc.patch
Patch2: hdf-4.2.4-sparc.patch Patch2: hdf-4.2.4-sparc.patch
Patch3: hdf-4.2.4-s390.patch Patch3: hdf-s390.patch
Patch4: hdf-4.2.7-arm.patch Patch4: hdf-arm.patch
# Add some missing declarations # Support DESTDIR in install-examples
Patch5: hdf-declaration.patch Patch5: hdf-destdir.patch
# Patch to fix integer wrapping in test # Install examples into the right location
Patch6: hdf-wrap.patch Patch6: hdf-examplesdir.patch
# Fix build with -Werror=format-security # Fix build with -Werror=format-security
# https://bugzilla.redhat.com/show_bug.cgi?id=1037120 # https://bugzilla.redhat.com/show_bug.cgi?id=1037120
Patch7: hdf-format.patch Patch7: hdf-format.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# For destdir/examplesdir patches
BuildRequires: automake libtool
BuildRequires: flex byacc libjpeg-devel zlib-devel BuildRequires: flex byacc libjpeg-devel zlib-devel
%if "%{?dist}" != ".el4" %if "%{?dist}" != ".el4"
BuildRequires: gcc-gfortran BuildRequires: gcc-gfortran
@ -55,14 +57,15 @@ HDF development headers and libraries.
%patch2 -p1 -b .sparc %patch2 -p1 -b .sparc
%patch3 -p1 -b .s390 %patch3 -p1 -b .s390
%patch4 -p1 -b .arm %patch4 -p1 -b .arm
%patch5 -p1 -b .declaration %patch5 -p1 -b .destdir
%patch6 -p1 -b .wrap %patch6 -p1 -b .examplesdir
%patch7 -p1 -b .format %patch7 -p1 -b .format
# For destdir/examplesdir patches
autoreconf -i
chmod a-x *hdf/*/*.c hdf/*/*.h chmod a-x *hdf/*/*.c hdf/*/*.h
# restore include file timestamps modified by patching # restore include file timestamps modified by patching
touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h touch -c -r ./hdf/src/hdfi.h.ppc ./hdf/src/hdfi.h
touch -c -r ./mfhdf/libsrc/config/netcdf-linux.h.s390 ./mfhdf/libsrc/config/netcdf-linux.h
%build %build
@ -75,12 +78,12 @@ export FFLAGS="$RPM_OPT_FLAGS -fPIC -ffixed-line-length-none"
make make
# correct the timestamps based on files used to generate the header files # 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/hdf.inc hdf/src/hdf.f90
touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90 touch -c -r hdf/src/dffunc.inc hdf/src/dffunc.f90
touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90 touch -c -r mfhdf/fortran/mffunc.inc mfhdf/fortran/mffunc.f90
# netcdf fortran include need same treatement, but they are not shipped # netcdf fortran include need same treatement, but they are not shipped
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p' make install DESTDIR=$RPM_BUILD_ROOT INSTALL='install -p'
@ -103,6 +106,7 @@ touch -c -r h4config.h h4config.h.tmp
mv h4config.h.tmp h4config.h mv h4config.h.tmp h4config.h
popd popd
%check %check
# bugzilla #961007 # bugzilla #961007
%ifnarch ppc %{power64} %ifnarch ppc %{power64}
@ -117,6 +121,7 @@ rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
%doc COPYING MANIFEST README.txt release_notes/*.txt %doc COPYING MANIFEST README.txt release_notes/*.txt
%exclude %{_defaultdocdir}/%{name}/examples
%{_bindir}/* %{_bindir}/*
%{_mandir}/man1/*.gz %{_mandir}/man1/*.gz
@ -124,9 +129,15 @@ rm -rf $RPM_BUILD_ROOT
%defattr(-,root,root,0755) %defattr(-,root,root,0755)
%{_includedir}/%{name}/ %{_includedir}/%{name}/
%{_libdir}/%{name}/ %{_libdir}/%{name}/
%{_defaultdocdir}/%{name}/examples
%changelog %changelog
* 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 * Sat Feb 1 2014 Orion Poplawski <orion@cora.nwra.com> 4.2.9-4
- Fix build with -Werror=format-security (bug #1037120) - Fix build with -Werror=format-security (bug #1037120)

Loading…
Cancel
Save