Index: /trunk/dports/science/ncview/Portfile
===================================================================
--- /trunk/dports/science/ncview/Portfile	(revision 98699)
+++ /trunk/dports/science/ncview/Portfile	(revision 98700)
@@ -1,2 +1,3 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
 # $Id$
 
@@ -4,9 +5,9 @@
 
 name                    ncview
-version                 1.93g
-revision                1
+version                 2.1.1
 maintainers             nomaintainer
 platforms               darwin
 categories              science
+license                 GPL-3
 
 description             X windows point'n'click NetCDF viewer.
@@ -22,52 +23,52 @@
 
 master_sites            ftp://cirrus.ucsd.edu/pub/ncview/
-checksums               md5     09615ad95fe1f1cc684c24e67bb78a78 \
-                        sha1    193b1e51d6ad7257bc4050493b708d5c12c16419 \
-                        rmd160  036f2b6851085243dedadb6d47292b0467ce1426
 
-patchfiles              patch-Makefile.in.diff patch-configure.diff
-depends_lib             port:netcdf port:udunits port:netpbm \
+checksums               rmd160  6308916cb309e2f2f809b4d4b47ad89263714885 \
+                        sha256  8aaf98fad15790313739520b88e17748617be504f0a2b0322a62144e390db1dd
+
+patchfiles              patch-configure.diff
+
+depends_lib             port:expat \
+                        port:hdf5-18 \
+                        port:libpng \
+                        port:netcdf \
+                        port:udunits2 \
                         port:xorg-libXaw port:xorg-libXt port:xorg-libice
+
+# Undefined symbols _framestore _main _options _pixel_transform _quit_app _read_in_state _useage _variables
+compiler.blacklist      clang
+
+pre-configure {
+    set nc4 [exec ${prefix}/bin/nc-config --has-nc4]
+    if {${nc4} != "yes"} {
+        ui_error "Install netcdf +netcdf4 first. Run:"
+        ui_error "    port install netcdf +netcdf4"
+        return -code error "netcdf +netcdf4 not installed"
+    }
+}
 
 configure.args          --with-netcdf_incdir=${prefix}/include \
                         --with-netcdf_libdir=${prefix}/lib \
                         --with-bindir=${prefix}/bin \
-                        --with-udunits_incdir=${prefix}/include \
-                        --with-udunits_libdir=${prefix}/lib \
-                        --with-ppm_incdir=${prefix}/include/netpbm \
-                        --with-ppm_libdir=${prefix}/lib \
-                        --x-includes=${prefix} \
-                        --x-libraries=${prefix}
-
-# Makefile does not respect CPPFLAGS
-configure.cflags-append -I${prefix}/include/netpbm
+                        --with-udunits2_incdir=${prefix}/include/udunits2 \
+                        --with-udunits2_libdir=${prefix}/lib \
+                        --with-png_incdir=${prefix}/include \
+                        --with-png_libdir=${prefix}/lib \
+                        --with-x
 
 use_parallel_build      yes
 
-destroot.destdir-append MANDIR=${prefix}/share/man/man1
-
 post-destroot {
-    xinstall -m 755 -d ${destroot}${prefix}/lib/ncview
-    foreach file { 3gauss.ncmap 3saw.ncmap default.ncmap detail.ncmap hotres.ncmap nc_overlay.earth.lat-lon.p8deg nc_overlay.lat-lon-grid.20x60 nc_overlay.lat-lon-grid.10x30 } {
-        xinstall -m 755 ${worksrcpath}/${file} ${destroot}${prefix}/lib/ncview
-    }
-    xinstall -m 755 -d ${destroot}${prefix}/share/doc/ncview
-    xinstall -m 755 ${worksrcpath}/README ${destroot}${prefix}/share/doc/ncview
-}
-
-post-activate {
-    ui_msg "\n
-The MacPorts X11 app-defaults directory is located at:
-
-        ${prefix}/lib/X11/app-defaults
-
-Therefore, you must set the XFILESEARCHPATH environment variable to your ~/.profile for
-your X11 environment to find the MacPorts app-defaults directory:
-
-        export XFILESEARCHPATH=/usr/X11R6/lib/X11/app-defaults/%N:${prefix}/lib/X11/app-defaults/%N
-\n"
+    xinstall -m 755 -d ${destroot}${prefix}/lib/${name}
+    xinstall -m 755 -W ${worksrcpath} 3gauss.ncmap 3saw.ncmap bw.ncmap default.ncmap detail.ncmap hotres.ncmap ${destroot}${prefix}/lib/${name}
+    
+    xinstall -m 755 ${worksrcpath}/data/ncview.1 ${destroot}${prefix}/share/man/man1
+    
+    set docdir ${prefix}/share/doc/${subport}
+    xinstall -m 755 -d ${destroot}${docdir}
+    xinstall -m 755 -W ${worksrcpath} README ${destroot}${docdir}
 }
 
 livecheck.type              regex
 livecheck.url               ${homepage}
