Diff

Differences From Artifact [0f3c234f4e]:

To Artifact [805b596118]:


    13     13   
    14     14   SRC="src/tcl${TCLVERS}.tar.gz"
    15     15   SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz"
    16     16   BUILDDIR="$(pwd)/build/tcl${TCLVERS}"
    17     17   OUTDIR="$(pwd)/out"
    18     18   INSTDIR="$(pwd)/inst"
    19     19   PATCHSCRIPTDIR="$(pwd)/patchscripts"
    20         -export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR
           20  +PATCHDIR="$(pwd)/patches"
           21  +export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR
    21     22   
    22     23   rm -rf 'build' 'out' 'inst'
    23     24   mkdir 'build' 'out' 'inst' || exit 1
    24     25   
    25     26   if [ ! -f "${SRC}" ]; then
    26     27   	mkdir 'src' >/dev/null 2>/dev/null
    27     28   
................................................................................
    51     52   	if [ ! -d '../buildsrc' ]; then
    52     53   		gzip -dc "../${SRC}" | tar -xf -
    53     54   	else
    54     55   		cp -rp ../buildsrc/* './'
    55     56   	fi
    56     57   
    57     58   	cd "${BUILDDIR}" || exit 1
           59  +
           60  +	# Apply patches if needed
           61  +	for patch in "${PATCHDIR}/all"/tcl-${TCLVERS}-*.diff "${PATCHDIR}/${TCLVERS}"/tcl-${TCLVERS}-*.diff; do
           62  +		if [ ! -f "${patch}" ]; then
           63  +			continue
           64  +		fi
           65  +                
           66  +		echo "Applying: ${patch}"
           67  +		${PATCH:-patch} -p1 < "${patch}"
           68  +	done
           69  +
    58     70   
    59     71   	# Apply patch scripts if needed
    60     72   	for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do
    61     73   		if [ -f "${patchscript}" ]; then
    62     74   			echo "Running patch script: ${patchscript}"
    63     75   
    64     76   			(