mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-27 05:10:36 +00:00
- Fix build with Tcl/Tk 8.6
Reported by: miwi (Tcl/Tk 8.6 exp-run late comers) Approved by: maintainer (via private email)
This commit is contained in:
parent
d700c30ad7
commit
7651e9922c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=319838
@ -49,7 +49,7 @@ TESTSBIN= cgwrite cgread test_partial
|
||||
.endif
|
||||
|
||||
.if ${PORT_OPTIONS:MTOOLS}
|
||||
USE_TK= 85
|
||||
USE_TK= yes
|
||||
USE_GL= gl glu
|
||||
USE_XORG= xmu
|
||||
CMAKE_ARGS+= -DBUILD_CGNSTOOLS:BOOL=TRUE \
|
||||
|
78
science/cgnslib/files/patch-tcl86
Normal file
78
science/cgnslib/files/patch-tcl86
Normal file
@ -0,0 +1,78 @@
|
||||
--- src/cgnstools/tkogl/tkogl.c.orig 2011-02-12 23:43:48.000000000 +0100
|
||||
+++ src/cgnstools/tkogl/tkogl.c 2013-06-03 18:10:06.000000000 +0200
|
||||
@@ -641,7 +641,7 @@
|
||||
ARRANGE_REDRAW(glxwinPtr);
|
||||
GetAbsXY (glxwinPtr);
|
||||
|
||||
- interp->result = Tk_PathName(glxwinPtr->tkwin);
|
||||
+ Tcl_SetObjResult(interp, Tcl_NewStringObj(Tk_PathName(glxwinPtr->tkwin), -1));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
@@ -998,7 +998,7 @@
|
||||
argv += narg;
|
||||
}
|
||||
glEndList();
|
||||
- if (result == TCL_OK) sprintf (interp->result, "%d", newlist);
|
||||
+ if (result == TCL_OK) Tcl_SetObjResult(interp, Tcl_NewIntObj(newlist));
|
||||
}
|
||||
else if ((c == 'e') && (strncmp(argv[1], "eval", length) == 0)) {
|
||||
/* sends the gl commands directly */
|
||||
@@ -1090,7 +1090,13 @@
|
||||
viewport, &x, &y, &z);
|
||||
}
|
||||
if (retval) {
|
||||
+#if TCL_MAJOR_VERSION < 8 || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION < 5)
|
||||
sprintf (interp->result, "%f %f %f", x, y, z);
|
||||
+#else
|
||||
+ Tcl_Obj *obj = Tcl_NewObj ();
|
||||
+ Tcl_AppendPrintfToObj (obj, "%f %f %f", x, y, z);
|
||||
+ Tcl_SetObjResult (interp, obj);
|
||||
+#endif
|
||||
}
|
||||
}
|
||||
else if ((c == 'r') && (strncmp(argv[1], "redraw", length) == 0)) {
|
||||
--- src/cgnstools/tkogl/nurbs.c.orig 2013-06-03 18:05:02.000000000 +0200
|
||||
+++ src/cgnstools/tkogl/nurbs.c 2013-06-03 18:05:31.000000000 +0200
|
||||
@@ -280,7 +280,7 @@
|
||||
DestroyFloatArray (cPoint);
|
||||
|
||||
if (result == TCL_OK) {
|
||||
- sprintf (interp->result, "%d", dlist);
|
||||
+ Tcl_SetObjResult (interp, Tcl_NewIntObj(dlist));
|
||||
}
|
||||
|
||||
return result;
|
||||
--- src/cgnstools/tkogl/quadric.c.orig 2013-06-03 18:06:04.000000000 +0200
|
||||
+++ src/cgnstools/tkogl/quadric.c 2013-06-03 18:06:28.000000000 +0200
|
||||
@@ -147,7 +147,7 @@
|
||||
if (dlist != 0) glEndList(); else return result;
|
||||
|
||||
if (result == TCL_OK) {
|
||||
- sprintf (interp->result, "%d", dlist);
|
||||
+ Tcl_SetObjResult (interp, Tcl_NewIntObj (dlist));
|
||||
}
|
||||
else {
|
||||
glDeleteLists (dlist, 1);
|
||||
--- src/cgnstools/tkogl/tess.c.orig 2013-06-03 18:06:51.000000000 +0200
|
||||
+++ src/cgnstools/tkogl/tess.c 2013-06-03 18:07:20.000000000 +0200
|
||||
@@ -122,7 +122,7 @@
|
||||
}
|
||||
|
||||
if (dlist != 0) {
|
||||
- sprintf (interp->result, "%d", dlist);
|
||||
+ Tcl_SetObjResult (interp, Tcl_NewIntObj (dlist));
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
--- src/cgnstools/tkogl/printstr.c.orig 2013-06-03 18:07:44.000000000 +0200
|
||||
+++ src/cgnstools/tkogl/printstr.c 2013-06-03 18:08:14.000000000 +0200
|
||||
@@ -131,7 +131,7 @@
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
- sprintf (interp->result, "%d", fontOffset);
|
||||
+ Tcl_SetObjResult (interp, Tcl_NewIntObj (fontOffset));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user