the Fink project is an effort to port
popular Unix programs to Mac OS X
Info4: <<
Package: netcdf7-gfortran
Version: 4.1.3
Revision: 11
BuildDependsOnly: true
Maintainer: Alexander Hansen
BuildDepends: hdf5.7, gcc46, fink-package-precedence, netcdf7 (>= %v-4), libcurl4, szip
Depends: %n-shlibs (= %V)
Conflicts: netcdf (<= 3.6.1-1003), netcdf-absoft, netcdf-g95, netcdf-gfortran, netcdf-fortran5
Replaces: netcdf (<= 3.6.1-1003), netcdf-absoft, netcdf-g95, netcdf-gfortran, netcdf-fortran5
Source: ftp://ftp.unidata.ucar.edu/pub/netcdf/netcdf-%v.tar.gz
Source-MD5: ead16cb3b671f767396387dcb3c1a814
SourceDirectory: netcdf-%v
NoSetCPPFlags: true
PatchScript: <<
perl -pi.bak -e 's|\$rpath|%p/opt/netcdf7/lib|g' configure
perl -pi.bak -e 's|print|!print|' f90/netcdf_expanded.f90
<<
ConfigureParams: <<
--libdir=%p/opt/netcdf7/lib --includedir=%p/opt/netcdf7/include \
--enable-shared CFLAGS=-O2 FFLAGS=-O2 FCFLAGS=-O2 FC=%p/bin/gfortran \
F77=%p/bin/gfortran F90=%p/bin/gfortran \
--mandir='${prefix}/share/man' --enable-docs-install --docdir='${prefix}/share/doc/netcdf' \
--enable-dap \
--with-netcdf-c-lib=%p/opt/netcdf7/lib --enable-netcdf-4 \
--disable-cxx --disable-utilities CPPFLAGS=$CPPFLAGS" -I%p/include" LDFLAGS=$LDFLAGS" -lsz"
<<
CompileScript: <<
%{default_script}
fink-package-precedence .
<<
InstallScript: <<
#!/bin/sh -ev
make install DESTDIR=%d
mv include/netcdf_f.h %i/opt/netcdf7/include/
mkdir -p %i/share
mkdir -p %i/share/doc
mkdir -p %i/share/info
# Add examples for F77 and F90
mkdir -p %i/share/doc/netcdf7/examples
cp -r examples/F* %i/share/doc/netcdf7/examples
# manually add docs
cp man4/netcdf-f77.{pdf,html} man4/netcdf-f90.{pdf,html} man4/netcdf_f{77,90}-man.html %i/share/doc/netcdf7
cp man4/netcdf-f{77,90}.info %i/share/info
# remove C library files
rm %i/opt/netcdf7/include/netcdf.h
rm -rf %i/opt/netcdf7/lib/libnetcdf.*dylib %i/opt/netcdf7/lib/libnetcdf.*a %i/opt/netcdf7/lib/pkgconfig
rm %i/share/info/netcdf-c* %i/share/info/netcdf-install.info %i/share/info/netcdf-tutorial.info %i/share/info/netcdf.info
rm %i/share/man/man3/netcdf.3
rm %i/bin/nc-config
perl -p -e 's|(fc=).*|\1"%p/bin/gfortran"|; \
s/(flibs=).*/\1"-L\$\{libdir\} -lnetcdff -lnetcdf"/; \
s/(has_f\d{2}=).*/\1"yes"/g' \
%p/bin/nc-config-nc7 > %i/bin/nc-config-nc7g
<<
PostInstScript: <<
update-alternatives --install %p/bin/nc-config ncconfig %p/bin/nc-config-nc7g 100 && chmod a+x %p/bin/nc-config
<<
PreRmScript: <<
if [ $1 != "upgrade" ]; then
update-alternatives --remove ncconfig %p/bin/nc-config-nc7g
fi
<<
SplitOff: <<
Package: %N-shlibs
Depends: netcdf7-shlibs (>= %v-1), gcc46-shlibs, hdf5.7-shlibs, szip-shlibs, libcurl4-shlibs
Files: opt/netcdf7/lib/libnetcdff.*.dylib
Shlibs: %p/opt/netcdf7/lib/libnetcdff.5.dylib 7.0.0 %n (>= 4.1.3-1)
DocFiles: COPYRIGHT README RELEASE_NOTES
<<
InfoDocs: netcdf-f77.info netcdf-f90.info
DocFiles: COPYRIGHT README RELEASE_NOTES
Description: Interface & lib for array-based data access
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 a library, documentation, and examples for interfacing
with Fortran 77 and Fortran 90 code using the gfortran compiler. Because the
library links to libraries from gcc4N-shlibs, a particular gcc4N had to be
chosen.
<<
DescUsage: <<
Installs library and include files in %p/opt/netcdf7 to allow
the netcdf-gfortran and %N packages to coexist.
Fink packages building against this one must ensure that they point
to %p/opt/netcdf7 and also BuildDepend on netcdf7.
When building by hand, make sure netcdf7 is installed.
<<
DescPackaging: <<
This Fortran interface is created as a different package so that users
do not have to install a Fortran compiler to just get the C/C++ interface.
All docs are moved into the directory /sw/share/doc/netcdf7.
Manually move docs from the tarball to avoid potentially triggering a rebuild.
Patch out a stray print statement--thanks to Remko Scharroo for finding this.
<<
DescPort: <<
CFLAGS=-O2 FFLAGS=-O2 FCFLAGS=-O2 is essential to avoid debugging mode flags (-g).
manually feed "-lsz" and "-I%p/include" to the configure script to find szlib
and hdf5.7, respectively.
<<
Homepage: http://www.unidata.ucar.edu/software/netcdf/
License: OSI-Approved
<<