Index: trunk/dports/www/zope-localfs/Portfile
===================================================================
--- trunk/dports/www/zope-localfs/Portfile	(revision 4225)
+++ trunk/dports/www/zope-localfs/Portfile	(revision 4226)
@@ -1,6 +1,6 @@
-# $Id: Portfile,v 1.2 2003/11/17 21:20:06 jkh Exp $
+# $Id: Portfile,v 1.3 2003/12/16 05:36:37 rshaw Exp $
 PortSystem 1.0
 name		zope-localfs
-version		1.0.0
+version		1.1.0
 categories	www python zope
 maintainers	rshaw@opendarwin.org
@@ -17,31 +17,33 @@
 platforms	darwin
 homepage	http://sourceforge.net/projects/localfs
-distname	LocalFS-1-0-0
 extract.suffix	.tgz
+distname	LocalFS-1-1-0
 master_sites	sourceforge:localfs
-checksums	md5 f3d27cfb5d09232bf2a01dad736c0740
-depends_build	bin:python2.1:python21 \
-		path:${prefix}/www/Zope:zope
+checksums	md5 738c05ad9e4cb59518269bc21fa79a1d
+
+set python	${prefix}/bin/python2.1
+set pythonlib	${prefix}/lib/python2.1
+set zopehome	${prefix}/www/Zope
+set zopeprod	${zopehome}/lib/python/Products
+set zopeuser	zope
+set zopegroup	www
+
+depends_build	bin:${python}:python21 \
+		path:${zopehome}:zope
+
+patchfiles	patch-FSObject.py
+pre-patch	{ system "ln -s lib/python/Products/LocalFS ${workpath}/${distname}" }
+
 configure	{}
 
-set python	/usr/bin/env\ python2.1
-set zopehome	${prefix}/www/Zope
+pre-build	{ file copy ${zopehome}/inst/compilezpy.py ${workpath}
+		  system "find ${workpath} -name '*.py\[co\]' | xargs rm" }
 
-pre-build	{ system "cp ${zopehome}/inst/compilezpy.py \
-			  ${workpath}/lib/python/Products" }
+build		{ system "cd ${workpath} && \
+			  ${python} ${workpath}/compilezpy.py" }
 
-build		{ system "cd ${workpath}/lib/python/Products && \
-			  ${python} ${workpath}/lib/python/Products/compilezpy.py"
-		  system "cd ${workpath}/lib/python/Products && \
-			  ${python} -O ${workpath}/lib/python/Products/compilezpy.py" }
+destroot	{ file mkdir ${destroot}${zopeprod}
+		  system "cp -R ${workpath}/lib/python/Products/LocalFS ${destroot}${zopeprod}"
+		  system "chown -R ${zopeuser} ${destroot}${zopeprod}"
+		  system "chgrp -R ${zopegroup} ${destroot}${zopeprod}" }
 
-destroot	{ set zopebase	  ${destroot}${zopehome}
-		  set productsdir ${zopebase}/lib/python/Products
-		  set zopeuser	  zope
-    
-		  # Copy Plone products into the Products directory
-		  system "install -d ${productsdir}"
-		  system "cp -R ${workpath}/lib/python/Products/LocalFS ${productsdir}"
-		  system "cd ${zopebase} && chown -R zope lib"
-		  system "cd ${zopebase} && chgrp -R www lib" }
-
Index: trunk/dports/www/zope-localfs/files/patch-FSObject.py
===================================================================
--- trunk/dports/www/zope-localfs/files/patch-FSObject.py	(revision 4226)
+++ trunk/dports/www/zope-localfs/files/patch-FSObject.py	(revision 4226)
@@ -0,0 +1,46 @@
+--- FSObject.py.orig	Sat Sep 14 11:23:19 2002
++++ FSObject.py	Mon Dec 15 21:03:42 2003
+@@ -180,16 +180,18 @@
+             self._fs_update_mtime()
+         except EnvironmentError, err: 
+             if (err[0] == errno.EACCES):
+-                if os.path.exists(tmp_path):
++                if os.path.exists(self._fs_data.path):
+                     raise 'Forbidden', HTTPResponse()._error_html(
+                         'Forbidden',
+                         "Sorry, you do not have permission to overwrite "
+-                        "this file.<p>")
++                        "this file: %s<p>"
++                        % self._fs_data.path)
+                 else:
+                     raise 'Forbidden', HTTPResponse()._error_html(
+                         'Forbidden',
+                         "Sorry, you do not have permission to write "
+-                        "to this directory.<p>")
++                        "to this directory: %s<p>"
++                        % os.path.dirname(self._fs_data.path))
+             else: raise
+ 
+     def _fs_write(self,file,write_props=1):
+@@ -235,16 +237,18 @@
+             self._fs_props.write()
+         except EnvironmentError, err: 
+             if (err[0] == errno.EACCES):
+-                if os.path.exists(tmp_path):
++                if os.path.exists(self._fs_props.path):
+                     raise 'Forbidden', HTTPResponse()._error_html(
+                         'Forbidden',
+                         "Sorry, you do not have permission to overwrite "
+-                        "this file.<p>")
++                        "this file: %s<p>"
++                        % self._fs_props.path)
+                 else:
+                     raise 'Forbidden', HTTPResponse()._error_html(
+                         'Forbidden',
+                         "Sorry, you do not have permission to write "
+-                        "to this directory.<p>")
++                        "to this directory: %s<p>"
++                        % os.path.dirname(self._fs_props.path))
+             else: raise
+ 
+     def _fs_write_props(self,file):
