about summary refs log tree commit diff
path: root/pkgs/development/libraries/tk
diff options
context:
space:
mode:
authorSong Wenwu <iyzsong@gmail.com>2014-01-25 10:36:20 +0800
committerSong Wenwu <iyzsong@gmail.com>2014-01-25 10:36:20 +0800
commit299af2ff45f0202067f8925913b203e4c0432f07 (patch)
tree18dbff90b9977f05c78ed7d2fb897ecc25496a78 /pkgs/development/libraries/tk
parentb6cc977580526918f8c1abe74985efec14dccbbf (diff)
tk: fix issue #1479
Diffstat (limited to 'pkgs/development/libraries/tk')
-rw-r--r--pkgs/development/libraries/tk/default.nix2
-rw-r--r--pkgs/development/libraries/tk/different-prefix-with-tcl.patch22
2 files changed, 24 insertions, 0 deletions
diff --git a/pkgs/development/libraries/tk/default.nix b/pkgs/development/libraries/tk/default.nix
index 7d55dd4c7d079..c7fe3e105d88a 100644
--- a/pkgs/development/libraries/tk/default.nix
+++ b/pkgs/development/libraries/tk/default.nix
@@ -7,6 +7,8 @@ stdenv.mkDerivation {
     url = "mirror://sourceforge/tcl/tk8.5.15-src.tar.gz";
     sha256 = "0grj0k0hljvwiz913pafqibz18fzk9xjxf0nzqrd9zdls036fp41";
   };
+
+  patches = [ ./different-prefix-with-tcl.patch ];
   
   postInstall = ''
     ln -s $out/bin/wish* $out/bin/wish
diff --git a/pkgs/development/libraries/tk/different-prefix-with-tcl.patch b/pkgs/development/libraries/tk/different-prefix-with-tcl.patch
new file mode 100644
index 0000000000000..bf331b75cae07
--- /dev/null
+++ b/pkgs/development/libraries/tk/different-prefix-with-tcl.patch
@@ -0,0 +1,22 @@
+--- tk8.5.15-orig/unix/Makefile.in	2014-01-25 08:57:45.626713122 +0800
++++ tk8.5.15/unix/Makefile.in	2014-01-25 08:59:35.315341825 +0800
+@@ -995,7 +995,8 @@
+ 	$(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
+--- tk8.5.15-orig/generic/tkWindow.c	2014-01-25 10:10:03.964476436 +0800
++++ tk8.5.15/generic/tkWindow.c	2014-01-25 10:08:06.020950933 +0800
+@@ -983,6 +983,7 @@
+ 
+     Tcl_SetVar(interp, "tk_patchLevel", TK_PATCH_LEVEL, TCL_GLOBAL_ONLY);
+     Tcl_SetVar(interp, "tk_version",    TK_VERSION,     TCL_GLOBAL_ONLY);
++    Tcl_SetVar(interp, "tk_library",    TK_LIBRARY,     TCL_GLOBAL_ONLY);
+ 
+     tsdPtr->numMainWindows++;
+     return tkwin;