# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
# $Id: Portfile 80508 2011-07-13 21:38:33Z jmr@macports.org $

PortSystem 1.0
PortGroup python31 1.0

name                    py31-tkinter
version                 3.1.4
categories              python graphics
license                 PSF
platforms               darwin
maintainers             nomaintainer
description             Python bindings to the Tk widget set
long_description        ${description}

homepage                http://docs.python.org/release/${version}/library/tkinter.html
master_sites            http://www.python.org/ftp/python/${version}/
distname                Python-${version}
dist_subdir             python31
checksums               md5     dcd128e69f8ee239182b54e33313aac7 \
                        sha1    e5767a4fc92433816451de75c8721f2e1a81f6ea \
                        rmd160  beb24a2a1227aa2bc036263b4c808daa72fa3e02
use_xz                  yes

depends_lib-append      port:tk

worksrcdir              ${worksrcdir}/Modules

extract.post_args       "| tar -xf - ${distname}/Modules/_tkinter.c \
                                ${distname}/Modules/tkinter.h \
                                ${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 (3\\.1\\.\[0-9\]+)
