# -*- 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 python32 1.0

name                    py32-tkinter
version                 3.2.1
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             python32
checksums               md5     f0869ba3f3797aacb1f954ef24c256f3 \
                        sha1    876943a2585e6365fdd7ffce1771d1bb689746a5 \
                        rmd160  398adb5ebb676006a97296d71d82a2a0cb9b984c
# consider changing to xz with next python32 release
use_bzip2                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\\.2\\.\[0-9\]+)
