# -*- 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 muniversal 1.1 name tk version 8.6.16 revision 0 categories x11 license Tcl/Tk maintainers {mcalhoun @MarcusCalhoun-Lopez} {gmx.us:chrischavez @chrstphrchvz} openmaintainer description Tcl Tool Kit homepage https://www.tcl-lang.org/ long_description This is Tk version ${version}, a GUI toolkit for Tcl. The best way to get \ started with Tcl is to read ``Tcl and the Tk Toolkit'' by John K. \ Ousterhout, Addison-Wesley, ISBN 0-201-63337-X. master_sites sourceforge:project/tcl/Tcl/${version} dist_subdir tcltk distname ${name}${version}-src worksrcdir ${name}${version} checksums md5 a7aad6cf52aa4687506a377a9a885a83 \ sha1 a0a9425f051bb7de8bd0932ccc3594f7815fcfb6 \ rmd160 58196d61f8f5a0de224630b9f7e2d342dc5f2d29 \ sha256 be9f94d3575d4b3099d84bc3c10de8994df2d7aa405208173c709cc404a7e5fe if {$subport eq $name} { distfiles # Not noarch so arch checking works transitively test.ignore_archs yes platforms any use_configure no build {} destroot { if {[variant_exists quartz] && [variant_isset quartz]} { set tkdepname tk-quartz } else { set tkdepname tk-x11 } set bindir ${prefix}/libexec/${tkdepname} ln -s {*}[glob -directory ${bindir} *] ${destroot}${prefix}/bin set incdir ${prefix}/include/${tkdepname} ln -s {*}[glob -directory ${incdir} *] ${destroot}${prefix}/include set libdir ${prefix}/lib/${tkdepname} ln -s {*}[glob -types f -directory ${libdir} *] ${destroot}${prefix}/lib ln -s {*}[glob -types d -directory ${libdir} tk*] ${destroot}${prefix}/lib ln -s ${libdir}/pkgconfig/tk.pc ${destroot}${prefix}/lib/pkgconfig set mandir ${prefix}/share/${tkdepname}/man foreach sect {1 3 n} { xinstall -d ${destroot}${prefix}/share/man/man${sect} ln -s {*}[glob -directory ${mandir}/man${sect} *] ${destroot}${prefix}/share/man/man${sect} } } if {${os.platform} eq "darwin" && ${os.subplatform} eq "macosx" && ${os.major} >= 10 && ![string match ppc* ${build_arch}]} { variant quartz conflicts x11 {} # The buildbot uses default variants, so binaries for ports # that don't depend on a specific tk subport will be linked # with tk-quartz, which is thus always needed. depends_lib port:tk-quartz variant x11 conflicts quartz { depends_lib-append port:tk-x11 } if {![variant_isset x11]} { default_variants +quartz } } else { depends_lib port:tk-x11 } livecheck.type regex # Only check for 8.x versions - 9 will need to be a separate port. livecheck.regex {Tcl/Tk (8(?:\.\d+)*)} } else { depends_build path:bin/pkg-config:pkgconfig depends_lib port:tcl patchfiles CGRect.patch configure.dir ${worksrcpath}/unix build.dir ${configure.dir} set bindir ${prefix}/libexec/${subport} set incdir ${prefix}/include/${subport} set libdir ${prefix}/lib/${subport} set mandir ${prefix}/share/${subport}/man configure.args --bindir=${bindir} \ --includedir=${incdir} \ --libdir=${libdir} \ --mandir=${mandir} \ --with-tcl=${prefix}/lib configure.env {TK_LIBRARY=$(libdir)/tk$(VERSION)} platform darwin { configure.args-append \ tcl_cv_type_64bit="long long" } # see https://trac.macports.org/ticket/58447 configure.cppflags-replace -I${prefix}/include -isystem${prefix}/include configure.ldflags -L${worksrcpath} -L${prefix}/lib configure.args.arm64-append --enable-64bit configure.args.x86_64-append --enable-64bit configure.args.ppc64-append --enable-64bit # see https://trac.macports.org/ticket/17189 destroot.target-append \ install-private-headers post-destroot { ln -s wish8.6 ${destroot}${bindir}/wish ln -s libtk8.6.dylib ${destroot}${libdir}/libtk.dylib foreach fl {tk3d.h tkFont.h} { xinstall -m 0644 ${workpath}/tk${version}/generic/${fl} ${destroot}${incdir} } } test.run yes livecheck.type none } subport tk-quartz { revision 0 platforms {macosx >= 10} supported_archs arm64 i386 x86_64 configure.args-append \ --enable-aqua post-destroot { move \ ${destroot}${incdir}/X11 \ ${destroot}${incdir}/X11_tk fs-traverse fl [list ${destroot}${incdir}] { if {[file extension ${fl}] eq ".h"} { reinplace -q "s|include