diff --git a/hdf-4.2r1p4-maxavailfiles.patch b/hdf-4.2r1p4-maxavailfiles.patch new file mode 100644 index 0000000..9afa15d --- /dev/null +++ b/hdf-4.2r1p4-maxavailfiles.patch @@ -0,0 +1,11 @@ +--- 4.2r1-hrepack-p4/mfhdf/libsrc/file.c.maxavailfiles 2007-04-20 12:21:12.000000000 -0600 ++++ 4.2r1-hrepack-p4/mfhdf/libsrc/file.c 2007-04-20 12:21:50.000000000 -0600 +@@ -31,7 +31,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 _ncdf = 0 ; /* high water mark on open cdf's */ + static NC **_cdfs; diff --git a/hdf.spec b/hdf.spec index 2318ddb..05f3d01 100644 --- a/hdf.spec +++ b/hdf.spec @@ -7,6 +7,7 @@ Group: System Environment/Libraries URL: http://hdf.ncsa.uiuc.edu/hdf4.html #Source0: ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/HDF%{version}.tar.gz Source0: ftp://ftp.hdfgroup.org/HDF/HDF_Current/src/4.2r1-hrepack-p4.tar.gz +Patch0: hdf-4.2r1p4-maxavailfiles.patch Patch1: hdf-4.2r1-ppc.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: autoconf flex byacc libjpeg-devel zlib-devel @@ -36,13 +37,14 @@ HDF development headers and libraries. %prep #%setup -q -n HDF%{version} %setup -q -n 4.2r1-hrepack-p4 +%patch -p1 -b .maxavailfiles %patch1 -p1 -b .orig %build autoconf export CFLAGS="$RPM_OPT_FLAGS -fPIC -DHAVE_NETCDF" -%configure F77=gfortran FFLAGS=-ffixed-line-length-none +%configure F77=gfortran FFLAGS=-ffixed-line-length-none --disable-production make @@ -78,6 +80,8 @@ rm -rf $RPM_BUILD_ROOT * Fri Apr 20 2007 Orion Poplawski 4.2r1-12 - Use 4.2r1-hrepack-p4.tar.gz for hrepack patch - Remove configure patch applied upstream +- Use --disable-production configure flag to avoid stripping -g compile flag +- Add patch to fix open file test when run under mock * Tue Aug 29 2006 Orion Poplawski 4.2r1-11 - Rebuild for FC6