From: 宋文武 <iyzsong@openmailbox.org>
To: guix-devel@gnu.org
Subject: [PATCH] tk: Hardcode path to TK_LIBRARY.
Date: Thu, 12 Nov 2015 13:50:17 +0800 [thread overview]
Message-ID: <8def219fd20047742c102943aaf6dea7@openmailbox.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 28 bytes --]
I did it for nixpkgs too :-)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-tk-Hardcode-path-to-TK_LIBRARY.patch --]
[-- Type: text/x-diff; name=0001-tk-Hardcode-path-to-TK_LIBRARY.patch, Size: 3238 bytes --]
From 6c9ea521e88d36bd1ce990a561477ec0e2950017 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= <iyzsong@gmail.com>
Date: Thu, 12 Nov 2015 13:31:19 +0800
Subject: [PATCH] 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.
---
gnu-system.am | 1 +
gnu/packages/patches/tk-find-library.patch | 30 ++++++++++++++++++++++++++++++
gnu/packages/tcl.scm | 3 ++-
3 files changed, 33 insertions(+), 1 deletion(-)
create mode 100644 gnu/packages/patches/tk-find-library.patch
diff --git a/gnu-system.am b/gnu-system.am
index 0b716c7..e7c1b7f 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -662,6 +662,7 @@ dist_patch_DATA = \
gnu/packages/patches/texi2html-document-encoding.patch \
gnu/packages/patches/texi2html-i18n.patch \
gnu/packages/patches/tidy-CVE-2015-5522+5523.patch \
+ gnu/packages/patches/tk-find-library.patch \
gnu/packages/patches/torsocks-dns-test.patch \
gnu/packages/patches/tvtime-gcc41.patch \
gnu/packages/patches/tvtime-pngoutput.patch \
diff --git a/gnu/packages/patches/tk-find-library.patch b/gnu/packages/patches/tk-find-library.patch
new file mode 100644
index 0000000..89c4781
--- /dev/null
+++ b/gnu/packages/patches/tk-find-library.patch
@@ -0,0 +1,30 @@
+This patch hardcode where Tk found its script library 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
diff --git a/gnu/packages/tcl.scm b/gnu/packages/tcl.scm
index 5b55ccc..c18b8b5 100644
--- a/gnu/packages/tcl.scm
+++ b/gnu/packages/tcl.scm
@@ -140,7 +140,8 @@ X11 GUIs.")
version "/tk" version "-src.tar.gz"))
(sha256
(base32
- "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88"))))
+ "1h96vp15zl5xz0d4qp6wjyrchqmrmdm3q5k22wkw9jaxbvw9vy88"))
+ (patches (list (search-patch "tk-find-library.patch")))))
(build-system gnu-build-system)
(arguments
'(#:phases (modify-phases %standard-phases
--
2.6.2
next reply other threads:[~2015-11-12 5:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-12 5:50 宋文武 [this message]
2015-11-12 12:58 ` bug#20889: [PATCH] tk: Hardcode path to TK_LIBRARY Ludovic Courtès
2015-11-12 12:58 ` Ludovic Courtès
2015-11-13 11:55 ` 宋文武
2015-11-13 11:55 ` bug#20889: " 宋文武
2015-11-16 8:42 ` bug#20889: Tkinter moved to separate output Ludovic Courtès
2015-11-16 11:44 ` Federico Beffa
2015-11-16 12:57 ` Ludovic Courtès
2015-11-16 13:16 ` Federico Beffa
2015-11-16 13:16 ` Federico Beffa
2015-11-29 22:09 ` Ludovic Courtès
2015-11-30 16:45 ` bug#20889: " Federico Beffa
2015-11-29 22:09 ` Ludovic Courtès
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=8def219fd20047742c102943aaf6dea7@openmailbox.org \
--to=iyzsong@openmailbox.org \
--cc=guix-devel@gnu.org \
--cc=iyzsong@member.fsf.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.