rpms/hdf/devel hdf-4.2r2-sparc.patch,NONE,1.1 hdf.spec,1.20,1.21

Orion Poplawski (orion) fedora-extras-commits at redhat.com
Mon Jan 7 21:17:58 UTC 2008


Author: orion

Update of /cvs/pkgs/rpms/hdf/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv12263

Modified Files:
	hdf.spec 
Added Files:
	hdf-4.2r2-sparc.patch 
Log Message:
* Mon Jan  7 2008 Orion Poplawski <orion at cora.nwra.com> 4.2.r2-5
- Add patches for sparc support (bug #427639)


hdf-4.2r2-sparc.patch:

--- NEW FILE hdf-4.2r2-sparc.patch ---
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
@@ -77,6 +77,7 @@
 #define     DFMT_LINUX64        0x4441
 #define     DFMT_POWERPC64      0x1111
 #define     DFMT_LINUXPPC       0x1111
+#define     DFMT_LINUXSPARC     0x1111
 
 /* I/O library constants */
 #define UNIXUNBUFIO 1
@@ -1444,6 +1445,66 @@
 
 #endif /*Linux PPC */
 
+/* Linux Sparc32/64 */
+#if defined __sparc__ || !defined __sparc64__
+
+#ifdef GOT_MACHINE
+If you get an error on this line more than one machine type has been defined.
+Please check your Makefile.
+#endif
+#define GOT_MACHINE
+
+#include <sys/file.h>               /* for unbuffered i/o stuff */
+#include <sys/stat.h>
+#define DF_MT             DFMT_LINUXPPC
+typedef void              VOID;
+typedef void              *VOIDP;
+typedef char              *_fcd;
+typedef char              char8;
+typedef unsigned char     uchar8;
+typedef char              int8;
+typedef unsigned char     uint8;
+typedef short int         int16;
+typedef unsigned short int uint16;
+#ifdef _LP64 /* 64-bit environment */
+typedef int               int32;
+typedef unsigned int      uint32;
+#else /* 32-bit environment */
+typedef long int          int32;
+typedef unsigned long int uint32;
+#endif
+typedef int               intn;
+typedef unsigned int      uintn;
+typedef int               intf;     /* size of INTEGERs in Fortran compiler */
+typedef float             float32;
+typedef double            float64;
+#ifdef _LP64 /* 64-bit environment */
+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
+#else /* 32-bit environment */
+typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
+#endif
+#define FNAME_POST_UNDERSCORE
+#define _fcdtocp(desc) (desc)
+#ifdef  HAVE_FMPOOL
+#define FILELIB PAGEBUFIO  /* enable page buffering */
+#else
+#define FILELIB UNIXBUFIO
+#endif
+
+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
+
+/* Determine the memory manager we are going to use. Valid values are: */
+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
+/*  what each does */
+#define JMEMSYS         MEM_ANSI
+
+#ifdef __GNUC__
+#define HAVE_STDC
+#define INCLUDES_ARE_ANSI
+#endif
+
+#endif /* Linux Sparc32/64 */
+
 /*#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.spec
===================================================================
RCS file: /cvs/pkgs/rpms/hdf/devel/hdf.spec,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -r1.20 -r1.21
--- hdf.spec	29 Oct 2007 12:02:04 -0000	1.20
+++ hdf.spec	7 Jan 2008 21:17:13 -0000	1.21
@@ -1,6 +1,6 @@
 Name: hdf
 Version: 4.2r2
-Release: 4%{?dist}
+Release: 5%{?dist}
 Summary: A general purpose library and file format for storing scientific data
 License: BSD
 Group: System Environment/Libraries
@@ -8,6 +8,7 @@
 Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/HDF%{version}.tar.gz
 Patch0: hdf-4.2r1p4-maxavailfiles.patch
 Patch1: hdf-4.2r2-ppc.patch
+Patch2: hdf-4.2r2-sparc.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: flex byacc libjpeg-devel zlib-devel
 BuildRequires: gcc-gfortran
@@ -37,6 +38,7 @@
 %setup -q -n HDF%{version}
 %patch -p1 -b .maxavailfiles
 %patch1 -p1 -b .ppc
+%patch2 -p1 -b .sparc
 
 chmod a-x *hdf/*/*.c hdf/*/*.h
 # restore include file timestamps modified by patching
@@ -107,6 +109,9 @@
 
 
 %changelog
+* Mon Jan  7 2008 Orion Poplawski <orion at cora.nwra.com> 4.2.r2-5
+- Add patches for sparc support (bug #427639)
+
 * Mon Oct 29 2007 Patrice Dumas <pertusus at free.fr> 4.2r2-4
 - install the netcdf.h file that describes the netcdf2 hdf enabled
   API




More information about the fedora-extras-commits mailing list