Index: tcl/build.sh ================================================================== --- tcl/build.sh +++ tcl/build.sh @@ -15,11 +15,12 @@ SRCURL="http://prdownloads.sourceforge.net/tcl/tcl${TCLVERS}-src.tar.gz" BUILDDIR="$(pwd)/build/tcl${TCLVERS}" OUTDIR="$(pwd)/out" INSTDIR="$(pwd)/inst" PATCHSCRIPTDIR="$(pwd)/patchscripts" -export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR +PATCHDIR="$(pwd)/patches" +export SRC SRCURL BUILDDIR OUTDIR INSTDIR PATCHSCRIPTDIR PATCHDIR rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 if [ ! -f "${SRC}" ]; then @@ -53,10 +54,21 @@ else cp -rp ../buildsrc/* './' fi cd "${BUILDDIR}" || exit 1 + + # Apply patches if needed + for patch in "${PATCHDIR}/all"/tcl-${TCLVERS}-*.diff "${PATCHDIR}/${TCLVERS}"/tcl-${TCLVERS}-*.diff; do + if [ ! -f "${patch}" ]; then + continue + fi + + echo "Applying: ${patch}" + ${PATCH:-patch} -p1 < "${patch}" + done + # Apply patch scripts if needed for patchscript in "${PATCHSCRIPTDIR}"/*.sh; do if [ -f "${patchscript}" ]; then echo "Running patch script: ${patchscript}" ADDED tcl/patches/8.4.19/tcl-8.4.19-win32castingfailure-1rsk.diff Index: tcl/patches/8.4.19/tcl-8.4.19-win32castingfailure-1rsk.diff ================================================================== --- /dev/null +++ tcl/patches/8.4.19/tcl-8.4.19-win32castingfailure-1rsk.diff @@ -0,0 +1,24 @@ +diff -uNr tcl8.4.19.orig/win/tclWinDde.c tcl8.4.19-1rsk/win/tclWinDde.c +--- tcl8.4.19.orig/win/tclWinDde.c 2006-04-05 15:50:46.000000000 -0500 ++++ tcl8.4.19-1rsk/win/tclWinDde.c 2010-10-12 10:40:23.000000000 -0500 +@@ -1308,7 +1308,7 @@ + } + + objc -= (async + 3); +- ((Tcl_Obj **) objv) += (async + 3); ++ objv += (async + 3); + + /* + * See if the target interpreter is local. If so, execute +diff -uNr tcl8.4.19.orig/win/tclWinReg.c tcl8.4.19-1rsk/win/tclWinReg.c +--- tcl8.4.19.orig/win/tclWinReg.c 2007-05-15 11:08:22.000000000 -0500 ++++ tcl8.4.19-1rsk/win/tclWinReg.c 2010-10-12 10:40:20.000000000 -0500 +@@ -790,7 +790,7 @@ + Tcl_NewStringObj(Tcl_DStringValue(&buf), + Tcl_DStringLength(&buf))); + if (regWinProcs->useWide) { +- while (*((Tcl_UniChar *)p)++ != 0) {} ++ while ((*((Tcl_UniChar *)p))++ != 0) {} + } else { + while (*p++ != '\0') {} + }