Package: tcl-libdirs Version: 1 Revision: 1 Source: none CompileScript: << #!/bin/sh -ev cat <<'EOF' > pkgIndex.tcl lappend auto_path [file join $dir [info tclversion]] lappend auto_path $dir EOF << InstallScript: << mkdir -p %i/lib/%n install -m 644 pkgIndex.tcl %i/lib/%n # the following isn't necessary, but safety against permission # screwups by other packages and also example of usage mkdir %i/lib/%n/8.6 << Maintainer: Daniel Macks License: Public Domain Description: Support lib/ subdir for tcl runtime packages DescDetail: << The tcl interpreter looks in %p/lib and %p/lib/tclMAJOR.MINOR for loading tcl packages at runtime. All direct subdirs of %p/lib are also checked (%p/lib/foo not %p/lib/foo/bar), and other tcl interpreters get access to all fink-packaged tcl packages simply by adding %p/lib to their auto_path. That means a ton of modules (tcl bundled, tk, and separately packaged) pile up in %p/lib. Installing this fink package creates a %p/lib/%n directory and triggers tcl to scan its direct subdirs as well. That means all tcl packages can be accumulated in this subdir, helping to keep %p/lib organized. It also contains subdirs for each tcl MAJOR.MINOR, for packages that are somehow tied to a specific tcl version (bundled with tcl core, linked against libtcl.dylib, etc.) << DescUsage: << Fink packages that install tcl packages in %p/lib/%n must have a runtime dependency on %n. << DescPackaging: << By doing this via a separate fink package (rather than including it as part of fink's tcltk package, or adding a hack to fink's tcl runtime itself to check this subdir) we make it easier for other fink packages to migrate to this system. Rather than needing a versioned dependency on tcltk, one simply needs a dependency on this fink package, which self-documents the support of this subdir. Using the TCLLIBPATH env var (via fink's RuntimeVars) would also have sufficed. However, the current implementation is not as sensitive to shells with mis-configured dotfiles. <<