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

name                    py26-tkinter
version                 2.6.7
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             python26
checksums               md5     d40ef58ed88438a870bbeb0ac5d4217b \
                        sha1    5d35eb746e85fb3deaff8518448137c9b9fb6daa \
                        rmd160  513e84a7cb76ca876e3803bb03ed558bd0378063
use_bzip2               yes

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.6.\[0-9\]+)
