# $Id: Portfile 37637 2008-06-16 18:57:31Z dluke@macports.org $ PortSystem 1.0 PortGroup python24 1.0 name py-bsddb version 2.4.5 revision 1 categories python databases platforms darwin maintainers mww description Python bindings to the db4 and db3 library long_description ${description} homepage http://www.python.org/doc/current/lib/module-dbm.html master_sites http://www.python.org/ftp/python/${version}/ distname Python-${version} dist_subdir python24 checksums sha1 6e9e1ac2b70cc10c36063a25ab5a5ddb53177107 use_bzip2 yes worksrcdir ${worksrcdir}/Modules extract.post_args "| tar -xf - ${distname}/Modules/bsddbmodule.c \ ${distname}/Modules/_bsddb.c" post-extract { file copy ${filespath}/setup.py ${worksrcpath} } set libdir ${prefix}/lib/db46 set incdir ${prefix}/include/db46 depends_lib-append port:db46 variant db3 { set libdir ${prefix}/lib set incdir ${prefix}/include/db3 depends_lib-delete port:db46 depends_lib-append port:db3 } post-patch { reinplace "s|__VERSION__|${version}|g" ${worksrcpath}/setup.py reinplace "s|__LIBDIR__|${libdir}|g" ${worksrcpath}/setup.py reinplace "s|__INCDIR__|${incdir}|g" ${worksrcpath}/setup.py } livecheck.check regex livecheck.url http://www.python.org/download/releases/ livecheck.regex Python (2.4.\[0-9\]+)