Diff

Differences From Artifact [ee8fedb377]:

To Artifact [11168404cf]:


     1      1   #! /bin/bash
     2      2   
     3         -if [ ! -x "../platform" ]; then
     4         -	echo "No platform script found, aborting." >&2
     5         -
     6         -	exit 1
     7         -fi
     8         -
     9         -if [ "${PLATFORM}" = "tcl" ]; then
    10         -	rm -rf out
    11         -
    12         -	exit 0
    13         -fi
    14         -
    15         -# We only do anything on Tcl 8.4.x
    16         -if echo "${TCLVERS}" | grep '^8\.4\.'; then
    17         -	true
    18         -else
    19         -	rm -rf out
    20         -
    21         -	exit 0
    22         -fi
    23         -
            3  +# Define parameters
    24      4   VERS=8.5.2
    25      5   SRC="src/tclDict-${VERS}.tar.gz"
    26      6   SRCURL="http://pascal.scheffers.net/software/tclDict-${VERS}.tar.gz"
    27      7   BUILDDIR="tclDict-${VERS}"
    28         -WORKDIR="${TMPDIR:-/tmp}/dict-$$${RANDOM}${RANDOM}${RANDOM}"
    29         -PLATDIR="$(pwd)/out/${PLATFORM}"
            8  +export VERS SRC SRCURL BUILDDIR
    30      9   
    31         -export VERS SRC SRCURL BUILDDIR WORKDIR PLATDIR
           10  +# Load common functions
           11  +source ../common.sh
           12  +
           13  +# Do not build if the "tcl" platform has been requested
           14  +not_platforms 'tcl'
    32     15   
    33         -if [ ! -f "${SRC}" ]; then
    34         -	mkdir src >/dev/null 2>/dev/null
           16  +# Require Tcl 8.4 to build
           17  +setup_tcl84
    35     18   
    36         -	wget -O "${SRC}" "${SRCURL}" || exit 1
    37         -fi
           19  +# Download source
           20  +download_src
    38     21   
    39     22   (
    40     23   	rm -rf build
    41     24   	mkdir -p "${PLATDIR}" >/dev/null 2>/dev/null
    42     25   	mkdir build
    43     26   
    44     27   	cd build/ || exit 1