@@ -1,42 +1,25 @@ #! /bin/bash -if [ ! -x "../platform" ]; then - echo "No platform script found, aborting." >&2 - - exit 1 -fi - -if [ "${PLATFORM}" = "tcl" ]; then - rm -rf out - - exit 0 -fi - -# We only do anything on Tcl 8.4.x -if echo "${TCLVERS}" | grep '^8\.4\.'; then - true -else - rm -rf out - - exit 0 -fi - +# Define parameters VERS=8.5.2 SRC="src/tclDict-${VERS}.tar.gz" SRCURL="http://pascal.scheffers.net/software/tclDict-${VERS}.tar.gz" BUILDDIR="tclDict-${VERS}" -WORKDIR="${TMPDIR:-/tmp}/dict-$$${RANDOM}${RANDOM}${RANDOM}" -PLATDIR="$(pwd)/out/${PLATFORM}" - -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR - -if [ ! -f "${SRC}" ]; then - mkdir src >/dev/null 2>/dev/null - - wget -O "${SRC}" "${SRCURL}" || exit 1 -fi +export VERS SRC SRCURL BUILDDIR + +# Load common functions +source ../common.sh + +# Do not build if the "tcl" platform has been requested +not_platforms 'tcl' + +# Require Tcl 8.4 to build +setup_tcl84 + +# Download source +download_src ( rm -rf build mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null mkdir build