From 131b229726d38a119f46c849610e2b1830904708 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Nov 2022 21:38:17 +0000 Subject: Get rid of TK_CONFIG_OBJS flag (and change signature of Tk_ConfigureWidgets) --- doc/ConfigWidg.3 | 36 +++++++++++------------ doc/CrtItemType.3 | 23 --------------- generic/tk.decls | 2 +- generic/tkCanvArc.c | 4 +-- generic/tkCanvBmap.c | 4 +-- generic/tkCanvImg.c | 4 +-- generic/tkCanvLine.c | 4 +-- generic/tkCanvPoly.c | 4 +-- generic/tkCanvPs.c | 4 +-- generic/tkCanvText.c | 4 +-- generic/tkCanvWind.c | 4 +-- generic/tkCanvas.c | 81 +++++++-------------------------------------------- generic/tkDecls.h | 6 ++-- generic/tkImgBmap.c | 2 +- generic/tkImgPhoto.c | 2 +- generic/tkMessage.c | 3 +- generic/tkOldConfig.c | 32 +++++--------------- generic/tkRectOval.c | 6 ++-- generic/tkScrollbar.c | 2 +- 19 files changed, 63 insertions(+), 164 deletions(-) diff --git a/doc/ConfigWidg.3 b/doc/ConfigWidg.3 index e29daa8..7954f14 100644 --- a/doc/ConfigWidg.3 +++ b/doc/ConfigWidg.3 @@ -15,7 +15,7 @@ Tk_ConfigureWidget, Tk_ConfigureInfo, Tk_ConfigureValue, Tk_FreeOptions \- proce \fB#include \fR .sp int -\fBTk_ConfigureWidget(\fIinterp, tkwin, specs, argc, argv, widgRec, flags\fB)\fR +\fBTk_ConfigureWidget(\fIinterp, tkwin, specs, objc, objv, widgRec, flags\fB)\fR .sp int \fBTk_ConfigureInfo(\fIinterp, tkwin, specs, widgRec, argvName, flags\fB)\fR @@ -33,9 +33,9 @@ Window used to represent widget (needed to set up X resources). .AP "const Tk_ConfigSpec" *specs in Pointer to table specifying legal configuration options for this widget. -.AP int argc in -Number of arguments in \fIargv\fR. -.AP "const char" **argv in +.AP int objc in +Number of arguments in \fIobjv\fR. +.AP "Tcl_Obj *const *" objv in Command-line options for configuring widget. .AP char *widgRec in/out Points to widget record structure. Fields in this structure get @@ -75,16 +75,16 @@ It is typically invoked when widgets are created, and again when the \fBconfigure\fR command is invoked for a widget. Although intended primarily for widgets, \fBTk_ConfigureWidget\fR -can be used in other situations where \fIargc-argv\fR information +can be used in other situations where \fIobjc-objv\fR information is to be used to fill in a record structure, such as configuring graphical elements for a canvas widget or entries of a menu. .PP \fBTk_ConfigureWidget\fR processes a table specifying the configuration options that are supported -(\fIspecs\fR) and a collection of command-line arguments (\fIargc\fR and -\fIargv\fR) to fill in fields of a record (\fIwidgRec\fR). +(\fIspecs\fR) and a collection of command-line arguments (\fIobjc\fR and +\fIobjv\fR) to fill in fields of a record (\fIwidgRec\fR). It uses the option database and defaults specified in \fIspecs\fR -to fill in fields of \fIwidgRec\fR that are not specified in \fIargv\fR. +to fill in fields of \fIwidgRec\fR that are not specified in \fIobjv\fR. \fBTk_ConfigureWidget\fR normally returns the value \fBTCL_OK\fR; in this case it does not modify \fIinterp\fR. If an error @@ -120,12 +120,12 @@ The \fIargvName\fR field is a string such as .QW \-font or .QW \-bg , -which is compared with the values in \fIargv\fR (if \fIargvName\fR is +which is compared with the values in \fIobjv\fR (if \fIargvName\fR is NULL it means this is a grouped entry; see \fBGROUPED ENTRIES\fR below). The \fIdbName\fR and \fIdbClass\fR fields are used to look up a value for this option in the option database. The \fIdefValue\fR field specifies a default value for this configuration option if no -value is specified in either \fIargv\fR or the option database. +value is specified in either \fIobjv\fR or the option database. \fIOffset\fR indicates where in \fIwidgRec\fR to store information about this option, and \fIspecFlags\fR contains additional information to control the processing of this configuration option (see FLAGS @@ -133,14 +133,14 @@ below). The last field, \fIcustomPtr\fR, is only used if \fItype\fR is \fBTK_CONFIG_CUSTOM\fR; see CUSTOM OPTION TYPES below. .PP -\fBTk_ConfigureWidget\fR first processes \fIargv\fR to see which +\fBTk_ConfigureWidget\fR first processes \fIobjv\fR to see which (if any) configuration options are specified there. \fIArgv\fR must contain an even number of fields; the first of each pair of fields must match the \fIargvName\fR of some entry in \fIspecs\fR (unique abbreviations are acceptable), and the second field of the pair contains the value for that configuration option. If there are entries in \fIspec\fR for which -there were no matching entries in \fIargv\fR, +there were no matching entries in \fIobjv\fR, \fBTk_ConfigureWidget\fR uses the \fIdbName\fR and \fIdbClass\fR fields of the \fIspecs\fR entry to probe the option database; if a value is found, then it is used as the value for the option. @@ -149,7 +149,7 @@ Finally, if no entry is found in the option database, the value for the configuration option. If the \fIdefValue\fR is NULL, or if the \fBTK_CONFIG_DONT_SET_DEFAULT\fR bit is set in \fIflags\fR, then there is no default value and this \fIspecs\fR entry -will be ignored if no value is specified in \fIargv\fR or the +will be ignored if no value is specified in \fIobjv\fR or the option database. .PP Once a string value has been determined for a configuration option, @@ -333,13 +333,13 @@ freed by passing it to \fBTcl_Free\fR. .TP \fBTK_CONFIG_SYNONYM\fR This \fItype\fR value identifies special entries in \fIspecs\fR that -are synonyms for other entries. If an \fIargv\fR value matches the +are synonyms for other entries. If an \fIobjv\fR value matches the \fIargvName\fR of a \fBTK_CONFIG_SYNONYM\fR entry, the entry is not used directly. Instead, \fBTk_ConfigureWidget\fR searches \fIspecs\fR for another entry whose \fIargvName\fR is the same as the \fIdbName\fR field in the \fBTK_CONFIG_SYNONYM\fR entry; this new entry is used just -as if its \fIargvName\fR had matched the \fIargv\fR value. The -synonym mechanism allows multiple \fIargv\fR values to be used for +as if its \fIargvName\fR had matched the \fIobjv\fR value. The +synonym mechanism allows multiple \fIobjv\fR values to be used for a single configuration option, such as .QW \-background and @@ -384,7 +384,7 @@ First, if the \fIflags\fR argument to \fBTk_ConfigureWidget\fR has the \fBTK_CONFIG_ARGV_ONLY\fR bit set (i.e., \fIflags\fR | \fBTK_CONFIG_ARGV_ONLY\fR != 0), then the option database and \fIdefValue\fR fields are not used. In this case, if an entry in -\fIspecs\fR does not match a field in \fIargv\fR then nothing happens: +\fIspecs\fR does not match a field in \fIobjv\fR then nothing happens: the corresponding target is not modified. This feature is useful when the goal is to modify certain configuration options while leaving others in their current state, such as when a \fBconfigure\fR @@ -433,7 +433,7 @@ once, save the value, and provide it before calling This bit is deprecated. It used to be set and cleared by \fBTk_ConfigureWidget\fR so that callers could detect what entries were specified in -\fIargv\fR, but it was removed because it was inherently +\fIobjv\fR, but it was removed because it was inherently thread-unsafe. Code that wishes to detect what options were specified should use \fBTk_SetOptions\fR instead. .PP diff --git a/doc/CrtItemType.3 b/doc/CrtItemType.3 index cd270f4..c46ad2d 100644 --- a/doc/CrtItemType.3 +++ b/doc/CrtItemType.3 @@ -180,14 +180,6 @@ is redrawn, rather than only when the bounding box of the item overlaps the area being redrawn. This is used by window items, for example, which need to unmap subwindows that are not on the screen. .TP -\fBTK_CONFIG_OBJS\fR -. -Indicates that operations which would otherwise take a string (or array of -strings) actually take a Tcl_Obj reference (or an array of such references). -The operations to which this applies are the \fIconfigProc\fR, the -\fIcoordProc\fR, the \fIcreateProc\fR, the \fIindexProc\fR and the -\fIinsertProc\fR. -.TP \fBTK_MOVABLE_POINTS\fR .VS 8.6 Indicates that the item supports the \fIdCharsProc\fR, \fIindexProc\fR and @@ -229,9 +221,6 @@ Tk has already initialized the item's header (the first The \fIobjc\fR and \fIobjv\fR arguments describe all of the arguments to the \fBcreate\fR command after the \fItype\fR argument. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually -contain a pointer to an array of constant strings. For example, in the widget command: .PP .CS @@ -285,9 +274,6 @@ The \fIinterp\fR argument identifies the interpreter in which the widget command was invoked, \fIcanvas\fR is a handle for the canvas widget, and \fIitemPtr\fR is a pointer to the item being configured. \fIobjc\fR and \fIobjv\fR contain the configuration options. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually -contain a pointer to an array of constant strings. For example, if the following command is invoked: .PP .CS @@ -324,9 +310,6 @@ typedef int \fBTk_ItemCoordProc\fR( The arguments \fIinterp\fR, \fIcanvas\fR, and \fIitemPtr\fR all have the standard meanings, and \fIobjc\fR and \fIobjv\fR describe the coordinate arguments. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobjv\fR parameter will actually -contain a pointer to an array of constant strings. For example, if the following widget command is invoked: .PP .CS @@ -616,9 +599,6 @@ have the usual meaning. \fIindexObj\fR contains a textual description of an index, and \fIindexPtr\fR points to an integer value that should be filled in with a numerical index. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIindexObj\fR parameter will -actually contain a pointer to a constant string. It is up to the type manager to decide what forms of index are supported (e.g., numbers, \fBinsert\fR, \fBsel.first\fR, \fBend\fR, etc.). @@ -702,9 +682,6 @@ typedef void \fBTk_ItemInsertProc\fR( previous call to \fItypePtr\->insertProc\fR, and \fIobj\fR contains new text to insert just before the character given by \fIindex\fR. -Note that if \fBTK_CONFIG_OBJS\fR is not set in the -\fItypePtr\->alwaysRedraw\fR field, the \fIobj\fR parameter will -actually contain a pointer to a constant string to be inserted. If the item supports modification of the coordinates list by this .PP The type manager should insert the text and recompute the bounding diff --git a/generic/tk.decls b/generic/tk.decls index 1075977..68da8b5 100644 --- a/generic/tk.decls +++ b/generic/tk.decls @@ -146,7 +146,7 @@ declare 28 { declare 29 { int Tk_ConfigureWidget(Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, - Tcl_Size argc, const char **argv, char *widgRec, + Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec, int flags) } declare 30 { diff --git a/generic/tkCanvArc.c b/generic/tkCanvArc.c index cfb5d0c..b1c109e 100644 --- a/generic/tkCanvArc.c +++ b/generic/tkCanvArc.c @@ -234,7 +234,7 @@ Tk_ItemType tkArcType = { ArcCoords, /* coordProc */ DeleteArc, /* deleteProc */ DisplayArc, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ ArcToPoint, /* pointProc */ ArcToArea, /* areaProc */ ArcToPostscript, /* postscriptProc */ @@ -452,7 +452,7 @@ ConfigureArc( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) arcPtr, flags|TK_CONFIG_OBJS)) { + objv, arcPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvBmap.c b/generic/tkCanvBmap.c index 6a6de42..d75f869 100644 --- a/generic/tkCanvBmap.c +++ b/generic/tkCanvBmap.c @@ -128,7 +128,7 @@ Tk_ItemType tkBitmapType = { BitmapCoords, /* coordProc */ DeleteBitmap, /* deleteProc */ DisplayBitmap, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ BitmapToPoint, /* pointProc */ BitmapToArea, /* areaProc */ BitmapToPostscript, /* postscriptProc */ @@ -324,7 +324,7 @@ ConfigureBitmap( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) bmapPtr, flags|TK_CONFIG_OBJS)) { + objv, bmapPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c index b51a785..9aef37b 100644 --- a/generic/tkCanvImg.c +++ b/generic/tkCanvImg.c @@ -116,7 +116,7 @@ Tk_ItemType tkImageType = { ImageCoords, /* coordProc */ DeleteImage, /* deleteProc */ DisplayImage, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ ImageToPoint, /* pointProc */ ImageToArea, /* areaProc */ ImageToPostscript, /* postscriptProc */ @@ -302,7 +302,7 @@ ConfigureImage( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) imgPtr, flags|TK_CONFIG_OBJS)) { + objv, imgPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvLine.c b/generic/tkCanvLine.c index 21b4ada..ace8643 100644 --- a/generic/tkCanvLine.c +++ b/generic/tkCanvLine.c @@ -230,7 +230,7 @@ Tk_ItemType tkLineType = { LineCoords, /* coordProc */ DeleteLine, /* deleteProc */ DisplayLine, /* displayProc */ - TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */ + TK_MOVABLE_POINTS, /* flags */ LineToPoint, /* pointProc */ LineToArea, /* areaProc */ LineToPostscript, /* postscriptProc */ @@ -482,7 +482,7 @@ ConfigureLine( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) linePtr, flags|TK_CONFIG_OBJS)) { + objv, linePtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvPoly.c b/generic/tkCanvPoly.c index eda1c22..24054a8 100644 --- a/generic/tkCanvPoly.c +++ b/generic/tkCanvPoly.c @@ -199,7 +199,7 @@ Tk_ItemType tkPolygonType = { PolygonCoords, /* coordProc */ DeletePolygon, /* deleteProc */ DisplayPolygon, /* displayProc */ - TK_CONFIG_OBJS | TK_MOVABLE_POINTS, /* flags */ + TK_MOVABLE_POINTS, /* flags */ PolygonToPoint, /* pointProc */ PolygonToArea, /* areaProc */ PolygonToPostscript, /* postscriptProc */ @@ -446,7 +446,7 @@ ConfigurePolygon( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) polyPtr, flags|TK_CONFIG_OBJS)) { + objv, polyPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c index 05555ae..500558b 100644 --- a/generic/tkCanvPs.c +++ b/generic/tkCanvPs.c @@ -236,8 +236,8 @@ TkCanvPostscriptObjCmd( psInfo.prolog = 1; psInfo.tkwin = tkwin; Tcl_InitHashTable(&psInfo.fontTable, TCL_STRING_KEYS); - result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, (const char **)objv+2, - (char *) &psInfo, TK_CONFIG_ARGV_ONLY|TK_CONFIG_OBJS); + result = Tk_ConfigureWidget(interp, tkwin, configSpecs, objc-2, objv+2, + &psInfo, TK_CONFIG_ARGV_ONLY); if (result != TCL_OK) { goto cleanup; } diff --git a/generic/tkCanvText.c b/generic/tkCanvText.c index f08e388..a222e48 100644 --- a/generic/tkCanvText.c +++ b/generic/tkCanvText.c @@ -278,7 +278,7 @@ Tk_ItemType tkTextType = { TextCoords, /* coordProc */ DeleteText, /* deleteProc */ DisplayCanvText, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ TextToPoint, /* pointProc */ TextToArea, /* areaProc */ TextToPostscript, /* postscriptProc */ @@ -500,7 +500,7 @@ ConfigureText( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **) objv, (char *) textPtr, flags|TK_CONFIG_OBJS)) { + objv, textPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 2ef4a82..4691e63 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -120,7 +120,7 @@ Tk_ItemType tkWindowType = { WinItemCoords, /* coordProc */ DeleteWinItem, /* deleteProc */ DisplayWinItem, /* displayProc */ - 1|TK_CONFIG_OBJS, /* flags */ + 1, /* flags */ WinItemToPoint, /* pointProc */ WinItemToArea, /* areaProc */ WinItemToPostscript, /* postscriptProc */ @@ -316,7 +316,7 @@ ConfigureWinItem( oldWindow = winItemPtr->tkwin; canvasTkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, canvasTkwin, configSpecs, objc, - (const char **) objv, (char *) winItemPtr, flags|TK_CONFIG_OBJS)) { + objv, winItemPtr, flags)) { return TCL_ERROR; } diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index c77d33e..82ab17e 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -334,25 +334,9 @@ ItemConfigure( Tcl_Obj *const objv[]) { Tcl_Interp *interp = canvasPtr->interp; - int result; - if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - const char **args = TkGetStringsFromObjs(objc, objv); - - result = itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, (Tcl_Obj **) args, TK_CONFIG_ARGV_ONLY); - if (args != NULL) { - ckfree(args); - } -#endif - } - return result; + return itemPtr->typePtr->configProc(interp, (Tk_Canvas) canvasPtr, + itemPtr, objc, objv, TK_CONFIG_ARGV_ONLY); } static inline int @@ -389,21 +373,9 @@ ItemCoords( if (itemPtr->typePtr->coordProc == NULL) { result = TCL_OK; - } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, objv); } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - const char **args = TkGetStringsFromObjs(objc, objv); - result = itemPtr->typePtr->coordProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc, (Tcl_Obj **) args); - if (args != NULL) { - ckfree(args); - } -#endif + itemPtr, objc, objv); } return result; } @@ -417,25 +389,9 @@ ItemCreate( Tcl_Obj *const objv[]) { Tcl_Interp *interp = canvasPtr->interp; - int result; - if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr, + return itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr, itemPtr, objc-3, objv+3); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - const char **args = TkGetStringsFromObjs(objc-3, objv+3); - - result = itemPtr->typePtr->createProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objc-3, (Tcl_Obj **) args); - if (args != NULL) { - ckfree(args); - } -#endif - } - return result; } static inline void @@ -489,17 +445,9 @@ ItemIndex( if (itemPtr->typePtr->indexProc == NULL) { return TCL_OK; - } else if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, objPtr, indexPtr); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr, - itemPtr, (Tcl_Obj *) Tcl_GetString(objPtr), indexPtr); -#endif } + return itemPtr->typePtr->indexProc(interp, (Tk_Canvas) canvasPtr, + itemPtr, objPtr, indexPtr); } static inline void @@ -509,17 +457,8 @@ ItemInsert( int beforeThis, Tcl_Obj *toInsert) { - if (itemPtr->typePtr->alwaysRedraw & TK_CONFIG_OBJS) { - itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr, - beforeThis, toInsert); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr, - beforeThis, (Tcl_Obj *) Tcl_GetString(toInsert)); -#endif - } + itemPtr->typePtr->insertProc((Tk_Canvas) canvasPtr, itemPtr, + beforeThis, toInsert); } static inline int @@ -2325,8 +2264,8 @@ ConfigureCanvas( Tk_State old_canvas_state=canvasPtr->canvas_state; if (Tk_ConfigureWidget(interp, canvasPtr->tkwin, configSpecs, - objc, (const char **) objv, (char *) canvasPtr, - flags|TK_CONFIG_OBJS) != TCL_OK) { + objc, objv, canvasPtr, + flags) != TCL_OK) { return TCL_ERROR; } diff --git a/generic/tkDecls.h b/generic/tkDecls.h index 706d91a..f3c6fb2 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -142,8 +142,8 @@ EXTERN int Tk_ConfigureValue(Tcl_Interp *interp, /* 29 */ EXTERN int Tk_ConfigureWidget(Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, - Tcl_Size argc, const char **argv, - char *widgRec, int flags); + Tcl_Size objc, Tcl_Obj *const *objv, + void *widgRec, int flags); /* 30 */ EXTERN void Tk_ConfigureWindow(Tk_Window tkwin, unsigned int valueMask, @@ -966,7 +966,7 @@ typedef struct TkStubs { int (*tk_ClipboardClear) (Tcl_Interp *interp, Tk_Window tkwin); /* 26 */ int (*tk_ConfigureInfo) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 27 */ int (*tk_ConfigureValue) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, char *widgRec, const char *argvName, int flags); /* 28 */ - int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size argc, const char **argv, char *widgRec, int flags); /* 29 */ + int (*tk_ConfigureWidget) (Tcl_Interp *interp, Tk_Window tkwin, const Tk_ConfigSpec *specs, Tcl_Size objc, Tcl_Obj *const *objv, void *widgRec, int flags); /* 29 */ void (*tk_ConfigureWindow) (Tk_Window tkwin, unsigned int valueMask, XWindowChanges *valuePtr); /* 30 */ Tk_TextLayout (*tk_ComputeTextLayout) (Tk_Font font, const char *str, Tcl_Size numChars, int wrapLength, Tk_Justify justify, int flags, int *widthPtr, int *heightPtr); /* 31 */ Tk_Window (*tk_CoordsToWindow) (int rootX, int rootY, Tk_Window tkwin); /* 32 */ diff --git a/generic/tkImgBmap.c b/generic/tkImgBmap.c index 3ff3a81..6cdd704 100644 --- a/generic/tkImgBmap.c +++ b/generic/tkImgBmap.c @@ -240,7 +240,7 @@ ImgBmapConfigureModel( int maskWidth, maskHeight, dummy1, dummy2; if (Tk_ConfigureWidget(modelPtr->interp, Tk_MainWindow(modelPtr->interp), - configSpecs, objc, (const char **) objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) { + configSpecs, objc, objv, modelPtr, flags) != TCL_OK) { return TCL_ERROR; } diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 6b92831..992f4bd 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -2052,7 +2052,7 @@ ImgPhotoConfigureModel( */ if (Tk_ConfigureWidget(interp, Tk_MainWindow(interp), configSpecs, - objc, (const char **)objv, (char *) modelPtr, flags|TK_CONFIG_OBJS) != TCL_OK) { + objc, objv, modelPtr, flags) != TCL_OK) { goto errorExit; } diff --git a/generic/tkMessage.c b/generic/tkMessage.c index a5c3a2f..814e96f 100644 --- a/generic/tkMessage.c +++ b/generic/tkMessage.c @@ -442,10 +442,9 @@ ConfigureMessage( * already have values for some fields. */ int objc, /* Number of valid entries in argv. */ Tcl_Obj *const objv[], /* Arguments. */ - int flags) /* Flags to pass to Tk_ConfigureWidget. */ + TCL_UNUSED(int)) /* Flags to pass to Tk_ConfigureWidget. */ { Tk_SavedOptions savedOptions; - (void)flags; /* * Eliminate any existing trace on a variable monitored by the message. diff --git a/generic/tkOldConfig.c b/generic/tkOldConfig.c index cc52e8c..3770cbd 100644 --- a/generic/tkOldConfig.c +++ b/generic/tkOldConfig.c @@ -57,7 +57,7 @@ static void DeleteSpecCacheTable(ClientData clientData, * will hold an error message. * * Side effects: - * The fields of widgRec get filled in with information from argc/argv + * The fields of widgRec get filled in with information from objc/objv * and the option database. Old information in widgRec's fields gets * recycled. A copy of the spec-table is taken with (some of) the char* * fields converted into Tk_Uid fields; this copy will be released when @@ -72,9 +72,9 @@ Tk_ConfigureWidget( Tk_Window tkwin, /* Window containing widget (needed to set up * X resources). */ const Tk_ConfigSpec *specs, /* Describes legal options. */ - Tcl_Size argc, /* Number of elements in argv. */ - const char **argv, /* Command-line options. */ - char *widgRec, /* Record whose fields are to be modified. + Tcl_Size objc, /* Number of elements in objv. */ + Tcl_Obj *const *objv, /* Command-line options. */ + void *widgRec, /* Record whose fields are to be modified. * Values must be properly initialized. */ int flags) /* Used to specify additional flags that must * be present in config specs for them to be @@ -121,18 +121,10 @@ Tk_ConfigureWidget( * match entries in the specs. */ - for ( ; argc > 0; argc -= 2, argv += 2) { + for ( ; objc > 0; objc -= 2, objv += 2) { const char *arg; - if (flags & TK_CONFIG_OBJS) { - arg = Tcl_GetString((Tcl_Obj *) *argv); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - arg = *argv; -#endif - } + arg = Tcl_GetString(*objv); specPtr = FindConfigSpec(interp, staticSpecs, arg, needFlags, hateFlags); if (specPtr == NULL) { return TCL_ERROR; @@ -142,21 +134,13 @@ Tk_ConfigureWidget( * Process the entry. */ - if (argc < 2) { + if (objc < 2) { Tcl_SetObjResult(interp, Tcl_ObjPrintf( "value for \"%s\" missing", arg)); Tcl_SetErrorCode(interp, "TK", "VALUE_MISSING", NULL); return TCL_ERROR; } - if (flags & TK_CONFIG_OBJS) { - arg = Tcl_GetString((Tcl_Obj *) argv[1]); - } else { -#if defined(TK_NO_DEPRECATED) || (TK_MAJOR_VERSION > 8) - Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory"); -#else - arg = argv[1]; -#endif - } + arg = Tcl_GetString(objv[1]); if (DoConfig(interp, tkwin, specPtr, arg, 0, widgRec) != TCL_OK) { Tcl_AppendObjToErrorInfo(interp, Tcl_ObjPrintf( "\n (processing \"%.40s\" option)",specPtr->argvName)); diff --git a/generic/tkRectOval.c b/generic/tkRectOval.c index e0d591c..3f307aa 100644 --- a/generic/tkRectOval.c +++ b/generic/tkRectOval.c @@ -171,7 +171,7 @@ Tk_ItemType tkRectangleType = { RectOvalCoords, /* coordProc */ DeleteRectOval, /* deleteProc */ DisplayRectOval, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ RectToPoint, /* pointProc */ RectToArea, /* areaProc */ RectOvalToPostscript, /* postscriptProc */ @@ -196,7 +196,7 @@ Tk_ItemType tkOvalType = { RectOvalCoords, /* coordProc */ DeleteRectOval, /* deleteProc */ DisplayRectOval, /* displayProc */ - TK_CONFIG_OBJS, /* flags */ + 0, /* flags */ OvalToPoint, /* pointProc */ OvalToArea, /* areaProc */ RectOvalToPostscript, /* postscriptProc */ @@ -416,7 +416,7 @@ ConfigureRectOval( tkwin = Tk_CanvasTkwin(canvas); if (TCL_OK != Tk_ConfigureWidget(interp, tkwin, configSpecs, objc, - (const char **)objv, (char *) rectOvalPtr, flags|TK_CONFIG_OBJS)) { + objv, rectOvalPtr, flags)) { return TCL_ERROR; } state = itemPtr->state; diff --git a/generic/tkScrollbar.c b/generic/tkScrollbar.c index 48e6de1..e0e3c0c 100644 --- a/generic/tkScrollbar.c +++ b/generic/tkScrollbar.c @@ -532,7 +532,7 @@ ConfigureScrollbar( int flags) /* Flags to pass to Tk_ConfigureWidget. */ { if (Tk_ConfigureWidget(interp, scrollPtr->tkwin, configSpecs, objc, - (const char **)objv, (char *) scrollPtr, flags|TK_CONFIG_OBJS) != TCL_OK) { + objv, (char *) scrollPtr, flags) != TCL_OK) { return TCL_ERROR; } -- cgit v0.12 From a652f87a0bf5145d16cb33a7708a27295e48a910 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Nov 2022 22:15:09 +0000 Subject: Tk version from 8.7 -> 9.1 --- .github/workflows/linux-build.yml | 156 -------------------------------------- .github/workflows/onefiledist.yml | 12 +-- .project | 2 +- README.md | 8 +- generic/tk.h | 19 ++--- library/tk.tcl | 2 +- unix/Makefile.in | 2 +- unix/configure | 38 +++++----- unix/configure.ac | 16 ++-- unix/tcl.m4 | 12 +-- unix/tk.spec | 6 +- win/README | 2 +- win/configure | 26 +++---- win/configure.ac | 10 +-- win/tcl.m4 | 8 +- 15 files changed, 82 insertions(+), 237 deletions(-) delete mode 100644 .github/workflows/linux-build.yml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml deleted file mode 100644 index 49ed6ee..0000000 --- a/.github/workflows/linux-build.yml +++ /dev/null @@ -1,156 +0,0 @@ -name: Linux -on: [push] -permissions: - contents: read -defaults: - run: - shell: bash - working-directory: tk/unix -env: - ERROR_ON_FAILURES: 1 -jobs: - build: - runs-on: ubuntu-22.04 - strategy: - matrix: - compiler: - - "gcc" - - "clang" - cfgopt: - - "" - - "CFLAGS=-DTK_NO_DEPRECATED=1" - - "--disable-shared" - - "--disable-xft" - - "--disable-xss" - - "--enable-symbols" - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: tk - - name: Checkout Tcl - uses: actions/checkout@v3 - with: - repository: tcltk/tcl - ref: core-8-6-branch - path: tcl - - name: Setup Environment (compiler=${{ matrix.compiler }}) - run: | - sudo apt-get install tcl8.6-dev libxss-dev - mkdir "$HOME/install dir" - touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6" --disable-zipfs >> $GITHUB_ENV - echo "CC=$COMPILER" >> $GITHUB_ENV - echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV - echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV - working-directory: "." - env: - CFGOPT: ${{ matrix.cfgopt }} - COMPILER: ${{ matrix.compiler }} - OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }} - - name: Configure (opts=${{ matrix.cfgopt }}) - run: | - ./configure $CFGOPT "--prefix=$HOME/install dir" || { - cat config.log - echo "::error::Failure during Configure" - exit 1 - } - - name: Build - run: | - make binaries libraries || { - echo "::error::Failure during Build" - exit 1 - } - - name: Build Test Harness - run: | - make tktest || { - echo "::error::Failure during Build" - exit 1 - } - - name: Test-Drive Installation - run: | - make install || { - echo "::error::Failure during Install" - exit 1 - } - - name: Create Distribution Package - run: | - make dist || { - echo "::error::Failure during Distribute" - exit 1 - } - - name: Convert Documentation to HTML - run: | - make html-tk TOOL_DIR=$TOOL_DIR || { - echo "::error::Failure during Distribute" - exit 1 - } - - name: Discover Version ID - if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} - run: | - cd /tmp/dist - echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV - - name: Upload Source Distribution - if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }} - uses: actions/upload-artifact@v2 - with: - name: Tk ${{ env.VERSION }} Source distribution (snapshot) - path: | - /tmp/dist/tk* - !/tmp/dist/tk*/html/** - - name: Upload Documentation Distribution - if: ${{ env.BUILD_CONFIG_ID == 'gcc-no' }} - uses: actions/upload-artifact@v2 - with: - name: Tk ${{ env.VERSION }} HTML documentation (snapshot) - path: /tmp/dist/tk*/html - test: - runs-on: ubuntu-20.04 - strategy: - matrix: - compiler: - - "gcc" - cfgopt: - - "" - - "--enable-symbols" - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: tk - - name: Setup Environment (compiler=${{ matrix.compiler }}) - run: | - sudo apt-get install tcl8.6-dev libxss-dev xvfb libicu-dev - mkdir "$HOME/install dir" - touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "CFGOPT=$CFGOPT --with-tcl=/usr/lib/tcl8.6 --disable-zipfs" >> $GITHUB_ENV - echo "CC=$COMPILER" >> $GITHUB_ENV - working-directory: "." - env: - CFGOPT: ${{ matrix.cfgopt }} - COMPILER: ${{ matrix.compiler }} - - name: Configure ${{ matrix.cfgopt }} - run: | - ./configure $CFGOPT "--prefix=$HOME/install dir" || { - cat config.log - echo "::error::Failure during Configure" - exit 1 - } - - name: Build - run: | - make binaries libraries tktest || { - echo "::error::Failure during Build" - exit 1 - } - - name: Run Tests - run: | - xvfb-run --auto-servernum make test-classic | tee out-classic.txt - xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt - grep -q "Failed 0" out-classic.txt || { - echo "::error::Failure during Test" - exit 1 - } - grep -q "Failed 0" out-ttk.txt || { - echo "::error::Failure during Test" - exit 1 - } diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index e3f9404..245c583 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -17,11 +17,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Setup Environment run: | @@ -81,11 +81,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Checkout create-dmg uses: actions/checkout@v3 @@ -169,11 +169,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Checkout Tcl 8.7 + - name: Checkout Tcl 9.0 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Setup Environment run: | diff --git a/.project b/.project index cc5f605..475bbe2 100644 --- a/.project +++ b/.project @@ -1,6 +1,6 @@ - tk8.7 + tk9.1 diff --git a/README.md b/README.md index f9fceb6..82c83dd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # README: Tk -This is the **Tk 8.7a6** source distribution. +This is the **Tk 9.1a0** source distribution. You can get any source release of Tk from [our distribution site](https://sourceforge.net/projects/tcl/files/Tcl/). @@ -14,6 +14,10 @@ site](https://sourceforge.net/projects/tcl/files/Tcl/). [![Build Status](https://github.com/tcltk/tk/workflows/Linux/badge.svg?branch=main)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Amain) [![Build Status](https://github.com/tcltk/tk/workflows/Windows/badge.svg?branch=main)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Amain) [![Build Status](https://github.com/tcltk/tk/workflows/macOS/badge.svg?branch=main)](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Amain) +9.1 (in development, daily build)) +[![Build Status](https://github.com/tcltk/tk/workflows/Linux/badge.svg?branch=tip-647)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Linux%22+branch%3Atip-647) +[![Build Status](https://github.com/tcltk/tk/workflows/Windows/badge.svg?branch=tip-647)](https://github.com/tcltk/tk/actions?query=workflow%3A%22Windows%22+branch%3Atip-647) +[![Build Status](https://github.com/tcltk/tk/workflows/macOS/badge.svg?branch=tip-647)](https://github.com/tcltk/tk/actions?query=workflow%3A%22macOS%22+branch%3Atip-647) ## 1. Introduction @@ -21,7 +25,7 @@ This directory contains the sources and documentation for Tk, a cross-platform GUI toolkit implemented with the Tcl scripting language. For details on features, incompatibilities, and potential problems with -this release, see [the Tcl/Tk 8.7 Web page](https://www.tcl-lang.org/software/tcltk/8.7.html) +this release, see [the Tcl/Tk 9.0 Web page](https://www.tcl-lang.org/software/tcltk/9.0.html) or refer to the "changes" file in this directory, which contains a historical record of all changes to Tk. diff --git a/generic/tk.h b/generic/tk.h index d59d3af..e1b76b2 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -17,8 +17,8 @@ #define _TK #include -#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6) -# error Tk 8.7 must be compiled with tcl.h from Tcl 8.6 or better +#if (TCL_MAJOR_VERSION < 8) || (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 7) +# error Tk 9.1 must be compiled with tcl.h from Tcl 8.7 or better #endif #ifndef EXTERN @@ -66,17 +66,14 @@ extern "C" { */ #ifndef TK_MAJOR_VERSION -# define TK_MAJOR_VERSION 8 +# define TK_MAJOR_VERSION 9 #endif -#if TK_MAJOR_VERSION != 8 -# error "This header-file is for Tk 8 only" -#endif -#define TK_MINOR_VERSION 7 +#define TK_MINOR_VERSION 1 #define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TK_RELEASE_SERIAL 6 +#define TK_RELEASE_SERIAL 0 -#define TK_VERSION "8.7" -#define TK_PATCH_LEVEL "8.7a6" +#define TK_VERSION "9.1" +#define TK_PATCH_LEVEL "9.1a0" /* * A special definition used to allow this header file to be included from @@ -1382,7 +1379,7 @@ typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format, #endif /* USE_OLD_IMAGE */ /* - * The following alternate definitions are used with the Tk8.7 file format + * The following alternate definitions are used with the Tk9.1 file format * supporting a metadata dict, internal dstring and close file flag */ diff --git a/library/tk.tcl b/library/tk.tcl index 75ac9c0..022ad97 100644 --- a/library/tk.tcl +++ b/library/tk.tcl @@ -11,7 +11,7 @@ # this file, and for a DISCLAIMER OF ALL WARRANTIES. # Verify that we have Tk binary and script components from the same release -package require -exact tk 8.7a6 +package require -exact tk 9.1a0 # Create a ::tk namespace namespace eval ::tk { diff --git a/unix/Makefile.in b/unix/Makefile.in index 8cff89e..ce61732 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -112,7 +112,7 @@ TCL_PLATFORM_DIR = $(TCLDIR)/unix # for this version of Tk: TCL_BIN_DIR = @TCL_BIN_DIR@ -# The linker flags needed to link in the Tcl library (ex: -ltcl8.7) +# The linker flags needed to link in the Tcl library (ex: -ltcl9.0) TCL_LIB_FLAG = @TCL_LIB_FLAG@ # Flag, 1: we're building a shared lib, 0 we're not diff --git a/unix/configure b/unix/configure index 876d417..c96139d 100755 --- a/unix/configure +++ b/unix/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for tk 8.7. +# Generated by GNU Autoconf 2.71 for tk 9.1. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tk' PACKAGE_TARNAME='tk' -PACKAGE_VERSION='8.7' -PACKAGE_STRING='tk 8.7' +PACKAGE_VERSION='9.1' +PACKAGE_STRING='tk 9.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1382,7 +1382,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tk 8.7 to adapt to many kinds of systems. +\`configure' configures tk 9.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1448,7 +1448,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tk 8.7:";; + short | recursive ) echo "Configuration of tk 9.1:";; esac cat <<\_ACEOF @@ -1564,7 +1564,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tk configure 8.7 +tk configure 9.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1920,7 +1920,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tk $as_me 8.7, which was +It was created by tk $as_me 9.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2582,10 +2582,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.1 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=1 +TK_PATCH_LEVEL="a0" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" @@ -2678,11 +2678,11 @@ printf "%s\n" "$as_me: WARNING: --with-tcl argument should refer to directory co `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tcl8.7 2>/dev/null` \ + `ls -d /usr/lib/tcl9.0 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \ + `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" @@ -2781,11 +2781,11 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } if test "${TCL_MAJOR_VERSION}" -lt 9 ; then if test "${TCL_MAJOR_VERSION}" -ne 8 ; then - as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ + as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}" "$LINENO" 5 fi -if test "${TCL_MINOR_VERSION}" -lt 6 ; then - as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ +if test "${TCL_MINOR_VERSION}" -lt 7 ; then + as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}" "$LINENO" 5 fi fi @@ -9535,7 +9535,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tk $as_me 8.7, which was +This file was extended by tk $as_me 9.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9594,7 +9594,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -tk config.status 8.7 +tk config.status 9.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/unix/configure.ac b/unix/configure.ac index f803a35..d7439bc 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to dnl generate the file "configure", which is run during Tk installation dnl to configure the system for the local environment. -AC_INIT([tk],[8.7]) +AC_INIT([tk],[9.1]) AC_PREREQ([2.69]) dnl This is only used when included from macosx/configure.ac @@ -23,10 +23,10 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [ #endif /* _TKCONFIG */]) ]) -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.1 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=1 +TK_PATCH_LEVEL="a0" VERSION=${TK_VERSION} LOCALES="cs da de el en en_gb eo es fr hu it nl pl pt ru sv" @@ -39,11 +39,11 @@ SC_LOAD_TCLCONFIG if test "${TCL_MAJOR_VERSION}" -lt 9 ; then if test "${TCL_MAJOR_VERSION}" -ne 8 ; then - AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ + AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}]) fi -if test "${TCL_MINOR_VERSION}" -lt 6 ; then - AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.6+ +if test "${TCL_MINOR_VERSION}" -lt 7 ; then + AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}]) fi fi diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 3730343..b3ebda0 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -93,11 +93,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tcl8.7 2>/dev/null` \ + `ls -d /usr/lib/tcl9.0 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \ + `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" @@ -226,11 +226,11 @@ AC_DEFUN([SC_PATH_TKCONFIG], [ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tk8.7 2>/dev/null` \ + `ls -d /usr/lib/tk9.1 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tk8.7 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tk8.7 2>/dev/null` \ + `ls -d /usr/local/lib/tk9.1 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tk9.1 2>/dev/null` \ ; do if test -f "$i/tkConfig.sh" ; then ac_cv_c_tkconfig="`(cd $i; pwd)`" diff --git a/unix/tk.spec b/unix/tk.spec index 6a6924c..95a4ccf 100644 --- a/unix/tk.spec +++ b/unix/tk.spec @@ -4,15 +4,15 @@ Name: tk Summary: Tk graphical toolkit for the Tcl scripting language. -Version: 8.7a6 +Version: 9.1a0 Release: 2 License: BSD Group: Development/Languages Source: http://prdownloads.sourceforge.net/tcl/tk%{version}-src.tar.gz URL: https://www.tcl-lang.org/ Buildroot: /var/tmp/%{name}%{version} -Buildrequires: XFree86-devel tcl >= 8.6.0 -Requires: tcl >= 8.6.0 +Buildrequires: XFree86-devel tcl >= 8.7.0 +Requires: tcl >= 8.7.0 %description The Tcl (Tool Command Language) provides a powerful platform for diff --git a/win/README b/win/README index e371a2c..0e48334 100644 --- a/win/README +++ b/win/README @@ -1,4 +1,4 @@ -Tk 8.7 for Windows +Tk 9.1 for Windows Originally by Scott Stanton while at Sun Microsystems Labs diff --git a/win/configure b/win/configure index bb26d7a..5411b1f 100755 --- a/win/configure +++ b/win/configure @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for tk 8.7. +# Generated by GNU Autoconf 2.71 for tk 9.1. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ MAKEFLAGS= # Identity of this package. PACKAGE_NAME='tk' PACKAGE_TARNAME='tk' -PACKAGE_VERSION='8.7' -PACKAGE_STRING='tk 8.7' +PACKAGE_VERSION='9.1' +PACKAGE_STRING='tk 9.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1365,7 +1365,7 @@ if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures tk 8.7 to adapt to many kinds of systems. +\`configure' configures tk 9.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1427,7 +1427,7 @@ fi if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of tk 8.7:";; + short | recursive ) echo "Configuration of tk 9.1:";; esac cat <<\_ACEOF @@ -1525,7 +1525,7 @@ fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -tk configure 8.7 +tk configure 9.1 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1729,7 +1729,7 @@ cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by tk $as_me 8.7, which was +It was created by tk $as_me 9.1, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2394,10 +2394,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu # /bin/sh. The bash shell seems to suffer from some strange failures. SHELL=/bin/sh -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.1 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=1 +TK_PATCH_LEVEL="a0" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ @@ -6551,7 +6551,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by tk $as_me 8.7, which was +This file was extended by tk $as_me 9.1, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -6606,7 +6606,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -tk config.status 8.7 +tk config.status 9.1 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff --git a/win/configure.ac b/win/configure.ac index ae5a1e3..e1db677 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -3,7 +3,7 @@ # generate the file "configure", which is run during Tk installation # to configure the system for the local environment. -AC_INIT([tk],[8.7]) +AC_INIT([tk],[9.1]) AC_CONFIG_SRCDIR([../generic/tk.h]) AC_PREREQ([2.69]) @@ -12,10 +12,10 @@ AC_PREREQ([2.69]) # /bin/sh. The bash shell seems to suffer from some strange failures. SHELL=/bin/sh -TK_VERSION=8.7 -TK_MAJOR_VERSION=8 -TK_MINOR_VERSION=7 -TK_PATCH_LEVEL="a6" +TK_VERSION=9.1 +TK_MAJOR_VERSION=9 +TK_MINOR_VERSION=1 +TK_PATCH_LEVEL="a0" VER=$TK_MAJOR_VERSION$TK_MINOR_VERSION #------------------------------------------------------------------------ diff --git a/win/tcl.m4 b/win/tcl.m4 index 8774b94..fa9d4a9 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -1009,13 +1009,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ #------------------------------------------------------------------------ AC_DEFUN([SC_WITH_TCL], [ - if test -d ../../tcl8.7$1/win; then - TCL_BIN_DEFAULT=../../tcl8.7$1/win + if test -d ../../tcl9.0$1/win; then + TCL_BIN_DEFAULT=../../tcl9.0$1/win else - TCL_BIN_DEFAULT=../../tcl8.7/win + TCL_BIN_DEFAULT=../../tcl9.0/win fi - AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 8.7 binaries from DIR], + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 9.0 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) if test ! -d $TCL_BIN_DIR; then AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) -- cgit v0.12 From 540245dba27aa20c996d7c5b8288cb0da2c9df65 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Nov 2022 22:21:17 +0000 Subject: Build with either Tcl 8.7 or 9.0 --- .github/workflows/linux-build.yml | 174 ++++++++++++++++++++++++++++ .github/workflows/linux-with-tcl9-build.yml | 174 ---------------------------- .github/workflows/mac-build.yml | 4 +- .github/workflows/win-build.yml | 4 +- 4 files changed, 178 insertions(+), 178 deletions(-) create mode 100644 .github/workflows/linux-build.yml delete mode 100644 .github/workflows/linux-with-tcl9-build.yml diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml new file mode 100644 index 0000000..23eda24 --- /dev/null +++ b/.github/workflows/linux-build.yml @@ -0,0 +1,174 @@ +name: Linux +on: [push] +permissions: + contents: read +defaults: + run: + shell: bash + working-directory: tk/unix +env: + ERROR_ON_FAILURES: 1 +jobs: + build: + runs-on: ubuntu-22.04 + strategy: + matrix: + compiler: + - "gcc" + - "clang" + cfgopt: + - "" + - "CFLAGS=-DTK_NO_DEPRECATED=1" + - "--disable-shared" + - "--disable-xft" + - "--disable-xss" + - "--enable-symbols" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: tk + - name: Checkout Tcl + uses: actions/checkout@v3 + with: + repository: tcltk/tcl + ref: main + path: tcl + - name: Setup Environment (compiler=${{ matrix.compiler }}) + run: | + sudo apt-get install libxss-dev + mkdir "$HOME/install dir" + touch tk/doc/man.macros tk/generic/tkStubInit.c + echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV + echo "CC=$COMPILER" >> $GITHUB_ENV + echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV + echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV + working-directory: "." + env: + CFGOPT: ${{ matrix.cfgopt }} + COMPILER: ${{ matrix.compiler }} + OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }} + - name: Configure and Build Tcl + run: | + ./configure ${CFGOPT} "--prefix=$HOME/install dir" || { + cat config.log + echo "::warning::Failure during Tcl Configure" + exit 1 + } + make all install || { + echo "::warning::Failure during Tcl Build" + exit 1 + } + echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV + working-directory: tcl/unix + - name: Configure (opts=${{ matrix.cfgopt }}) + run: | + ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } + - name: Build + run: | + make binaries libraries || { + echo "::error::Failure during Build" + exit 1 + } + - name: Build Test Harness + run: | + make tktest || { + echo "::error::Failure during Build" + exit 1 + } + - name: Test-Drive Installation + run: | + make install || { + echo "::error::Failure during Install" + exit 1 + } + - name: Create Distribution Package + run: | + make dist || { + echo "::error::Failure during Distribute" + exit 1 + } + - name: Convert Documentation to HTML + run: | + make html-tk TOOL_DIR=$TOOL_DIR || { + echo "::error::Failure during Distribute" + exit 1 + } + - name: Discover Version ID + if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} + run: | + cd /tmp/dist + echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV + test: + runs-on: ubuntu-20.04 + strategy: + matrix: + compiler: + - "gcc" + cfgopt: + - "" + - "--enable-symbols" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: tk + - name: Checkout Tcl + uses: actions/checkout@v3 + with: + repository: tcltk/tcl + ref: main + path: tcl + - name: Setup Environment (compiler=${{ matrix.compiler }}) + run: | + sudo apt-get install libxss-dev xvfb libicu-dev + mkdir "$HOME/install dir" + touch tk/doc/man.macros tk/generic/tkStubInit.c + echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV + echo "CC=$COMPILER" >> $GITHUB_ENV + working-directory: "." + env: + CFGOPT: ${{ matrix.cfgopt }} + COMPILER: ${{ matrix.compiler }} + - name: Configure and Build Tcl + run: | + ./configure ${CFGOPT} "--prefix=$HOME/install dir" || { + cat config.log + echo "::warning::Failure during Tcl Configure" + exit 1 + } + make all install || { + echo "::warning::Failure during Tcl Build" + exit 1 + } + echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV + working-directory: tcl/unix + - name: Configure ${{ matrix.cfgopt }} + run: | + ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } + - name: Build + run: | + make binaries libraries tktest || { + echo "::error::Failure during Build" + exit 1 + } + - name: Run Tests + run: | + xvfb-run --auto-servernum make test-classic | tee out-classic.txt + xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt + grep -q "Failed 0" out-classic.txt || { + echo "::error::Failure during Test" + exit 1 + } + grep -q "Failed 0" out-ttk.txt || { + echo "::error::Failure during Test" + exit 1 + } diff --git a/.github/workflows/linux-with-tcl9-build.yml b/.github/workflows/linux-with-tcl9-build.yml deleted file mode 100644 index 3f34da5..0000000 --- a/.github/workflows/linux-with-tcl9-build.yml +++ /dev/null @@ -1,174 +0,0 @@ -name: Linux (with Tcl 9.0) -on: [push] -permissions: - contents: read -defaults: - run: - shell: bash - working-directory: tk/unix -env: - ERROR_ON_FAILURES: 1 -jobs: - build: - runs-on: ubuntu-22.04 - strategy: - matrix: - compiler: - - "gcc" - - "clang" - cfgopt: - - "" - - "CFLAGS=-DTK_NO_DEPRECATED=1" - - "--disable-shared" - - "--disable-xft" - - "--disable-xss" - - "--enable-symbols" - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: tk - - name: Checkout Tcl - uses: actions/checkout@v3 - with: - repository: tcltk/tcl - ref: main - path: tcl - - name: Setup Environment (compiler=${{ matrix.compiler }}) - run: | - sudo apt-get install libxss-dev - mkdir "$HOME/install dir" - touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV - echo "CC=$COMPILER" >> $GITHUB_ENV - echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV - echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV - working-directory: "." - env: - CFGOPT: ${{ matrix.cfgopt }} - COMPILER: ${{ matrix.compiler }} - OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }} - - name: Configure and Build Tcl - run: | - ./configure ${CFGOPT} "--prefix=$HOME/install dir" || { - cat config.log - echo "::warning::Failure during Tcl Configure" - exit 1 - } - make all install || { - echo "::warning::Failure during Tcl Build" - exit 1 - } - echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV - working-directory: tcl/unix - - name: Configure (opts=${{ matrix.cfgopt }}) - run: | - ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || { - cat config.log - echo "::error::Failure during Configure" - exit 1 - } - - name: Build - run: | - make binaries libraries || { - echo "::error::Failure during Build" - exit 1 - } - - name: Build Test Harness - run: | - make tktest || { - echo "::error::Failure during Build" - exit 1 - } - - name: Test-Drive Installation - run: | - make install || { - echo "::error::Failure during Install" - exit 1 - } - - name: Create Distribution Package - run: | - make dist || { - echo "::error::Failure during Distribute" - exit 1 - } - - name: Convert Documentation to HTML - run: | - make html-tk TOOL_DIR=$TOOL_DIR || { - echo "::error::Failure during Distribute" - exit 1 - } - - name: Discover Version ID - if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} - run: | - cd /tmp/dist - echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV - test: - runs-on: ubuntu-20.04 - strategy: - matrix: - compiler: - - "gcc" - cfgopt: - - "" - - "--enable-symbols" - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - path: tk - - name: Checkout Tcl - uses: actions/checkout@v3 - with: - repository: tcltk/tcl - ref: main - path: tcl - - name: Setup Environment (compiler=${{ matrix.compiler }}) - run: | - sudo apt-get install libxss-dev xvfb libicu-dev - mkdir "$HOME/install dir" - touch tk/doc/man.macros tk/generic/tkStubInit.c - echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV - echo "CC=$COMPILER" >> $GITHUB_ENV - working-directory: "." - env: - CFGOPT: ${{ matrix.cfgopt }} - COMPILER: ${{ matrix.compiler }} - - name: Configure and Build Tcl - run: | - ./configure ${CFGOPT} "--prefix=$HOME/install dir" || { - cat config.log - echo "::warning::Failure during Tcl Configure" - exit 1 - } - make all install || { - echo "::warning::Failure during Tcl Build" - exit 1 - } - echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV - working-directory: tcl/unix - - name: Configure ${{ matrix.cfgopt }} - run: | - ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || { - cat config.log - echo "::error::Failure during Configure" - exit 1 - } - - name: Build - run: | - make binaries libraries tktest || { - echo "::error::Failure during Build" - exit 1 - } - - name: Run Tests - run: | - xvfb-run --auto-servernum make test-classic | tee out-classic.txt - xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt - grep -q "Failed 0" out-classic.txt || { - echo "::error::Failure during Test" - exit 1 - } - grep -q "Failed 0" out-ttk.txt || { - echo "::error::Failure during Test" - exit 1 - } diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index c1f0d60..ed8ba16 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -20,7 +20,7 @@ jobs: uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: core-8-6-branch + ref: main path: tcl - name: Prepare checked out repositories run: | @@ -71,7 +71,7 @@ jobs: uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: core-8-6-branch + ref: main path: tcl - name: Prepare checked out repositories env: diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 6d56b8c..2cf86f7 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: core-8-branch + ref: main path: tcl - name: Init MSVC uses: ilammy/msvc-dev-cmd@v1 @@ -114,7 +114,7 @@ jobs: uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: core-8-6-branch + ref: main path: tcl - name: Prepare run: | -- cgit v0.12 From c850de328148642da972b2a53f232df75dcbbfe1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Thu, 3 Nov 2022 23:04:27 +0000 Subject: two more 8.6 -> 8.7 --- unix/Makefile.in | 2 +- win/Makefile.in | 2 +- win/makefile.vc | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/unix/Makefile.in b/unix/Makefile.in index ce61732..c0fac18 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -795,7 +795,7 @@ install-binaries: $(TK_STUB_LIB_FILE) $(TK_LIB_FILE) ${WISH_EXE} echo "Creating package index $(PKG_INDEX)"; \ rm -f "$(PKG_INDEX)"; \ (\ - echo "if {![package vsatisfies [package provide Tcl] 8.6-]} return";\ + echo "if {![package vsatisfies [package provide Tcl] 8.7-]} return";\ relative=`echo | awk '{ORS=" "; split("$(TK_PKG_DIR)",a,"/"); for (f in a) {print ".."}}'`;\ if test "x$(DLL_INSTALL_DIR)" != "x$(BIN_INSTALL_DIR)"; then \ echo "if {[package vsatisfies [package provide Tcl] 9.0]} {";\ diff --git a/win/Makefile.in b/win/Makefile.in index 0550811..2d3c3ea 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -534,7 +534,7 @@ install-binaries: binaries @echo "Creating package index $(PKG_INDEX)"; @$(RM) $(PKG_INDEX); @(\ - echo "if {![package vsatisfies [package provide Tcl] 8.6-]} return";\ + echo "if {![package vsatisfies [package provide Tcl] 8.7-]} return";\ echo "if {(\$$::tcl_platform(platform) eq \"unix\") && ([info exists ::env(DISPLAY)]";\ echo " || ([info exists ::argv] && (\"-display\" in \$$::argv)))} {";\ echo " if {[package vsatisfies [package provide Tcl] 9.0]} {";\ diff --git a/win/makefile.vc b/win/makefile.vc index 25e3a38..0fecad6 100644 --- a/win/makefile.vc +++ b/win/makefile.vc @@ -756,7 +756,7 @@ install-binaries: !if !$(STATIC_BUILD) @echo creating package index @type << > $(OUT_DIR)\pkgIndex.tcl -if {![package vsatisfies [package provide Tcl] 8.6-]} return +if {![package vsatisfies [package provide Tcl] 8.7-]} return if {($$::tcl_platform(platform) eq "unix") && ([info exists ::env(DISPLAY)] || ([info exists ::argv] && ("-display" in $$::argv)))} { if {[package vsatisfies [package provide Tcl] 9.0]} { -- cgit v0.12 From 184a6c52517c826425e6ef06aaa06e3dc1cee92f Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 Nov 2022 12:41:58 +0000 Subject: wish8.7 -> wish9.1 --- .github/workflows/onefiledist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 245c583..5edb14c 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -51,7 +51,7 @@ jobs: # TODO: need the Tk version separately for distro naming below - name: Package run: | - cp bin/wish8.7 ${BUILD_NAME} + cp bin/wish9.1 ${BUILD_NAME} chmod +x ${BUILD_NAME} tar -cf ${BUILD_NAME}.tar ${BUILD_NAME} working-directory: ${{ env.INST_DIR }} -- cgit v0.12 From ad53ca0af06e1300fb06d68be098a961a06eb05a Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 Nov 2022 16:28:54 +0000 Subject: alwaysRedraw -> flags --- doc/CrtItemType.3 | 8 ++++---- generic/tk.h | 10 ++++------ generic/tkCanvWind.c | 2 +- generic/tkCanvas.c | 4 ++-- 4 files changed, 11 insertions(+), 13 deletions(-) diff --git a/doc/CrtItemType.3 b/doc/CrtItemType.3 index c46ad2d..af0eaee 100644 --- a/doc/CrtItemType.3 +++ b/doc/CrtItemType.3 @@ -71,7 +71,7 @@ typedef struct Tk_ItemType { Tk_ItemCoordProc *\fIcoordProc\fR; Tk_ItemDeleteProc *\fIdeleteProc\fR; Tk_ItemDisplayProc *\fIdisplayProc\fR; - int \fIalwaysRedraw\fR; + int \fIflags\fR; Tk_ItemPointProc *\fIpointProc\fR; Tk_ItemAreaProc *\fIareaProc\fR; Tk_ItemPostscriptProc *\fIpostscriptProc\fR; @@ -169,7 +169,7 @@ If there already existed an item type by this name then the new item type replaces the old one. .SS "FLAGS (IN ALWAYSREDRAW)" .PP -The \fItypePtr\->alwaysRedraw\fR field (so named for historic reasons) +The \fItypePtr\->flags\fR field contains a collection of flag bits that modify how the canvas core interacts with the item. The following bits are defined: .TP @@ -384,9 +384,9 @@ of \fIdst\fR. .PP Normally an item's \fIdisplayProc\fR is only invoked if the item overlaps the area being displayed. -However, if bit zero of \fItypePtr\->alwaysRedraw\fR is 1, +However, if bit zero of \fItypePtr\->flags\fR is 1, (i.e.\| -.QW "\fItypePtr\->alwaysRedraw & 1 == 1\fR" ) +.QW "\fItypePtr\->flags & 1 == 1\fR" ) then \fIdisplayProc\fR is invoked during every redisplay operation, even if the item does not overlap the area of redisplay; this is useful for cases such as window items, where the subwindow needs to be unmapped when it diff --git a/generic/tk.h b/generic/tk.h index e1b76b2..167ed56 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1089,9 +1089,7 @@ typedef struct Tk_ItemType { * type. */ Tk_ItemDisplayProc *displayProc; /* Procedure to display items of this type. */ - int alwaysRedraw; /* Non-zero means displayProc should be called - * even when the item has been moved - * off-screen. */ + int flags; /* Combination of TK_ALWAYS_REDRAW/TK_MOVABLE_POINTS */ Tk_ItemPointProc *pointProc;/* Computes distance from item to a given * point. */ Tk_ItemAreaProc *areaProc; /* Computes whether item is inside, outside, @@ -1128,11 +1126,11 @@ typedef struct Tk_ItemType { } Tk_ItemType; /* - * Flag (used in the alwaysRedraw field) to say whether an item supports - * point-level manipulation like the line and polygon items. + * Possible flags for 'flags' field. */ -#define TK_MOVABLE_POINTS 2 +#define TK_ALWAYS_REDRAW 1 /* item should be redrawn always*/ +#define TK_MOVABLE_POINTS 2 /* item supports point-level manipulation */ #endif /* __NO_OLD_CONFIG */ diff --git a/generic/tkCanvWind.c b/generic/tkCanvWind.c index 4691e63..2472c3f 100644 --- a/generic/tkCanvWind.c +++ b/generic/tkCanvWind.c @@ -120,7 +120,7 @@ Tk_ItemType tkWindowType = { WinItemCoords, /* coordProc */ DeleteWinItem, /* deleteProc */ DisplayWinItem, /* displayProc */ - 1, /* flags */ + TK_ALWAYS_REDRAW, /* flags */ WinItemToPoint, /* pointProc */ WinItemToArea, /* areaProc */ WinItemToPostscript, /* postscriptProc */ diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 82ab17e..705df64 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -323,7 +323,7 @@ static inline int AlwaysRedraw( Tk_Item *itemPtr) { - return itemPtr->typePtr->alwaysRedraw & 1; + return itemPtr->typePtr->flags & TK_ALWAYS_REDRAW; } static inline int @@ -1164,7 +1164,7 @@ CanvasWidgetCmd( */ if (itemPtr == NULL || - !(itemPtr->typePtr->alwaysRedraw & TK_MOVABLE_POINTS)) { + !(itemPtr->typePtr->flags & TK_MOVABLE_POINTS)) { continue; } -- cgit v0.12 From cb5e842402977341d53bd2ba71fdc70d9f118991 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 4 Nov 2022 22:58:55 +0000 Subject: TkGetStringsFromObjs() is no longer needed --- generic/tkCanvas.c | 45 --------------------------------------------- 1 file changed, 45 deletions(-) diff --git a/generic/tkCanvas.c b/generic/tkCanvas.c index 705df64..209f01a 100644 --- a/generic/tkCanvas.c +++ b/generic/tkCanvas.c @@ -257,7 +257,6 @@ static int FindItems(Tcl_Interp *interp, TkCanvas *canvasPtr, static int FindArea(Tcl_Interp *interp, TkCanvas *canvasPtr, Tcl_Obj *const *objv, Tk_Uid uid, int enclosed); static double GridAlign(double coord, double spacing); -static const char** TkGetStringsFromObjs(int objc, Tcl_Obj *const *objv); static void InitCanvas(void); static void PickCurrentItem(TkCanvas *canvasPtr, XEvent *eventPtr); static Tcl_Obj * ScrollFractions(int screen1, @@ -2032,7 +2031,6 @@ CanvasWidgetCmd( int newX = 0; /* Initialization needed only to prevent gcc * warnings. */ double fraction; - const char **args; if (objc == 2) { Tcl_SetObjResult(interp, ScrollFractions( @@ -2043,11 +2041,7 @@ CanvasWidgetCmd( break; } - args = TkGetStringsFromObjs(objc, objv); type = Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count); - if (args != NULL) { - ckfree(args); - } switch (type) { case TK_SCROLL_MOVETO: newX = canvasPtr->scrollX1 - canvasPtr->inset @@ -2078,7 +2072,6 @@ CanvasWidgetCmd( int newY = 0; /* Initialization needed only to prevent gcc * warnings. */ double fraction; - const char **args; if (objc == 2) { Tcl_SetObjResult(interp, ScrollFractions( @@ -2089,11 +2082,7 @@ CanvasWidgetCmd( break; } - args = TkGetStringsFromObjs(objc, objv); type = Tk_GetScrollInfoObj(interp, objc, objv, &fraction, &count); - if (args != NULL) { - ckfree(args); - } switch (type) { case TK_SCROLL_MOVETO: newY = canvasPtr->scrollY1 - canvasPtr->inset + (int) ( @@ -6029,41 +6018,7 @@ CanvasSetOrigin( canvasPtr->xOrigin + Tk_Width(canvasPtr->tkwin), canvasPtr->yOrigin + Tk_Height(canvasPtr->tkwin)); } - -/* - *---------------------------------------------------------------------- - * - * TkGetStringsFromObjs -- - * - * Results: - * Converts object list into string list. - * - * Side effects: - * Memory is allocated for the objv array, which must be freed using - * ckfree() when no longer needed. - * - *---------------------------------------------------------------------- - */ - -static const char ** -TkGetStringsFromObjs( - int objc, - Tcl_Obj *const objv[]) -{ - int i; - const char **argv; - if (objc <= 0) { - return NULL; - } - argv = (const char **)ckalloc((objc+1) * sizeof(char *)); - for (i = 0; i < objc; i++) { - argv[i] = Tcl_GetString(objv[i]); - } - argv[objc] = 0; - return argv; -} - /* *-------------------------------------------------------------- * -- cgit v0.12 From 587a2e20fc944a74d01a7cc236d6968e241dea85 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Nov 2022 07:45:07 +0000 Subject: Souce/Documentation distrubion with Tcl 9.0, not 8.7 --- .github/workflows/linux-build.yml | 14 ++++++++++++++ .github/workflows/linux-with-tcl8-build.yml | 14 -------------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 23eda24..c97d9bb 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -103,6 +103,20 @@ jobs: run: | cd /tmp/dist echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV + - name: Upload Source Distribution + if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} + uses: actions/upload-artifact@v2 + with: + name: Tk ${{ env.VERSION }} Source distribution (snapshot) + path: | + /tmp/dist/tk* + !/tmp/dist/tk*/html/** + - name: Upload Documentation Distribution + if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} + uses: actions/upload-artifact@v2 + with: + name: Tk ${{ env.VERSION }} HTML documentation (snapshot) + path: /tmp/dist/tk*/html test: runs-on: ubuntu-20.04 strategy: diff --git a/.github/workflows/linux-with-tcl8-build.yml b/.github/workflows/linux-with-tcl8-build.yml index ff66bc1..272db22 100644 --- a/.github/workflows/linux-with-tcl8-build.yml +++ b/.github/workflows/linux-with-tcl8-build.yml @@ -103,20 +103,6 @@ jobs: run: | cd /tmp/dist echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV - - name: Upload Source Distribution - if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} - uses: actions/upload-artifact@v2 - with: - name: Tk ${{ env.VERSION }} Source distribution (snapshot) - path: | - /tmp/dist/tk* - !/tmp/dist/tk*/html/** - - name: Upload Documentation Distribution - if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} - uses: actions/upload-artifact@v2 - with: - name: Tk ${{ env.VERSION }} HTML documentation (snapshot) - path: /tmp/dist/tk*/html test: runs-on: ubuntu-20.04 strategy: -- cgit v0.12 From 0aac7b40202f295da02ee3a63a0d8637b1aef34c Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Nov 2022 13:24:42 +0000 Subject: Tk_ConfigureWidget() signature compatibility with 8.7. More version fixes --- generic/tk.h | 18 ++++++++---------- generic/tkDecls.h | 10 ++++++++++ library/demos/widget | 2 +- unix/Makefile.in | 2 +- unix/configure | 10 +++------- unix/configure.ac | 4 ---- unix/tcl.m4 | 6 +++--- win/configure | 11 +++-------- win/configure.ac | 11 +++-------- win/tcl.m4 | 8 ++++---- 10 files changed, 36 insertions(+), 46 deletions(-) diff --git a/generic/tk.h b/generic/tk.h index 167ed56..5af8d6a 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -68,12 +68,14 @@ extern "C" { #ifndef TK_MAJOR_VERSION # define TK_MAJOR_VERSION 9 #endif -#define TK_MINOR_VERSION 1 -#define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE -#define TK_RELEASE_SERIAL 0 - -#define TK_VERSION "9.1" -#define TK_PATCH_LEVEL "9.1a0" +#if TK_MAJOR_VERSION == 9 +# define TK_MINOR_VERSION 1 +# define TK_RELEASE_LEVEL TCL_ALPHA_RELEASE +# define TK_RELEASE_SERIAL 0 + +# define TK_VERSION "9.1" +# define TK_PATCH_LEVEL "9.1a0" +#endif /* TK_MAJOR_VERSION */ /* * A special definition used to allow this header file to be included from @@ -143,10 +145,6 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement; */ typedef const char *Tk_Uid; - -#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION == 6) -# define Tcl_Size int -#endif /* *---------------------------------------------------------------------- diff --git a/generic/tkDecls.h b/generic/tkDecls.h index f3c6fb2..21d1a54 100644 --- a/generic/tkDecls.h +++ b/generic/tkDecls.h @@ -1862,6 +1862,16 @@ extern const TkStubs *tkStubsPtr; #undef Tk_CreateOldPhotoImageFormat #endif /* TK_NO_DEPRECATED */ +#if TK_MAJOR_VERSION < 9 +/* Restore 8.x signature of Tk_ConfigureWidget, but panic if TK_CONFIG_OBJS flag is not set */ +#undef Tk_ConfigureWidget +#define Tk_ConfigureWidget(interp, tkwin, specs, argc, argv, widgRec, flags) \ + ((int (*)(Tcl_Interp *, Tk_Window, const Tk_ConfigSpec *, \ + int, const char **, char *, int))(void *)(tkStubsPtr->tk_ConfigureWidget)) \ + (((flags & TK_CONFIG_OBJS) ? interp : (Tcl_Panic("Flag TK_CONFIG_OBJS is mandatory in Tk_ConfigureWidget"), \ + NULL)), tkwin, specs, argc, argv, widgRec, flags) +#endif + #undef TCL_STORAGE_CLASS #define TCL_STORAGE_CLASS DLLIMPORT diff --git a/library/demos/widget b/library/demos/widget index 055dd60..35173da 100644 --- a/library/demos/widget +++ b/library/demos/widget @@ -10,7 +10,7 @@ exec wish "$0" ${1+"$@"} # separate ".tcl" files is this directory, which are sourced by this script as # needed. -package require Tk 8.5 +package require Tk 8.6- package require msgcat eval destroy [winfo child .] diff --git a/unix/Makefile.in b/unix/Makefile.in index c0fac18..8fd4af5 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -112,7 +112,7 @@ TCL_PLATFORM_DIR = $(TCLDIR)/unix # for this version of Tk: TCL_BIN_DIR = @TCL_BIN_DIR@ -# The linker flags needed to link in the Tcl library (ex: -ltcl9.0) +# The linker flags needed to link in the Tcl library (ex: -ltcl9.1) TCL_LIB_FLAG = @TCL_LIB_FLAG@ # Flag, 1: we're building a shared lib, 0 we're not diff --git a/unix/configure b/unix/configure index c96139d..eddb5d5 100755 --- a/unix/configure +++ b/unix/configure @@ -2678,11 +2678,11 @@ printf "%s\n" "$as_me: WARNING: --with-tcl argument should refer to directory co `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tcl9.0 2>/dev/null` \ + `ls -d /usr/lib/tcl9.1 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \ + `ls -d /usr/local/lib/tcl9.1 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tcl9.1 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" @@ -2780,10 +2780,6 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" -ne 8 ; then - as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ -Found config for Tcl ${TCL_VERSION}" "$LINENO" 5 -fi if test "${TCL_MINOR_VERSION}" -lt 7 ; then as_fn_error $? "${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}" "$LINENO" 5 diff --git a/unix/configure.ac b/unix/configure.ac index d7439bc..7f433f5 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -38,10 +38,6 @@ SC_PATH_TCLCONFIG SC_LOAD_TCLCONFIG if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" -ne 8 ; then - AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ -Found config for Tcl ${TCL_VERSION}]) -fi if test "${TCL_MINOR_VERSION}" -lt 7 ; then AC_MSG_ERROR([${PACKAGE_NAME} ${PACKAGE_VERSION} requires Tcl 8.7+ Found config for Tcl ${TCL_VERSION}]) diff --git a/unix/tcl.m4 b/unix/tcl.m4 index b3ebda0..72ae94d 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -93,11 +93,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [ `ls -d /usr/local/lib 2>/dev/null` \ `ls -d /usr/contrib/lib 2>/dev/null` \ `ls -d /usr/pkg/lib 2>/dev/null` \ - `ls -d /usr/lib/tcl9.0 2>/dev/null` \ + `ls -d /usr/lib/tcl9.1 2>/dev/null` \ `ls -d /usr/lib 2>/dev/null` \ `ls -d /usr/lib64 2>/dev/null` \ - `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \ - `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \ + `ls -d /usr/local/lib/tcl9.1 2>/dev/null` \ + `ls -d /usr/local/lib/tcl/tcl9.1 2>/dev/null` \ ; do if test -f "$i/tclConfig.sh" ; then ac_cv_c_tclconfig="`(cd $i; pwd)`" diff --git a/win/configure b/win/configure index 5411b1f..5f81c3f 100755 --- a/win/configure +++ b/win/configure @@ -4038,15 +4038,10 @@ printf "%s\n" "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then +if test "${TCL_MINOR_VERSION}" -lt 7; then as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5 -fi -if test "${TCL_MINOR_VERSION}" -lt 6; then - as_fn_error $? "${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better." "$LINENO" 5 +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.7+. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.7 or better." "$LINENO" 5 fi fi diff --git a/win/configure.ac b/win/configure.ac index e1db677..17c5c0a 100644 --- a/win/configure.ac +++ b/win/configure.ac @@ -77,15 +77,10 @@ SC_PATH_TCLCONFIG($TK_PATCH_LEVEL) SC_LOAD_TCLCONFIG if test "${TCL_MAJOR_VERSION}" -lt 9 ; then -if test "${TCL_MAJOR_VERSION}" != "${TK_MAJOR_VERSION}"; then +if test "${TCL_MINOR_VERSION}" -lt 7; then AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.]) -fi -if test "${TCL_MINOR_VERSION}" -lt 6; then - AC_MSG_ERROR([${TCL_BIN_DIR}/tclConfig.sh is for Tcl ${TCL_VERSION}. -Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.6+. -Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.6 or better.]) +Tk ${TK_VERSION}${TK_PATCH_LEVEL} needs Tcl 8.7+. +Use --with-tcl= option to indicate location of tclConfig.sh file for Tcl 8.7 or better.]) fi fi diff --git a/win/tcl.m4 b/win/tcl.m4 index fa9d4a9..9241ade 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -1009,13 +1009,13 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ #------------------------------------------------------------------------ AC_DEFUN([SC_WITH_TCL], [ - if test -d ../../tcl9.0$1/win; then - TCL_BIN_DEFAULT=../../tcl9.0$1/win + if test -d ../../tcl9.1$1/win; then + TCL_BIN_DEFAULT=../../tcl9.1$1/win else - TCL_BIN_DEFAULT=../../tcl9.0/win + TCL_BIN_DEFAULT=../../tcl9.1/win fi - AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 9.0 binaries from DIR], + AC_ARG_WITH(tcl, [ --with-tcl=DIR use Tcl 9.1 binaries from DIR], TCL_BIN_DIR=$withval, TCL_BIN_DIR=`cd $TCL_BIN_DEFAULT; pwd`) if test ! -d $TCL_BIN_DIR; then AC_MSG_ERROR(Tcl directory $TCL_BIN_DIR does not exist) -- cgit v0.12 From 0ac0d239102133abed26f5d57d690f0aaa6bd199 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Tue, 8 Nov 2022 17:26:17 +0000 Subject: No need for 'VERSION' here any more --- .github/workflows/linux-with-tcl8-build.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/linux-with-tcl8-build.yml b/.github/workflows/linux-with-tcl8-build.yml index 272db22..10e5c59 100644 --- a/.github/workflows/linux-with-tcl8-build.yml +++ b/.github/workflows/linux-with-tcl8-build.yml @@ -98,11 +98,6 @@ jobs: echo "::error::Failure during Distribute" exit 1 } - - name: Discover Version ID - if: ${{ env.BUILD_CONFIG_ID == 'gcc' }} - run: | - cd /tmp/dist - echo "VERSION=`ls -d tk* | sed 's/tk//'`" >> $GITHUB_ENV test: runs-on: ubuntu-20.04 strategy: -- cgit v0.12 From 50fd4ebd7f402307fdbcf7f1b431d502564c5dcb Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 2 Dec 2022 18:07:07 +0000 Subject: Fix linux-with-tcl9-build.yml name --- .github/workflows/linux-with-tcl9-build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/linux-with-tcl9-build.yml b/.github/workflows/linux-with-tcl9-build.yml index 74b8b4a..b8ec212 100644 --- a/.github/workflows/linux-with-tcl9-build.yml +++ b/.github/workflows/linux-with-tcl9-build.yml @@ -1,4 +1,4 @@ -name: Linux (with Tcl 8.7) +name: Linux (with Tcl 9.0) on: [push] permissions: contents: read -- cgit v0.12 From 8933faa013ff59b405eb5b4b2b62f44edb4115d6 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 2 Dec 2022 18:19:14 +0000 Subject: Build with Tcl 9.1 (with TIP #626) on more platforms --- .github/workflows/mac-build.yml | 8 ++++---- .github/workflows/onefiledist.yml | 12 ++++++------ .github/workflows/win-build.yml | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index ed8ba16..833411a 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -16,11 +16,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Check out Tcl + - name: Check out Tcl 9.1 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: main + ref: tip-626 path: tcl - name: Prepare checked out repositories run: | @@ -67,11 +67,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Check out Tcl + - name: Check out Tcl 9.1 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: main + ref: tip-626 path: tcl - name: Prepare checked out repositories env: diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 5edb14c..237c54d 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -17,11 +17,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Checkout Tcl 9.0 + - name: Checkout Tcl 9.1 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: main + ref: tip-626 path: tcl - name: Setup Environment run: | @@ -81,11 +81,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Checkout Tcl 9.0 + - name: Checkout Tcl 9.1 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: main + ref: tip-626 path: tcl - name: Checkout create-dmg uses: actions/checkout@v3 @@ -169,11 +169,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Checkout Tcl 9.0 + - name: Checkout Tcl 9.1 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: main + ref: tip-626 path: tcl - name: Setup Environment run: | diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 2cf86f7..57fd607 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -22,11 +22,11 @@ jobs: uses: actions/checkout@v3 with: path: tk - - name: Checkout Tcl + - name: Checkout Tcl 9.1 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: main + ref: tip-626 path: tcl - name: Init MSVC uses: ilammy/msvc-dev-cmd@v1 @@ -110,11 +110,11 @@ jobs: install: git mingw-w64-x86_64-toolchain make zip - name: Checkout Tk uses: actions/checkout@v3 - - name: Checkout Tcl + - name: Checkout Tcl 9.1 uses: actions/checkout@v3 with: repository: tcltk/tcl - ref: main + ref: tip-626 path: tcl - name: Prepare run: | -- cgit v0.12 From 13bad419574a433553f9a8a6d6ec49bbeaf552f7 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Sun, 11 Dec 2022 22:09:35 +0000 Subject: Build with Tcl 8.7 too --- .github/workflows/linux-with-tcl8-build.yml | 170 ++++++++++++++++++++++++++++ generic/tk.h | 2 +- 2 files changed, 171 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/linux-with-tcl8-build.yml diff --git a/.github/workflows/linux-with-tcl8-build.yml b/.github/workflows/linux-with-tcl8-build.yml new file mode 100644 index 0000000..6b04cbb --- /dev/null +++ b/.github/workflows/linux-with-tcl8-build.yml @@ -0,0 +1,170 @@ +name: Linux (with Tcl 8.7) +on: [push] +permissions: + contents: read +defaults: + run: + shell: bash + working-directory: tk/unix +env: + ERROR_ON_FAILURES: 1 +jobs: + build: + runs-on: ubuntu-22.04 + strategy: + matrix: + compiler: + - "gcc" + - "clang" + cfgopt: + - "" + - "CFLAGS=-DTK_NO_DEPRECATED=1" + - "--disable-shared" + - "--disable-xft" + - "--disable-xss" + - "--enable-symbols" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: tk + - name: Checkout Tcl + uses: actions/checkout@v3 + with: + repository: tcltk/tcl + ref: main + path: tcl + - name: Setup Environment (compiler=${{ matrix.compiler }}) + run: | + sudo apt-get install libxss-dev + mkdir "$HOME/install dir" + touch tk/doc/man.macros tk/generic/tkStubInit.c + echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV + echo "CC=$COMPILER" >> $GITHUB_ENV + echo "TOOL_DIR=$(cd tcl/tools;pwd)" >> $GITHUB_ENV + echo "BUILD_CONFIG_ID=$OPTS" >> $GITHUB_ENV + working-directory: "." + env: + CFGOPT: ${{ matrix.cfgopt }} + COMPILER: ${{ matrix.compiler }} + OPTS: ${{ matrix.compiler }}${{ matrix.cfgopt }} + - name: Configure and Build Tcl + run: | + ./configure $CFGOPT "--prefix=$HOME/install dir" || { + cat config.log + echo "::warning::Failure during Tcl Configure" + exit 1 + } + make all install || { + echo "::warning::Failure during Tcl Build" + exit 1 + } + echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV + working-directory: tcl/unix + - name: Configure (opts=${{ matrix.cfgopt }}) + run: | + ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } + - name: Build + run: | + make binaries libraries || { + echo "::error::Failure during Build" + exit 1 + } + - name: Build Test Harness + run: | + make tktest || { + echo "::error::Failure during Build" + exit 1 + } + - name: Test-Drive Installation + run: | + make install || { + echo "::error::Failure during Install" + exit 1 + } + - name: Create Distribution Package + run: | + make dist || { + echo "::error::Failure during Distribute" + exit 1 + } + - name: Convert Documentation to HTML + run: | + make html-tk TOOL_DIR=$TOOL_DIR || { + echo "::error::Failure during Distribute" + exit 1 + } + test: + runs-on: ubuntu-22.04 + strategy: + matrix: + compiler: + - "gcc" + cfgopt: + - "" + - "--disable-xft" + - "--enable-symbols" + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + path: tk + - name: Checkout Tcl + uses: actions/checkout@v3 + with: + repository: tcltk/tcl + ref: main + path: tcl + - name: Setup Environment (compiler=${{ matrix.compiler }}) + run: | + sudo apt-get install libxss-dev xvfb libicu-dev + mkdir "$HOME/install dir" + touch tk/doc/man.macros tk/generic/tkStubInit.c + echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV + echo "CC=$COMPILER" >> $GITHUB_ENV + working-directory: "." + env: + CFGOPT: ${{ matrix.cfgopt }} + COMPILER: ${{ matrix.compiler }} + - name: Configure and Build Tcl + run: | + ./configure $CFGOPT "--prefix=$HOME/install dir" || { + cat config.log + echo "::warning::Failure during Tcl Configure" + exit 1 + } + make all install || { + echo "::warning::Failure during Tcl Build" + exit 1 + } + echo "TCL_CONFIG_PATH=`pwd`" >> $GITHUB_ENV + working-directory: tcl/unix + - name: Configure ${{ matrix.cfgopt }} + run: | + ./configure $CFGOPT --with-tcl=$TCL_CONFIG_PATH "--prefix=$HOME/install dir" || { + cat config.log + echo "::error::Failure during Configure" + exit 1 + } + - name: Build + run: | + make binaries libraries tktest || { + echo "::error::Failure during Build" + exit 1 + } + - name: Run Tests + run: | + xvfb-run --auto-servernum make test-classic | tee out-classic.txt + xvfb-run --auto-servernum make test-ttk | tee out-ttk.txt + grep -q "Failed 0" out-classic.txt || { + echo "::error::Failure during Test" + exit 1 + } + grep -q "Failed 0" out-ttk.txt || { + echo "::error::Failure during Test" + exit 1 + } diff --git a/generic/tk.h b/generic/tk.h index 6cd0943..834848f 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -1371,7 +1371,7 @@ typedef int (Tk_ImageStringWriteProc) (Tcl_Interp *interp, Tcl_Obj *format, #endif /* USE_OLD_IMAGE */ /* - * The following alternate definitions are used with the Tk9.1 file format + * The following alternate definitions are used with the Tk8.7 file format * supporting a metadata dict, internal dstring and close file flag */ -- cgit v0.12 From 772f4eae7bc74750f8338fd75d2a29c4f08e14b1 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Mon, 12 Dec 2022 15:49:42 +0000 Subject: Fix building of Linux binary --- .github/workflows/onefiledist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index fa18770..8617dba 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -51,7 +51,7 @@ jobs: # TODO: need the Tk version separately for distro naming below - name: Package run: | - cp bin/wish8.7 ${BUILD_NAME} + cp bin/wish9.1 ${BUILD_NAME} chmod +x ${BUILD_NAME} tar -cf ${BUILD_NAME}.tar ${BUILD_NAME} working-directory: ${{ env.INST_DIR }} -- cgit v0.12 From 048db2dfe0fb2c570130d6224a1364652c88fa86 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 8 Nov 2023 12:08:32 +0000 Subject: Handle branches in CI builds --- .github/workflows/linux-build.yml | 1 + .github/workflows/linux-with-tcl9-build.yml | 1 + .github/workflows/mac-build.yml | 9 +++++---- .github/workflows/onefiledist.yml | 7 ++++--- .github/workflows/win-build.yml | 1 + 5 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 595c6e8..891aebe 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -3,6 +3,7 @@ on: push: branches: - "main" + - "core-8-branch" - "core-8-6-branch" tags: - "core-**" diff --git a/.github/workflows/linux-with-tcl9-build.yml b/.github/workflows/linux-with-tcl9-build.yml index 0fda00c..7e2d6a8 100644 --- a/.github/workflows/linux-with-tcl9-build.yml +++ b/.github/workflows/linux-with-tcl9-build.yml @@ -3,6 +3,7 @@ on: push: branches: - "main" + - "core-8-branch" - "core-8-6-branch" tags: - "core-**" diff --git a/.github/workflows/mac-build.yml b/.github/workflows/mac-build.yml index c8d6df1..0dc2bc7 100644 --- a/.github/workflows/mac-build.yml +++ b/.github/workflows/mac-build.yml @@ -3,6 +3,7 @@ on: push: branches: - "main" + - "core-8-branch" - "core-8-6-branch" tags: - "core-**" @@ -22,11 +23,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Check out Tcl 8.7 + - name: Check out Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: tip-626 + ref: main path: tcl - name: Prepare checked out repositories run: | @@ -74,11 +75,11 @@ jobs: uses: actions/checkout@v4 with: path: tk - - name: Check out Tcl 8.7 + - name: Check out Tcl 9.0 uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: tip-626 + ref: main path: tcl - name: Prepare checked out repositories env: diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 79f9e2f..6a1b3e9 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -3,6 +3,7 @@ on: push: branches: - "main" + - "core-8-branch" - "core-8-6-branch" tags: - "core-**" @@ -27,7 +28,7 @@ jobs: uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: tip-626 + ref: main path: tcl - name: Setup Environment run: | @@ -91,7 +92,7 @@ jobs: uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: tip-626 + ref: main path: tcl - name: Checkout create-dmg uses: actions/checkout@v4 @@ -179,7 +180,7 @@ jobs: uses: actions/checkout@v4 with: repository: tcltk/tcl - ref: tip-626 + ref: main path: tcl - name: Setup Environment run: | diff --git a/.github/workflows/win-build.yml b/.github/workflows/win-build.yml index 5a12c0f..851774f 100644 --- a/.github/workflows/win-build.yml +++ b/.github/workflows/win-build.yml @@ -3,6 +3,7 @@ on: push: branches: - "main" + - "core-8-branch" - "core-8-6-branch" tags: - "core-**" -- cgit v0.12 From b68dac494c3cbaae6426ecc3bf9d94404fd3a43b Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 8 Nov 2023 15:49:46 +0000 Subject: update github actions --- .github/workflows/linux-build.yml | 4 ++-- .github/workflows/linux-with-tcl9-build.yml | 4 ++-- .github/workflows/onefiledist.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml index 891aebe..7a39e2f 100644 --- a/.github/workflows/linux-build.yml +++ b/.github/workflows/linux-build.yml @@ -43,7 +43,7 @@ jobs: path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install libxss-dev + sudo apt-get install libxss-dev libxft-dev mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV @@ -147,7 +147,7 @@ jobs: path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install libxss-dev xvfb libicu-dev + sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV diff --git a/.github/workflows/linux-with-tcl9-build.yml b/.github/workflows/linux-with-tcl9-build.yml index 0e55a87..4672b54 100644 --- a/.github/workflows/linux-with-tcl9-build.yml +++ b/.github/workflows/linux-with-tcl9-build.yml @@ -43,7 +43,7 @@ jobs: path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install libxss-dev + sudo apt-get install libxss-dev libxft-dev mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV @@ -128,7 +128,7 @@ jobs: path: tcl - name: Setup Environment (compiler=${{ matrix.compiler }}) run: | - sudo apt-get install libxss-dev xvfb libicu-dev + sudo apt-get install libxss-dev libxft-dev xvfb libicu-dev mkdir "$HOME/install dir" touch tk/doc/man.macros tk/generic/tkStubInit.c echo "CFGOPT=$CFGOPT" >> $GITHUB_ENV diff --git a/.github/workflows/onefiledist.yml b/.github/workflows/onefiledist.yml index 6a1b3e9..37f4895 100644 --- a/.github/workflows/onefiledist.yml +++ b/.github/workflows/onefiledist.yml @@ -32,7 +32,7 @@ jobs: path: tcl - name: Setup Environment run: | - sudo apt-get install libxss-dev + sudo apt-get install libxss-dev libxft-dev touch tcl/generic/tclStubInit.c tcl/generic/tclOOStubInit.c touch tk/generic/tkStubInit.c echo "INST_DIR=$(cd install;pwd)" >> $GITHUB_ENV -- cgit v0.12