summaryrefslogtreecommitdiff
path: root/math/plplot/files
diff options
context:
space:
mode:
Diffstat (limited to 'math/plplot/files')
-rw-r--r--math/plplot/files/patch-bindings__tk-x-plat__plolotter.c102
-rw-r--r--math/plplot/files/patch-bindings__tk__plframe.c102
-rw-r--r--math/plplot/files/patch-bindings__tk__plserver.c36
-rw-r--r--math/plplot/files/patch-bindings__tk__tkMain.c106
-rw-r--r--math/plplot/files/patch-bindings__tk__tkshell.c11
-rw-r--r--math/plplot/files/patch-cmake_modules_tcl-related.cmake32
-rw-r--r--math/plplot/files/patch-doc__docbook__src__plplotdoc.texi20
-rw-r--r--math/plplot/files/patch-doc__docbook__src__tcl.xml20
-rw-r--r--math/plplot/files/patch-drivers__ntk.c74
-rw-r--r--math/plplot/files/patch-drivers__tk.c65
-rw-r--r--math/plplot/files/patch-examples__python__CMakeLists.txt11
-rw-r--r--math/plplot/files/patch-examples__tk__xtk01.c11
-rw-r--r--math/plplot/files/patch-examples__tk__xtk02.c20
-rw-r--r--math/plplot/files/patch-examples__tk__xtk04.c38
-rw-r--r--math/plplot/files/patch-plplot_test__CMakeLists.txt15
-rw-r--r--math/plplot/files/patch-scripts__CMakeLists.txt14
-rw-r--r--math/plplot/files/patch-util__pltcl.c11
17 files changed, 656 insertions, 32 deletions
diff --git a/math/plplot/files/patch-bindings__tk-x-plat__plolotter.c b/math/plplot/files/patch-bindings__tk-x-plat__plolotter.c
new file mode 100644
index 000000000000..d1f6c28d495c
--- /dev/null
+++ b/math/plplot/files/patch-bindings__tk-x-plat__plolotter.c
@@ -0,0 +1,102 @@
+--- bindings/tk-x-plat/plplotter.c.orig
++++ bindings/tk-x-plat/plplotter.c
+@@ -463,7 +463,7 @@
+ PlPlotterFirstInit( (ClientData) plPlotterPtr );
+ Tk_GeometryRequest( plPlotterPtr->tkwin, 200, 200 );
+
+- interp->result = Tk_PathName( plPlotterPtr->tkwin );
++ Tcl_SetResult(interp,(char*)Tk_PathName(plPlotterPtr->tkwin) ,TCL_VOLATILE);
+
+ return TCL_OK;
+ }
+@@ -2018,7 +2018,7 @@
+ //
+ // Results:
+ // The return value is a standard Tcl result. If TCL_ERROR is
+-// returned, then interp->result contains an error message.
++// returned, then Tcl_GetStringResult(interp) contains an error message.
+ //
+ // Side effects:
+ // Configuration information, such as text string, colors, font, etc.
+@@ -2469,7 +2469,7 @@
+ plr->at_bop = 0;
+ if ( Tcl_Eval( interp, plPlotterPtr->bopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plPlotterPtr->bopCmd, interp->result );
++ plPlotterPtr->bopCmd, Tcl_GetStringResult(interp) );
+ }
+
+ // Signal eop if necessary
+@@ -2479,7 +2479,7 @@
+ plr->at_eop = 0;
+ if ( Tcl_Eval( interp, plPlotterPtr->eopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plPlotterPtr->eopCmd, interp->result );
++ plPlotterPtr->eopCmd, Tcl_GetStringResult(interp) );
+ }
+
+ return result;
+@@ -2491,7 +2491,7 @@
+ {
+ if ( Tcl_Eval( interp, plPlotterPtr->eopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plPlotterPtr->eopCmd, interp->result );
++ plPlotterPtr->eopCmd, Tcl_GetStringResult(interp) );
+ }
+ }
+
+@@ -2501,7 +2501,7 @@
+ {
+ if ( Tcl_Eval( interp, plPlotterPtr->bopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plPlotterPtr->bopCmd, interp->result );
++ plPlotterPtr->bopCmd, Tcl_GetStringResult(interp ) );
+ }
+ }
+
+@@ -2536,7 +2536,7 @@
+ {
+ #endif
+ Tcl_AppendResult( interp, "Packet receive failed:\n\t %s\n",
+- interp->result, (char *) NULL );
++ Tcl_GetStringResult(interp), (char *) NULL );
+ return TCL_ERROR;
+ }
+
+@@ -3082,7 +3082,7 @@
+
+ if ( argc == 0 )
+ {
+- interp->result = "report what?";
++ Tcl_SetResult(interp,(char*)"report what?",TCL_VOLATILE);
+ return TCL_ERROR;
+ }
+
+@@ -3093,7 +3093,7 @@
+
+ if ( argc != 3 )
+ {
+- interp->result = "Wrong # of args: report wc x y";
++ Tcl_SetResult(interp,(char*)"Wrong # of args: report wc x y",TCL_VOLATILE);
+ return TCL_ERROR;
+ }
+
+@@ -3107,15 +3107,15 @@
+
+ if ( plTranslateCursor( gin ) )
+ {
+- sprintf( interp->result, "%f %f", gin->wX, gin->wY );
++ sprintf( Tcl_GetStringResult(interp), "%f %f", gin->wX, gin->wY );
+ return TCL_OK;
+ }
+
+- interp->result = "Cannot locate";
++ Tcl_SetResult(interp,(char*)"Cannot locate",TCL_VOLATILE);
+ return TCL_OK;
+ }
+
+- interp->result = "nonsensical request.";
++ Tcl_SetResult(interp,(char*)"nonsensical request.",TCL_VOLATILE);
+ return TCL_ERROR;
+ }
+
diff --git a/math/plplot/files/patch-bindings__tk__plframe.c b/math/plplot/files/patch-bindings__tk__plframe.c
new file mode 100644
index 000000000000..a92a268d6e23
--- /dev/null
+++ b/math/plplot/files/patch-bindings__tk__plframe.c
@@ -0,0 +1,102 @@
+--- bindings/tk/plframe.c.orig
++++ bindings/tk/plframe.c
+@@ -484,7 +484,7 @@
+ Tk_DestroyWindow( plFramePtr->tkwin );
+ return TCL_ERROR;
+ }
+- interp->result = Tk_PathName( plFramePtr->tkwin );
++ Tcl_SetResult(interp,(char*)Tk_PathName( plFramePtr->tkwin) ,TCL_VOLATILE);
+
+ return TCL_OK;
+ }
+@@ -616,7 +616,7 @@
+ {
+ bcb.cmd = PLESC_DOUBLEBUFFERING_QUERY;
+ pl_cmd( PLESC_DOUBLEBUFFERING, &bcb );
+- sprintf( interp->result, "%d", bcb.result );
++ sprintf( Tcl_GetStringResult(interp), "%d", bcb.result );
+ }
+ }
+
+@@ -2215,7 +2215,7 @@
+ //
+ // Results:
+ // The return value is a standard Tcl result. If TCL_ERROR is
+-// returned, then interp->result contains an error message.
++// returned, then Tcl_GetStringResult(interp) contains an error message.
+ //
+ // Side effects:
+ // Configuration information, such as text string, colors, font, etc.
+@@ -2675,7 +2675,7 @@
+ plr->at_bop = 0;
+ if ( Tcl_Eval( interp, plFramePtr->bopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plFramePtr->bopCmd, interp->result );
++ plFramePtr->bopCmd, Tcl_GetStringResult(interp) );
+ }
+
+ // Signal eop if necessary
+@@ -2685,7 +2685,7 @@
+ plr->at_eop = 0;
+ if ( Tcl_Eval( interp, plFramePtr->eopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plFramePtr->eopCmd, interp->result );
++ plFramePtr->eopCmd, Tcl_GetStringResult(interp) );
+ }
+
+ return result;
+@@ -3275,7 +3275,7 @@
+
+ if ( argc == 0 )
+ {
+- interp->result = "report what?";
++ Tcl_SetResult(interp,(char*)"report what?",TCL_VOLATILE);
+ return TCL_ERROR;
+ }
+
+@@ -3286,7 +3286,7 @@
+
+ if ( argc != 3 )
+ {
+- interp->result = "Wrong # of args: report wc x y";
++ Tcl_SetResult(interp,(char*)"Wrong # of args: report wc x y",TCL_VOLATILE);
+ return TCL_ERROR;
+ }
+
+@@ -3300,15 +3300,15 @@
+
+ if ( plTranslateCursor( gin ) )
+ {
+- sprintf( interp->result, "%f %f", gin->wX, gin->wY );
++ sprintf( Tcl_GetStringResult(interp), "%f %f", gin->wX, gin->wY );
+ return TCL_OK;
+ }
+
+- interp->result = "Cannot locate";
++ Tcl_SetResult(interp,(char*)"Cannot locate",TCL_VOLATILE);
+ return TCL_OK;
+ }
+
+- interp->result = "nonsensical request.";
++ Tcl_SetResult(interp,(char*)"nonsensical request.",TCL_VOLATILE);
+ return TCL_ERROR;
+ }
+
+@@ -3324,7 +3324,7 @@
+
+ if ( Tcl_Eval( plFramePtr->interp, plFramePtr->bopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plFramePtr->bopCmd, plFramePtr->interp->result );
++ plFramePtr->bopCmd, Tcl_GetStringResult(plFramePtr->interp) );
+ }
+
+ //--------------------------------------------------------------------------
+@@ -3339,7 +3339,7 @@
+
+ if ( Tcl_Eval( plFramePtr->interp, plFramePtr->eopCmd ) != TCL_OK )
+ fprintf( stderr, "Command \"%s\" failed:\n\t %s\n",
+- plFramePtr->eopCmd, plFramePtr->interp->result );
++ plFramePtr->eopCmd, Tcl_GetStringResult(plFramePtr->interp) );
+ }
+
+ //--------------------------------------------------------------------------
diff --git a/math/plplot/files/patch-bindings__tk__plserver.c b/math/plplot/files/patch-bindings__tk__plserver.c
new file mode 100644
index 000000000000..17b940fed902
--- /dev/null
+++ b/math/plplot/files/patch-bindings__tk__plserver.c
@@ -0,0 +1,36 @@
+--- bindings/tk/plserver.c.orig
++++ bindings/tk/plserver.c
+@@ -126,11 +126,11 @@
+ if ( Tk_ParseArgv( interp, (Tk_Window) NULL, &argc, argv,
+ argTable, TK_ARGV_NO_DEFAULTS ) != TCL_OK )
+ {
+- fprintf( stderr, "\n(plserver) %s\n\n", interp->result );
++ fprintf( stderr, "\n(plserver) %s\n\n", Tcl_GetStringResult(interp) );
+ fprintf( stderr, "\
+ The client_<xxx> and -child options should not be used except via the\n\
+ PLplot/Tk driver.\n\n(wish) " );
+- if ( strncmp( interp->result, helpmsg, strlen( helpmsg ) ) )
++ if ( strncmp( Tcl_GetStringResult(interp), helpmsg, strlen( helpmsg ) ) )
+ exit( 1 );
+ }
+
+@@ -158,7 +158,7 @@
+ //
+ // Results:
+ // Returns a standard Tcl completion code, and leaves an error
+-// message in interp->result if an error occurs.
++// message in Tcl_GetStringResult(interp) if an error occurs.
+ //
+ // Side effects:
+ // Depends on the startup script.
+@@ -257,8 +257,8 @@
+
+ // Print error message if one given
+
+- if ( interp->result != NULL && interp->result[0] != '\0' )
+- fprintf( stderr, "%s\n", interp->result );
++ if ( Tcl_GetStringResult(interp) != NULL && Tcl_GetStringResult(interp)[0] != '\0' )
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+
+ // Best to check the syntax before proceeding
+
diff --git a/math/plplot/files/patch-bindings__tk__tkMain.c b/math/plplot/files/patch-bindings__tk__tkMain.c
new file mode 100644
index 000000000000..bc097f4c9a26
--- /dev/null
+++ b/math/plplot/files/patch-bindings__tk__tkMain.c
@@ -0,0 +1,106 @@
+--- bindings/tk/tkMain.c.orig
++++ bindings/tk/tkMain.c
+@@ -85,17 +85,6 @@
+
+ // From tclIntDecls.h
+
+-#ifndef Tcl_Import_TCL_DECLARED
+-EXTERN int Tcl_Import _ANSI_ARGS_( ( Tcl_Interp * interp,
+- Tcl_Namespace * nsPtr, char * pattern,
+- int allowOverwrite ) );
+-#endif
+-
+-#ifndef Tcl_GetGlobalNamespace_TCL_DECLARE
+-EXTERN Tcl_Namespace * Tcl_GetGlobalNamespace _ANSI_ARGS_( (
+- Tcl_Interp * interp ) );
+-#endif
+-
+ //
+ // Declarations for various library procedures and variables (don't want
+ // to include tkInt.h or tkConfig.h here, because people might copy this
+@@ -180,7 +169,7 @@
+ pltkMain( int argc, const char **argv, char *RcFileName,
+ int ( *AppInit )( Tcl_Interp *interp ) )
+ {
+- char *args, *msg;
++ char *args; const char *msg;
+ const char *p;
+ char buf[20];
+ int code;
+@@ -202,7 +191,7 @@
+ if ( Tk_ParseArgv( interp, (Tk_Window) NULL, &argc, argv, argTable, 0 )
+ != TCL_OK )
+ {
+- fprintf( stderr, "%s\n", interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+ exit( 1 );
+ }
+ if ( name == NULL )
+@@ -331,7 +320,7 @@
+
+ if ( ( *AppInit )( interp ) != TCL_OK )
+ {
+- fprintf( stderr, "(*AppInit) failed: %s\n", interp->result );
++ fprintf( stderr, "(*AppInit) failed: %s\n", Tcl_GetStringResult(interp) );
+ }
+
+ //
+@@ -343,7 +332,7 @@
+ code = Tcl_VarEval( interp, "wm geometry . ", geometry, (char *) NULL );
+ if ( code != TCL_OK )
+ {
+- fprintf( stderr, "%s\n", interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+ }
+ }
+
+@@ -393,7 +382,7 @@
+ fullName = Tcl_TildeSubst( interp, RcFileName, &buffer );
+ if ( fullName == NULL )
+ {
+- fprintf( stderr, "%s\n", interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+ }
+ else
+ {
+@@ -403,7 +392,7 @@
+ code = Tcl_EvalFile( interp, fullName );
+ if ( code != TCL_OK )
+ {
+- fprintf( stderr, "%s\n", interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+ }
+ fclose( f );
+ }
+@@ -442,7 +431,7 @@
+ msg = (char *) Tcl_GetVar( interp, "errorInfo", TCL_GLOBAL_ONLY );
+ if ( msg == NULL )
+ {
+- msg = interp->result;
++ msg = Tcl_GetStringResult(interp);
+ }
+ fprintf( stderr, "%s\n", msg );
+ Tcl_Eval( interp, errorExitCmd );
+@@ -535,11 +524,11 @@
+ Tk_CreateFileHandler( 0, TK_READABLE, StdinProc, (ClientData) 0 );
+ #endif
+ Tcl_DStringFree( &command );
+- if ( *interp->result != 0 )
++ if ( Tcl_GetStringResult(interp) )
+ {
+ if ( ( code != TCL_OK ) || ( tty ) )
+ {
+- printf( "%s\n", interp->result );
++ printf( "%s\n", Tcl_GetStringResult(interp) );
+ }
+ }
+
+@@ -599,7 +588,7 @@
+ {
+ Tcl_AddErrorInfo( interp,
+ "\n (script that generates prompt)" );
+- fprintf( stderr, "%s\n", interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+ goto defaultPrompt;
+ }
+ }
diff --git a/math/plplot/files/patch-bindings__tk__tkshell.c b/math/plplot/files/patch-bindings__tk__tkshell.c
new file mode 100644
index 000000000000..94bf522f214a
--- /dev/null
+++ b/math/plplot/files/patch-bindings__tk__tkshell.c
@@ -0,0 +1,11 @@
+--- bindings/tk/tkshell.c.orig
++++ bindings/tk/tkshell.c
+@@ -115,7 +115,7 @@
+ if ( Tcl_ExprBoolean( interp, argv[1], &result ) )
+ {
+ fprintf( stderr, "wait_until command \"%s\" failed:\n\t %s\n",
+- argv[1], interp->result );
++ argv[1], Tcl_GetStringResult(interp) );
+ break;
+ }
+ if ( result )
diff --git a/math/plplot/files/patch-cmake_modules_tcl-related.cmake b/math/plplot/files/patch-cmake_modules_tcl-related.cmake
deleted file mode 100644
index 52a0b4d3c390..000000000000
--- a/math/plplot/files/patch-cmake_modules_tcl-related.cmake
+++ /dev/null
@@ -1,32 +0,0 @@
---- cmake/modules/tcl-related.cmake.orig 2009-09-06 21:04:43.000000000 +0200
-+++ cmake/modules/tcl-related.cmake 2009-12-25 17:44:43.000000000 +0100
-@@ -98,11 +98,13 @@
- WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules
- OUTPUT_VARIABLE itcl_library_versions)
- message(STATUS "Looking for itcl.h")
-- find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH})
-+ find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH}/../itcl%%ITCL_VER%%)
- if(ITCL_INCLUDE_PATH)
- message(STATUS "Looking for itcl.h - found")
- message(STATUS "Looking for itcl library")
- get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH)
-+ find_library(ITCL_LIBRARY itcl PATHS ${TCL_LIBRARY_PATH}
-+ PATH_SUFFIXES itcl)
- set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
- foreach(version ${itcl_library_versions})
- find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH}
-@@ -158,11 +160,12 @@
- endif(ENABLE_tk)
- if(ENABLE_itk)
- message(STATUS "Looking for itk.h")
-- find_path(ITK_INCLUDE_PATH itk.h ${TK_INCLUDE_PATH})
-+ find_path(ITK_INCLUDE_PATH itk.h ${TCL_INCLUDE_PATH}/../itk%%ITCL_VER%%)
- if(ITK_INCLUDE_PATH)
- message(STATUS "Looking for itk.h - found")
- message(STATUS "Looking for itk library")
-- set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
-+ find_library(ITK_LIBRARY itk PATH_SUFFIXES itk)
-+ set(itk_library_versions "" 3.4 3.3 3.2 3.1 3.0 2.1 2.0)
- foreach(version ${itk_library_versions})
- find_library(ITK_LIBRARY itk${version}
- PATH_SUFFIXES itk${version})
diff --git a/math/plplot/files/patch-doc__docbook__src__plplotdoc.texi b/math/plplot/files/patch-doc__docbook__src__plplotdoc.texi
new file mode 100644
index 000000000000..15d6f7ed200e
--- /dev/null
+++ b/math/plplot/files/patch-doc__docbook__src__plplotdoc.texi
@@ -0,0 +1,20 @@
+--- doc/docbook/src/plplotdoc.texi.orig
++++ doc/docbook/src/plplotdoc.texi
+@@ -6722,7 +6722,7 @@
+ if (pm->fdata[i] > max)
+ max = pm->fdata[i];
+
+- sprintf( interp->result, "%f", max );
++ sprintf( Tcl_GetStringResult(interp), "%f", max );
+ return TCL_OK;
+ @}
+
+@@ -6735,7 +6735,7 @@
+ if (pm->fdata[i] < min)
+ min = pm->fdata[i];
+
+- sprintf( interp->result, "%f", min );
++ sprintf( Tcl_GetStringResult(interp), "%f", min );
+ return TCL_OK;
+ @}
+
diff --git a/math/plplot/files/patch-doc__docbook__src__tcl.xml b/math/plplot/files/patch-doc__docbook__src__tcl.xml
new file mode 100644
index 000000000000..c3f332b423b7
--- /dev/null
+++ b/math/plplot/files/patch-doc__docbook__src__tcl.xml
@@ -0,0 +1,20 @@
+--- doc/docbook/src/tcl.xml.orig
++++ doc/docbook/src/tcl.xml
+@@ -576,7 +576,7 @@
+ if (pm->fdata[i] > max)
+ max = pm->fdata[i];
+
+- sprintf( interp->result, "%f", max );
++ sprintf( Tcl_GetStringResult(interp), "%f", max );
+ return TCL_OK;
+ }
+
+@@ -589,7 +589,7 @@
+ if (pm->fdata[i] &lt; min)
+ min = pm->fdata[i];
+
+- sprintf( interp->result, "%f", min );
++ sprintf( Tcl_GetStringResult(interp), "%f", min );
+ return TCL_OK;
+ }
+ </programlisting>
diff --git a/math/plplot/files/patch-drivers__ntk.c b/math/plplot/files/patch-drivers__ntk.c
new file mode 100644
index 000000000000..ff18c65e6e51
--- /dev/null
+++ b/math/plplot/files/patch-drivers__ntk.c
@@ -0,0 +1,74 @@
+--- drivers/ntk.c.orig
++++ drivers/ntk.c
+@@ -115,7 +115,7 @@
+ //
+ sprintf( scmd, "send %s {%s}", rem_interp, cmd ); // mess! make it more efficient
+ if ( Tcl_Eval( interp, scmd ) != TCL_OK )
+- fprintf( stderr, "%s\n", interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+ }
+ }
+
+@@ -264,7 +264,7 @@
+ sprintf( cmd, "send %s \"set client [tk appname]; wm deiconify .\"", rem_interp );
+ if ( Tcl_Eval( interp, cmd ) != TCL_OK )
+ {
+- fprintf( stderr, "%s\n", interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(interp) );
+ plexit( "No such tk server." );
+ }
+ }
+@@ -301,7 +301,7 @@
+ // Set up device parameters
+
+ Tcl_Eval( interp, "tk scaling" ); // pixels per mm
+- ppm = (PLFLT) atof( interp->result ) / ( 25.4 / 72. );
++ ppm = (PLFLT) atof( Tcl_GetStringResult(interp) ) / ( 25.4 / 72. );
+ plP_setpxl( ppm, ppm );
+ plP_setphy( xmin, xmax * scale, ymin, ymax * scale );
+ }
+@@ -371,11 +371,11 @@
+ {
+ tk_cmd( "update" );
+ tk_cmd( "info exists keypress" );
+- sscanf( interp->result, "%d", &st );
++ sscanf( Tcl_GetStringResult(interp), "%d", &st );
+ }
+
+ tk_cmd( "set keypress" );
+- sscanf( interp->result, "%d", &key );
++ sscanf( Tcl_GetStringResult(interp), "%d", &key );
+ //fprintf(stderr,"\n%d\n", key);fflush(stderr);
+ tk_cmd( "unset keypress" );
+ st = 0;
+@@ -433,7 +433,7 @@
+ {
+ tk_cmd( "update" );
+ tk_cmd( "winfo exists $plf.f2.c$ccanv" );
+- sscanf( interp->result, "%d", &st );
++ sscanf( Tcl_GetStringResult(interp), "%d", &st );
+ }
+ st = 0;
+ // this give a "Segmentation fault", even after checking for the canvas!
+@@ -450,16 +450,16 @@
+ {
+ tk_cmd( "update" );
+ tk_cmd( "info exists xloc" );
+- sscanf( interp->result, "%d", &st );
++ sscanf( Tcl_GetStringResult(interp), "%d", &st );
+ }
+ tk_cmd( "set xloc" );
+- sscanf( interp->result, "%d", &gin.pX );
++ sscanf( Tcl_GetStringResult(interp), "%d", &gin.pX );
+ tk_cmd( "set yloc" );
+- sscanf( interp->result, "%d", &gin.pY );
++ sscanf( Tcl_GetStringResult(interp), "%d", &gin.pY );
+ tk_cmd( "set bloc" );
+- sscanf( interp->result, "%d", &gin.button );
++ sscanf( Tcl_GetStringResult(interp), "%d", &gin.button );
+ tk_cmd( "set sloc" );
+- sscanf( interp->result, "%d", &gin.state );
++ sscanf( Tcl_GetStringResult(interp), "%d", &gin.state );
+
+ gin.dX = (PLFLT) gin.pX / xmax;
+ gin.dY = 1. - (PLFLT) gin.pY / ymax;
diff --git a/math/plplot/files/patch-drivers__tk.c b/math/plplot/files/patch-drivers__tk.c
new file mode 100644
index 000000000000..91c99facaf33
--- /dev/null
+++ b/math/plplot/files/patch-drivers__tk.c
@@ -0,0 +1,65 @@
+--- drivers/tk.c.orig
++++ drivers/tk.c
+@@ -764,7 +764,7 @@
+
+ if ( Tcl_Init( dev->interp ) != TCL_OK )
+ {
+- fprintf( stderr, "%s\n", dev->interp->result );
++ fprintf( stderr, "%s\n", Tcl_GetStringResult(dev->interp) );
+ abort_session( pls, "Unable to initialize Tcl" );
+ }
+
+@@ -1568,7 +1568,7 @@
+ 0, 1, ( ClientData ) & iodev->file ) != TCL_OK )
+ {
+ fprintf( stderr, "Cannot get file info:\n\t %s\n",
+- dev->interp->result );
++ Tcl_GetStringResult(dev->interp) );
+ abort_session( pls, "" );
+ }
+ iodev->fd = fileno( iodev->file );
+@@ -1673,7 +1673,7 @@
+ if ( pl_PacketSend( dev->interp, dev->iodev, pls->pdfs ) )
+ {
+ fprintf( stderr, "Packet send failed:\n\t %s\n",
+- dev->interp->result );
++ Tcl_GetStringResult(dev->interp) );
+ abort_session( pls, "" );
+ }
+ pdfs->bp = 0;
+@@ -2131,7 +2131,7 @@
+
+ if ( Tk_Init( interp ) )
+ {
+- fprintf( stderr, "tk_init:%s\n", interp->result );
++ fprintf( stderr, "tk_init:%s\n", Tcl_GetStringResult(interp) );
+ return 1;
+ }
+
+@@ -2165,7 +2165,7 @@
+ if ( Tcl_ExprBoolean( dev->interp, dev->cmdbuf, &result ) )
+ {
+ fprintf( stderr, "tk_wait command \"%s\" failed:\n\t %s\n",
+- cmd, dev->interp->result );
++ cmd, Tcl_GetStringResult(dev->interp) );
+ break;
+ }
+ if ( result )
+@@ -2225,7 +2225,7 @@
+ if ( result != TCL_OK )
+ {
+ fprintf( stderr, "Server command \"%s\" failed:\n\t %s\n",
+- cmd, dev->interp->result );
++ cmd, Tcl_GetStringResult(dev->interp) );
+ abort_session( pls, "" );
+ }
+ }
+@@ -2247,7 +2247,7 @@
+ if ( Tcl_VarEval( dev->interp, cmd, (char **) NULL ) != TCL_OK )
+ {
+ fprintf( stderr, "TCL command \"%s\" failed:\n\t %s\n",
+- cmd, dev->interp->result );
++ cmd, Tcl_GetStringResult(dev->interp) );
+ abort_session( pls, "" );
+ }
+ }
diff --git a/math/plplot/files/patch-examples__python__CMakeLists.txt b/math/plplot/files/patch-examples__python__CMakeLists.txt
new file mode 100644
index 000000000000..521744516269
--- /dev/null
+++ b/math/plplot/files/patch-examples__python__CMakeLists.txt
@@ -0,0 +1,11 @@
+--- examples/python/CMakeLists.txt.orig
++++ examples/python/CMakeLists.txt
+@@ -241,7 +241,7 @@
+ @ONLY
+ )
+
+- set(python_location1 ${PYTHON_INSTDIR})
++ set(python_location1)
+ set(python_location2)
+ set(python_location3)
+ set(python_location4)
diff --git a/math/plplot/files/patch-examples__tk__xtk01.c b/math/plplot/files/patch-examples__tk__xtk01.c
new file mode 100644
index 000000000000..e68c359c70a0
--- /dev/null
+++ b/math/plplot/files/patch-examples__tk__xtk01.c
@@ -0,0 +1,11 @@
+--- examples/tk/xtk01.c.orig
++++ examples/tk/xtk01.c
+@@ -53,7 +53,7 @@
+ //
+ // Results:
+ // Returns a standard Tcl completion code, and leaves an error
+-// message in interp->result if an error occurs.
++// message in Tcl_GetStringResult(interp) if an error occurs.
+ //
+ // Side effects:
+ // Depends on the startup script.
diff --git a/math/plplot/files/patch-examples__tk__xtk02.c b/math/plplot/files/patch-examples__tk__xtk02.c
new file mode 100644
index 000000000000..dd17bd5c7f0e
--- /dev/null
+++ b/math/plplot/files/patch-examples__tk__xtk02.c
@@ -0,0 +1,20 @@
+--- examples/tk/xtk02.c.orig
++++ examples/tk/xtk02.c
+@@ -49,7 +49,7 @@
+ pm->fdata[i] = y;
+ }
+
+- interp->result = "Things are cool in gumbyville.";
++ Tcl_SetResult(interp,(char*)"Things are cool in gumbyville.",TCL_VOLATILE);
+ return TCL_OK;
+ }
+
+@@ -82,7 +82,7 @@
+ //
+ // Results:
+ // Returns a standard Tcl completion code, and leaves an error
+-// message in interp->result if an error occurs.
++// message in Tcl_GetStringResult(interp) if an error occurs.
+ //
+ // Side effects:
+ // Depends on the startup script.
diff --git a/math/plplot/files/patch-examples__tk__xtk04.c b/math/plplot/files/patch-examples__tk__xtk04.c
new file mode 100644
index 000000000000..ee64d8c82a90
--- /dev/null
+++ b/math/plplot/files/patch-examples__tk__xtk04.c
@@ -0,0 +1,38 @@
+--- examples/tk/xtk04.c.orig
++++ examples/tk/xtk04.c
+@@ -35,7 +35,7 @@
+ if ( pm->fdata[i] > max )
+ max = pm->fdata[i];
+
+- sprintf( interp->result, "%f", max );
++ sprintf( Tcl_GetStringResult(interp), "%f", max );
+ return TCL_OK;
+ }
+
+@@ -48,7 +48,7 @@
+ if ( pm->fdata[i] < min )
+ min = pm->fdata[i];
+
+- sprintf( interp->result, "%f", min );
++ sprintf( Tcl_GetStringResult(interp), "%f", min );
+ return TCL_OK;
+ }
+
+@@ -80,7 +80,7 @@
+ //
+ // Results:
+ // Returns a standard Tcl completion code, and leaves an error
+-// message in interp->result if an error occurs.
++// message in Tcl_GetStringResult(interp) if an error occurs.
+ //
+ // Side effects:
+ // Depends on the startup script.
+@@ -158,7 +158,7 @@
+
+ if ( pm->dim != 2 )
+ {
+- interp->result = "must use 2-d matrix.";
++ Tcl_SetResult(interp,(char*)"must use 2-d matrix.",TCL_VOLATILE);
+ return TCL_ERROR;
+ }
+
diff --git a/math/plplot/files/patch-plplot_test__CMakeLists.txt b/math/plplot/files/patch-plplot_test__CMakeLists.txt
new file mode 100644
index 000000000000..cd1b1a0454a7
--- /dev/null
+++ b/math/plplot/files/patch-plplot_test__CMakeLists.txt
@@ -0,0 +1,15 @@
+--- plplot_test/CMakeLists.txt.orig
++++ plplot_test/CMakeLists.txt
+@@ -387,12 +387,6 @@
+ )
+ endif(PLD_pdfqt)
+
+- if(PLD_pdf)
+- add_test(examples_pdf
+- ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pdf"
+- )
+- endif(PLD_pdf)
+-
+ if(CMP_EXECUTABLE OR DIFF_EXECUTABLE AND TAIL_EXECUTABLE)
+ configure_file(
+ test_diff.sh.in
diff --git a/math/plplot/files/patch-scripts__CMakeLists.txt b/math/plplot/files/patch-scripts__CMakeLists.txt
new file mode 100644
index 000000000000..309ba97912d5
--- /dev/null
+++ b/math/plplot/files/patch-scripts__CMakeLists.txt
@@ -0,0 +1,14 @@
+--- scripts/CMakeLists.txt.orig
++++ scripts/CMakeLists.txt
+@@ -28,9 +28,9 @@
+ )
+ endif(PLD_plmeta)
+ if(PLD_pstex)
+- set(scripts_SCRIPTS ${scripts_SCRIPTS} pstex2eps)
++ set(scripts_SCRIPTS "${scripts_SCRIPTS}" pstex2eps)
+ endif(PLD_pstex)
+- if (NOT ${scripts_SCRIPTS} STREQUAL "")
++ if (NOT "${scripts_SCRIPTS}" STREQUAL "")
+ install(PROGRAMS ${scripts_SCRIPTS} DESTINATION ${BIN_DIR})
+ endif (NOT ${scripts_SCRIPTS} STREQUAL "")
+ endif(HAVE_BASH)
diff --git a/math/plplot/files/patch-util__pltcl.c b/math/plplot/files/patch-util__pltcl.c
new file mode 100644
index 000000000000..6842580295c6
--- /dev/null
+++ b/math/plplot/files/patch-util__pltcl.c
@@ -0,0 +1,11 @@
+--- utils/pltcl.c.orig
++++ utils/pltcl.c
+@@ -119,7 +119,7 @@
+ //
+ // Results:
+ // Returns a standard Tcl completion code, and leaves an error
+-// message in interp->result if an error occurs.
++// message in Tcl_GetStringResult(interp) if an error occurs.
+ //
+ // Side effects:
+ // Depends on the startup script.