-livecheck.regex             {New version \(([0-9]+\.[0-9]+[a-z])}
+livecheck.regex             {New version \(([^)]+)\)}
Index: unk/dports/science/ncview/files/patch-Makefile.in.diff
===================================================================
--- /trunk/dports/science/ncview/files/patch-Makefile.in.diff	(revision 98699)
+++ 	(revision )
@@ -1,19 +1,0 @@
---- Makefile.in.orig	2009-11-04 16:19:19.000000000 +0900
-+++ Makefile.in	2009-11-04 16:22:11.000000000 +0900
-@@ -129,13 +129,13 @@
- 	@echo "----------------------------------------------------"
- 	@echo "Installing binary in directory $(BINDIR)"
- 	@echo "----------------------------------------------------"
--	if test ! -d $(BINDIR); then  mkdir -p $(BINDIR); fi; $(INSTALL) $(INSTBINFLAGS) ncview   $(BINDIR)/ncview
-+	mkdir -p $(DESTDIR)$(BINDIR); $(INSTALL) $(INSTBINFLAGS) ncview   $(DESTDIR)$(BINDIR)/ncview
- 	@echo "--------------------------------------------------------"
- 	@echo "Installing manual in directory $(MANDIR)"
- 	@echo "--------------------------------------------------------"
--	if test ! -d $(MANDIR); then mkdir -p $(MANDIR); fi; $(INSTALL) $(INSTMANFLAGS) ncview.1 $(MANDIR)/ncview.1
-+	mkdir -p $(DESTDIR)$(MANDIR); $(INSTALL) $(INSTMANFLAGS) ncview.1 $(DESTDIR)$(MANDIR)/ncview.1
- 	@echo "------------------------------------"
- 	@echo "Installing application defaults file"
- 	@echo "------------------------------------"
--	/bin/sh ./install-appdef "$(INSTALL) $(INSTMANFLAGS)"
-+	mkdir -p $(DESTDIR)@prefix@/lib/X11/app-defaults; $(INSTALL) Ncview $(DESTDIR)@prefix@/lib/X11/app-defaults
- 
Index: /trunk/dports/science/ncview/files/patch-configure.diff
===================================================================
--- /trunk/dports/science/ncview/files/patch-configure.diff	(revision 98699)
+++ /trunk/dports/science/ncview/files/patch-configure.diff	(revision 98700)
@@ -1,41 +1,20 @@
---- configure.orig	2009-11-04 16:56:19.000000000 +0900
-+++ configure	2009-11-04 16:59:59.000000000 +0900
-@@ -7053,10 +7053,7 @@
+--- configure.orig	2012-03-29 21:27:50.000000000 +0200
++++ configure	2012-03-29 21:46:40.000000000 +0200
+@@ -8252,7 +8252,7 @@
+ 	echo "** Could not find the png.h file, so -frames support will not be included  **"
+ 	echo "** Install the PNG library (and development headers) to fix this           **"
  fi
- if test $do_udunits = true; then
- 	echo "****************************************************************************"
--	echo "Udunits support enabled.   Note: Udunits did not used to work with MAC OS X"
--	echo "If you are using Mac OS X and have trouble, make sure you are using the"
--	echo "latest udunits package.  If it still doesn't work, remove the udunits library and remake ncview"
--	echo "udunits dirs: include: $UDUNITS_INCDIR  library: $UDUNITS_LIBDIR  libname: $UDUNITS_LIBNAME"
-+	echo "Udunits support enabled."
- 	echo "****************************************************************************"
- 	DO_UDUNITS_LINE="INC_UDUNITS   = -DINC_UDUNITS"
- 	DO_UDUNITS_INCDIR="UDUNITSINCDIR = -I$UDUNITS_INCDIR"
-@@ -7678,7 +7675,7 @@
+-PNG_LIBNAME=libpng.so
++PNG_LIBNAME=libpng.dylib
  
+ # Check whether --with-png_libdir was given.
+ if test "${with_png_libdir+set}" = set; then
+@@ -8483,7 +8483,7 @@
+ fi
  
  fi
--PPM_LIBNAME=libppm.so
-+PPM_LIBNAME=libppm.dylib
- 
- # Check whether --with-ppm_libdir or --without-ppm_libdir was given.
- if test "${with_ppm_libdir+set}" = set; then
-@@ -7883,7 +7880,7 @@
- 
- fi
- if test x$PPM_LIBDIR = x; then
--PPM_LIBNAME=libnetpbm.so
-+PPM_LIBNAME=libnetpbm.dylib
- if test x$PPM_LIBDIR = x; then
- 	echo "$as_me:$LINENO: checking for ppm_writeppm in -lnetpbm" >&5
- echo $ECHO_N "checking for ppm_writeppm in -lnetpbm... $ECHO_C" >&6
-@@ -8051,7 +8048,7 @@
- 
- fi
- fi
--PPM_LIBNAME=`echo $PPM_LIBNAME | sed s/lib// | sed s/\.so//`
-+PPM_LIBNAME=`echo $PPM_LIBNAME | sed s/lib// | sed s/\.dylib//`
- 
- 
- 
+-PNG_LIBNAME=`echo $PNG_LIBNAME | sed s/lib// | sed s/\.so//`
++PNG_LIBNAME=`echo $PNG_LIBNAME | sed s/lib// | sed s/\.dylib//`
+ PNG_PRESENT=no
+ if test $PNG_INC_PRESENT = yes; then
+ 	if test x$PNG_LIBDIR != x; then
