# $Id: Portfile 80508 2011-07-13 21:38:33Z jmr@macports.org $

PortSystem 1.0
PortGroup python25 1.0

name			py25-tkinter
version			2.5.6
categories		python graphics
license			PSF
platforms		darwin
maintainers		jwa openmaintainer
description		Python 2.5 bindings to the Tk widget set
long_description	${description}

homepage		http://docs.python.org/release/2.5.4/lib/module-Tkinter.html
master_sites            http://www.python.org/ftp/python/${version}/
dist_subdir             python25
distname                Python-${version}
use_bzip2               yes
checksums               md5     5d45979c5f30fb2dd5f067c6b06b88e4 \
                        sha1    29f6dd41bf09c5e04311b367cbb7604fa016e699 \
                        rmd160  92f0a955971f187a7d50c6422168202ec551bf22

depends_lib-append      port:tk

worksrcdir              ${worksrcdir}/Modules

extract.post_args       "| tar -xf - ${distname}/Modules/_tkinter.c \
                                ${distname}/Modules/tkappinit.c"
post-extract {
        file copy       ${filespath}/setup.py ${worksrcpath}
}

configure {
        reinplace "s|__PREFIX__|${prefix}|g" ${worksrcpath}/setup.py
        reinplace "s|__TK-VERSION__|8.5|g" ${worksrcpath}/setup.py
}

livecheck.type  regex
livecheck.url   http://www.python.org/download/releases/
livecheck.regex Python (2.5.\[0-9\]+)
