--- Portfile.macports.orig	Fri Feb 13 23:08:01 2009
+++ Portfile	Fri Feb 13 23:40:10 2009
@@ -1,9 +1,9 @@
-# c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
-# $Id: Portfile.macports,v 1.1 2009/02/14 05:07:53 brian Exp brian $
+# -*- 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: Portfile,v 1.1 2008/12/21 02:55:40 brian Exp $
 
 PortSystem 1.0
 
-name                wikkawiki
+name                wikkawiki 
 set major_version   1.1.6
 version             ${major_version}.5
 categories          www php
@@ -25,13 +25,16 @@
     port:php4 \
     port:mysql4
 
+set wikkapath ${prefix}/www/wikka
+set osxdocpath /Library/WebServer/Documents
+
 variant php5 description {Use php5 instead of php4 (not fully tested)} {
-    depends_lib-append  port:php5
+    depends_lib-append  path:bin/php:php5
     depends_lib-delete  port:php4
 }
 
 variant mysql5 description {Use mysql5 instead of mysql4 (not fully tested)} {
-    depends_lib-append  port:mysql5
+    depends_lib-append  path:bin/mysql_config5:mysql5
     depends_lib-delete  port:mysql4
 }
 
@@ -40,31 +43,31 @@
     depends_lib-delete port:mysql4
 }
 
-variant use_osx_docroot conflicts php5 mysql5 requires nodeps description {Create link to /Library/WebServer/Documents} {}
+variant use_osx_docroot conflicts php5 mysql5 requires nodeps description {Create link to /Library/WebServer/Documents} {
+    post-destroot {
+        xinstall -d ${destroot}${osxdocpath}
+        ln -s ${wikkapath} ${destroot}${osxdocpath}/wikka
+    }
 
-use_configure   no
-build            {}
+    post-activate {
+    }
+}
 
-set wikkapath ${destroot}${prefix}/www/wikka
-set osxdocpath /Library/WebServer/Documents
+use_configure   no
+build           {}
 
 destroot {
-    xinstall -d -m 0755 ${wikkapath}
-    eval file copy [glob ${worksrcpath}/*] ${wikkapath}
-    xinstall -m 0666 ${worksrcpath}/.htaccess ${wikkapath}
-    touch ${wikkapath}/wikka.config.php
-    file attributes ${wikkapath}/wikka.config.php -permissions 0666
-
-    if {[variant_isset use_osx_docroot]} {
-        file delete -force ${osxdocpath}/wikka
-        ln -s ${prefix}/www/wikka ${osxdocpath}/wikka
-    }
+    xinstall -d -m 0755 ${destroot}${wikkapath}
+    eval file copy [glob ${worksrcpath}/*] ${destroot}${wikkapath}
+    xinstall -m 0666 ${worksrcpath}/.htaccess ${destroot}${wikkapath}
+    touch ${destroot}${wikkapath}/wikka.config.php
+    file attributes ${destroot}${wikkapath}/wikka.config.php -permissions 0666
 }
 
 post-activate {
     if {[variant_isset use_osx_docroot]} {
         ui_msg "**********************************************************"
-        ui_msg "* Point your browser to http://localhost/wikka to continue"
+        ui_msg "* Point your browser to http://localhost/wikka to continue" 
         ui_msg "* installation. Be sure to lock down permissions on"
         ui_msg "* ${osxdocpath}/wikka/wikka.config.php and"
         ui_msg "* ${osxdocpath}/wikka/.htaccess for public sites!"
@@ -72,7 +75,7 @@
         ui_msg "**********************************************************"
     } else {
         ui_msg "**********************************************************"
-        ui_msg "* Point your browser to http://localhost/wikka to continue"
+        ui_msg "* Point your browser to http://localhost/wikka to continue" 
         ui_msg "* installation. Be sure to lock down permissions on"
         ui_msg "* ${prefix}/www/wikka/wikka.config.php and"
         ui_msg "* ${prefix}/www/wikka/.htaccess for public sites!"
