--- /Users/snc/Source/macports-trunk/dports/www/wikkawiki/Portfile	2009-02-10 15:21:27.000000000 -0500
+++ www/wikkawiki/Portfile	2009-02-11 10:19:11.000000000 -0500
@@ -1,4 +1,4 @@
-# c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# -*- 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 46696 2009-02-10 20:21:26Z snc@macports.org $
 
 PortSystem 1.0
@@ -25,13 +25,16 @@
     port:php4 \
     port:mysql4
 
+set wikkapath ${destroot}${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,43 +43,40 @@
     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 ${prefix}/www/wikkawiki ${destroot}${osxdocpath}/wikka
+    }
 
-use_configure   no
-build            {}
+    post-activate {
+        ui_msg "**********************************************************"
+        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!"
+        ui_msg "* Visit http://docs.wikkawiki.org/MacportInstall for help."
+        ui_msg "**********************************************************"
+    }
+}
 
-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 -m 0666 ${wikkapath}/wikka.config.php
 }
 
 post-activate {
-    if {[variant_isset use_osx_docroot]} {
-        ui_msg "**********************************************************"
-        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!"
-        ui_msg "* Visit http://docs.wikkawiki.org/MacportInstall for help."
-        ui_msg "**********************************************************"
-    } else {
-        ui_msg "**********************************************************"
-        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!"
-        ui_msg "* Visit http://docs.wikkawiki.org/MacportInstall for help."
-        ui_msg "**********************************************************"
-    }
+    ui_msg "**********************************************************"
+    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!"
+    ui_msg "* Visit http://docs.wikkawiki.org/MacportInstall for help."
+    ui_msg "**********************************************************"
 }
