3
5
Fork 0
mirror of git://git.savannah.gnu.org/guix.git synced 2023-12-14 03:33:07 +01:00
guix/gnu/packages/patches/tk-find-library.patch
宋文武 79c8a071e7 tk: Hardcode path to TK_LIBRARY.
Fixes <http://bugs.gnu.org/20889>.

* gnu/packages/patches/tk-find-library.patch: New patch.
* gnu-system.am (dist_patch_DATA): Add it.
* gnu/packages/tcl.scm (tk)[source]: Add patch.
2015-11-29 22:59:28 +01:00

30 lines
1.1 KiB
Diff

This patch hard-codes the Tk library directory during package initialization.
See <http://core.tcl.tk/tk/tktview/765642ffffffffffffff>.
diff --git a/generic/tkWindow.c b/generic/tkWindow.c
index b5cbbab..96b5501 100644
--- a/generic/tkWindow.c
+++ b/generic/tkWindow.c
@@ -988,6 +988,7 @@ TkCreateMainWindow(
Tcl_SetVar2(interp, "tk_patchLevel", NULL, TK_PATCH_LEVEL, TCL_GLOBAL_ONLY);
Tcl_SetVar2(interp, "tk_version", NULL, TK_VERSION, TCL_GLOBAL_ONLY);
+ Tcl_SetVar2(interp, "tk_library", NULL, TK_LIBRARY, TCL_GLOBAL_ONLY);
tsdPtr->numMainWindows++;
return tkwin;
diff --git a/unix/Makefile.in b/unix/Makefile.in
index f21fdbb..c61b0df 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -1029,7 +1029,7 @@ tkVisual.o: $(GENERIC_DIR)/tkVisual.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkVisual.c
tkWindow.o: $(GENERIC_DIR)/tkWindow.c
- $(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkWindow.c
+ $(CC) -c $(CC_SWITCHES) -DTK_LIBRARY=\"${TK_LIBRARY}\" $(GENERIC_DIR)/tkWindow.c
tkButton.o: $(GENERIC_DIR)/tkButton.c
$(CC) -c $(CC_SWITCHES) $(GENERIC_DIR)/tkButton.c