Diff

Differences From Artifact [b421315dfc]:

To Artifact [0f3e73b2cc]:


    18     18   BUILDDIR="$(pwd)/build/itcl${ITCLVERS}"
    19     19   OUTDIR="$(pwd)/out"
    20     20   INSTDIR="$(pwd)/inst"
    21     21   export ITCLVERS SRC SRCURL BUILDDIR OUTDIR INSTDIR
    22     22   
    23     23   rm -rf 'build' 'out' 'inst'
    24     24   mkdir 'build' 'out' 'inst' || exit 1
           25  +
           26  +# Determine if Itcl is even needed
           27  +(
           28  +	TCL_VERSION="unknown"
           29  +	if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then
           30  +		source "${TCLCONFIGDIR}/tclConfig.sh"
           31  +	fi
           32  +
           33  +	if echo "${TCL_VERSION}" | grep '^8\.[45]$' >/dev/null; then
           34  +		# Itcl is required for Tcl 8.4 and Tcl 8.5
           35  +
           36  +		exit 0
           37  +	fi
           38  +
           39  +	if [ "${TCL_VERSION}" = "unknown" ]; then
           40  +		# If we don't know what version of Tcl we are building, build
           41  +		# Itcl just in case.
           42  +
           43  +		exit 0
           44  +	fi
           45  +
           46  +	# All other versions do not require Itcl
           47  +	echo "Skipping building Itcl, not required for ${TCL_VERSION}"
           48  +	exit 1
           49  +) || exit 0
    25     50   
    26     51   if [ ! -f "${SRC}" ]; then
    27     52   	mkdir 'src' >/dev/null 2>/dev/null
    28     53   
    29     54   	wget -O "${SRC}" "${SRCURL}" || exit 1
    30     55   fi
    31     56