# $Id: Portfile,v 1.1 2004/02/16 00:23:20 rshaw Exp $ PortSystem 1.0 name zope-btreefolder2 version 1.0 categories www zope python maintainers rshaw@opendarwin.org description Zope folder that can contain many more objects efficiently long_description When you fill a Zope folder with too many \ objects, both Zope and your browser get \ overwhelmed. Zope has to load and store a large \ folder object, and the browser has to render \ large HTML tables repeatedly. Zope can store a \ lot of objects, but it has trouble storing a lot \ of objects in a single standard Zope folder. \ BTreeFolder2 solves this problem by storing the \ objects in Zope BTrees, special structures \ designed for the Zope object database. BTrees \ can hold numerous items without loading them all \ into memory at once. platforms darwin freebsd homepage http://hathaway.freezope.org/Software/BTreeFolder2/ master_sites http://hathaway.freezope.org/Software/BTreeFolder2 dist_subdir zope/${name} distname BTreeFolder2 distfiles ${distname}-${version}${extract.suffix} checksums md5 d430cf27bfc78922eaca9222f393022f # Use Python 2.3 from DarwinPorts explicitly set python ${prefix}/bin/python2.3 # Location to install Zope products and the Zope user set zopehome ${prefix}/libexec/Zope set zopeinst ${prefix}/www/Zope set zopeprod ${zopehome}/lib/python/Products set zopeuser zope set zopegroup www # Depends on Zope depends_build path:${zopehome}:zope platform freebsd { extract.post_args | gtar -xf - } use_configure no pre-build { file copy ${zopehome}/bin/compilezpy.py ${workpath} reinplace "s|^.*sys.stdout|#&|" ${workpath}/compilezpy.py system "find ${worksrcpath} -name '*.py\[co\]' | xargs rm" } build { system "cd ${worksrcpath} && ${python} ${workpath}/compilezpy.py" } destroot { if {$env(USER) != "root"} { ui_msg "------------------------------------------------------------" ui_msg "Note that you are not installing as root, so files installed" ui_msg "by this port will not end up with proper ownership and" ui_msg "likely not work correctly with Zope." ui_msg "------------------------------------------------------------" } # Install products xinstall -d -m 0755 ${destroot}${zopeprod} system "cp -R ${workpath}/${distname} ${destroot}${zopeprod}" if {$env(USER) == "root"} { system "chown -R ${zopeuser} ${destroot}${zopehome}" system "chgrp -R ${zopegroup} ${destroot}${zopehome}" } }