TIP 483: Improved TIP #59 implementation for Tk

Login
Author:         Stuart Cassoff <stwo@users.sourceforge.net>
State:          Accepted
Type:           Project
Vote:           Done
Created:        03-Nov-2017
Post-History:   
Keywords:       Tk, configuration
Tcl-Version:    8.7
Tk-Branch:      tk-stu-pkg

Abstract

Initially implemented in TIP #205 [205], the TIP #59 [59] implementation for Tk is incomplete.

This TIP proposes a more complete TIP #59 implementation for Tk.

Rationale

There is currently only one key (fontsystem) provided by ::tk::pkgconfig, which will contain the value xft only if xft was enabled at configure-time, requiring a [catch]-wrapping of any [::tk::pkgconfig get fontsystem] calls.

Proposal

    #if defined(_WIN32) || defined(__CYGWIN__)
    #  define CFG_FONTSYSTEM	"gdi"
    #elif defined(MAC_OSX_TK)
    #  define CFG_FONTSYSTEM	"xft"
    #elif defined(HAVE_XFT)
    #  define CFG_FONTSYSTEM	"xft"
    #else
    #  define CFG_FONTSYSTEM	"x11"
    #endif

Tk Configuration Specification

Keys to be provided by ::tk::pkgconfig, their types and a description of their use.

Types: B = Boolean flag, S = String.

Examples of the files expected to be found in the configured directories in parenthesis.

Name Type Description
64bit B Set to true if Tk was compiled in 64bit mode
debug B Set to true if Tk was compiled to contain debugging information
mem_debug B Set to true if Tk has memory debugging compiled into it
optimized B Set to true if Tk was compiled with compiler optimizations
profiled B Set to true if Tk was compiled to contain profiling statements
threaded B Set to true if Tk was compiled as thread-enabled
fontsystem S Name of fontsystem being used by Tk
bindir,install S Directory where binary files are configured to be installed (wish)
demodir,install S Directory where demonstration files are configured to be installed (.tcl, .xbm)
docdir,install S Directory where documentation files are configured to be installed (.man, .html)
includedir,install S Directory where include files are configured to be installed (.h)
libdir,install S Directory where library files are configured to be installed (.so, .a)
scriptdir,install S Directory where script files are configured to be installed (tk.tcl)
bindir,runtime S Directory where binary files should be found at runtime (wish)
demodir,runtime S Directory where demonstration files should be found at runtime (.tcl, .xbm)
docdir,runtime S Directory where documentation files should be found at runtime (.man, .html)
includedir,runtime S Directory where include files should be found at runtime (.h)
libdir,runtime S Directory where library files should be found at runtime (.so, .a)
scriptdir,runtime S Directory where script files should be found at runtime (tk.tcl)

Platform Considerations

Current Uncertainties as of 2017/11/22:

Status 2018/07/04:

Reference Implementation

The reference implementation is available in the tk-stu-pkg branch. http://core.tcl.tk/tk/timeline?r=tk-stu-pkg

The code is licensed under the same license as Tk.

See Also

TIP #482 [482]: Record Tk demo directory information.

Copyright

This document has been placed in the public domain.