# $Id: Portfile 57375 2009-09-10 08:16:41Z ryandesign@macports.org $

PortSystem 1.0
PortGroup python25 1.0

name                    py25-libxslt
version                 2.6.21
categories              python textproc
platforms               darwin
maintainers             nomaintainer
description             Python bindings for libxslt
long_description        ${description}

homepage                http://xmlsoft.org/
master_sites            ftp://xmlsoft.org/libxml2/python/
distname                libxml2-python-${version}
checksums               md5 229dd2b3d110a77defeeaa73af83f7f3
patchfiles              patch-setup.py.diff

depends_lib-append      port:libxslt \
                        port:py25-libxml2 \
                        port:zlib

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

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

post-destroot {
  # strip out anything not related to libxslt, so this doesn't conflict
  # with py25-libxml2
  fs-traverse file ${destroot} {
    if {[file isfile ${file}]} {
      if {[string match "*libxml2*" ${file}]} {
         file delete ${file}
      }
    }
  }
}

livecheck.type          regex
livecheck.url           ftp://xmlsoft.org/libxml2/python/
livecheck.regex         {libxml2-python-(.*)\.tar\.gz}

