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

name                tix
version             8.4.3
revision            6
categories          x11
license             BSD
maintainers         {gmx.us:chrischavez @chrstphrchvz} openmaintainer
description         Tk Interface eXtension
long_description    Tix, the Tk Interface eXtension, is a powerful set of \
                    user interface components that expands the capabilities \
                    of your Tcl/Tk and Python applications. Using Tix together \
                    with Tk will greatly enhance the appearance and functionality \
                    of your application.

homepage            http://tix.sourceforge.net/

master_sites        sourceforge:project/tix/tix/${version}

dist_subdir         tcltk
distname            Tix${version}-src

worksrcdir          Tix${version}

checksums           rmd160  99249c4d7a19fcb8c27f11ab1b3ef6102911409d \
                    sha256  562f040ff7657e10b5cffc2c41935f1a53c6402eb3d5f3189113d734fd6c03cb \
                    size    1831503

depends_lib         port:tcl
patchfiles          patch-generic-tixGrSort.c.diff \
                    patch-tk_x11.diff \
                    patch-dyld_variable.diff \
                    patch-tk_aqua.diff

# Fix implicit function declarations
patchfiles-append   patch-missing-headers.diff \
                    panic.patch

configure.args      --mandir=${prefix}/share/man \
                    --with-tcl=${prefix}/lib

variant quartz conflicts x11 {
    depends_lib-append  port:tk-quartz
    configure.args-append \
                    --with-tk=${prefix}/lib/tk-quartz
    configure.cppflags-prepend  -I${prefix}/include/tk-quartz
}

variant x11 conflicts quartz {
    depends_lib-append  port:tk-x11

    configure.args-append \
                    --with-x \
                    --x-includes=${prefix}/include \
                    --x-libraries=${prefix}/lib \
                    --with-tk=${prefix}/lib/tk-x11
    configure.cppflags-prepend  -I${prefix}/include/tk-x11
}

if {![variant_isset quartz]} {
    default_variants +x11
}

test.run            yes
test.target         test

livecheck.regex     {/tix/(\d+\.\d+\.\d+)}
