--- /opt/local/var/macports/sources/rsync.macports.org/release/ports/science/wview/Portfile	2009-09-24 11:45:22.000000000 -0500
+++ Portfile	2009-11-03 17:52:31.000000000 -0600
@@ -1,10 +1,12 @@
-# $Id: Portfile 58230 2009-09-24 16:45:22Z ryandesign@macports.org $
+# $Id&
 
 PortSystem      1.0
 
 name            wview
 
-version         4.0.1
+version         5.6.3
+
+revision        1
 
 categories      science
 
@@ -17,67 +19,35 @@
 long_description \
   wview is a unix application for weather stations. It archives weather \
   data from the station. Generates full html web sites with graphics. \
-  ftp/ssh export capability. MySQL/PostgreSQL archiving. International. \
-  Weather alarms. Data feed. RSS feed. Stations currently supported include: \
-  Davis Vantage Pro/Pro2, Vaisala WXT-510, La Crosse WS-2300, and a \
-  weather station simulator.
+  ftp/ssh export capability. International. Weather alarms. Data feed. \
+  RSS feed. Stations currently supported include: Davis Vantage Pro/Pro2,\
+  Vaisala WXT-510, La Crosse WS-2300, and a weather station simulator.
 
 platforms        darwin
 
-master_sites     sourceforge:wview
-
-depends_lib      port:gd2 port:radlib
-
-checksums        md5 1042769d7c94395bcc3732de7c1c8e87 \
-                 sha1 949c76e1a2179eedb7104a7b28a526d4e4ffe953 \
-                 rmd160 86e581f2d9779650d0189b0dbfb068b71b5affc8
-
-configure.args   --exec-prefix=${prefix}
-
-variant env      description { Install config files and templates (first time install) } {
-  destroot.target-append install-env
-}
-
-variant mysql5 	description { Includes mySQL5 database support } {
-  configure.args-append --enable-mysql
-  configure.ldflags-append  -L${prefix}/lib/mysql5/mysql
-  depends_lib-append path:bin/mysql_config5:mysql5
-}
-
-variant pgresql   description { Includes Postgresql database support } {
-  configure.args-append --enable-pgresql
-  depends_lib-append port:postgresql83
-}
+use_autoconf     yes
 
-variant vpro      description { Support for Davis Vantage Pro WX Station } {
-  configure.args-append --enable-station-vp2
-}
-
-variant wxt510    description { Support for Vaisala WXT-510 WX Station } {
-  configure.args-append --enable-station-wxt510
-}
+master_sites     sourceforge:wview
 
-variant ws2300    description { Support for the La Crosse WS-2300 series stations } {
-  configure.args-append --enable-station-ws2300
-}
+depends_lib      port:gd2 port:radlib port:gawk port:sqlite3 port:curl
 
-variant wmr918    description { Support for the for the Oregon Scientific WMR918/968 WX Station} {
-  configure.args-append --enable-station-wmr918
-}
+checksums        md5  7dc21ef4a1f4cb2686ae628928e51f15 \
+                 sha1 0fb124b5ae36e91143c29862082bf44fc72e65bf \
+                 rmd160 8e8163a0fe531c806765fd1c27082385a5285765
 
-variant sim       description { Support for the Simulated WX Station } {
-  configure.args-append --enable-station-sim
-}
+configure.args   --exec-prefix=${prefix} --enable-station-sim --enable-http 
 
-variant http      description { Enable support for uploading data to Weather Underground } {
-  configure.args-append --enable-http
-  depends_lib-append port:curl
-}
+configure.env-append    HTTP_DOC_ROOT="${prefix}/www"
 
 destroot.violate_mtree
 
+destroot.target-append install-env
+
 post-destroot {
   xinstall -d -o root -g wheel -m 755 \
+    ${worksrcpath}/examples/MacOSX/wview ${destroot}/Library/StartupItems
+  
+  xinstall -d -o root -g wheel -m 755 \
     ${worksrcpath}/examples/MacOSX/wview ${destroot}/Library/StartupItems/wview
 
   xinstall -o root -g wheel -m 755 ${worksrcpath}/examples/MacOSX/wview/wview \
@@ -86,8 +56,7 @@
   xinstall -o root -g wheel -m 644 \
     ${worksrcpath}/examples/MacOSX/wview/StartupParameters.plist \
     ${destroot}/Library/StartupItems/wview/StartupParameters.plist
-
-
+          
   file mkdir ${destroot}${prefix}/share/doc/${name}
 
   file copy ${worksrcpath}/wview-Quick-Start-MacOSX.html \
@@ -104,21 +73,24 @@
 
   file copy ${worksrcpath}/UPGRADE \
     ${destroot}${prefix}/share/doc/${name}/UPGRADE
-
-
 }
 
 post-install {
   ui_msg "\n#####################################"
-  ui_msg "Run\n"
-  ui_msg "\tsudo ${prefix}/bin/wviewconfig and\n"
-  ui_msg "\tsudo ${prefix}/bin/wviewhtmlconfig\n"
+  ui_msg "Run"
+  ui_msg "\tsudo ${prefix}/bin/wviewconfig"
+  ui_msg "\tsudo ${prefix}/bin/wviewhtmlconfig"
   ui_msg "before launching wview\n"
-  ui_msg "\n#####################################"
-  ui_msg "html templates and config files are stored in ${prefix}/etc/wview/\n"
-  ui_msg "archive files are stored in ${prefix}/var/wview/\n"
-  ui_msg "\n#####################################"
-  ui_msg "Start the daemons with the command:\n"
+  ui_msg "#####################################"
+  ui_msg "html templates and config files are stored in"
+  ui_msg "\t${prefix}/etc/wview/\n"
+  ui_msg "archive files are stored in"
+  ui_msg "\t${prefix}/var/wview/\n"
+  ui_msg "#####################################"
+  ui_msg "wviewmgmt scripts are installed in"
+  ui_msg "\t${prefix}/www/wviewmgmt\n"
+  ui_msg "#####################################"
+  ui_msg "Start the daemons with the command:"
   ui_msg "\tsudo /sbin/SystemStarter start wview\n"
-  ui_msg "\n#####################################"
+  ui_msg "#####################################"
 }
