ADDED itcl/build.sh Index: itcl/build.sh ================================================================== --- itcl/build.sh +++ itcl/build.sh @@ -0,0 +1,49 @@ +#! /bin/bash + +if [ ! -f 'build.sh' ]; then + echo 'ERROR: This script must be run from the directory it is in' >&2 + + exit 1 +fi +if [ -z "${TCLVERS}" ]; then + echo 'ERROR: The TCLVERS environment variable is not set' >&2 + + exit 1 +fi + +ITCLVERS="3.4" +ITCLVERSEXTRA="b1" +SRC="src/itcl-${ITCLVERS}.tar.gz" +SRCURL="http://sourceforge.net/projects/incrtcl/files/%5BIncr%20Tcl_Tk%5D-source/${ITCLVERS}/itcl${ITCLVERS}${ITCLVERSEXTRA}.tar.gz/download" +BUILDDIR="$(pwd)/build/itcl${ITCLVERS}" +OUTDIR="$(pwd)/out" +INSTDIR="$(pwd)/inst" +export ITCLVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR + +rm -rf 'build' 'out' 'inst' +mkdir 'build' 'out' 'inst' || exit 1 + +if [ ! -f "${SRC}" ]; then + mkdir 'src' >/dev/null 2>/dev/null + + wget -O "${SRC}" "${SRCURL}" || exit 1 +fi + +( + cd 'build' || exit 1 + + gzip -dc "../${SRC}" | tar -xf - + + cd "${BUILDDIR}" || exit 1 + ./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} + + "${MAKE:-make}" || exit 1 + + "${MAKE:-make}" install + + mkdir "${OUTDIR}/lib" || exit 1 + cp -r "${INSTDIR}/lib"/itcl*/ "${OUTDIR}/lib/" + rm -f "${OUTDIR}/lib"/itcl*/*.a +) || exit 1 + +exit 0 ADDED kitcreator Index: kitcreator ================================================================== --- kitcreator +++ kitcreator @@ -0,0 +1,44 @@ +#! /bin/bash + +TCLVERS="8.4.19" +export TCLVERS + +mode="build" +if [ "$1" = "clean" ]; then + mode="clean" +fi +if [ "$1" = "distclean" ]; then + mode="distclean" +fi + +for pkg in tcl tk itcl mk4tcl tclvfs; do + if [ "${mode}" = "distclean" ]; then + rm -rf "${pkg}/src" + fi + + if [ "${mode}" = "clean" -o "${mode}" = "distclean" ]; then + rm -f "${pkg}/build.log" + rm -rf "${pkg}/out" "${pkg}/inst" "${pkg}/build" + + continue + fi + + ( + cd "${pkg}" || exit 1 + + ./build.sh > build.log 2>&1 || exit 1 + ) || failed="${failed} ${pkg}" + + case "${pkg}" in + tcl) + TCLCONFIGDIR=$(find "$(pwd)/tcl/build" -name tclConfig.sh | head -1 | sed 's@/[^/]*$@@') + export TCLCONFIGDIR + ;; + esac +done + +if [ -n "${failed}" ]; then + echo "Failed to build:${failed}" +fi + +exit 0 ADDED mk4tcl/build.sh Index: mk4tcl/build.sh ================================================================== --- mk4tcl/build.sh +++ mk4tcl/build.sh @@ -0,0 +1,44 @@ +#! /bin/bash + +if [ ! -f 'build.sh' ]; then + echo 'ERROR: This script must be run from the directory it is in' >&2 + + exit 1 +fi +if [ -z "${TCLVERS}" ]; then + echo 'ERROR: The TCLVERS environment variable is not set' >&2 + + exit 1 +fi + +MK4VERS="2.4.9.7" +SRC="src/metakit-${MK4VERS}.tar.gz" +SRCURL="http://www.equi4.com/pub/mk/metakit-${MK4VERS}.tar.gz" +BUILDDIR="$(pwd)/build/metakit-${MK4VERS}" +OUTDIR="$(pwd)/out" +INSTDIR="$(pwd)/inst" +export MK4VERS SRC SRCURL BUILDDIR OUTDIR INSTDIR + +rm -rf 'build' 'out' 'inst' +mkdir 'build' 'out' 'inst' || exit 1 + +if [ ! -f "${SRC}" ]; then + mkdir 'src' >/dev/null 2>/dev/null + + wget -O "${SRC}" "${SRCURL}" || exit 1 +fi + +( + cd 'build' || exit 1 + + gzip -dc "../${SRC}" | tar -xf - + + cd "${BUILDDIR}/unix" || exit 1 + ./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}/../generic" ${CONFIGUREEXTRA} + + "${MAKE:-make}" tcllibdir="${INSTDIR}/lib" || exit 1 + + "${MAKE:-make}" tcllibdir="${INSTDIR}/lib" install +) || exit 1 + +exit 0 ADDED tcl/build.sh Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -0,0 +1,55 @@ +#! /bin/bash + +if [ ! -f 'build.sh' ]; then + echo 'ERROR: This script must be run from the directory it is in' >&2 + + exit 1 +fi +if [ -z "${TCLVERS}" ]; then + echo 'ERROR: The TCLVERS environment variable is not set' >&2 + + exit 1 +fi + +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 + +rm -rf 'build' 'out' 'inst' +mkdir 'build' 'out' 'inst' || exit 1 + +if [ ! -f "${SRC}" ]; then + mkdir 'src' >/dev/null 2>/dev/null + + wget -O "${SRC}" "${SRCURL}" || exit 1 +fi + +( + cd 'build' || exit 1 + + gzip -dc "../${SRC}" | tar -xf - + + cd "${BUILDDIR}" || exit 1 + for dir in unix win macosx; do + # Remove previous directory's "tclConfig.sh" if found + rm -f 'tclConfig.sh' + + cd "${BUILDDIR}/${dir}" || exit 1 + + ./configure --disable-shared --prefix="${INSTDIR}" ${CONFIGUREEXTRA} + + "${MAKE:-make}" || continue + + "${MAKE:-make}" install + + mkdir "${OUTDIR}/lib" || exit 1 + cp -r "${INSTDIR}/lib"/tcl*/ "${OUTDIR}/lib/" + + break + done +) || exit 1 + +exit 0 ADDED tclvfs/build.sh Index: tclvfs/build.sh ================================================================== --- tclvfs/build.sh +++ tclvfs/build.sh @@ -0,0 +1,50 @@ +#! /bin/bash + +if [ ! -f 'build.sh' ]; then + echo 'ERROR: This script must be run from the directory it is in' >&2 + + exit 1 +fi +if [ -z "${TCLVERS}" ]; then + echo 'ERROR: The TCLVERS environment variable is not set' >&2 + + exit 1 +fi + +TCLVFSVERS="20080503" +SRC="src/tclvfs-${TCLVFSVERS}.tar.gz" +SRCURL="http://sourceforge.net/projects/tclvfs/files/tclvfs/tclvfs-${TCLVFSVERS}/tclvfs-${TCLVFSVERS}.tar.gz/download" +BUILDDIR="$(pwd)/build/tclvfs-${TCLVFSVERS}" +OUTDIR="$(pwd)/out" +INSTDIR="$(pwd)/inst" +export TCLVFSVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR + +rm -rf 'build' 'out' 'inst' +mkdir 'build' 'out' 'inst' || exit 1 + +if [ ! -f "${SRC}" ]; then + mkdir 'src' >/dev/null 2>/dev/null + + wget -O "${SRC}" "${SRCURL}" || exit 1 +fi + +( + cd 'build' || exit 1 + + gzip -dc "../${SRC}" | tar -xf - + + cd "${BUILDDIR}" || exit 1 + ./configure --disable-shared --prefix="${INSTDIR}" --exec-prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} + + cp generic/vfs.c . + + "${MAKE:-make}" || exit 1 + + "${MAKE:-make}" install + + mkdir "${OUTDIR}/lib" || exit 1 + cp -r "${INSTDIR}/lib"/vfs*/ "${OUTDIR}/lib/" + rm -f "${OUTDIR}/lib"/vfs*/*.a +) || exit 1 + +exit 0 ADDED tk/build.sh Index: tk/build.sh ================================================================== --- tk/build.sh +++ tk/build.sh @@ -0,0 +1,55 @@ +#! /bin/bash + +if [ ! -f 'build.sh' ]; then + echo 'ERROR: This script must be run from the directory it is in' >&2 + + exit 1 +fi +if [ -z "${TCLVERS}" ]; then + echo 'ERROR: The TCLVERS environment variable is not set' >&2 + + exit 1 +fi + +SRC="src/tk${TCLVERS}.tar.gz" +SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz" +BUILDDIR="$(pwd)/build/tk${TCLVERS}" +OUTDIR="$(pwd)/out" +INSTDIR="$(pwd)/inst" +export SRC SRCURL BUILDDIR OUTDIR INSTDIR + +rm -rf 'build' 'out' 'inst' +mkdir 'build' 'out' 'inst' || exit 1 + +if [ ! -f "${SRC}" ]; then + mkdir 'src' >/dev/null 2>/dev/null + + wget -O "${SRC}" "${SRCURL}" || exit 1 +fi + +( + cd 'build' || exit 1 + + gzip -dc "../${SRC}" | tar -xf - + + cd "${BUILDDIR}" || exit 1 + for dir in unix win macosx; do + # Remove previous directory's "tkConfig.sh" if found + rm -f 'tkConfig.sh' + + cd "${BUILDDIR}/${dir}" || exit 1 + + ./configure --disable-shared --prefix="${INSTDIR}" --with-tcl="${TCLCONFIGDIR}" ${CONFIGUREEXTRA} + + "${MAKE:-make}" || continue + + "${MAKE:-make}" install + + mkdir "${OUTDIR}/lib" || exit 1 + cp -r "${INSTDIR}/lib"/tk*/ "${OUTDIR}/lib/" + + break + done +) || exit 1 + +exit 0