the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: netcdf7
Version: 4.1.3
Revision: 9
BuildDependsOnly: true
GCC: 4.0
Maintainer: Alexander Hansen
Depends: %n-shlibs (= %v-%r), %n-bin (= %v-%r)
BuildDepends: fink-package-precedence, hdf5.7, libcurl4, szip
Conflicts: netcdf-absoft, netcdf, netcdf-c7, netcdf-cxx4
Replaces: netcdf-absoft, netcdf, netcdf-c7, netcdf-cxx4
Source: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-%v.tar.gz
Source-MD5: ead16cb3b671f767396387dcb3c1a814
PatchFile: %n.patch
PatchFile-MD5: bedbd9b87b2b2e24d81812a6e75ee7a8
PatchScript: sed -e 's,@FINKPREFIX@,%p', -e 's,@NCPKG@,%n,' %{PatchFile} | patch -p1
ConfigureParams: <<
--enable-shared CFLAGS=-O2 CXXFLAGS=-O2 --libdir=%p/opt/netcdf7/lib \
--includedir=%p/opt/netcdf7/include --enable-cxx-4 \
--mandir='${prefix}/share/man' --enable-docs-install --docdir='${prefix}/share/doc/%n' \
--disable-fortran-compiler-check --disable-f77 --disable-f90 --with-libcf \
--disable-dap-remote-tests
<<
CompileScript: <<
#!/bin/sh -ev
export LDFLAGS=$LDFLAGS" -lsz"
%{default_script}
fink-package-precedence .
<<
InfoTest: <<
TestScript: <<
#!/bin/sh -ev
if [ "%m" != "powerpc" ]
then make -j1 check || exit 2
else
printf "\n**************************\n"
printf "Tests disabled on powerpc.\n"
printf "**************************\n\n"
fi
<<
<<
InstallScript: <<
#!/bin/sh -ev
make install DESTDIR=%d
# Add C, CDL and CXX examples
mkdir -p %i/share/doc/%N/examples
cp -r examples/C* %i/share/doc/%N/examples
# Add documentation
cp man4/*.{texi,html,dvi,info*,pdf,ps,txt,tex} %i/share/doc/%N
# Remove fortran stuff
rm %i/share/info/netcdf-f*
pushd %i/share/doc/%N
rm *f77* *f90*
perl -pi -e 's/gfortran// ; \
s/(flibs=).*/\1""/; \
s/(has_szlib=).*/\1"yes"/' \
%i/bin/nc-config
mv %i/bin/nc-config %i/bin/nc-config-nc7
<<
PostInstScript: <<
update-alternatives --install %p/bin/nc-config ncconfig %p/bin/nc-config-nc7 50
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
update-alternatives --remove ncconfig %p/bin/nc-config-nc7
fi
<<
SplitOff: <<
Package: %N-shlibs
Depends: hdf5.7-shlibs, libcurl4-shlibs, szip-shlibs
Conflicts: netcdf-absoft-shlibs
Replaces: netcdf-absoft-shlibs, netcdf (<= 3.5.0-6), netcdf-absoft (<= 3.5.1-2), netcdf-shlibs
Suggests: %N-bin
Files: <<
opt/%N/lib/libnetcdf.*.dylib
opt/%N/lib/libnetcdf_c++.*.dylib
opt/%N/lib/libnetcdf_c++4.1.dylib
opt/%N/lib/libcf.*.dylib
<<
Shlibs: <<
%p/opt/%N/lib/libnetcdf.7.dylib 9.0.0 %n (>= 4.1.3-1)
%p/opt/%N/lib/libnetcdf_c++.4.dylib 6.0.0 %n (>= 4.1.3-1)
%p/opt/%N/lib/libnetcdf_c++4.1.dylib 2.0.0 %n (>= 4.1.3-2)
%p/opt/%N/lib/libcf.0.dylib 1.0.0 %n (>=4.1.3-1)
<<
DocFiles: COPYRIGHT README RELEASE_NOTES
<<
SplitOff2: <<
Package: netcdf7-bin
Depends: %N-shlibs (= %v-%r)
Conflicts: netcdf-absoft-bin, netcdf-bin
Replaces: netcdf-absoft-bin, netcdf-bin, netcdf (<= 3.5.0-6), netcdf-absoft (<= 3.5.1-2)
Files: bin/nc{copy,dump,gen,gen3} bin/cfcheck share/man/man1 share/doc/%N/*-man-1.html
DocFiles: COPYRIGHT README RELEASE_NOTES
Description: Array-based data access, interface
<<
DocFiles: COPYRIGHT README RELEASE_NOTES
InfoDocs: netcdf-install.info netcdf-tutorial.info netcdf.info netcdf-c.info netcdf-cxx.info
Description: Array-based data access, headers and docs
DescDetail: <<
The netCDF (network Common Data Form) library defines a machine-independent
format for representing scientific data. Together, the interface, library,
and format support the creation, access, and sharing of scientific data.
This package provides libraries, documentation and examples for interfacing
with C and C++ code. For libraries, documentation and examples for interfacing
with Fortran 77 (and Fortran 90) code install the `%N-gfortran' packages.
It also includes the LibCF library.
<<
DescPackaging: <<
The Fortran interface is moved to a different package so that users
do not have to install gfortran to just get the C/C++ interface.
Included examples in documents directory.
Installs libs and headers in a private directory because libnetcdf_c++.4.dylib
is also installed by netcdf-shlibs.
Disable remote DAP tests since we aren't supposed to be accessing remote data
during the build phase.
Feed -lsz to configure so that it finds libsz.
Patch nc-config to use the actual include and library install locations.
Disable tests on powerpc to allow maintainer mode build, at least until we
figure out why it's failing (or quit supporting powerpc)
<<
DescPort: <<
CFLAGS=-O2 CXXFLAGS=-O2 is essential to avoid debugging mode flags (-g).
<<
DescUsage: <<
Packages building against this one must find the headers in
%p/opt/%N/include, and the libs in %p/opt/%N/lib,
e.g. via ConfigureParams, *FLAGS variables, setting PKG_CONFIG_PATH,
using %p/bin/nc-config, or explicit patching.
<<
Homepage: http://www.unidata.ucar.edu/software/netcdf/
License: OSI-Approved
diff -Naur netcdf-4.1.3/nc-config.in netcdf-4.1.3.patched/nc-config.in
--- netcdf-4.1.3/nc-config.in 2011-06-30 19:22:22.000000000 -0400
+++ netcdf-4.1.3.patched/nc-config.in 2011-08-04 12:16:06.000000000 -0400
@@ -8,8 +8,9 @@
prefix=@prefix@
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
-includedir=${prefix}/include
+ncdir=@FINKPREFIX@/opt/@NCPKG@
+libdir=${ncdir}/lib
+includedir=${ncdir}/include
cc="@CC@"
cxx="@CXX@"