ADDED build/make-minkit-static Index: build/make-minkit-static ================================================================== --- /dev/null +++ build/make-minkit-static @@ -0,0 +1,21 @@ +#! /bin/sh + +# Set C compiler to diet libc +CC='diet gcc' +export CC + +# Build minimalistic tclkit +KITCREATOR_PKGS=" " +KITCREATOR_MINENCODINGS='true' +KITCREATOR_MINBUILD='true' +export KITCREATOR_PKGS KITCREATOR_MINENCODINGS KITCREATOR_MINBUILD + +rm -rf tcl/patchscripts +mkdir tcl/patchscripts || exit 1 + +cat << \__EOF__ > tcl/patchscripts/dietlibc.sh +sed 's@^# *include *$@&@;T s;p;s@string.h@strings.h@;:s' generic/tclInt.h > generic/tclInt.h.new && cat generic/tclInt.h.new > generic/tclInt.h +rm -f generic/tclInt.h.new +__EOF__ + +./kitcreator "$@" --disable-load Index: build/pre.sh ================================================================== --- build/pre.sh +++ build/pre.sh @@ -16,7 +16,9 @@ make boot.tcl.h make zipvfs.tcl.h make distclean ) || exit 1 + +rm -rf tcl/patchscripts/ find . -name '.*.sw?' -type f | xargs rm -f Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -14,11 +14,12 @@ SRC="src/tcl${TCLVERS}.tar.gz" SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz" BUILDDIR="$(pwd)/build/tcl${TCLVERS}" OUTDIR="$(pwd)/out" INSTDIR="$(pwd)/inst" -export SRC SRCURL BUILDDIR OUTDIR INSTDIR +PATCHSCRIPTDIR="$(pwd)/patchscripts" +export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 if [ ! -f "${SRC}" ]; then @@ -52,10 +53,19 @@ else cp -rp ../buildsrc/* './' fi cd "${BUILDDIR}" || exit 1 + + # Apply patch scripts if needed + for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do + if [ -f "${patchscript}" ]; then + echo "Running patch script: ${patchscript}" + . "${patchscript}" + fi + done + for dir in unix win macosx __fail__; do if [ "${dir}" = "__fail__" ]; then # If we haven't figured out how to build it, reject. exit 1