Index: tk/build.sh ================================================================== --- tk/build.sh +++ tk/build.sh @@ -12,16 +12,25 @@ fi SRC="src/tk${TCLVERS}.tar.gz" SRCURL="http://prdownloads.sourceforge.net/tcl/tk${TCLVERS}-src.tar.gz" BUILDDIR="$(pwd)/build/tk${TCLVERS}" +PATCHDIR="$(pwd)/patches" OUTDIR="$(pwd)/out" INSTDIR="$(pwd)/inst" -export SRC SRCURL BUILDDIR OUTDIR INSTDIR +export SRC SRCURL BUILDDIR PATCHDIR OUTDIR INSTDIR rm -rf 'build' 'out' 'inst' mkdir 'build' 'out' 'inst' || exit 1 + +# Determine Tcl version +TCL_VERSION="unknown" +if [ -f "${TCLCONFIGDIR}/tclConfig.sh" ]; then + source "${TCLCONFIGDIR}/tclConfig.sh" +fi +export TCL_VERSION + if [ ! -f "${SRC}" ]; then mkdir 'src' >/dev/null 2>/dev/null if echo "${TCLVERS}" | grep '^cvs_' >/dev/null; then @@ -52,10 +61,34 @@ else cp -rp ../buildsrc/* './' fi cd "${BUILDDIR}" || exit 1 + + # Determine Tk version + TK_VERSION="$(grep '^#.*define.*TK_VERSION' generic/tk.h 2>/dev/null | sed 's@^# *define[[:space:]][[:space:]]*TK_VERSION[[:space:]][[:space:]]*\"@@;s@\"$@@' 2>/dev/null | head -n 1)" + if [ -z "${TK_VERSION}" ]; then + TK_VERSION="unknown" + fi + export TK_VERSION + + echo "Note: TCL_VERSION=\"${TCL_VERSION}\"" + echo "Note: TK_VERSION=\"${TK_VERSION}\"" + + ( + # Apply required patches + cd "${BUILDDIR}" || exit 1 + for patch in "${PATCHDIR}/all"/tk-${TK_VERSION}-*.diff "${PATCHDIR}/${TCL_VERSION}"/tk-${TK_VERSION}-*.diff; do + if [ ! -f "${patch}" ]; then + continue + fi + + echo "Applying: ${patch}" + ${PATCH:-patch} -p1 < "${patch}" + done + ) + for dir in unix win macosx win64 __fail__; do if [ "${dir}" = "__fail__" ]; then exit 1 fi ADDED tk/patches/8.4/tk-8.4-removemousewheel.diff Index: tk/patches/8.4/tk-8.4-removemousewheel.diff ================================================================== --- tk/patches/8.4/tk-8.4-removemousewheel.diff +++ tk/patches/8.4/tk-8.4-removemousewheel.diff @@ -0,0 +1,28 @@ +diff -uNr tk8.4.19.orig/library/listbox.tcl tk8.4.19-1rsk/library/listbox.tcl +--- tk8.4.19.orig/library/listbox.tcl 2006-01-25 12:21:41.000000000 -0600 ++++ tk8.4.19-1rsk/library/listbox.tcl 2010-09-18 16:18:34.000000000 -0500 +@@ -191,10 +191,6 @@ + bind Listbox { + %W xview scroll [expr {-10 * (%D)}] units + } +-} else { +- bind Listbox { +- %W yview scroll [expr {- (%D / 120) * 4}] units +- } + } + + if {"x11" eq [tk windowingsystem]} { +diff -uNr tk8.4.19.orig/library/text.tcl tk8.4.19-1rsk/library/text.tcl +--- tk8.4.19.orig/library/text.tcl 2006-09-10 12:07:36.000000000 -0500 ++++ tk8.4.19-1rsk/library/text.tcl 2010-09-18 16:18:30.000000000 -0500 +@@ -467,10 +467,6 @@ + bind Text { + %W xview scroll [expr {-10 * (%D)}] units + } +-} else { +- bind Text { +- %W yview scroll [expr {- (%D / 120) * 4}] units +- } + } + + if {"x11" eq [tk windowingsystem]} {