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

PortSystem          1.0
PortGroup           perl5 1.0

perl5.branches      5.28 5.30 5.32 5.34
perl5.setup         Tcl-Tk 1.29

platforms           {darwin any}
supported_archs     noarch
maintainers         {@chrstphrchvz gmx.us:chrischavez} openmaintainer
license             {Artistic-1 GPL}

description         Tcl::Tk - Extension module for Perl giving access to Tk \
                    via the Tcl extension

long_description    The Tcl::Tk extension (not to be confused with the \
                    \"native\" perl5 Perl/Tk extension) provides a raw but \
                    complete interface to the whole of Tk via the Tcl \
                    extension. \
                    \
                    \n\nTcl::Tk is pure-perl, with all binary bindings \
                    offloaded to Tcl perl module. \
                    \
                    \n\nTcl::Tk has full support for perl/Tk syntax. This \
                    does not mean 100% compatibility though. perl/Tk syntax \
                    is taken, but it is not followed when it is not tcl/tk \
                    compatible. Do not expect full perl/tk compatibility, \
                    just use the same syntax. \
                    \
                    \n\nThis approach allows you to intermix tcl/tk and \
                    perl/tk code, for example you can use pure-tcl to create \
                    entire GUI and then use perl/Tk syntax to access \
                    individual widgets. This also allows you to design GUI \
                    with any tcl/tk GUI designer.

checksums           rmd160  81f211fc39580f6e2955ee4b2c51d6a112ac70d3 \
                    sha256  9d590b992494cd1a3fb72ea017e81ecc2a6d99034ab3a04e073ef24a9a9d0e63 \
                    size    321915

if {${perl5.major} != ""} {
    # Only used for a test removed by patch;
    # doesn't get stored in configuration
    #configure.args-append \
    #               --tclsh ${prefix}/bin/tclsh

    depends_lib-append \
                    port:p${perl5.major}-tcl \
                    port:tk \
                    port:tklib
    # Bypass the test-for-tk since it doesn't work from MacPorts
    # (Perl never gets any output from tclsh for some reason)
    patchfiles-append \
                    patch-Makefile.PL.diff
}
