KitCreator

KitCreator , by Roy Keene, is a simple build system for creating a Tclkit or other basekit for your platform. It was created to ease creation of basekits for the local platform.

Builds

released builds
KitCreator Web Interface
choose desired kit via a form

Description

It will work for cross-compiling Tclkits if you bootstrap a local Tclkit first.

It is intended to resemble as closely as possible the authentic Tclkit.

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)

Discussion

tnc

AMG: The following adds support for the tnc package included within tDOM.

tar -xf ~/tdom-0.9.1-src.tgz &&
mkdir tnc &&
mv tdom-0.9.1 tnc/buildsrc &&
sed -i '/^INSTALL_DATA\>/s/444$/644/' tnc/buildsrc/extensions/tnc/Makefile.in &&
sed -i '/-DUSE_TDOM_STUBS=1/d' tnc/buildsrc/extensions/tnc/configure &&
cat > tnc/build.sh << "EOF" &&
#! /usr/bin/env bash
# BuildCompatible: KitCreator
version=0.3.0
configure_extra=("--with-tdom=${pkgdir}/../tdom/inst/lib")
function preconfigure() {
    cd extensions/tnc
}
EOF
chmod +x tnc/build.sh

When running kitcreator, be sure to include tdom tnc in the value of KITCREATOR_PKGS.

This is a partial solution, a quick fix. The above does not tie into KitCreator's machinery for downloading packages. As written, it assumes you have the tdom sources downloaded to ~/tdom-0.9.1-src.tgz. It works for me because, due to firewall shenanigans at the office, I'm already having to run KitCreator with all packages pre-downloaded, bypassing its built-in download machinery.

I feel a better solution would be to update the tdom build script to internally build a tnc package as well as tdom itself.

zlib

AMG: KitCreator targets an older version of zlib (1.2.8). The following upgrades to 1.2.11:

mkdir zlib/src &&
ln ~/zlib-1.2.11.tar.gz zlib/src &&
sed -i '/^version=.*/s//version=1.2.11/' zlib/build.sh

Unwanted console window

AMG: When compiling for Windows, add LDFLAGS=-mwindows to the build command to hide the console window.

No Xft support

AMG: When I use KitCreator to cross-compile Tclkit, it ends up not supporting Xft.

First off, the build system's xft.pc and other pkg-config files are being used, rather than the target system's xft.pc. I fixed this by setting these environment variables when running KitCreator:

PKG_CONFIG_PATH=
PKG_CONFIG_LIBDIR=$SYSROOT/usr/lib/pkgconfig:$SYSROOT/usr/share/pkgconfig
PKG_CONFIG_SYSROOT_DIR=$SYSROOT

Next, I'm getting -L/usr/lib64 in my X library search path, even though that's outside my sysroot and the target system is 32-bit. This is coming from Tk's configure script's X11 detection code, which happily finds the host system's files. I don't have a fix for this yet, but manually running configure with the following options help:

--x-includes=$SYSROOT/usr/X11R6/include
--x-libraries=$SYSROOT/usr/X11R6/lib

Finally, the real killer. pkg-config --libs xft yields -L$SYSROOT/usr/X11R6/lib -lXft -lfreetype -lXrender -lfontconfig (with $SYSROOT expanded). The listed libraries also depend on libXext.so, but the linker isn't given -rpath-link, so it doesn't know where to find that library. Only on SunOS is -L consulted when searching for libraries needed by those explicitly listed on the command line.

The only way I was able to fix this last problem was by editing xft.pc to include -lXext in the Libs: line.