rpms/hdf/FC-4 hdf-4.2r1-ppc.patch,NONE,1.1 hdf.spec,1.5,1.6

Orion Poplawski (orion) fedora-extras-commits at redhat.com
Mon Feb 20 16:09:39 UTC 2006


Author: orion

Update of /cvs/extras/rpms/hdf/FC-4
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18866

Modified Files:
	hdf.spec 
Added Files:
	hdf-4.2r1-ppc.patch 
Log Message:
- Compile with -DHAVE_NETCDF for gdl hdf/netcdf compatibility
- Add patch to build on ppc


hdf-4.2r1-ppc.patch:

--- NEW FILE hdf-4.2r1-ppc.patch ---
--- HDF4.2r1/hdf/src/hdfi.h.orig	2005-01-24 20:36:44.000000000 -0700
+++ HDF4.2r1/hdf/src/hdfi.h	2006-02-02 21:54:59.347516688 -0700
@@ -72,6 +72,7 @@
 #define     DFMT_CRAYMPP        0x1171
 #define     DFMT_IA64           0x4441
 #define     DFMT_LINUX64        0x4441
+#define     DFMT_LINUXPPC       0x1111
 
 /* I/O library constants */
 #define UNIXUNBUFIO 1
@@ -1326,6 +1327,57 @@
 
 #endif /*Linux 64 */
 
+/* Linux PPC */
+#if defined __PPC__
+
+#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 */
+
 /*#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/extras/rpms/hdf/FC-4/hdf.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- hdf.spec	5 Oct 2005 15:21:45 -0000	1.5
+++ hdf.spec	20 Feb 2006 16:09:35 -0000	1.6
@@ -1,6 +1,6 @@
 Name: hdf
 Version: 4.2r1
-Release: 5%{?dist}
+Release: 6%{?dist}
 Summary: A general purpose library and file format for storing scientific data
 License: BSD-ish
 Group: System Environment/Libraries
@@ -8,10 +8,10 @@
 Source0: ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/HDF%{version}.tar.gz
 Source1: ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/patches/4.2r1-hrepack-patch.tar
 Patch0: hdf-4.2r1-configure.patch
+Patch1: hdf-4.2r1-ppc.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf flex byacc libjpeg-devel zlib-devel
 BuildRequires: gcc-gfortran
-ExcludeArch: ppc ppc64
 
 %description
 HDF is a general purpose library and file format for storing scientific data.
@@ -37,10 +37,11 @@
 mv mfhdf/hrepack/4.2r1-hrepack-patch/*.[ch] mfhdf/hrepack
 rm -r mfhdf/hrepack/4.2r1-hrepack-patch
 %patch0 -p1 -b .orig
+%patch1 -p1 -b .orig
 
 %build
 autoconf
-export CFLAGS="$RPM_OPT_FLAGS -fPIC"
+export CFLAGS="$RPM_OPT_FLAGS -fPIC -DHAVE_NETCDF"
 %configure F77=gfortran FFLAGS=-ffixed-line-length-none
 make
 
@@ -73,6 +74,10 @@
 %{_libdir}/%{name}/
 
 %changelog
+* Mon Feb 20 2006 Orion Poplawski <orion at cora.nwra.com> 4.2r1-6
+- Compile with -DHAVE_NETCDF for gdl hdf/netcdf compatibility
+- Add patch to build on ppc
+
 * Wed Oct 05 2005 Orion Poplawski <orion at cora.nwra.com> 4.2r1-5
 - Add Requires: libjpeg-devel zlib-devel to -devel package
 




More information about the fedora-extras-commits mailing list