Changes to KitCreator between r30 and r31

A simple build system for creating a [http://www.equi4.com/tclkit/ | Tclkit] for your platform.  It was created to ease creation of Tclkits for the local platform.  If you just want to use Tcl on your platform, it is recommended that you use a [http://www.equi4.com/tclkit/download.html | pre-existing Tclkit].  See also locally built pre-built [Tclkits].

It will work for cross-compiling Tclkits if you bootstrap a local Tclkit first, however this is not well tested.

Download:
   * [http://www.rkeene.org/devel/kitcreator-0.3.3.2315.tar.gz | KitCreator v0.3.3.2315]
----
'''Some examples:'''
   1. Create a Tclkit:
   11. `$ ./kitcreator`
   2. Create a Tclkit for Tcl 8.5.8:
   22. `$ ./kitcreator 8.5.8`
   3. Create a Tclkit for Tcl from CVS HEAD:
   33. `$ ./kitcreator cvs_HEAD`
   4. Compile a 64-bit Tclkit:
   44. `$ ./kitcreator --enable-64bit`
   5. Cross-compile a Tclkit:
   55. Bootstrap (optional, you can use an existing Tclkit):
   555. `$ ./kitcreator`
   555. `$ mv tclkit-8.4.19 tclkit-local`
   555. `$ TCLKIT="$(pwd)/tclkit-local"`
   555. `$ export TCLKIT`
   55. Cross-compile:
   555. `$ CC=mipsel-linux-uclibc-gcc`
   555. `$ CXX=false`
   555. `$ AR=mipsel-linux-uclibc-ar`
   555. `$ RANLIB=mipsel-linux-uclibc-ranlib`
   555. `$ export CC CXX AR RANLIB`
   555. `$ ./kitcreator --host=mipsel-linux-uclibc`
   6. Compile a 64-bit Tclkit 8.5.8 using SunStudio 12.1 on Solaris/x86:
   66. `$ CC='/opt/sunstudio12.1/bin/cc -m64'`
   66. `$ CXX='/opt/sunstudio12.1/bin/CC -m64'`
   66. `$ PATCH='gpatch'`
   66. `$ export CC CXX PATCH`
   66. `$ ./kitcreator 8.5.8 --enable-64bit`
   7. To clean up post-build:
   77. `$ ./kitcreator clean`
   8. Create a Tclkit without Metakit4 support (falls back to Zip for storage):
   88. KITCREATOR_PKGS='tk itcl'
   88. export KITCREATOR_PKGS
   88. ./kitcreator
   9. Create a Tclkit with Metakit4 support, but using Zip for storage:
   99. $ ./kitcreator --enable-kit-storage=zip

----
'''Method of Operation'''

''Details:''
The general mechanism that enables a Tclkit to operate is a small Tcl
initialization routine linked statically to the core libraries needed to
operate a Tcl interpreter, the Tcl VFS Layer, and a database-backed (Metakit)
Virtual File System that is appended to the end of the executable.

This project brings together all of the required pieces, plus some additional
pieces that were found in the original Tclkit:
   1. Tk (dynamically linked)
   2. Itcl (dynamically linked)

These source code for these pieces are downloaded, compiled, and linked, and
the database containing the appropriate filesystem data is created.  What sets
this project apart from other similar projects is that:
   1. It attempts to be modular;
   2. It supports cross-compiling;
   3. It downloads the source from their original repositories;
   4. It allows you to specify an arbitrary version of Tcl (including CVS); and
   5. It uses GNU Autoconf scripts for compiling the part of the Tclkit that brings the whole thing together (the Kitsh)

To accomplish these goals the following mechanisms are in place:
   1. The top-level "kitcreator" script; and
   2. Per-project subdirectories, each containing a "build.sh" script

The top-level "kitcreator" script is very simple.  Its only job is to
interpret command line arguments, and call the per-project "build.sh" scripts.
For the "tcl" project it also finds the appropriate "tclConfig.sh" (and stores
this path in TCLCONFIGDIR) to enable subsequent build scripts to find the
appropriate Tcl to link against.

The per-project "build.sh" scripts are entirely autonomous.  They are
responsible for downloading the source code for the appropriate version that
will compile and link against the current version of Tcl (user requested
version can be found in "TCLVERS", while the actual version must be requested
from the "tclConfig.sh" script), compiling it, installing a functional copy
into the per-project "inst" directory, and installing anything that needs to
be in the Tclkit's VFS root into the per-project "out" directory.

The exception to this is the "kitsh" project.  It is the glue that binds all
the individual projects together into a single executable.  Its build script
does not create an "inst" or an "out" directory because it is not a library.
Instead, it collects all the other project's "out" directories into a single
directory (starpack.vfs), as well a static file (boot.tcl).  It then compiles
the source code, and then installs the Metakit database containing the VFS
onto the resulting executable.


If the "mk4tcl" project fails to build (or is not requested to be built),
the rest of the project will be built using zip files instead of Metakit
databases.


To create the storage database, one of two Tclkits is used (tried in this
order):
   1. The Tclkit specified by the TCLKIT environment variable (or "tclkit" if that variable is not set) if it is functional; or
   2. The built Tclkit itself

The second method will not work if the built Tclkit is not executable on the
current platform (i.e., in the case of cross-compilation) and so it may be
necessary to bootstrap a runnable Tclkit first.
----
'''Included Packages'''

%| Package Name | Package Version | Included When...   | Linking Method |%
&| Tk           | ''same as Tcl'' | Always             | Dynamic        |&
&| Incr Tcl     | 3.4b1           | Always             | Dynamic        |&
&| starkit      | 1.3.2           | Always             | Static         |&
&| Metakit      | 2.4.9.7         | Always             | Static         |&
&| TclVFS       | 20080503        | Always             | Static         |&
&| PWB          | 1.1             | Always             | Static         |&
&| Rechan       | 1.0             | Always             | Static         |&
&| Zlib         | 1.1             | Always             | Static         |&
&| Thread       | 2.6.5           | --enable-threads   | Dynamic        |&
&| Registry     | ''varies''      | Building for Win32 | Static         |&
&| DDE          | ''varies''      | Building for Win32 | Static         |&
&| http         | ''varies''      | Always             | Static         |&
&| opt          | ''varies''      | Always             | Static         |&
&| msgcat       | ''varies''      | Always             | Static         |&
&| tcltest      | ''varies''      | Unless MINBUILD    | Static         |&
----
'''Tested Platforms'''

%| Operating System | CPU Architecture | Tcl Version | Compiler | Cross-compile |%
&| Linux 2.6   | x86     | 8.4.19   | gcc 4.1.2         | no |&
&| Linux 2.6   | x86     | 8.5.8    | gcc 4.1.2         | no |&
&| Linux 2.6   | x86     | CVS HEAD | gcc 4.1.2         | no |&
&| Solaris 8   | SPARC   | 8.4.19   | gcc 3.4.6         | no |&
&| Solaris 8   | SPARC   | 8.5.8    | gcc 3.4.6         | no |&
&| Solaris 10  | SPARC   | 8.4.19   | gcc 3.4.3         | no |&
&| Solaris 10  | SPARC   | 8.5.8    | gcc 3.4.3         | no |&
&| Solaris 10  | SPARC   | 8.4.19   | SunStudio 12      | no |&
&| Solaris 10  | SPARC   | 8.5.8    | SunStudio 12      | no |&
&| HP/UX 11iv1 | PA-RISC | 8.4.19   | gcc               | no |&
&| HP/UX 11iv1 | PA-RISC | 8.5.8    | gcc               | no |&
&| Linux       | ARM     | 8.4.19   | gcc 4.3.3         | yes |&
&| Windows     | x86     | 8.4.19   | mingw32 gcc 3.4.2 | yes |&
&| Windows     | x86     | 8.5.8    | mingw32 gcc 3.4.2 | yes |&
----
'''Versioning Information'''
''Version Numbers''
   1. The version number for a KitCreator release is in the following format:
   11. ''Major''.''Minor''.''Revision''.''Version Control Tag''
   2. The components are incremented based on various criteria:
   22. ''Major'': When the interface changes in an incompatible way possibly with no way to revert to the previous behavior
   22. ''Minor'': When the basic functionality is altered or any interfaces changes are mode (all interface changes that are incompatible will support the previous behavior); Substantial new features
   22. ''Revision'': Bug fixes to existing features, new minor features that do not alter the usage of the built Tclkit
   22. ''Version Control Tag'': Every change
(blank line)
'''Basic Revision History''' --> ''Basic Revision History''
(blank line)
   1. KitCreator 0.0.1 - Initial separation from other projects (no release)
   2. KitCreator 0.0.2 - Minor fixes (no release)
   3. KitCreator 0.0.3 - Cleanup (no release)
   4. KitCreator 0.0.4 - CVS compiling support (first release)
   5. KitCreator 0.0.5 - Cleaned up Metakit4 support
   6. KitCreator 0.0.6 - Added support for "buildsrc" directories to all sub-projects
   7. KitCreator 0.0.7 - 64-bit (especially SPARC) fixes, and started adding cross-compiling support
   8. KitCreator 0.0.8 - Cross-compiling support and improved for Win32 and Linux/MIPSEL

   0. KitCreator 0.1.0 - Zlib package added to allow static linking and HP-UX fixes

   0. KitCreator 0.2.0 - Pure-tcl read-only Mk4 implementation; Added Thread package support added; Fixed Windows build issues
   1. KitCreator 0.2.1 - Fixed failure to clean kitsh directory when producing releases
   2. KitCreator 0.2.2 - Updated to latest zlib (''note: this caused build failures on non-UNIX systems'')
   3. KitCreator 0.2.3 - Further work on Pure-Tcl Mk4 implementation
   4. KitCreator 0.2.4 - Statically link to Zlibc

   0. KitCreator 0.3.0 - Zip storage added if Mk4 fails to build; Fixed bug in Windows builds where Tk was unusable; Reverted to working version of zlib; Fixed bug in "`tcl::pkgconfig`"
   1. KitCreator 0.3.1 - Added support for "`--enable-kit-storage`" option to allow user to specify what storage mechanism to use
   2. KitCreator 0.3.2 - Fixed bug in sync logic if new "`--enable-kit-storage`" option is used
   3. KitCreator 0.3.3 - Fixed bug preventing "Mk4tcl" package from being "`package required`" even if present when using Zip Tclkit storage
(blank line)
   0. KitCreator 0.4.0 - System encoding will be set to the system default rather than the traditional list (future)
(blank line)
   0. KitCreator 0.5.0 - Tcl 8.5 made the default (future)
(blank line)
   0. KitCreator 0.5.0 - Tcl 8.6 features will be integrated more heavily (future)
(blank line)
   0. KitCreator 1.0.0 - Stable long term release, Tcl 8.6 made the default (future)

Legend

     Only in r30
     Only in r31
     -->      Modified slightly between r30 and r31