Add patch to link only against netcdf

This commit is contained in:
Orion Poplawski 2012-09-12 15:30:21 -06:00
parent 5541250ab8
commit b7eed1f00b
2 changed files with 21 additions and 1 deletions

14
netcdf4-python-libs.patch Normal file
View File

@ -0,0 +1,14 @@
diff -up netCDF4-1.0/setup.py.libs netCDF4-1.0/setup.py
--- netCDF4-1.0/setup.py.libs 2012-09-12 15:14:43.024761604 -0600
+++ netCDF4-1.0/setup.py 2012-09-12 15:20:37.741745136 -0600
@@ -149,8 +149,8 @@ NETCDF4_DIR environment variable not set
if netCDF4_libdir is None and netCDF4_dir is not None:
netCDF4_libdir = os.path.join(netCDF4_dir, 'lib')
- libs = ['netcdf','hdf5_hl','hdf5','z']
- lib_dirs = [netCDF4_libdir,HDF5_libdir]
+ libs = ['netcdf']
+ lib_dirs = [netCDF4_libdir]
inc_dirs = [netCDF4_includedir,HDF5_includedir]
# add szip to link if desired.

View File

@ -8,7 +8,7 @@
Name: netcdf4-python
Version: 1.0
Release: 1.fix1%{?dist}
Release: 2.fix1%{?dist}
Summary: Python/numpy interface to netCDF
Group: Development/Languages
@ -17,6 +17,8 @@ URL: http://code.google.com/p/netcdf4-python/
Source0: http://netcdf4-python.googlecode.com/files/netCDF4-%{version}fix1.tar.gz
# No rpath for library
Patch0: netcdf4-python-norpath.patch
# Don't link against hdf5 and z libraries
Patch1: netcdf4-python-libs.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: python2-devel
@ -78,6 +80,7 @@ containing vlens, and vlens containing compound types) are not supported.
%prep
%setup -q -n netCDF4-%{version}
%patch0 -p1 -b .norpath
%patch1 -p1 -b .libs
%if 0%{?with_python3}
rm -rf %{py3dir}
@ -132,6 +135,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
* Wed Sep 12 2012 Orion Poplawski <orion@cora.nwra.com> - 1.0-2.fix1
- Add patch to link only against netcdf
* Thu May 24 2012 Orion Poplawski <orion@cora.nwra.com> - 1.0-1.fix1
- Update to 1.0fix1