nco stable port information

Info2:<<
Package: nco
Version: 4.1.0
Revision: 1
Type: v (4.1.0)
Description: The NetCDF Operators, using netcdf-4
License: GPL3
Maintainer: Alexander Hansen

# Prerequisites
Depends: <<
bison (>=1.35-2),
gsl-shlibs,
%N%type_pkg[v]-shlibs (=%v-%r)
<<
BuildDepends: <<
antlr, gsl, udunits2-dev (>= 2.1.22-1),
fink (>=0.28-1), fink-package-precedence,
netcdf-c7, netcdf-bin (>=4.2)
<<
Conflicts: %N (<< 4.0.8-1), %N-dap (<< 4.0.8-1), %N-netcdf (<< 4.0.9-1), %N-opendap
Replaces: %N (<< 4.0.8-1), %N-dap (<< 4.0.8-1), %N-netcdf (<< 4.0.9-1), %N-opendap
# Unpack Phase:
Source: http://%N.sourceforge.net/src/%N-%v.tar.gz
Source-MD5: 0e0af2226177d0b6981cf6f8208c2b6e

# Patch Phase:
PatchScript: <<
#!/bin/sh -ev
perl -pi -e 's|||' src/nco++/Invoke.cc \
src/nco++/NcapVector.hh src/nco++/ncoGrammer.g src/nco++/ncoLexer.hpp \
src/nco++/ncoParser.hpp src/nco++/ncoTree.hpp
perl -pi -e 's|-lnco|%b/src/nco/.libs/libnco.dylib|' src/nco++/Makefile.in
# perl -pi -e 's,dynamiclib,$& -single_module,' configure aclocal.m4
perl -pi -e "s,(apple.*)enable_shared='no',\1," configure
<<

# Compile Phase:
GCC: 4.0
SetLDFLAGS: -L%p/opt/netcdf7/lib -Wl,-dead_strip_dylibs
SetCPPFLAGS: -I%p/opt/netcdf7/include
ConfigureParams: <<
--enable-udunits2 --disable-udunits --enable-gsl \
--enable-dap-netcdf \
--enable-netcdf4 \
--enable-dependency-tracking \
--enable-shared \
--disable-static
<<
CompileScript: <<
#!/bin/sh -ev
export UDUNITS2_PATH=%p
export NETCDF_INC=%p \
NETCDF_LIB=%p \
NETCDF4_ROOT=%p
%{default_script}
fink-package-precedence --prohibit-bdep=%N-dap,%N-opendap,%N-netcdf,%N .
<<

# Install Phase:
DocFiles: doc/*
InfoDocs: %N.info

InstallScript: <<
make install DESTDIR=%d
<<
DescDetail: <<
Each NCO operator (e.g., ncks) takes netCDF or HDF input file(s),
performs an operation (e.g., averaging, hyperslabbing, or renaming),
and outputs a processed netCDF file. Although most users of
netCDF and HDF data are involved in scientific research,
these data formats, and thus NCO, are generic and
are equally useful in fields like finance.

This version is OPeNDAP/DODS enabled, so it can be given
URLs to read remote datasets as if they were local netCDF files.

It uses Fink's netcdf7 package (upstream netCDF4).
<<
DescPackaging: <<
Upstream has discontinued using libnc-dap, so have "nco" built against
netcdf be the new hotness, and merge nco-netcdf into it on update.
<<
DescPort: <<
Get rid of hardcoded malloc.h for C++ stuff.
Patch out an -lnco that tends to link to a library in a
previously installed version of the package.
Upstream claims OS X doesn't understand shared libs; perhaps it's
upstream who doesn't understand. :-)
<<
Homepage: http://nco.sourceforge.net/
Splitoff: <<
Package: %N%type_pkg[v]-shlibs
Depends: netcdf-c7-shlibs, udunits2-shlibs
DocFiles: doc/LICENSE
Files: lib/libnco*%v.dylib
Shlibs: <<
%p/lib/libnco-%type_raw[v].dylib 0.0.0 %n (>=4.1.0-1)
%p/lib/libnco_c++-%type_raw[v].dylib 0.0.0 %n (>=4.1.0-1)
<<
Description: The NetCDF Operators, shared libraries
<<
Splitoff2: <<
Package: %N%type_pkg[v]-dev
DocFiles: doc/LICENSE
Files: include lib
Description: The NetCDF Operators, build-time files
BuildDependsOnly: true
Conflicts: %N (<= 4.0.9-1), %N-dap (<< 4.0.8-1), %N-netcdf (<< 4.0.9-1), %N-opendap
Replaces: %N (<= 4.0.9-1), %N-dap (<< 4.0.8-1), %N-netcdf (<< 4.0.9-1), %N-opendap
<<
<<

nco stable port .patch

--- nco-3.1.8/configure.orig 2006-12-16 17:02:32.000000000 +0900
+++ nco-3.1.8/configure 2006-12-16 17:02:57.000000000 +0900
@@ -1829,7 +1829,7 @@
_ACEOF

;;
- powerpc-apple-darwin* )
+ *-apple-darwin* )
cat >>confdefs.h <<\_ACEOF
#define MACOSX 1
_ACEOF

nco _unstable_ port .patch