# -*- Mode: Tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:et:sw=4:ts=4:sts=4
# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0
PortGroup python25 1.0

name                    py25-libxml2
version                 2.6.21
revision                1
categories              python textproc
platforms               darwin
maintainers             sfiera openmaintainer
description             Python bindings for libxml2
long_description        ${description}

homepage                http://xmlsoft.org/python.html
master_sites            ftp://xmlsoft.org/libxml2/python/
distname                libxml2-python-${version}

checksums               md5 229dd2b3d110a77defeeaa73af83f7f3 \
                        sha1 2d395e8a5e9accd68f4e78ac2391431ef884e9d5 \
                        rmd160 d4973576c33e0e65c4fc41b31ee3df5f803abfad

patchfiles              patch-setup.py.diff

depends_lib-append      port:libxml2 \
                        port:zlib

build.env               LDFLAGS=-L${prefix}/lib

post-patch {
  reinplace "s|@PREFIX@|$prefix|" ${worksrcpath}/setup.py
}

post-destroot {
  set docdir ${prefix}/share/doc/${name}-${version}
  xinstall -d ${destroot}${docdir}
  xinstall -m 0644 -W ${worksrcpath} README TODO \
    ${destroot}${docdir}
}

livecheck.type          regex
livecheck.url           http://xmlsoft.org/sources/python/
livecheck.regex         {libxml2-python-(\d+(?:\.\d+)*)}
