Attachment "1578344-tk.patch" to
ticket [1578344fff]
added by
dgp
2007-09-12 00:08:59.
Index: generic/tkConsole.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tkConsole.c,v
retrieving revision 1.32
diff -u -r1.32 tkConsole.c
--- generic/tkConsole.c 10 Sep 2007 13:35:42 -0000 1.32
+++ generic/tkConsole.c 11 Sep 2007 17:07:18 -0000
@@ -233,7 +233,7 @@
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
+ if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL) {
return;
}
Index: generic/tkMain.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tkMain.c,v
retrieving revision 1.25
diff -u -r1.25 tkMain.c
--- generic/tkMain.c 10 Sep 2007 13:35:42 -0000 1.25
+++ generic/tkMain.c 11 Sep 2007 17:07:18 -0000
@@ -110,7 +110,7 @@
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
+ if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL) {
abort();
}
Index: generic/tkWindow.c
===================================================================
RCS file: /cvsroot/tktoolkit/tk/generic/tkWindow.c,v
retrieving revision 1.83
diff -u -r1.83 tkWindow.c
--- generic/tkWindow.c 10 Sep 2007 13:35:42 -0000 1.83
+++ generic/tkWindow.c 11 Sep 2007 17:07:18 -0000
@@ -2948,7 +2948,7 @@
* only an issue when Tk is loaded dynamically.
*/
- if (Tcl_InitStubs(interp, TCL_VERSION, 1) == NULL) {
+ if (Tcl_InitStubs(interp, TCL_PATCH_LEVEL, 0) == NULL) {
return TCL_ERROR;
}
Index: library/tk.tcl
===================================================================
RCS file: /cvsroot/tktoolkit/tk/library/tk.tcl,v
retrieving revision 1.63
diff -u -r1.63 tk.tcl
--- library/tk.tcl 18 May 2007 19:21:59 -0000 1.63
+++ library/tk.tcl 11 Sep 2007 17:07:19 -0000
@@ -12,8 +12,11 @@
# See the file "license.terms" for information on usage and redistribution
# of this file, and for a DISCLAIMER OF ALL WARRANTIES.
-# Insist on running with compatible versions of Tcl and Tk.
-package require -exact Tcl 8.5a7
+package require Tcl 8.5 ;# Guard against [source] in an 8.4- interp
+ ;# before using 8.5 [package] features.
+# Insist on running with compatible version of Tcl
+package require Tcl 8.5a7-8.6
+# Verify that we have Tk binary and script components from the same release
package require -exact Tk 8.5a7
# Create a ::tk namespace
Index: unix/Makefile.in
===================================================================
RCS file: /cvsroot/tktoolkit/tk/unix/Makefile.in,v
retrieving revision 1.136
diff -u -r1.136 Makefile.in
--- unix/Makefile.in 6 Sep 2007 19:34:02 -0000 1.136
+++ unix/Makefile.in 11 Sep 2007 17:07:19 -0000
@@ -706,11 +706,10 @@
echo "Creating package index $(PKG_INDEX)"; \
rm -f $(PKG_INDEX); \
(\
- echo "if {![package vsatisfies [package provide Tcl] $(TCLVERSION)]} { return }";\
- echo "if {[package vcompare [package provide Tcl]\
- $(TCLVERSION)$(TCLPATCHL)] != 0} { return }";\
+ echo "if {[catch {package present Tcl\
+ $(TCLVERSION)$(TCLPATCHL)}]} { return }";\
relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\
- echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(TCLPATCHL)\
+ echo "package ifneeded Tk $(MAJOR_VERSION).$(MINOR_VERSION)$(PATCH_LEVEL)\
[list load [file join \$$dir $${relative}$(TK_LIB_FILE)] Tk]";\
) > $(PKG_INDEX); \
fi
Index: win/Makefile.in
===================================================================
RCS file: /cvsroot/tktoolkit/tk/win/Makefile.in,v
retrieving revision 1.73
diff -u -r1.73 Makefile.in
--- win/Makefile.in 14 May 2007 20:58:28 -0000 1.73
+++ win/Makefile.in 11 Sep 2007 17:07:19 -0000
@@ -9,6 +9,7 @@
TCLVERSION = @TCL_VERSION@
TCLPATCHL = @TCL_PATCH_LEVEL@
VERSION = @TK_VERSION@
+PATCH_LEVEL = @TK_PATCH_LEVEL@
#----------------------------------------------------------------
# Things you can change to personalize the Makefile for your own
@@ -479,10 +480,9 @@
@echo "Creating package index $(PKG_INDEX)";
@$(RM) $(PKG_INDEX);
@(\
- echo "if {![package vsatisfies [package provide Tcl] $(TCLVERSION)]} { return }";\
- echo "if {[package vcompare [package provide Tcl]\
- $(TCLVERSION)$(TCLPATCHL)] != 0} { return }";\
- echo "package ifneeded Tk $(VERSION)$(TCLPATCHL)\
+ echo "if {[catch {package present Tcl\
+ $(TCLVERSION)$(TCLPATCHL)]} { return }";\
+ echo "package ifneeded Tk $(VERSION)$(PATCH_LEVEL)\
[list load [file join \$$dir .. .. bin $(TK_DLL_FILE)] Tk]";\
) > $(PKG_INDEX);
@for i in tkConfig.sh $(TK_LIB_FILE) $(TK_STUB_LIB_FILE); \
Index: win/makefile.vc
===================================================================
RCS file: /cvsroot/tktoolkit/tk/win/makefile.vc,v
retrieving revision 1.103
diff -u -r1.103 makefile.vc
--- win/makefile.vc 15 May 2007 23:20:17 -0000 1.103
+++ win/makefile.vc 11 Sep 2007 17:07:19 -0000
@@ -963,8 +963,7 @@
!if !$(STATIC_BUILD)
@echo creating package index
@type << > $(OUT_DIR)\pkgIndex.tcl
-if {![package vsatisfies [package provide Tcl] $(TCL_DOTVERSION)]} { return }
-if {[package vcompare [package provide Tcl] $(TCL_DOTVERSION)$(TCL_PATCHLEVEL)] != 0} { return }
+if {[catch {package present Tcl $(TCL_DOTVERSION)$(TCL_PATCHLEVEL)]} { return }
package ifneeded Tk $(DOTVERSION)$(TCL_PATCHLEVEL) [list load [file join $$dir .. .. bin $(TKLIBNAME)] Tk]
<<
@$(CPY) $(OUT_DIR)\pkgIndex.tcl "$(SCRIPT_INSTALL_DIR)\"