@@ -14,11 +14,12 @@ 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 +PATCHSCRIPTDIR="$(pwd)/patchscripts" +export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 if [ ! -f "${SRC}" ]; then @@ -52,10 +53,19 @@ else cp -rp ../buildsrc/* './' fi cd "${BUILDDIR}" || exit 1 + + # Apply patch scripts if needed + for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do + if [ -f "${patchscript}" ]; then + echo "Running patch script: ${patchscript}" + . "${patchscript}" + fi + done + for dir in unix win macosx __fail__; do if [ "${dir}" = "__fail__" ]; then # If we haven't figured out how to build it, reject. exit 1