aboutsummaryrefslogtreecommitdiff
path: root/x11-toolkits/pure-tk
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2013-05-14 14:16:52 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2013-05-14 14:16:52 +0000
commit1c92957e84167297926d5af8e17872fa6767b892 (patch)
tree75bdbfdde82bd5e5150eb7104ce6bdbc9a1c26df /x11-toolkits/pure-tk
parent835fd4bc7523f8d8ca591656dc2a3ed073392434 (diff)
downloadports-1c92957e84167297926d5af8e17872fa6767b892.tar.gz
ports-1c92957e84167297926d5af8e17872fa6767b892.zip
Notes
Diffstat (limited to 'x11-toolkits/pure-tk')
-rw-r--r--x11-toolkits/pure-tk/Makefile10
-rw-r--r--x11-toolkits/pure-tk/files/patch-tk.c38
-rw-r--r--x11-toolkits/pure-tk/pkg-descr2
3 files changed, 42 insertions, 8 deletions
diff --git a/x11-toolkits/pure-tk/Makefile b/x11-toolkits/pure-tk/Makefile
index 25473050511a..d6fbcf37dc4c 100644
--- a/x11-toolkits/pure-tk/Makefile
+++ b/x11-toolkits/pure-tk/Makefile
@@ -1,19 +1,15 @@
-# New ports collection makefile for: pure-tk
-# Date created: 2011-11-09
-# Whom: Zhihao Yuan <lichray@gmail.com>
-#
+# Created by: Zhihao Yuan <lichray@gmail.com>
# $FreeBSD$
-#
PORTNAME= pure-tk
PORTVERSION= 0.3
CATEGORIES= x11-toolkits
MAINTAINER= lichray@gmail.com
-COMMENT= A basic interface between Pure and Tcl/Tk
+COMMENT= Basic interface between Pure and Tcl/Tk
USE_PURE= yes
-USE_TK= 84+
+USE_TK= yes
SHORT_TCL_VER= ${TCL_VER:S/8./8/}
MAKE_ARGS+= tclvers=${TCL_VER}
diff --git a/x11-toolkits/pure-tk/files/patch-tk.c b/x11-toolkits/pure-tk/files/patch-tk.c
new file mode 100644
index 000000000000..793998df16fd
--- /dev/null
+++ b/x11-toolkits/pure-tk/files/patch-tk.c
@@ -0,0 +1,38 @@
+--- tk.c.orig 2013-05-14 16:10:31.000000000 +0200
++++ tk.c 2013-05-14 16:13:05.000000000 +0200
+@@ -115,8 +115,9 @@
+ /* start up a new interpreter */
+ if (!(interp = Tcl_CreateInterp())) return false;
+ if (Tcl_Init(interp) != TCL_OK) {
+- if (interp->result && *interp->result)
+- set_result(result, interp->result);
++ const char *res = Tcl_GetStringResult(interp);
++ if (res && *res)
++ set_result(result, res);
+ else
+ set_result(result, "error initializing Tcl");
+ tk_stop();
+@@ -128,8 +129,9 @@
+ /* oddly, there are no `env' variables passed, and this one is needed */
+ Tcl_SetVar2(interp, "env", "DISPLAY", getenv("DISPLAY"), TCL_GLOBAL_ONLY);
+ if (Tk_Init(interp) != TCL_OK) {
+- if (interp->result && *interp->result)
+- set_result(result, interp->result);
++ const char *res = Tcl_GetStringResult(interp);
++ if (res && *res)
++ set_result(result, res);
+ else
+ set_result(result, "error initializing Tk");
+ tk_stop();
+@@ -182,8 +184,9 @@
+ if (!cmd) return false;
+ strcpy(cmd, s);
+ status = Tcl_Eval(interp, cmd);
+- if (interp && interp->result && *interp->result)
+- set_result(result, interp->result);
++ const char *res = Tcl_GetStringResult(interp);
++ if (res && *res)
++ set_result(result, res);
+ else if (status == TCL_BREAK)
+ set_result(result, "invoked \"break\" outside of a loop");
+ else if (status == TCL_CONTINUE)
diff --git a/x11-toolkits/pure-tk/pkg-descr b/x11-toolkits/pure-tk/pkg-descr
index 5380da967a27..a39fe168fc03 100644
--- a/x11-toolkits/pure-tk/pkg-descr
+++ b/x11-toolkits/pure-tk/pkg-descr
@@ -3,4 +3,4 @@ operations of this module allow you to execute arbitrary commands
in the Tcl interpreter, set and retrieve variable values in the
interpreter, and invoke Pure callbacks from Tcl/Tk.
-WWW: http://docs.pure-lang.googlecode.com/hg/pure-tk.html
+WWW: http://docs.pure-lang.googlecode.com/hg/pure-tk.html