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

name                    py27-tkinter
version                 2.7.2
categories              python graphics
license                 PSF
platforms               darwin
maintainers             singingwolfboy openmaintainer
description             Python bindings to the Tk widget set
long_description        ${description}

homepage                http://docs.python.org/library/tkinter.html
master_sites            http://www.python.org/ftp/python/${version}/ \
                        ftp://ftp.python.org/pub/python/${version}/
distname                Python-${version}
dist_subdir             python27
checksums               md5     ba7b2f11ffdbf195ee0d111b9455a5bd \
                        sha1    417bdeea77abfaf1b9257fc6b4a04aaa209f4547 \
                        rmd160  c3bf4f09b7c429a4d9f4cc251c795304cd5232c5
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 (2.7.\[0-9\]+)
