Ticket #37376: grass.patch

File grass.patch, 1.5 KB (added by g5pw (Aljaž Srebrnič), 12 years ago)
  • Portfile

     
    4444patchfiles \
    4545    patch-Makefile.diff \
    4646    patch-configure.diff \
    47     patch-macosx_Makefile.diff
     47    patch-macosx_Makefile.diff \
     48    visualization_nviz_src_draw.c.diff
     49    # The patch above enables tcl/tk comaptibility by readding a deleted function in TCL
     50
    4851
    4952post-patch {
    5053   reinplace "s|@@APPLICATIONS_DIR@@|${applications_dir}|" \
  • files/visualization_nviz_src_draw.c.diff

     
     1--- visualization/nviz/src/draw.c       2008-12-19 21:29:59.000000000 +0100
     2+++ visualization/nviz/src/draw.c.new   2012-12-24 18:19:41.000000000 +0100
     3@@ -25,6 +25,22 @@
     4 
     5 int auto_draw(Nv_data *, Tcl_Interp *);
     6 
     7+int
     8+TkCopyAndGlobalEval(
     9+    Tcl_Interp *interp,                /* Interpreter in which to evaluate script. */
     10+    char *script)              /* Script to evaluate. */
     11+{
     12+    Tcl_DString buffer;
     13+    int code;
     14+
     15+    Tcl_DStringInit(&buffer);
     16+    Tcl_DStringAppend(&buffer, script, -1);
     17+    code = Tcl_EvalEx(interp, Tcl_DStringValue(&buffer),
     18+        Tcl_DStringLength(&buffer), TCL_EVAL_GLOBAL);
     19+    Tcl_DStringFree(&buffer);
     20+    return code;
     21+}
     22+
     23 /* this function is used as a hook to
     24  * call a particular script when the
     25  * cancel button is pressed during a draw