You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(33) |
Jun
|
Jul
(30) |
Aug
(2) |
Sep
|
Oct
(30) |
Nov
(136) |
Dec
(59) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(255) |
Feb
(169) |
Mar
(322) |
Apr
(185) |
May
(33) |
Jun
(89) |
Jul
(47) |
Aug
(59) |
Sep
(40) |
Oct
(31) |
Nov
(74) |
Dec
(84) |
2002 |
Jan
(163) |
Feb
(78) |
Mar
(23) |
Apr
(5) |
May
(22) |
Jun
(75) |
Jul
(143) |
Aug
(48) |
Sep
(111) |
Oct
(58) |
Nov
(124) |
Dec
(278) |
2003 |
Jan
(106) |
Feb
(276) |
Mar
(354) |
Apr
(97) |
May
(14) |
Jun
(3) |
Jul
(7) |
Aug
(21) |
Sep
(83) |
Oct
(110) |
Nov
(3) |
Dec
(119) |
2004 |
Jan
(318) |
Feb
(409) |
Mar
(68) |
Apr
(23) |
May
(105) |
Jun
(147) |
Jul
(69) |
Aug
(53) |
Sep
(23) |
Oct
(14) |
Nov
(15) |
Dec
(63) |
2005 |
Jan
(146) |
Feb
(69) |
Mar
(157) |
Apr
(127) |
May
(166) |
Jun
(8) |
Jul
(5) |
Aug
(3) |
Sep
(8) |
Oct
(17) |
Nov
(29) |
Dec
(34) |
2006 |
Jan
(3) |
Feb
(4) |
Mar
(1) |
Apr
(70) |
May
(241) |
Jun
(82) |
Jul
(344) |
Aug
(196) |
Sep
(87) |
Oct
(57) |
Nov
(121) |
Dec
(86) |
2007 |
Jan
(60) |
Feb
(67) |
Mar
(102) |
Apr
(28) |
May
(13) |
Jun
(29) |
Jul
(38) |
Aug
(56) |
Sep
(91) |
Oct
(89) |
Nov
(50) |
Dec
(68) |
2008 |
Jan
(87) |
Feb
(47) |
Mar
(100) |
Apr
(34) |
May
(65) |
Jun
(54) |
Jul
(98) |
Aug
(128) |
Sep
(109) |
Oct
(141) |
Nov
(40) |
Dec
(206) |
2009 |
Jan
(176) |
Feb
(226) |
Mar
(134) |
Apr
(84) |
May
(152) |
Jun
(85) |
Jul
(91) |
Aug
(153) |
Sep
(141) |
Oct
(59) |
Nov
(87) |
Dec
(75) |
2010 |
Jan
(58) |
Feb
(41) |
Mar
(51) |
Apr
(74) |
May
(81) |
Jun
(39) |
Jul
(30) |
Aug
(43) |
Sep
(76) |
Oct
(59) |
Nov
(62) |
Dec
(52) |
2011 |
Jan
(125) |
Feb
(41) |
Mar
(96) |
Apr
(53) |
May
(21) |
Jun
(23) |
Jul
(48) |
Aug
(71) |
Sep
(37) |
Oct
(81) |
Nov
(60) |
Dec
(32) |
2012 |
Jan
(51) |
Feb
(23) |
Mar
|
Apr
(8) |
May
(2) |
Jun
|
Jul
(8) |
Aug
(25) |
Sep
(4) |
Oct
(32) |
Nov
(17) |
Dec
(2) |
2013 |
Jan
(8) |
Feb
(2) |
Mar
(9) |
Apr
(9) |
May
(37) |
Jun
(48) |
Jul
(63) |
Aug
(42) |
Sep
(59) |
Oct
(83) |
Nov
(141) |
Dec
(133) |
2014 |
Jan
(57) |
Feb
(58) |
Mar
(58) |
Apr
(25) |
May
(14) |
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: <ai...@us...> - 2013-11-13 09:10:12
|
Revision: 12689 http://sourceforge.net/p/plplot/code/12689 Author: airwin Date: 2013-11-13 09:10:07 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Update documentation of PL_COLORBAR_ORIENT_* bits used to help form plcolorbar arguments. The docbook result validates, and the doxygen commentary in the source file compiles. The corresponding changes in swig_documentation.i were automatically generated from the DocBook api.xml file using the check_swig_documentation target. Modified Paths: -------------- trunk/bindings/swig-support/swig_documentation.i trunk/doc/docbook/src/api.xml trunk/src/pllegend.c Modified: trunk/bindings/swig-support/swig_documentation.i =================================================================== --- trunk/bindings/swig-support/swig_documentation.i 2013-11-13 06:30:19 UTC (rev 12688) +++ trunk/bindings/swig-support/swig_documentation.i 2013-11-13 09:10:07 UTC (rev 12689) @@ -702,10 +702,12 @@ opt (PLINT, input) : opt contains bits controlling the overall color bar. The orientation (direction of the maximum value) of the color bar is specified with PL_ORIENT_RIGHT, PL_ORIENT_TOP, - PL_ORIENT_LEFT, or PL_ORIENT_BOTTOM. If none of those bits are - specified, the default orientation is toward the top, i.e., a - vertical color bar. If the PL_COLORBAR_BACKGROUND bit is set, plot - a (semi-transparent) background for the color bar. If the + PL_ORIENT_LEFT, or PL_ORIENT_BOTTOM. If none of these bits are + specified, the default orientation is toward the top if the + colorbar is placed on the left or right of the viewport or toward + the right if the colorbar is placed on the top or bottom of the + viewport. If the PL_COLORBAR_BACKGROUND bit is set, plot a + (semi-transparent) background for the color bar. If the PL_COLORBAR_BOUNDING_BOX bit is set, plot a bounding box for the color bar. The type of color bar must be specified with one of PL_COLORBAR_IMAGE, PL_COLORBAR_SHADE, or PL_COLORBAR_GRADIENT. If Modified: trunk/doc/docbook/src/api.xml =================================================================== --- trunk/doc/docbook/src/api.xml 2013-11-13 06:30:19 UTC (rev 12688) +++ trunk/doc/docbook/src/api.xml 2013-11-13 09:10:07 UTC (rev 12689) @@ -1954,10 +1954,12 @@ the maximum value) of the color bar is specified with <literal>PL_ORIENT_RIGHT</literal>, <literal>PL_ORIENT_TOP</literal>, <literal>PL_ORIENT_LEFT</literal>, or - <literal>PL_ORIENT_BOTTOM</literal>. If none of those bits are - specified, the default orientation is toward the top, i.e., a vertical - color bar. If the <literal>PL_COLORBAR_BACKGROUND</literal> bit is - set, plot a (semi-transparent) background for the color bar. If the + <literal>PL_ORIENT_BOTTOM</literal>. If none of these bits are + specified, the default orientation is toward the top if the colorbar + is placed on the left or right of the viewport or toward the right if + the colorbar is placed on the top or bottom of the viewport. If the + <literal>PL_COLORBAR_BACKGROUND</literal> bit is set, plot a + (semi-transparent) background for the color bar. If the <literal>PL_COLORBAR_BOUNDING_BOX</literal> bit is set, plot a bounding box for the color bar. The type of color bar must be specified with one of <literal>PL_COLORBAR_IMAGE</literal>, Modified: trunk/src/pllegend.c =================================================================== --- trunk/src/pllegend.c 2013-11-13 06:30:19 UTC (rev 12688) +++ trunk/src/pllegend.c 2013-11-13 09:10:07 UTC (rev 12689) @@ -1400,8 +1400,10 @@ //! @param opt This variable contains bits which control the overall //! color bar. The orientation (direction of the maximum value) of //! the color bar is specified with PL_COLORBAR_ORIENT_(RIGHT, TOP, -//! LEFT, BOTTOM). If none of those bits are specified, the default -//! orientation is toward the top, i.e., a vertical color bar. If the +//! LEFT, BOTTOM). If none of these bits are specified, the default +//! orientation is toward the top if the colorbar is placed on the +//! left or right of the viewport or toward the right if the colorbar +//! is placed on the top or bottom of the viewport. If the //! PL_COLORBAR_BACKGROUND bit is set, plot a (semi-transparent) //! background for the color bar. If the PL_COLORBAR_BOUNDING_BOX bit //! is set, plot a bounding box for the color bar. The type of color This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 06:30:22
|
Revision: 12688 http://sourceforge.net/p/plplot/code/12688 Author: airwin Date: 2013-11-13 06:30:19 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Correct possible USE_TCL_STUBS and USE_TK_STUBS error which consist of calling Tcl_InitStubs, Tk_InitStubs, and (redundantly) Tcl_InitStubs (first thing done inside the call to PlbasicInit). That redundant call might be an issue. Anyhow, eliminate it by calling PlbasicInit (which includes no Tk calls), then Tk_InitStubs. This is the method used by bindings/tk/Pltk_Init.c. N.B. We have never tested the Tcl/Tk stubs system because the build system does not set USE_TCL_STUBS or USE_TK_STUBS and does not link to the stubs versions of the Tcl/Tk libraries. So the possible error above has never been tested and the fix also won't be tested unless and until we "stubify" our PLplot extensions to Tcl/Tk. Nevertheless, the Pltk_Init.c stubs initiation is obviously correct so it is good to use exactly the same method for Plplotter_Init.c. Modified Paths: -------------- trunk/bindings/tk-x-plat/Plplotter_Init.c Modified: trunk/bindings/tk-x-plat/Plplotter_Init.c =================================================================== --- trunk/bindings/tk-x-plat/Plplotter_Init.c 2013-11-13 01:15:42 UTC (rev 12687) +++ trunk/bindings/tk-x-plat/Plplotter_Init.c 2013-11-13 06:30:19 UTC (rev 12688) @@ -55,25 +55,23 @@ PLDLLIMPEXP_DRIVER EXTERN int Plplotter_Init( Tcl_Interp *interp ) { -#ifdef USE_TCL_STUBS - // - // We hard-wire 8.1 here, rather than TCL_VERSION, TK_VERSION because - // we really don't mind which version of Tcl, Tk we use as long as it - // is 8.1 or newer. Otherwise if we compiled against 8.2, we couldn't - // be loaded into 8.1 - // - Tcl_InitStubs( interp, "8.1", 0 ); -#endif -#ifdef USE_TK_STUBS - Tk_InitStubs( interp, "8.1", 0 ); -#endif // This must be before any other Tcl related calls if ( PlbasicInit( interp ) != TCL_OK ) { return TCL_ERROR; } +#ifdef USE_TK_STUBS // + // We hard-wire 8.1 here (as is done for the USE_TCL_STUBS case in + // PlbasisInit above) rather than TK_VERSION because we really don't + // mind which version of Tcl, Tk we use as long as it is 8.1 or + // newer. Otherwise if we compiled against 8.2, we couldn't be + // loaded into 8.1 + // + Tk_InitStubs( interp, "8.1", 0 ); +#endif + // // Note, the old technique of: // main = Tk_MainWindow(interp); // and then passing main to 'plframe' as the clientdata can This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-13 01:15:44
|
Revision: 12687 http://sourceforge.net/p/plplot/code/12687 Author: airwin Date: 2013-11-13 01:15:42 +0000 (Wed, 13 Nov 2013) Log Message: ----------- Finish propagating recent plplot.h ==> plplotcapi.i changes in numerical macros to symbolic PLplot constants for two non-swig languages. These changes were automatically generated by the check_f95_parameters and check_tcl_parameters targets and copied back to the source tree by hand after evaluation. Document the entire series of changes leading up to and including these ones in README.release. Tested by Alan W. Irwin <ai...@us...> on Linux using the check_f95_parameters and check_tcl_parameters targets (to check consistency) and the test_noninteractive target (to test that these changes and the prior extensive changes propagated from numerical macros #defined in include/plplot.h caused no issues). Modified Paths: -------------- trunk/README.release trunk/bindings/f95/plplot_parameters.h trunk/bindings/tcl/plplot_parameters.h Modified: trunk/README.release =================================================================== --- trunk/README.release 2013-11-12 23:55:03 UTC (rev 12686) +++ trunk/README.release 2013-11-13 01:15:42 UTC (rev 12687) @@ -105,8 +105,27 @@ 1. OFFICIAL NOTICES FOR USERS SINCE 5.9.10 (the previous development release) -None at this time. +((5.9.11) Backwards-incompatible API change. The numerical symbolic +constants that are #defined as macros in plplot.h have been +repropagated to the Python, Java, Lua, Octave, Fortran 95, and Tcl +language bindings using scripts. Previously, this propagation was +done by hand in a piece-meal manner so use of the scripts has created +a number of changes in the PLplot symbolic constants for these +languages. These changes are the addition of 25 symbolic constants +that were previously only available for C, no deletions of symbolic +constants, no changes to numerical values, but the following +backwards-incompatible name changes: +PLESC_PLFLTBUFFERING ==> PLESC_DOUBLEBUFFERING +PLESPLFLTBUFFERING_DISABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_ENABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_QUERY ==> PLESC_DOUBLEBUFFERING_QUERY + +So those users who were using the symbolic constants on the left for +the above languages will have to change their source code or scripts +to use the constants on the right. No changes in source code or +scripts should be required of other users. + 2. Tests made for release 5.9.11 None at this time. @@ -131,6 +150,27 @@ 4. OFFICIAL NOTICES FOR USERS SINCE 5.8.0 (the previous stable release) +(5.9.11) Backwards-incompatible API change. The numerical symbolic +constants that are #defined as macros in plplot.h have been +repropagated to the Python, Java, Lua, Octave, Fortran 95, and Tcl +language bindings using scripts. Previously, this propagation was +done by hand in a piece-meal manner so use of the scripts has created +a number of changes in the PLplot symbolic constants for these +languages. These changes are the addition of 25 symbolic constants +that were previously only available for C, no deletions of symbolic +constants, no changes to numerical values, but the following +backwards-incompatible name changes: + +PLESC_PLFLTBUFFERING ==> PLESC_DOUBLEBUFFERING +PLESPLFLTBUFFERING_DISABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_ENABLE ==> PLESC_DOUBLEBUFFERING_ENABLE +PLESPLFLTBUFFERING_QUERY ==> PLESC_DOUBLEBUFFERING_QUERY + +So those users who were using the symbolic constants on the left for +the above languages will have to change their source code or scripts +to use the constants on the right. No changes in source code or +scripts should be required of other users. + (5.9.10) The minimum version of CMake has been bumped to 5.8.9. This change allows our build system to take advantage of CMake features introduced in later versions of CMake. Even more importantly it also Modified: trunk/bindings/f95/plplot_parameters.h =================================================================== --- trunk/bindings/f95/plplot_parameters.h 2013-11-12 23:55:03 UTC (rev 12686) +++ trunk/bindings/f95/plplot_parameters.h 2013-11-13 01:15:42 UTC (rev 12687) @@ -21,7 +21,7 @@ integer, parameter :: PLESC_EH = 12 ! handle Window events integer, parameter :: PLESC_GETC = 13 ! get cursor position integer, parameter :: PLESC_SWIN = 14 ! set window parameters - integer, parameter :: PLESC_PLFLTBUFFERING = 15 ! configure PLFLT buffering + integer, parameter :: PLESC_DOUBLEBUFFERING = 15 ! configure double buffering integer, parameter :: PLESC_XORMOD = 16 ! set xor mode integer, parameter :: PLESC_SET_COMPRESSION = 17 ! AFR: set compression integer, parameter :: PLESC_CLEAR = 18 ! RL: clear graphics region @@ -29,58 +29,27 @@ integer, parameter :: PLESC_HAS_TEXT = 20 ! driver draws text integer, parameter :: PLESC_IMAGE = 21 ! handle image integer, parameter :: PLESC_IMAGEOPS = 22 ! plimage related operations - integer, parameter :: DRAW_LINEX = 1 ! draw lines parallel to the X axis - integer, parameter :: DRAW_LINEY = 2 ! draw lines parallel to the Y axis - integer, parameter :: DRAW_LINEXY = 3 ! draw lines parallel to both the X and Y axes - integer, parameter :: MAG_COLOR = 4 ! draw the mesh with a color dependent of the magnitude - integer, parameter :: BASE_CONT = 8 ! draw contour plot at bottom xy plane - integer, parameter :: TOP_CONT = 1*16 ! draw contour plot at top xy plane - integer, parameter :: SURF_CONT = 2*16 ! draw contour plot at surface - integer, parameter :: DRAW_SIDES = 4*16 ! draw sides - integer, parameter :: FACETED = 8*16 ! draw outline for each square that makes up the surface - integer, parameter :: MESH = 1*16*16 ! draw mesh - integer, parameter :: PL_BIN_DEFAULT = 0 - integer, parameter :: PL_BIN_CENTRED = 1 - integer, parameter :: PL_BIN_NOEXPAND = 2 - integer, parameter :: PL_BIN_NOEMPTY = 4 - integer, parameter :: PL_HIST_DEFAULT = 0 - integer, parameter :: PL_HIST_NOSCALING = 1 - integer, parameter :: PL_HIST_IGNORE_OUTLIERS = 2 - integer, parameter :: PL_HIST_NOEXPAND = 8 - integer, parameter :: PL_HIST_NOEMPTY = 16 - integer, parameter :: PL_POSITION_LEFT = 1 - integer, parameter :: PL_POSITION_RIGHT = 2 - integer, parameter :: PL_POSITION_TOP = 4 - integer, parameter :: PL_POSITION_BOTTOM = 8 - integer, parameter :: PL_POSITION_INSIDE = 16 - integer, parameter :: PL_POSITION_OUTSIDE = 32 - integer, parameter :: PL_POSITION_VIEWPORT = 64 - integer, parameter :: PL_POSITION_SUBPAGE = 128 - integer, parameter :: PL_LEGEND_NONE = 1 - integer, parameter :: PL_LEGEND_COLOR_BOX = 2 - integer, parameter :: PL_LEGEND_LINE = 4 - integer, parameter :: PL_LEGEND_SYMBOL = 8 - integer, parameter :: PL_LEGEND_TEXT_LEFT = 16 - integer, parameter :: PL_LEGEND_BACKGROUND = 32 - integer, parameter :: PL_LEGEND_BOUNDING_BOX = 64 - integer, parameter :: PL_LEGEND_ROW_MAJOR = 128 - integer, parameter :: PL_COLORBAR_LABEL_LEFT = 1 - integer, parameter :: PL_COLORBAR_LABEL_RIGHT = 2 - integer, parameter :: PL_COLORBAR_LABEL_TOP = 4 - integer, parameter :: PL_COLORBAR_LABEL_BOTTOM = 8 - integer, parameter :: PL_COLORBAR_IMAGE = 1*16 - integer, parameter :: PL_COLORBAR_SHADE = 2*16 - integer, parameter :: PL_COLORBAR_GRADIENT = 4*16 - integer, parameter :: PL_COLORBAR_CAP_NONE = 8*16 - integer, parameter :: PL_COLORBAR_CAP_LOW = 1*16*16 - integer, parameter :: PL_COLORBAR_CAP_HIGH = 2*16*16 - integer, parameter :: PL_COLORBAR_SHADE_LABEL = 4*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_RIGHT = 8*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_TOP = 1*16*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_LEFT = 2*16*16*16 - integer, parameter :: PL_COLORBAR_ORIENT_BOTTOM = 4*16*16*16 - integer, parameter :: PL_COLORBAR_BACKGROUND = 8*16*16*16 - integer, parameter :: PL_COLORBAR_BOUNDING_BOX = 1*16*16*16*16 + integer, parameter :: PLESC_PL2DEVCOL = 23 ! convert PLColor to device color + integer, parameter :: PLESC_DEV2PLCOL = 24 ! convert device color to PLColor + integer, parameter :: PLESC_SETBGFG = 25 ! set BG, FG colors + integer, parameter :: PLESC_DEVINIT = 26 ! alternate device initialization + integer, parameter :: PLESC_GETBACKEND = 27 ! get used backend of (wxWidgets) driver + integer, parameter :: PLESC_BEGIN_TEXT = 28 ! get ready to draw a line of text + integer, parameter :: PLESC_TEXT_CHAR = 29 ! render a character of text + integer, parameter :: PLESC_CONTROL_CHAR = 30 ! handle a text control character (super/subscript, etc.) + integer, parameter :: PLESC_END_TEXT = 31 ! finish a drawing a line of text + integer, parameter :: PLESC_START_RASTERIZE = 32 ! start rasterized rendering + integer, parameter :: PLESC_END_RASTERIZE = 33 ! end rasterized rendering + integer, parameter :: PLESC_ARC = 34 ! render an arc + integer, parameter :: PLESC_GRADIENT = 35 ! render a gradient + integer, parameter :: PLESC_MODESET = 36 ! set drawing mode + integer, parameter :: PLESC_MODEGET = 37 ! get drawing mode + integer, parameter :: PLTEXT_FONTCHANGE = 0 ! font change in the text stream + integer, parameter :: PLTEXT_SUPERSCRIPT = 1 ! superscript in the text stream + integer, parameter :: PLTEXT_SUBSCRIPT = 2 ! subscript in the text stream + integer, parameter :: PLTEXT_BACKCHAR = 3 ! back-char in the text stream + integer, parameter :: PLTEXT_OVERLINE = 4 ! toggle overline in the text stream + integer, parameter :: PLTEXT_UNDERLINE = 5 ! toggle underline in the text stream integer, parameter :: PLSWIN_DEVICE = 1 ! device coordinates integer, parameter :: PLSWIN_WORLD = 2 ! world coordinates integer, parameter :: PL_X_AXIS = 1 ! The x-axis @@ -128,12 +97,68 @@ real(kind=plflt), parameter :: PL_NOTSET = -42.0_plflt real(kind=plflt), parameter :: PL_PI = 3.1415926535897932384_plflt real(kind=plflt), parameter :: PL_TWOPI = 2.0_plflt*PL_PI - integer, parameter :: PLESPLFLTBUFFERING_ENABLE = 1 - integer, parameter :: PLESPLFLTBUFFERING_DISABLE = 2 - integer, parameter :: PLESPLFLTBUFFERING_QUERY = 3 + integer, parameter :: PLESC_DOUBLEBUFFERING_ENABLE = 1 + integer, parameter :: PLESC_DOUBLEBUFFERING_DISABLE = 2 + integer, parameter :: PLESC_DOUBLEBUFFERING_QUERY = 3 + integer, parameter :: PL_BIN_DEFAULT = 0 + integer, parameter :: PL_BIN_CENTRED = 1 + integer, parameter :: PL_BIN_NOEXPAND = 2 + integer, parameter :: PL_BIN_NOEMPTY = 4 integer, parameter :: GRID_CSA = 1 ! Bivariate Cubic Spline approximation integer, parameter :: GRID_DTLI = 2 ! Delaunay Triangulation Linear Interpolation integer, parameter :: GRID_NNI = 3 ! Natural Neighbors Interpolation integer, parameter :: GRID_NNIDW = 4 ! Nearest Neighbors Inverse Distance Weighted integer, parameter :: GRID_NNLI = 5 ! Nearest Neighbors Linear Interpolation integer, parameter :: GRID_NNAIDW = 6 ! Nearest Neighbors Around Inverse Distance Weighted + integer, parameter :: PL_HIST_DEFAULT = 0 + integer, parameter :: PL_HIST_NOSCALING = 1 + integer, parameter :: PL_HIST_IGNORE_OUTLIERS = 2 + integer, parameter :: PL_HIST_NOEXPAND = 8 + integer, parameter :: PL_HIST_NOEMPTY = 1*16 + integer, parameter :: PL_POSITION_LEFT = 1 + integer, parameter :: PL_POSITION_RIGHT = 2 + integer, parameter :: PL_POSITION_TOP = 4 + integer, parameter :: PL_POSITION_BOTTOM = 8 + integer, parameter :: PL_POSITION_INSIDE = 1*16 + integer, parameter :: PL_POSITION_OUTSIDE = 2*16 + integer, parameter :: PL_POSITION_VIEWPORT = 4*16 + integer, parameter :: PL_POSITION_SUBPAGE = 8*16 + integer, parameter :: PL_LEGEND_NONE = 1 + integer, parameter :: PL_LEGEND_COLOR_BOX = 2 + integer, parameter :: PL_LEGEND_LINE = 4 + integer, parameter :: PL_LEGEND_SYMBOL = 8 + integer, parameter :: PL_LEGEND_TEXT_LEFT = 1*16 + integer, parameter :: PL_LEGEND_BACKGROUND = 2*16 + integer, parameter :: PL_LEGEND_BOUNDING_BOX = 4*16 + integer, parameter :: PL_LEGEND_ROW_MAJOR = 8*16 + integer, parameter :: PL_COLORBAR_LABEL_LEFT = 1 + integer, parameter :: PL_COLORBAR_LABEL_RIGHT = 2 + integer, parameter :: PL_COLORBAR_LABEL_TOP = 4 + integer, parameter :: PL_COLORBAR_LABEL_BOTTOM = 8 + integer, parameter :: PL_COLORBAR_IMAGE = 1*16 + integer, parameter :: PL_COLORBAR_SHADE = 2*16 + integer, parameter :: PL_COLORBAR_GRADIENT = 4*16 + integer, parameter :: PL_COLORBAR_CAP_NONE = 8*16 + integer, parameter :: PL_COLORBAR_CAP_LOW = 1*16*16 + integer, parameter :: PL_COLORBAR_CAP_HIGH = 2*16*16 + integer, parameter :: PL_COLORBAR_SHADE_LABEL = 4*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_RIGHT = 8*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_TOP = 1*16*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_LEFT = 2*16*16*16 + integer, parameter :: PL_COLORBAR_ORIENT_BOTTOM = 4*16*16*16 + integer, parameter :: PL_COLORBAR_BACKGROUND = 8*16*16*16 + integer, parameter :: PL_COLORBAR_BOUNDING_BOX = 1*16*16*16*16 + integer, parameter :: PL_DRAWMODE_UNKNOWN = 0 + integer, parameter :: PL_DRAWMODE_DEFAULT = 1 + integer, parameter :: PL_DRAWMODE_REPLACE = 2 + integer, parameter :: PL_DRAWMODE_XOR = 4 + integer, parameter :: DRAW_LINEX = 1 ! draw lines parallel to the X axis + integer, parameter :: DRAW_LINEY = 2 ! draw lines parallel to the Y axis + integer, parameter :: DRAW_LINEXY = 3 ! draw lines parallel to both the X and Y axis + integer, parameter :: MAG_COLOR = 4 ! draw the mesh with a color dependent of the magnitude + integer, parameter :: BASE_CONT = 8 ! draw contour plot at bottom xy plane + integer, parameter :: TOP_CONT = 1*16 ! draw contour plot at top xy plane + integer, parameter :: SURF_CONT = 2*16 ! draw contour plot at surface + integer, parameter :: DRAW_SIDES = 4*16 ! draw sides + integer, parameter :: FACETED = 8*16 ! draw outline for each square that makes up the surface + integer, parameter :: MESH = 1*16*16 ! draw mesh Modified: trunk/bindings/tcl/plplot_parameters.h =================================================================== --- trunk/bindings/tcl/plplot_parameters.h 2013-11-12 23:55:03 UTC (rev 12686) +++ trunk/bindings/tcl/plplot_parameters.h 2013-11-13 01:15:42 UTC (rev 12687) @@ -56,8 +56,8 @@ # set window parameters\n\ variable PLESC_SWIN 14\n\ \n\ -# configure PLFLT buffering\n\ -variable PLESC_PLFLTBUFFERING 15\n\ +# configure double buffering\n\ +variable PLESC_DOUBLEBUFFERING 15\n\ \n\ # set xor mode\n\ variable PLESC_XORMOD 16\n\ @@ -80,162 +80,69 @@ # plimage related operations\n\ variable PLESC_IMAGEOPS 22\n\ \n\ -# draw lines parallel to the X axis\n\ -variable DRAW_LINEX 0x01\n\ +# convert PLColor to device color\n\ +variable PLESC_PL2DEVCOL 23\n\ \n\ -# draw lines parallel to the Y axis\n\ -variable DRAW_LINEY 0x02\n\ +# convert device color to PLColor\n\ +variable PLESC_DEV2PLCOL 24\n\ \n\ -# draw lines parallel to both the X and Y axes\n\ -variable DRAW_LINEXY 0x03\n\ +# set BG, FG colors\n\ +variable PLESC_SETBGFG 25\n\ \n\ -# draw the mesh with a color dependent of the magnitude\n\ -variable MAG_COLOR 0x04\n\ +# alternate device initialization\n\ +variable PLESC_DEVINIT 26\n\ \n\ -# draw contour plot at bottom xy plane\n\ -variable BASE_CONT 0x08\n\ +# get used backend of (wxWidgets) driver\n\ +variable PLESC_GETBACKEND 27\n\ \n\ -# draw contour plot at top xy plane\n\ -variable TOP_CONT 0x10\n\ +# get ready to draw a line of text\n\ +variable PLESC_BEGIN_TEXT 28\n\ \n\ -# draw contour plot at surface\n\ -variable SURF_CONT 0x20\n\ +# render a character of text\n\ +variable PLESC_TEXT_CHAR 29\n\ \n\ -# draw sides\n\ -variable DRAW_SIDES 0x40\n\ +# handle a text control character (super/subscript, etc.)\n\ +variable PLESC_CONTROL_CHAR 30\n\ \n\ -# draw outline for each square that makes up the surface\n\ -variable FACETED 0x80\n\ +# finish a drawing a line of text\n\ +variable PLESC_END_TEXT 31\n\ \n\ -# draw mesh\n\ -variable MESH 0x100\n\ +# start rasterized rendering\n\ +variable PLESC_START_RASTERIZE 32\n\ \n\ +# end rasterized rendering\n\ +variable PLESC_END_RASTERIZE 33\n\ \n\ -variable PL_BIN_DEFAULT 0\n\ +# render an arc\n\ +variable PLESC_ARC 34\n\ \n\ +# render a gradient\n\ +variable PLESC_GRADIENT 35\n\ \n\ -variable PL_BIN_CENTRED 1\n\ +# set drawing mode\n\ +variable PLESC_MODESET 36\n\ \n\ +# get drawing mode\n\ +variable PLESC_MODEGET 37\n\ \n\ -variable PL_BIN_NOEXPAND 2\n\ +# font change in the text stream\n\ +variable PLTEXT_FONTCHANGE 0\n\ \n\ +# superscript in the text stream\n\ +variable PLTEXT_SUPERSCRIPT 1\n\ \n\ -variable PL_BIN_NOEMPTY 4\n\ +# subscript in the text stream\n\ +variable PLTEXT_SUBSCRIPT 2\n\ \n\ +# back-char in the text stream\n\ +variable PLTEXT_BACKCHAR 3\n\ \n\ -variable PL_HIST_DEFAULT 0\n\ +# toggle overline in the text stream\n\ +variable PLTEXT_OVERLINE 4\n\ \n\ +# toggle underline in the text stream\n\ +variable PLTEXT_UNDERLINE 5\n\ \n\ -variable PL_HIST_NOSCALING 1\n\ -\n\ -\n\ -variable PL_HIST_IGNORE_OUTLIERS 2\n\ -\n\ -\n\ -variable PL_HIST_NOEXPAND 8\n\ -\n\ -\n\ -variable PL_HIST_NOEMPTY 16\n\ -\n\ -\n\ -variable PL_POSITION_LEFT 1\n\ -\n\ -\n\ -variable PL_POSITION_RIGHT 2\n\ -\n\ -\n\ -variable PL_POSITION_TOP 4\n\ -\n\ -\n\ -variable PL_POSITION_BOTTOM 8\n\ -\n\ -\n\ -variable PL_POSITION_INSIDE 16\n\ -\n\ -\n\ -variable PL_POSITION_OUTSIDE 32\n\ -\n\ -\n\ -variable PL_POSITION_VIEWPORT 64\n\ -\n\ -\n\ -variable PL_POSITION_SUBPAGE 128\n\ -\n\ -\n\ -variable PL_LEGEND_NONE 1\n\ -\n\ -\n\ -variable PL_LEGEND_COLOR_BOX 2\n\ -\n\ -\n\ -variable PL_LEGEND_LINE 4\n\ -\n\ -\n\ -variable PL_LEGEND_SYMBOL 8\n\ -\n\ -\n\ -variable PL_LEGEND_TEXT_LEFT 16\n\ -\n\ -\n\ -variable PL_LEGEND_BACKGROUND 32\n\ -\n\ -\n\ -variable PL_LEGEND_BOUNDING_BOX 64\n\ -\n\ -\n\ -variable PL_LEGEND_ROW_MAJOR 128\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_LEFT 0x1\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_RIGHT 0x2\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_TOP 0x4\n\ -\n\ -\n\ -variable PL_COLORBAR_LABEL_BOTTOM 0x8\n\ -\n\ -\n\ -variable PL_COLORBAR_IMAGE 0x10\n\ -\n\ -\n\ -variable PL_COLORBAR_SHADE 0x20\n\ -\n\ -\n\ -variable PL_COLORBAR_GRADIENT 0x40\n\ -\n\ -\n\ -variable PL_COLORBAR_CAP_NONE 0x80\n\ -\n\ -\n\ -variable PL_COLORBAR_CAP_LOW 0x100\n\ -\n\ -\n\ -variable PL_COLORBAR_CAP_HIGH 0x200\n\ -\n\ -\n\ -variable PL_COLORBAR_SHADE_LABEL 0x400\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_RIGHT 0x800\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_TOP 0x1000\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_LEFT 0x2000\n\ -\n\ -\n\ -variable PL_COLORBAR_ORIENT_BOTTOM 0x4000\n\ -\n\ -\n\ -variable PL_COLORBAR_BACKGROUND 0x8000\n\ -\n\ -\n\ -variable PL_COLORBAR_BOUNDING_BOX 0x10000\n\ -\n\ # device coordinates\n\ variable PLSWIN_DEVICE 1\n\ \n\ @@ -375,14 +282,26 @@ variable PL_PI 3.1415926535897932384\n\ \n\ \n\ -variable PLESPLFLTBUFFERING_ENABLE 1\n\ +variable PLESC_DOUBLEBUFFERING_ENABLE 1\n\ \n\ \n\ -variable PLESPLFLTBUFFERING_DISABLE 2\n\ +variable PLESC_DOUBLEBUFFERING_DISABLE 2\n\ \n\ \n\ -variable PLESPLFLTBUFFERING_QUERY 3\n\ +variable PLESC_DOUBLEBUFFERING_QUERY 3\n\ \n\ +\n\ +variable PL_BIN_DEFAULT 0x0\n\ +\n\ +\n\ +variable PL_BIN_CENTRED 0x1\n\ +\n\ +\n\ +variable PL_BIN_NOEXPAND 0x2\n\ +\n\ +\n\ +variable PL_BIN_NOEMPTY 0x4\n\ +\n\ # Bivariate Cubic Spline approximation\n\ variable GRID_CSA 1\n\ \n\ @@ -400,5 +319,161 @@ \n\ # Nearest Neighbors Around Inverse Distance Weighted\n\ variable GRID_NNAIDW 6\n\ +\n\ +\n\ +variable PL_HIST_DEFAULT 0x00\n\ +\n\ +\n\ +variable PL_HIST_NOSCALING 0x01\n\ +\n\ +\n\ +variable PL_HIST_IGNORE_OUTLIERS 0x02\n\ +\n\ +\n\ +variable PL_HIST_NOEXPAND 0x08\n\ +\n\ +\n\ +variable PL_HIST_NOEMPTY 0x10\n\ +\n\ +\n\ +variable PL_POSITION_LEFT 0x1\n\ +\n\ +\n\ +variable PL_POSITION_RIGHT 0x2\n\ +\n\ +\n\ +variable PL_POSITION_TOP 0x4\n\ +\n\ +\n\ +variable PL_POSITION_BOTTOM 0x8\n\ +\n\ +\n\ +variable PL_POSITION_INSIDE 0x10\n\ +\n\ +\n\ +variable PL_POSITION_OUTSIDE 0x20\n\ +\n\ +\n\ +variable PL_POSITION_VIEWPORT 0x40\n\ +\n\ +\n\ +variable PL_POSITION_SUBPAGE 0x80\n\ +\n\ +\n\ +variable PL_LEGEND_NONE 0x1\n\ +\n\ +\n\ +variable PL_LEGEND_COLOR_BOX 0x2\n\ +\n\ +\n\ +variable PL_LEGEND_LINE 0x4\n\ +\n\ +\n\ +variable PL_LEGEND_SYMBOL 0x8\n\ +\n\ +\n\ +variable PL_LEGEND_TEXT_LEFT 0x10\n\ +\n\ +\n\ +variable PL_LEGEND_BACKGROUND 0x20\n\ +\n\ +\n\ +variable PL_LEGEND_BOUNDING_BOX 0x40\n\ +\n\ +\n\ +variable PL_LEGEND_ROW_MAJOR 0x80\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_LEFT 0x1\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_RIGHT 0x2\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_TOP 0x4\n\ +\n\ +\n\ +variable PL_COLORBAR_LABEL_BOTTOM 0x8\n\ +\n\ +\n\ +variable PL_COLORBAR_IMAGE 0x10\n\ +\n\ +\n\ +variable PL_COLORBAR_SHADE 0x20\n\ +\n\ +\n\ +variable PL_COLORBAR_GRADIENT 0x40\n\ +\n\ +\n\ +variable PL_COLORBAR_CAP_NONE 0x80\n\ +\n\ +\n\ +variable PL_COLORBAR_CAP_LOW 0x100\n\ +\n\ +\n\ +variable PL_COLORBAR_CAP_HIGH 0x200\n\ +\n\ +\n\ +variable PL_COLORBAR_SHADE_LABEL 0x400\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_RIGHT 0x800\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_TOP 0x1000\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_LEFT 0x2000\n\ +\n\ +\n\ +variable PL_COLORBAR_ORIENT_BOTTOM 0x4000\n\ +\n\ +\n\ +variable PL_COLORBAR_BACKGROUND 0x8000\n\ +\n\ +\n\ +variable PL_COLORBAR_BOUNDING_BOX 0x10000\n\ +\n\ +\n\ +variable PL_DRAWMODE_UNKNOWN 0x0\n\ +\n\ +\n\ +variable PL_DRAWMODE_DEFAULT 0x1\n\ +\n\ +\n\ +variable PL_DRAWMODE_REPLACE 0x2\n\ +\n\ +\n\ +variable PL_DRAWMODE_XOR 0x4\n\ +\n\ +# draw lines parallel to the X axis\n\ +variable DRAW_LINEX 0x001\n\ +\n\ +# draw lines parallel to the Y axis\n\ +variable DRAW_LINEY 0x002\n\ +\n\ +# draw lines parallel to both the X and Y axis\n\ +variable DRAW_LINEXY 0x003\n\ +\n\ +# draw the mesh with a color dependent of the magnitude\n\ +variable MAG_COLOR 0x004\n\ +\n\ +# draw contour plot at bottom xy plane\n\ +variable BASE_CONT 0x008\n\ +\n\ +# draw contour plot at top xy plane\n\ +variable TOP_CONT 0x010\n\ +\n\ +# draw contour plot at surface\n\ +variable SURF_CONT 0x020\n\ +\n\ +# draw sides\n\ +variable DRAW_SIDES 0x040\n\ +\n\ +# draw outline for each square that makes up the surface\n\ +variable FACETED 0x080\n\ +\n\ +# draw mesh\n\ +variable MESH 0x100\n\ }" ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 23:55:08
|
Revision: 12686 http://sourceforge.net/p/plplot/code/12686 Author: airwin Date: 2013-11-12 23:55:03 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Style previous commit. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-11-12 22:26:49 UTC (rev 12685) +++ trunk/bindings/tcl/tclAPI.c 2013-11-12 23:55:03 UTC (rev 12686) @@ -444,36 +444,36 @@ Tcl_SetVar( interp, "plversion", PLPLOT_VERSION, TCL_GLOBAL_ONLY ); if ( strcmp( PLPLOT_ITCL_VERSION, "4.0.0" ) >= 0 ) - Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 4", TCL_GLOBAL_ONLY ); + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 4", TCL_GLOBAL_ONLY ); else if ( strcmp( PLPLOT_ITCL_VERSION, "3.0.0" ) >= 0 ) - Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 3", TCL_GLOBAL_ONLY ); + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 3", TCL_GLOBAL_ONLY ); else - // Mark invalid package name in such a way as to cause an error - // when, for example, itcl has been disabled by PLplot, yet one - // of the PLplot Tcl scripts attempts to load Itcl. - Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); - + // Mark invalid package name in such a way as to cause an error + // when, for example, itcl has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Itcl. + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + if ( strcmp( PLPLOT_ITK_VERSION, "4.0.0" ) >= 0 ) - Tcl_SetVar( interp, "pl_itk_package_name", "Itk 4", TCL_GLOBAL_ONLY ); + Tcl_SetVar( interp, "pl_itk_package_name", "Itk 4", TCL_GLOBAL_ONLY ); else if ( strcmp( PLPLOT_ITK_VERSION, "3.0.0" ) >= 0 ) - Tcl_SetVar( interp, "pl_itk_package_name", "Itk 3", TCL_GLOBAL_ONLY ); + Tcl_SetVar( interp, "pl_itk_package_name", "Itk 3", TCL_GLOBAL_ONLY ); else - // Mark invalid package name in such a way as to cause an error - // when, for example, itk has been disabled by PLplot, yet one - // of the PLplot Tcl scripts attempts to load Itk. - Tcl_SetVar( interp, "pl_itk_package_name", "Itk(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); - + // Mark invalid package name in such a way as to cause an error + // when, for example, itk has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Itk. + Tcl_SetVar( interp, "pl_itk_package_name", "Itk(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + if ( strcmp( PLPLOT_IWIDGETS_VERSION, "4.1.0" ) >= 0 ) - Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets 4", TCL_GLOBAL_ONLY ); + Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets 4", TCL_GLOBAL_ONLY ); else if ( strcmp( PLPLOT_IWIDGETS_VERSION, "4.0.0" ) >= 0 ) - Tcl_SetVar( interp, "pl_iwidgets_package_name", "-exact Iwidgets " PLPLOT_IWIDGETS_VERSION, TCL_GLOBAL_ONLY ); + Tcl_SetVar( interp, "pl_iwidgets_package_name", "-exact Iwidgets " PLPLOT_IWIDGETS_VERSION, TCL_GLOBAL_ONLY ); else - // Mark invalid package name in such a way as to cause an error - // when, for example, itk has been disabled by PLplot, yet one - // of the PLplot Tcl scripts attempts to load Iwidgets. - Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); - - + // Mark invalid package name in such a way as to cause an error + // when, for example, itk has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Iwidgets. + Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + + // Begin search for init script // Each search begins with a test of libDir, so rearrangement is easy. // If search is successful, both libDir (C) and pllibrary (tcl) are set This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 22:26:53
|
Revision: 12685 http://sourceforge.net/p/plplot/code/12685 Author: airwin Date: 2013-11-12 22:26:49 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Implement a new target, check_plplotcapi_defines, which propagates the numerical #defines in include/plplot.h to a file which can be compared with the numerical #defines in bindings/swig-support/plplotcapi.i to see whether those need updating. Do such updating using the build-tree file generated by the above target. Modified Paths: -------------- trunk/bindings/swig-support/CMakeLists.txt trunk/bindings/swig-support/plplotcapi.i Modified: trunk/bindings/swig-support/CMakeLists.txt =================================================================== --- trunk/bindings/swig-support/CMakeLists.txt 2013-11-12 22:19:13 UTC (rev 12684) +++ trunk/bindings/swig-support/CMakeLists.txt 2013-11-12 22:26:49 UTC (rev 12685) @@ -46,3 +46,14 @@ " so cannot check that swig_documentation.i is up to date." ) endif(PERL_XML_DOM AND PERL_XML_PARSER) + +# Add (Unix) custom target to check numerical #defines in plplotcapi.i. +add_custom_target( + check_plplotcapi_defines + COMMAND ${CMAKE_COMMAND} -E remove -f + ${CMAKE_CURRENT_BINARY_DIR}/generated_plplotcapi_defines + COMMAND grep -E "^ *#define +[^ ]+ +[()-+0-9x]+" ${CMAKE_SOURCE_DIR}/include/plplot.h | grep -v plotsh3d > ${CMAKE_CURRENT_BINARY_DIR}/generated_plplotcapi_defines + COMMAND ${CMAKE_COMMAND} -E echo "Non-NULL diff results below (which will be accompanied by an error for this target) imply the numerical #defines section of bindings/swig-support/plplotcapi.i needs updating following the directions in that file" + COMMAND grep -E "^ *#define +[^ ]+ +[()-+0-9x]+" ${CMAKE_CURRENT_SOURCE_DIR}/plplotcapi.i | diff -auw - ${CMAKE_CURRENT_BINARY_DIR}/generated_plplotcapi_defines + VERBATIM +) \ No newline at end of file Modified: trunk/bindings/swig-support/plplotcapi.i =================================================================== --- trunk/bindings/swig-support/plplotcapi.i 2013-11-12 22:19:13 UTC (rev 12684) +++ trunk/bindings/swig-support/plplotcapi.i 2013-11-12 22:26:49 UTC (rev 12685) @@ -29,180 +29,187 @@ typedef void* PLPointer; -//-------------------------------------------------------------------------- -// Complex data types and other good stuff -//-------------------------------------------------------------------------- +// The following numerical #defines should not be independently edited +// since they are generated from include/plplot.h by the +// check_plplotcapi_defines target. If that target complains of diff +// issues (i.e., non whitespace differences between these next +// numerical #defines and what is generated, then in simple cases edit +// the following numerical #defines to resolve the issue (i.e., the +// check_plplotcapi_defines target runs without diff issues) or in +// complicated cases replace the entirety of the following numerical +// #defines with the contents of the file, +// bindings/swig-support/generated_plplotcapi_defines which is +// generated in the build tree as a result of running the +// check_plplotcapi_defines target. -// Switches for escape function call. -// Some of these are obsolete but are retained in order to process -// old metafiles +// N.B. for an overview of the following numerical #defines see the +// documentation in include/plplot.h. -#define PLESC_SET_RGB 1 // obsolete -#define PLESC_ALLOC_NCOL 2 // obsolete -#define PLESC_SET_LPB 3 // obsolete -#define PLESC_EXPOSE 4 // handle window expose -#define PLESC_RESIZE 5 // handle window resize -#define PLESC_REDRAW 6 // handle window redraw -#define PLESC_TEXT 7 // switch to text screen -#define PLESC_GRAPH 8 // switch to graphics screen -#define PLESC_FILL 9 // fill polygon -#define PLESC_DI 10 // handle DI command -#define PLESC_FLUSH 11 // flush output -#define PLESC_EH 12 // handle Window events -#define PLESC_GETC 13 // get cursor position -#define PLESC_SWIN 14 // set window parameters -#define PLESC_PLFLTBUFFERING 15 // configure PLFLT buffering -#define PLESC_XORMOD 16 // set xor mode -#define PLESC_SET_COMPRESSION 17 // AFR: set compression -#define PLESC_CLEAR 18 // RL: clear graphics region -#define PLESC_DASH 19 // RL: draw dashed line -#define PLESC_HAS_TEXT 20 // driver draws text -#define PLESC_IMAGE 21 // handle image -#define PLESC_IMAGEOPS 22 // plimage related operations +#define PLESC_SET_RGB 1 // obsolete +#define PLESC_ALLOC_NCOL 2 // obsolete +#define PLESC_SET_LPB 3 // obsolete +#define PLESC_EXPOSE 4 // handle window expose +#define PLESC_RESIZE 5 // handle window resize +#define PLESC_REDRAW 6 // handle window redraw +#define PLESC_TEXT 7 // switch to text screen +#define PLESC_GRAPH 8 // switch to graphics screen +#define PLESC_FILL 9 // fill polygon +#define PLESC_DI 10 // handle DI command +#define PLESC_FLUSH 11 // flush output +#define PLESC_EH 12 // handle Window events +#define PLESC_GETC 13 // get cursor position +#define PLESC_SWIN 14 // set window parameters +#define PLESC_DOUBLEBUFFERING 15 // configure double buffering +#define PLESC_XORMOD 16 // set xor mode +#define PLESC_SET_COMPRESSION 17 // AFR: set compression +#define PLESC_CLEAR 18 // RL: clear graphics region +#define PLESC_DASH 19 // RL: draw dashed line +#define PLESC_HAS_TEXT 20 // driver draws text +#define PLESC_IMAGE 21 // handle image +#define PLESC_IMAGEOPS 22 // plimage related operations +#define PLESC_PL2DEVCOL 23 // convert PLColor to device color +#define PLESC_DEV2PLCOL 24 // convert device color to PLColor +#define PLESC_SETBGFG 25 // set BG, FG colors +#define PLESC_DEVINIT 26 // alternate device initialization +#define PLESC_GETBACKEND 27 // get used backend of (wxWidgets) driver +#define PLESC_BEGIN_TEXT 28 // get ready to draw a line of text +#define PLESC_TEXT_CHAR 29 // render a character of text +#define PLESC_CONTROL_CHAR 30 // handle a text control character (super/subscript, etc.) +#define PLESC_END_TEXT 31 // finish a drawing a line of text +#define PLESC_START_RASTERIZE 32 // start rasterized rendering +#define PLESC_END_RASTERIZE 33 // end rasterized rendering +#define PLESC_ARC 34 // render an arc +#define PLESC_GRADIENT 35 // render a gradient +#define PLESC_MODESET 36 // set drawing mode +#define PLESC_MODEGET 37 // get drawing mode +#define PLTEXT_FONTCHANGE 0 // font change in the text stream +#define PLTEXT_SUPERSCRIPT 1 // superscript in the text stream +#define PLTEXT_SUBSCRIPT 2 // subscript in the text stream +#define PLTEXT_BACKCHAR 3 // back-char in the text stream +#define PLTEXT_OVERLINE 4 // toggle overline in the text stream +#define PLTEXT_UNDERLINE 5 // toggle underline in the text stream +#define ZEROW2B 1 +#define ZEROW2D 2 +#define ONEW2B 3 +#define ONEW2D 4 +#define PLSWIN_DEVICE 1 // device coordinates +#define PLSWIN_WORLD 2 // world coordinates +#define PL_X_AXIS 1 // The x-axis +#define PL_Y_AXIS 2 // The y-axis +#define PL_Z_AXIS 3 // The z-axis +#define PL_OPT_ENABLED 0x0001 // Obsolete +#define PL_OPT_ARG 0x0002 // Option has an argment +#define PL_OPT_NODELETE 0x0004 // Don't delete after processing +#define PL_OPT_INVISIBLE 0x0008 // Make invisible +#define PL_OPT_DISABLED 0x0010 // Processing is disabled +#define PL_OPT_FUNC 0x0100 // Call handler function +#define PL_OPT_BOOL 0x0200 // Set *var = 1 +#define PL_OPT_INT 0x0400 // Set *var = atoi(optarg) +#define PL_OPT_FLOAT 0x0800 // Set *var = atof(optarg) +#define PL_OPT_STRING 0x1000 // Set var = optarg +#define PL_PARSE_PARTIAL 0x0000 // For backward compatibility +#define PL_PARSE_FULL 0x0001 // Process fully & exit if error +#define PL_PARSE_QUIET 0x0002 // Don't issue messages +#define PL_PARSE_NODELETE 0x0004 // Don't delete options after +#define PL_PARSE_SHOWALL 0x0008 // Show invisible options +#define PL_PARSE_OVERRIDE 0x0010 // Obsolete +#define PL_PARSE_NOPROGRAM 0x0020 // Program name NOT in *argv[0].. +#define PL_PARSE_NODASH 0x0040 // Set if leading dash NOT required +#define PL_PARSE_SKIP 0x0080 // Skip over unrecognized args +#define PL_FCI_MARK 0x80000000 +#define PL_FCI_IMPOSSIBLE 0x00000000 +#define PL_FCI_HEXDIGIT_MASK 0xf +#define PL_FCI_HEXPOWER_MASK 0x7 +#define PL_FCI_HEXPOWER_IMPOSSIBLE 0xf +#define PL_FCI_FAMILY 0x0 +#define PL_FCI_STYLE 0x1 +#define PL_FCI_WEIGHT 0x2 +#define PL_FCI_SANS 0x0 +#define PL_FCI_SERIF 0x1 +#define PL_FCI_MONO 0x2 +#define PL_FCI_SCRIPT 0x3 +#define PL_FCI_SYMBOL 0x4 +#define PL_FCI_UPRIGHT 0x0 +#define PL_FCI_ITALIC 0x1 +#define PL_FCI_OBLIQUE 0x2 +#define PL_FCI_MEDIUM 0x0 +#define PL_FCI_BOLD 0x1 +#define PL_MAXKEY 16 +#define PL_MAXWINDOWS 64 // Max number of windows/page tracked +#define PL_NOTSET ( -42 ) +#define PLESC_DOUBLEBUFFERING_ENABLE 1 +#define PLESC_DOUBLEBUFFERING_DISABLE 2 +#define PLESC_DOUBLEBUFFERING_QUERY 3 +#define PL_BIN_DEFAULT 0x0 +#define PL_BIN_CENTRED 0x1 +#define PL_BIN_NOEXPAND 0x2 +#define PL_BIN_NOEMPTY 0x4 +#define GRID_CSA 1 // Bivariate Cubic Spline approximation +#define GRID_DTLI 2 // Delaunay Triangulation Linear Interpolation +#define GRID_NNI 3 // Natural Neighbors Interpolation +#define GRID_NNIDW 4 // Nearest Neighbors Inverse Distance Weighted +#define GRID_NNLI 5 // Nearest Neighbors Linear Interpolation +#define GRID_NNAIDW 6 // Nearest Neighbors Around Inverse Distance Weighted +#define PL_HIST_DEFAULT 0x00 +#define PL_HIST_NOSCALING 0x01 +#define PL_HIST_IGNORE_OUTLIERS 0x02 +#define PL_HIST_NOEXPAND 0x08 +#define PL_HIST_NOEMPTY 0x10 +#define PL_POSITION_LEFT 0x1 +#define PL_POSITION_RIGHT 0x2 +#define PL_POSITION_TOP 0x4 +#define PL_POSITION_BOTTOM 0x8 +#define PL_POSITION_INSIDE 0x10 +#define PL_POSITION_OUTSIDE 0x20 +#define PL_POSITION_VIEWPORT 0x40 +#define PL_POSITION_SUBPAGE 0x80 +#define PL_LEGEND_NONE 0x1 +#define PL_LEGEND_COLOR_BOX 0x2 +#define PL_LEGEND_LINE 0x4 +#define PL_LEGEND_SYMBOL 0x8 +#define PL_LEGEND_TEXT_LEFT 0x10 +#define PL_LEGEND_BACKGROUND 0x20 +#define PL_LEGEND_BOUNDING_BOX 0x40 +#define PL_LEGEND_ROW_MAJOR 0x80 +#define PL_COLORBAR_LABEL_LEFT 0x1 +#define PL_COLORBAR_LABEL_RIGHT 0x2 +#define PL_COLORBAR_LABEL_TOP 0x4 +#define PL_COLORBAR_LABEL_BOTTOM 0x8 +#define PL_COLORBAR_IMAGE 0x10 +#define PL_COLORBAR_SHADE 0x20 +#define PL_COLORBAR_GRADIENT 0x40 +#define PL_COLORBAR_CAP_NONE 0x80 +#define PL_COLORBAR_CAP_LOW 0x100 +#define PL_COLORBAR_CAP_HIGH 0x200 +#define PL_COLORBAR_SHADE_LABEL 0x400 +#define PL_COLORBAR_ORIENT_RIGHT 0x800 +#define PL_COLORBAR_ORIENT_TOP 0x1000 +#define PL_COLORBAR_ORIENT_LEFT 0x2000 +#define PL_COLORBAR_ORIENT_BOTTOM 0x4000 +#define PL_COLORBAR_BACKGROUND 0x8000 +#define PL_COLORBAR_BOUNDING_BOX 0x10000 +#define PL_DRAWMODE_UNKNOWN 0x0 +#define PL_DRAWMODE_DEFAULT 0x1 +#define PL_DRAWMODE_REPLACE 0x2 +#define PL_DRAWMODE_XOR 0x4 +#define DRAW_LINEX 0x001 // draw lines parallel to the X axis +#define DRAW_LINEY 0x002 // draw lines parallel to the Y axis +#define DRAW_LINEXY 0x003 // draw lines parallel to both the X and Y axis +#define MAG_COLOR 0x004 // draw the mesh with a color dependent of the magnitude +#define BASE_CONT 0x008 // draw contour plot at bottom xy plane +#define TOP_CONT 0x010 // draw contour plot at top xy plane +#define SURF_CONT 0x020 // draw contour plot at surface +#define DRAW_SIDES 0x040 // draw sides +#define FACETED 0x080 // draw outline for each square that makes up the surface +#define MESH 0x100 // draw mesh -// image operations -#if 0 -#define ZEROW2B 1 -#define ZEROW2D 2 -#define ONEW2B 3 -#define ONEW2D 4 -#endif +// End of data that is derived from numerical #defines in include/plplot.h -// definitions for the opt argument in plsurf3d() +//-------------------------------------------------------------------------- +// Complex data types and other good stuff +//-------------------------------------------------------------------------- -#define DRAW_LINEX 0x01 // draw lines parallel to the X axis -#define DRAW_LINEY 0x02 // draw lines parallel to the Y axis -#define DRAW_LINEXY 0x03 // draw lines parallel to both the X and Y axes -#define MAG_COLOR 0x04 // draw the mesh with a color dependent of the magnitude -#define BASE_CONT 0x08 // draw contour plot at bottom xy plane -#define TOP_CONT 0x10 // draw contour plot at top xy plane -#define SURF_CONT 0x20 // draw contour plot at surface -#define DRAW_SIDES 0x40 // draw sides -#define FACETED 0x80 // draw outline for each square that makes up the surface -#define MESH 0x100 // draw mesh - -// Flags for plbin() - opt argument -#define PL_BIN_DEFAULT 0 -#define PL_BIN_CENTRED 1 -#define PL_BIN_NOEXPAND 2 -#define PL_BIN_NOEMPTY 4 - -// Flags for plhist() - opt argument; note: some flags are passed to -// plbin() for the actual plotting -#define PL_HIST_DEFAULT 0 -#define PL_HIST_NOSCALING 1 -#define PL_HIST_IGNORE_OUTLIERS 2 -#define PL_HIST_NOEXPAND 8 -#define PL_HIST_NOEMPTY 16 - -//flags used for position argument of both pllegend and plcolorbar -#define PL_POSITION_LEFT 1 -#define PL_POSITION_RIGHT 2 -#define PL_POSITION_TOP 4 -#define PL_POSITION_BOTTOM 8 -#define PL_POSITION_INSIDE 16 -#define PL_POSITION_OUTSIDE 32 -#define PL_POSITION_VIEWPORT 64 -#define PL_POSITION_SUBPAGE 128 - - -// Flags for pllegend. -#define PL_LEGEND_NONE 1 -#define PL_LEGEND_COLOR_BOX 2 -#define PL_LEGEND_LINE 4 -#define PL_LEGEND_SYMBOL 8 -#define PL_LEGEND_TEXT_LEFT 16 -#define PL_LEGEND_BACKGROUND 32 -#define PL_LEGEND_BOUNDING_BOX 64 -#define PL_LEGEND_ROW_MAJOR 128 - -// Flags for plcolorbar -#define PL_COLORBAR_LABEL_LEFT 0x1 -#define PL_COLORBAR_LABEL_RIGHT 0x2 -#define PL_COLORBAR_LABEL_TOP 0x4 -#define PL_COLORBAR_LABEL_BOTTOM 0x8 -#define PL_COLORBAR_IMAGE 0x10 -#define PL_COLORBAR_SHADE 0x20 -#define PL_COLORBAR_GRADIENT 0x40 -#define PL_COLORBAR_CAP_NONE 0x80 -#define PL_COLORBAR_CAP_LOW 0x100 -#define PL_COLORBAR_CAP_HIGH 0x200 -#define PL_COLORBAR_SHADE_LABEL 0x400 -#define PL_COLORBAR_ORIENT_RIGHT 0x800 -#define PL_COLORBAR_ORIENT_TOP 0x1000 -#define PL_COLORBAR_ORIENT_LEFT 0x2000 -#define PL_COLORBAR_ORIENT_BOTTOM 0x4000 -#define PL_COLORBAR_BACKGROUND 0x8000 -#define PL_COLORBAR_BOUNDING_BOX 0x10000 - -// Window parameter tags - -#define PLSWIN_DEVICE 1 // device coordinates -#define PLSWIN_WORLD 2 // world coordinates - -// Axis label tags -#define PL_X_AXIS 1 // The x-axis -#define PL_Y_AXIS 2 // The y-axis -#define PL_Z_AXIS 3 // The z-axis - -// PLplot Option table & support constants - -// Option-specific settings - -#define PL_OPT_ENABLED 0x0001 // Obsolete -#define PL_OPT_ARG 0x0002 // Option has an argment -#define PL_OPT_NODELETE 0x0004 // Don't delete after processing -#define PL_OPT_INVISIBLE 0x0008 // Make invisible -#define PL_OPT_DISABLED 0x0010 // Processing is disabled - -// Option-processing settings -- mutually exclusive - -#define PL_OPT_FUNC 0x0100 // Call handler function -#define PL_OPT_BOOL 0x0200 // Set *var = 1 -#define PL_OPT_INT 0x0400 // Set *var = atoi(optarg) -#define PL_OPT_FLOAT 0x0800 // Set *var = atof(optarg) -#define PL_OPT_STRING 0x1000 // Set var = optarg - -// Global mode settings -// These override per-option settings - -#define PL_PARSE_PARTIAL 0x0000 // For backward compatibility -#define PL_PARSE_FULL 0x0001 // Process fully & exit if error -#define PL_PARSE_QUIET 0x0002 // Don't issue messages -#define PL_PARSE_NODELETE 0x0004 // Don't delete options after - // processing -#define PL_PARSE_SHOWALL 0x0008 // Show invisible options -#define PL_PARSE_OVERRIDE 0x0010 // Obsolete -#define PL_PARSE_NOPROGRAM 0x0020 // Program name NOT in *argv[0].. -#define PL_PARSE_NODASH 0x0040 // Set if leading dash NOT required -#define PL_PARSE_SKIP 0x0080 // Skip over unrecognized args - -// FCI (font characterization integer) related constants. -#define PL_FCI_MARK 0x80000000 -#define PL_FCI_IMPOSSIBLE 0x00000000 -#define PL_FCI_HEXDIGIT_MASK 0xf -#define PL_FCI_HEXPOWER_MASK 0x7 -#define PL_FCI_HEXPOWER_IMPOSSIBLE 0xf -// These define hexpower values corresponding to each font attribute. -#define PL_FCI_FAMILY 0x0 -#define PL_FCI_STYLE 0x1 -#define PL_FCI_WEIGHT 0x2 -// These are legal values for font family attribute -#define PL_FCI_SANS 0x0 -#define PL_FCI_SERIF 0x1 -#define PL_FCI_MONO 0x2 -#define PL_FCI_SCRIPT 0x3 -#define PL_FCI_SYMBOL 0x4 -// These are legal values for font style attribute -#define PL_FCI_UPRIGHT 0x0 -#define PL_FCI_ITALIC 0x1 -#define PL_FCI_OBLIQUE 0x2 -// These are legal values for font weight attribute -#define PL_FCI_MEDIUM 0x0 -#define PL_FCI_BOLD 0x1 - -#define PL_MAXKEY 16 - +// Structure for describing the plot window typedef struct { int type; // of event (CURRENTLY UNUSED) @@ -217,28 +224,6 @@ } PLGraphicsIn; -// Structure for describing the plot window - -#define PL_MAXWINDOWS 64 // Max number of windows/page tracked - -// Macro used (in some cases) to ignore value of argument -// I don't plan on changing the value so you can hard-code it - -#define PL_NOTSET ( -42 ) - - -#define PLESPLFLTBUFFERING_ENABLE 1 -#define PLESPLFLTBUFFERING_DISABLE 2 -#define PLESPLFLTBUFFERING_QUERY 3 - -#define GRID_CSA 1 // Bivariate Cubic Spline approximation -#define GRID_DTLI 2 // Delaunay Triangulation Linear Interpolation -#define GRID_NNI 3 // Natural Neighbors Interpolation -#define GRID_NNIDW 4 // Nearest Neighbors Inverse Distance Weighted -#define GRID_NNLI 5 // Nearest Neighbors Linear Interpolation -#define GRID_NNAIDW 6 // Nearest Neighbors Around Inverse Distance Weighted - - #ifdef SWIG_PYTHON #define SWIG_OBJECT_DATA PYOBJECT_DATA #define SWIG_OBJECT_DATA_img PYOBJECT_DATA_img This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 22:19:16
|
Revision: 12684 http://sourceforge.net/p/plplot/code/12684 Author: airwin Date: 2013-11-12 22:19:13 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Express more of the numerically #defined constants as hexadecimal constants where appropriate (i.e., where typically only one bit is set). Untested. Modified Paths: -------------- trunk/include/plplot.h Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2013-11-12 10:16:40 UTC (rev 12683) +++ trunk/include/plplot.h 2013-11-12 22:19:13 UTC (rev 12684) @@ -830,10 +830,10 @@ // Plot a histogram using x to store data values and y to store frequencies // Flags for plbin() - opt argument -#define PL_BIN_DEFAULT 0 -#define PL_BIN_CENTRED 1 -#define PL_BIN_NOEXPAND 2 -#define PL_BIN_NOEMPTY 4 +#define PL_BIN_DEFAULT 0x0 +#define PL_BIN_CENTRED 0x1 +#define PL_BIN_NOEXPAND 0x2 +#define PL_BIN_NOEMPTY 0x4 PLDLLIMPEXP void c_plbin( PLINT nbin, const PLFLT *x, const PLFLT *y, PLINT opt ); @@ -1159,11 +1159,11 @@ // Flags for plhist() - opt argument; note: some flags are passed to // plbin() for the actual plotting -#define PL_HIST_DEFAULT 0 -#define PL_HIST_NOSCALING 1 -#define PL_HIST_IGNORE_OUTLIERS 2 -#define PL_HIST_NOEXPAND 8 -#define PL_HIST_NOEMPTY 16 +#define PL_HIST_DEFAULT 0x00 +#define PL_HIST_NOSCALING 0x01 +#define PL_HIST_IGNORE_OUTLIERS 0x02 +#define PL_HIST_NOEXPAND 0x08 +#define PL_HIST_NOEMPTY 0x10 PLDLLIMPEXP void c_plhist( PLINT n, const PLFLT *data, PLFLT datmin, PLFLT datmax, @@ -1384,16 +1384,16 @@ // DRAW_LINEX *must* be 1 and DRAW_LINEY *must* be 2, because of legacy code! // -#define DRAW_LINEX ( 1 << 0 ) // draw lines parallel to the X axis -#define DRAW_LINEY ( 1 << 1 ) // draw lines parallel to the Y axis -#define DRAW_LINEXY ( DRAW_LINEX | DRAW_LINEY ) // draw lines parallel to both the X and Y axis -#define MAG_COLOR ( 1 << 2 ) // draw the mesh with a color dependent of the magnitude -#define BASE_CONT ( 1 << 3 ) // draw contour plot at bottom xy plane -#define TOP_CONT ( 1 << 4 ) // draw contour plot at top xy plane -#define SURF_CONT ( 1 << 5 ) // draw contour plot at surface -#define DRAW_SIDES ( 1 << 6 ) // draw sides -#define FACETED ( 1 << 7 ) // draw outline for each square that makes up the surface -#define MESH ( 1 << 8 ) // draw mesh +#define DRAW_LINEX 0x001 // draw lines parallel to the X axis +#define DRAW_LINEY 0x002 // draw lines parallel to the Y axis +#define DRAW_LINEXY 0x003 // draw lines parallel to both the X and Y axis +#define MAG_COLOR 0x004 // draw the mesh with a color dependent of the magnitude +#define BASE_CONT 0x008 // draw contour plot at bottom xy plane +#define TOP_CONT 0x010 // draw contour plot at top xy plane +#define SURF_CONT 0x020 // draw contour plot at surface +#define DRAW_SIDES 0x040 // draw sides +#define FACETED 0x080 // draw outline for each square that makes up the surface +#define MESH 0x100 // draw mesh // // valid options for plot3dc(): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 10:16:42
|
Revision: 12683 http://sourceforge.net/p/plplot/code/12683 Author: airwin Date: 2013-11-12 10:16:40 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Change the two-argument min and max functions used in various examples to the exact variable number of argument min and max used in bindings/tk/pltools.tcl. This prevents a clash (found under plserver when editing the cmap1 colour palette for example 8) in min and max function definitions when these examples are running in examples/tk under plserver. Modified Paths: -------------- trunk/examples/tcl/x20.tcl trunk/examples/tcl/x21.tcl trunk/examples/tcl/x33.tcl Modified: trunk/examples/tcl/x20.tcl =================================================================== --- trunk/examples/tcl/x20.tcl 2013-11-12 08:15:37 UTC (rev 12682) +++ trunk/examples/tcl/x20.tcl 2013-11-12 10:16:40 UTC (rev 12683) @@ -514,11 +514,20 @@ #---------------------------------------------------------------------------- # proc max and min -proc max {x y} { - expr {$x > $y? $x : $y} +proc min {args} { + set x [lindex $args 0] + foreach i $args { + if {$i<$x} {set x $i} + } + return $x } -proc min {x y} { - expr {$x > $y? $y : $x} + +proc max {args} { + set x [lindex $args 0] + foreach i $args { + if {$i>$x} {set x $i} + } + return $x } Modified: trunk/examples/tcl/x21.tcl =================================================================== --- trunk/examples/tcl/x21.tcl 2013-11-12 08:15:37 UTC (rev 12682) +++ trunk/examples/tcl/x21.tcl 2013-11-12 10:16:40 UTC (rev 12683) @@ -269,14 +269,22 @@ #---------------------------------------------------------------------------- # proc max and min -proc max {x y} { - expr {$x > $y? $x : $y} +proc min {args} { + set x [lindex $args 0] + foreach i $args { + if {$i<$x} {set x $i} + } + return $x } -proc min {x y} { - expr {$x > $y? $y : $x} + +proc max {args} { + set x [lindex $args 0] + foreach i $args { + if {$i>$x} {set x $i} + } + return $x } - #---------------------------------------------------------------------------- # proc cmap1_init # Set up the colour map Modified: trunk/examples/tcl/x33.tcl =================================================================== --- trunk/examples/tcl/x33.tcl 2013-11-12 08:15:37 UTC (rev 12682) +++ trunk/examples/tcl/x33.tcl 2013-11-12 10:16:40 UTC (rev 12683) @@ -975,10 +975,18 @@ } # Auxiliary routines -proc max {a b} { - expr {$a > $b? $a : $b} +proc min {args} { + set x [lindex $args 0] + foreach i $args { + if {$i<$x} {set x $i} + } + return $x } -proc min {a b} { - expr {$a < $b? $a : $b} +proc max {args} { + set x [lindex $args 0] + foreach i $args { + if {$i>$x} {set x $i} + } + return $x } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 08:15:42
|
Revision: 12682 http://sourceforge.net/p/plplot/code/12682 Author: airwin Date: 2013-11-12 08:15:37 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Add some more output of version information. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-12 06:03:11 UTC (rev 12681) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-12 08:15:37 UTC (rev 12682) @@ -109,6 +109,7 @@ if(ITCL_INCLUDE_PATH) message(STATUS "Looking for itcl.h - found") message(STATUS "ITCL_INCLUDE_PATH = ${ITCL_INCLUDE_PATH}") + message(STATUS "PLPLOT_ITCL_VERSION = ${PLPLOT_ITCL_VERSION}") message(STATUS "Checking for Itcl header version consistency") string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITCL_MAJOR_VERSION "${PLPLOT_ITCL_VERSION}") @@ -217,6 +218,7 @@ if(ITK_INCLUDE_PATH) message(STATUS "Looking for itk.h - found") message(STATUS "ITK_INCLUDE_PATH = ${ITK_INCLUDE_PATH}") + message(STATUS "PLPLOT_ITK_VERSION = ${PLPLOT_ITK_VERSION}") message(STATUS "Checking for Itk header version consistency") string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITK_MAJOR_VERSION "${PLPLOT_ITK_VERSION}") @@ -299,11 +301,12 @@ list(GET IWIDGETS_VERSIONS_LIST 0 PLPLOT_IWIDGETS_VERSION) list(GET IWIDGETS_VERSIONS_LIST 1 CONSISTENT_ITK_VERSION) list(GET IWIDGETS_VERSIONS_LIST 2 CONSISTENT_ITCL_VERSION) + + message(STATUS "PLPLOT_IWIDGETS_VERSION = ${PLPLOT_IWIDGETS_VERSION}") message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent") if(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent - true") else(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) - message(STATUS "PLPLOT_IWIDGETS_VERSION = ${PLPLOT_IWIDGETS_VERSION}") message(STATUS "PLPLOT_ITK_VERSION = ${PLPLOT_ITK_VERSION}") message(STATUS "CONSISTENT_ITK_VERSION = ${CONSISTENT_ITK_VERSION}") message(STATUS "PLPLOT_ITCL_VERSION = ${PLPLOT_ITCL_VERSION}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 06:03:22
|
Revision: 12681 http://sourceforge.net/p/plplot/code/12681 Author: airwin Date: 2013-11-12 06:03:11 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Forgot to use the global attribute when necessary for new global variables pl_itcl_package_name and pl_iwidgets_package_name. For all PLplot Tk GUI's these fixes allow access to the "Itcl" version of the file chooser and also provides an "Itcl" "Palettes" menu item which appears to work perfectly. Modified Paths: -------------- trunk/bindings/tk/pltools.tcl trunk/bindings/tk/plwidget.tcl Modified: trunk/bindings/tk/pltools.tcl =================================================================== --- trunk/bindings/tk/pltools.tcl 2013-11-12 05:49:16 UTC (rev 12680) +++ trunk/bindings/tk/pltools.tcl 2013-11-12 06:03:11 UTC (rev 12681) @@ -256,6 +256,7 @@ #---------------------------------------------------------------------------- proc fileSelect {{filter {}}} { + global pl_iwidgets_package_name # Use the Iwidgets file selector if available if ![catch {eval package require $pl_iwidgets_package_name}] { Modified: trunk/bindings/tk/plwidget.tcl =================================================================== --- trunk/bindings/tk/plwidget.tcl 2013-11-12 05:49:16 UTC (rev 12680) +++ trunk/bindings/tk/plwidget.tcl 2013-11-12 06:03:11 UTC (rev 12681) @@ -556,7 +556,7 @@ proc plw::create_pmenu_palettes {w} { global pmenu; set m $pmenu($w).palettes - global plopt_static_redraw plopt_dynamic_redraw + global plopt_static_redraw plopt_dynamic_redraw pl_itcl_package_name # The palette tools require Itcl 3.0 or later. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 05:49:20
|
Revision: 12680 http://sourceforge.net/p/plplot/code/12680 Author: airwin Date: 2013-11-12 05:49:16 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Update the directions for running the standard Tcl PLplot examples by hand. Modified Paths: -------------- trunk/examples/tcl/README.tcldemos Modified: trunk/examples/tcl/README.tcldemos =================================================================== --- trunk/examples/tcl/README.tcldemos 2013-11-12 05:48:09 UTC (rev 12679) +++ trunk/examples/tcl/README.tcldemos 2013-11-12 05:49:16 UTC (rev 12680) @@ -1,23 +1,33 @@ Running the Tcl Demos. -PLplot doesn't need to be installed to run these demos. -However, different commands might be needed to run the demos when PLplot -is installed or not; in these cases, the first command must be used for -the installed situation, while the second, separeted by a '|', is for the -uninstalled situation. +There are two ways to run the examples below, where the alternatives +are indicated by "|". The first alternative should only be used if +you have changed directories to +$prefix/share/plplot$VERSION/examples/tcl where $prefix is the PLplot +install prefix and $VERSION is the PLplot release version, e.g., +5.9.10. (That is, the first alternative should be used if you have +changed directories to the installed tk examples directory.) The +second alternative should only be used if you have changed directories +to bindings/examples/tk in the build tree. + To run individual examples, run the x?? script corresponding to the x??.tcl -example, where ?? is 01 through 19. To find out all the possible command-line -options run pltcl -h (every x?? script runs pltcl). -For the uninstalled situation, do PATH=../../utils:$PATH x?? +example, where ?? is 00 through 33 (except for 32), e.g., +./x00 -dev xwin | env PATH=../../utils:$PATH ./x00 -dev xwin + +Note, -dev xwin is just one possible PLplot driver, and there are many others. + +To find out all the possible command-line +options run pltcl -h or x?? -h (every x?? script runs pltcl). + To run the plot.tcl demo follow the directions in that file to run it under pltcl with the various standard devices. To run the plgrid.tcl demo follow the directions in that file to run it under pltcl with the various standard devices. -tcldemos.tcl runs all 19 examples. +tcldemos.tcl runs all the standard examples except for example 32. There are two ways to run tcldemos.tcl: @@ -25,12 +35,15 @@ pltcl | ../../utils/pltcl plinit source tcldemos.tcl +0 1 2 .... Note the pltcl command has normal PLplot command-line options (run pltcl -h -to find out what they are). +to find out what they are). In fact, you can specify, e.g., -dev tk or +-dev xwin, but since plinit has to be run in any case, you might as +well use the device driver chooser in that case. (2) Note, fill in $prefix below with whatever you configured for the install prefix (/usr/local/plplot or whatever) and $VERSION with the plplot VERSION @@ -41,6 +54,7 @@ package require Pltcl plinit source tcldemos.tcl +0 1 2 .... @@ -49,6 +63,5 @@ package) use man tclsh. Both the pltcl and tclsh methods execute the various x??.tcl examples -corresponding to the numbers specified by the user. A few of the x??.tcl -examples will return the message that they have not been implemented, but -the rest should work smoothly without problems. +corresponding to the numbers (in the range from 0 to 33, except for 32) +specified by the user. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 05:48:14
|
Revision: 12679 http://sourceforge.net/p/plplot/code/12679 Author: airwin Date: 2013-11-12 05:48:09 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Correct some bit rot due to replacing our long-since-retired (!) autotools-based build system with the present CMake-based build system. As a result of this change, the Tcl standard examples can now be run from tclsh by following the directions in examples/tcl/README.tcldemos. Modified Paths: -------------- trunk/bindings/tcl/pkgIndex.tcl.in Modified: trunk/bindings/tcl/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-12 03:22:18 UTC (rev 12678) +++ trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-12 05:48:09 UTC (rev 12679) @@ -37,7 +37,7 @@ set buildDir "@BUILD_DIR@" set bLen [string length $buildDir] if {![string compare -length $bLen $buildDir $thisDir]} then { - set searchdirs ".libs"} else { + set searchdirs "."} else { set searchdirs [list "@LIB_HARDDIR@"]} #puts $searchdirs # prefer double precision version @@ -74,4 +74,3 @@ } package ifneeded Pltcl @PLPLOT_VERSION@ [list load_pkg_Pltcl $dir] - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 03:22:21
|
Revision: 12678 http://sourceforge.net/p/plplot/code/12678 Author: airwin Date: 2013-11-12 03:22:18 +0000 (Tue, 12 Nov 2013) Log Message: ----------- Use PLPLOT_ITCL_VERSION, PLPLOT_ITK_VERSION, and PLPLOT_IWIDGETS_VERSION (now #defined in C environment) to create Tcl global variables pl_itcl_package_name, pl_itk_package_name, and pl_iwidgets_package_name. Use those global variables containing the package name and version for Itcl, Itk, and Iwidgets wherever the "package require Itcl", "package require Itk", and "package require Iwidgets" were used previously in tcl scripts. Tested by: Alan W. Irwin <ai...@us...> on Linux using the test_interactive target in the build tree. There were no run-time errors, and the "itcl" examples (targets test_tk_02 and test_tk_04) worked without issues, but the "itcl" menu items for colour palette manipulation were missing. Thus, these changes introduce a colour palette regression that needs to be fixed. Modified Paths: -------------- trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/PLWin.itk trunk/bindings/tk/Pltkwin.tcl trunk/bindings/tk/plcolor.tcl trunk/bindings/tk/pltools.tcl trunk/bindings/tk/plwidget.tcl trunk/bindings/tk-x-plat/Memberscope.tcl trunk/bindings/tk-x-plat/Plplotwin.tcl trunk/bindings/tk-x-plat/Plwindow.tcl trunk/bindings/tk-x-plat/plbarchart.tcl trunk/bindings/tk-x-plat/pltimeseries.tcl trunk/bindings/tk-x-plat/plwidget2.tcl trunk/cmake/modules/tcl-related.cmake trunk/examples/tk/tk02.in trunk/examples/tk/tk04.in Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tcl/tclAPI.c 2013-11-12 03:22:18 UTC (rev 12678) @@ -443,6 +443,37 @@ Tcl_SetVar( interp, "plversion", PLPLOT_VERSION, TCL_GLOBAL_ONLY ); + if ( strcmp( PLPLOT_ITCL_VERSION, "4.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 4", TCL_GLOBAL_ONLY ); + else if ( strcmp( PLPLOT_ITCL_VERSION, "3.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl 3", TCL_GLOBAL_ONLY ); + else + // Mark invalid package name in such a way as to cause an error + // when, for example, itcl has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Itcl. + Tcl_SetVar( interp, "pl_itcl_package_name", "Itcl(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + + if ( strcmp( PLPLOT_ITK_VERSION, "4.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itk_package_name", "Itk 4", TCL_GLOBAL_ONLY ); + else if ( strcmp( PLPLOT_ITK_VERSION, "3.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_itk_package_name", "Itk 3", TCL_GLOBAL_ONLY ); + else + // Mark invalid package name in such a way as to cause an error + // when, for example, itk has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Itk. + Tcl_SetVar( interp, "pl_itk_package_name", "Itk(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + + if ( strcmp( PLPLOT_IWIDGETS_VERSION, "4.1.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets 4", TCL_GLOBAL_ONLY ); + else if ( strcmp( PLPLOT_IWIDGETS_VERSION, "4.0.0" ) >= 0 ) + Tcl_SetVar( interp, "pl_iwidgets_package_name", "-exact Iwidgets " PLPLOT_IWIDGETS_VERSION, TCL_GLOBAL_ONLY ); + else + // Mark invalid package name in such a way as to cause an error + // when, for example, itk has been disabled by PLplot, yet one + // of the PLplot Tcl scripts attempts to load Iwidgets. + Tcl_SetVar( interp, "pl_iwidgets_package_name", "Iwidgets(because_not_found_by_PLplot)", TCL_GLOBAL_ONLY ); + + // Begin search for init script // Each search begins with a test of libDir, so rearrangement is easy. // If search is successful, both libDir (C) and pllibrary (tcl) are set Modified: trunk/bindings/tk/PLWin.itk =================================================================== --- trunk/bindings/tk/PLWin.itk 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/PLWin.itk 2013-11-12 03:22:18 UTC (rev 12678) @@ -7,7 +7,7 @@ # $Id$ ############################################################################### -package require Itk +eval package require $pl_itk_package_name itcl::class PLWin { inherit itk::Widget Modified: trunk/bindings/tk/Pltkwin.tcl =================================================================== --- trunk/bindings/tk/Pltkwin.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/Pltkwin.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -36,9 +36,7 @@ # We don't need version numbers because we use the first versions # which actually use the 'package' mechanism. package require Pltk -package require Itcl -package require Itk -package require Iwidgets +eval package require $pl_iwidgets_package_name itcl::class Pltkwin { inherit PLWin Modified: trunk/bindings/tk/plcolor.tcl =================================================================== --- trunk/bindings/tk/plcolor.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/plcolor.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -69,7 +69,7 @@ set colorSpace hsl -package require Itcl +eval package require $pl_itcl_package_name itcl::class ColorEditor { private variable r 255 Modified: trunk/bindings/tk/pltools.tcl =================================================================== --- trunk/bindings/tk/pltools.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/pltools.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -258,7 +258,7 @@ proc fileSelect {{filter {}}} { # Use the Iwidgets file selector if available - if ![catch {package require Iwidgets}] { + if ![catch {eval package require $pl_iwidgets_package_name}] { if {![winfo exist .fs]} { iwidgets::fileselectiondialog .fs -modality application } Modified: trunk/bindings/tk/plwidget.tcl =================================================================== --- trunk/bindings/tk/plwidget.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk/plwidget.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -560,7 +560,7 @@ # The palette tools require Itcl 3.0 or later. - if [catch {package require Itcl 3.0}] { return } + if [catch {eval package require $pl_itcl_package_name}] { return } $pmenu($w) add cascade -label "Palettes" -menu $m menu $m Modified: trunk/bindings/tk-x-plat/Memberscope.tcl =================================================================== --- trunk/bindings/tk-x-plat/Memberscope.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/Memberscope.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -2,7 +2,7 @@ # Use, copy, sell, rewrite, improve however you like. # Vince Darley. -package require Itcl +eval package require $pl_itcl_package_name itcl::class Memberscope { protected method memberscope {var} Modified: trunk/bindings/tk-x-plat/Plplotwin.tcl =================================================================== --- trunk/bindings/tk-x-plat/Plplotwin.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/Plplotwin.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -51,7 +51,7 @@ package require Tk 8.0 package require Plplotter -package require Itk 3.0 +eval package require $pl_itk_package_name # # Usual options. Modified: trunk/bindings/tk-x-plat/Plwindow.tcl =================================================================== --- trunk/bindings/tk-x-plat/Plwindow.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/Plwindow.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -13,9 +13,8 @@ option add *Plwindow.width 250 widgetDefault option add *Plwindow.height 250 widgetDefault -package require Itk 3.0 package require Plplotter - +eval package require $pl_itk_package_name # # Usual options. # Modified: trunk/bindings/tk-x-plat/plbarchart.tcl =================================================================== --- trunk/bindings/tk-x-plat/plbarchart.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/plbarchart.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -17,8 +17,7 @@ ## package require Plplotter -package require Itk - +eval package require $pl_itk_package_name proc plbarchart {args} {uplevel Plbarchart $args} itcl::class Plbarchart { Modified: trunk/bindings/tk-x-plat/pltimeseries.tcl =================================================================== --- trunk/bindings/tk-x-plat/pltimeseries.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/pltimeseries.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -17,8 +17,7 @@ ## package require Plplotter -package require Itk - +eval package require $pl_itk_package_name proc pltimeseries {args} {uplevel Pltimeseries $args} itcl::class Pltimeseries { Modified: trunk/bindings/tk-x-plat/plwidget2.tcl =================================================================== --- trunk/bindings/tk-x-plat/plwidget2.tcl 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/bindings/tk-x-plat/plwidget2.tcl 2013-11-12 03:22:18 UTC (rev 12678) @@ -533,11 +533,11 @@ $m add checkbutton -label "Doublebuffer" -variable \ plotopts($w,dbl) -command "$w.plwin configure -doublebuffer \$plotopts($w,dbl)" - global plopt_static_redraw plopt_dynamic_redraw + global plopt_static_redraw plopt_dynamic_redraw pl_itcl_package_name # The palette tools require Itcl 3.0 or later. - if [catch {package require Itcl 3.0}] { return } + if [catch {eval package require $pl_itcl_package_name}] { return } # Set up redraw variables. Basically if you have r/w colorcells (e.g. # PseudoColor visual, not sure if any others), you don't need either of Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-12 03:22:18 UTC (rev 12678) @@ -296,14 +296,14 @@ endforeach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) endif(USE_INCRTCL_VERSION_4) if(NOT IWIDGETS_RC) - list(GET IWIDGETS_VERSIONS_LIST 0 IWIDGETS_VERSION) + list(GET IWIDGETS_VERSIONS_LIST 0 PLPLOT_IWIDGETS_VERSION) list(GET IWIDGETS_VERSIONS_LIST 1 CONSISTENT_ITK_VERSION) list(GET IWIDGETS_VERSIONS_LIST 2 CONSISTENT_ITCL_VERSION) message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent") if(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent - true") else(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) - message(STATUS "IWIDGETS_VERSION = ${IWIDGETS_VERSION}") + message(STATUS "PLPLOT_IWIDGETS_VERSION = ${PLPLOT_IWIDGETS_VERSION}") message(STATUS "PLPLOT_ITK_VERSION = ${PLPLOT_ITK_VERSION}") message(STATUS "CONSISTENT_ITK_VERSION = ${CONSISTENT_ITK_VERSION}") message(STATUS "PLPLOT_ITCL_VERSION = ${PLPLOT_ITCL_VERSION}") Modified: trunk/examples/tk/tk02.in =================================================================== --- trunk/examples/tk/tk02.in 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/examples/tk/tk02.in 2013-11-12 03:22:18 UTC (rev 12678) @@ -8,7 +8,8 @@ # @> A script for using Tk to control xtk01, using the PLplot itcl interface. ############################################################################### -package require Itk +package require Pltk +eval package require $pl_itk_package_name wm title . "x01c -- TK version" plstdwin . Modified: trunk/examples/tk/tk04.in =================================================================== --- trunk/examples/tk/tk04.in 2013-11-12 00:54:54 UTC (rev 12677) +++ trunk/examples/tk/tk04.in 2013-11-12 03:22:18 UTC (rev 12678) @@ -7,8 +7,8 @@ # @> A script illustrating use of 2-d tcl api (plframe). ############################################################################### -package require Itk - +package require Pltk +eval package require $pl_itk_package_name wm title . "tk04" plstdwin . This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-12 00:54:58
|
Revision: 12677 http://sourceforge.net/p/plplot/code/12677 Author: airwin Date: 2013-11-12 00:54:54 +0000 (Tue, 12 Nov 2013) Log Message: ----------- VERSION ==> PLPLOT_VERSION (to make the code easier to understand and to reduce the possibility of name clashes in the future). PLPLOT_TCL_VERSION ==> PLPLOT_VERSION (since we want to identifiy the PLplot tcl/tk bindings with PLPLOT_VERSION and not potentially some other version string. Propagate PLPLOT_ITCL_VERSION, PLPLOT_ITK_VERSION, and PLPLOT_IWIDGETS_VERSION from CMake to the C code environment. N.B. The first of these changes is quite intrusive so the tests below are useful but they are far from a guarantee that there are no lingering issues from this change. So stay alert for VERSION issues when you use the PLplot svn trunk. Tested by Alan W. Irwin <ai...@us...> on Linux using the test_noninteractive targets for the build tree and the traditional and CMake-based build systems for the installed examples tree. Modified Paths: -------------- trunk/CMakeLists.txt trunk/abi-compliance-checker.xml.template.in trunk/bindings/ocaml/META.in trunk/bindings/ocaml/plcairo/META.in trunk/bindings/tcl/pkgIndex.tcl.in trunk/bindings/tcl/tclAPI.c trunk/bindings/tk/Pltk_Init.c trunk/bindings/tk/pkgIndex.tcl.in trunk/bindings/tk-x-plat/Plplotter_Init.c trunk/bindings/tk-x-plat/pkgIndex.tcl.in trunk/cmake/modules/docbook.cmake trunk/cmake/modules/instdirs.cmake trunk/cmake/modules/plplot_version.cmake trunk/config.h.in trunk/doc/Doxyfile.in trunk/drivers/ps.c trunk/drivers/psttf.cc trunk/pkgcfg/plplot-template.pc.in trunk/plplot_test/plplot-test.sh.in trunk/src/plargs.c trunk/src/plcore.c Modified: trunk/CMakeLists.txt =================================================================== --- trunk/CMakeLists.txt 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/CMakeLists.txt 2013-11-12 00:54:54 UTC (rev 12677) @@ -248,7 +248,7 @@ endif(WIN32_AND_NOT_CYGWIN) set( CPACK_SOURCE_PACKAGE_FILE_NAME - "plplot-${VERSION}" + "plplot-${PLPLOT_VERSION}" CACHE INTERNAL "tarball basename" ) set(CPACK_SOURCE_GENERATOR TGZ) Modified: trunk/abi-compliance-checker.xml.template.in =================================================================== --- trunk/abi-compliance-checker.xml.template.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/abi-compliance-checker.xml.template.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -1,4 +1,4 @@ -<version>${VERSION}</version> +<version>${PLPLOT_VERSION}</version> <headers> ${PREFIX}/include/plplot </headers> Modified: trunk/bindings/ocaml/META.in =================================================================== --- trunk/bindings/ocaml/META.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/ocaml/META.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -1,7 +1,7 @@ # findlib META file for ocaml-plplot requires = "" description = "PLplot library bindings" -version = "@VERSION@" +version = "@PLPLOT_VERSION@" browse_interfaces = " Plplot " linkopts = "-ccopt \"-L@SHLIB_DIR@\"" archive(byte) = "plplot.cma" Modified: trunk/bindings/ocaml/plcairo/META.in =================================================================== --- trunk/bindings/ocaml/plcairo/META.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/ocaml/plcairo/META.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -2,7 +2,7 @@ requires = "plplot" requires += "cairo" description = "PLplot Cairo extras" -version = "@VERSION@" +version = "@PLPLOT_VERSION@" browse_interfaces = " Plcairo " archive(byte) = "plcairo.cma" archive(native) = "plcairo.cmxa" Modified: trunk/bindings/tcl/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/tcl/pkgIndex.tcl.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -73,5 +73,5 @@ rename load_pkg_Pltcl {} } -package ifneeded Pltcl @PLPLOT_TCL_VERSION@ [list load_pkg_Pltcl $dir] +package ifneeded Pltcl @PLPLOT_VERSION@ [list load_pkg_Pltcl $dir] Modified: trunk/bindings/tcl/tclAPI.c =================================================================== --- trunk/bindings/tcl/tclAPI.c 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/tcl/tclAPI.c 2013-11-12 00:54:54 UTC (rev 12677) @@ -398,10 +398,10 @@ int debug = plsc->debug; const char *libDir = NULL; static char initScript[] = - "tcl_findLibrary plplot " VERSION " \"\" plplot.tcl PL_LIBRARY pllibrary"; + "tcl_findLibrary plplot " PLPLOT_VERSION " \"\" plplot.tcl PL_LIBRARY pllibrary"; #ifdef PLPLOT_EXTENDED_SEARCH static char initScriptExtended[] = - "tcl_findLibrary plplot " VERSION "/tcl \"\" plplot.tcl PL_LIBRARY pllibrary"; + "tcl_findLibrary plplot " PLPLOT_VERSION "/tcl \"\" plplot.tcl PL_LIBRARY pllibrary"; #endif #ifdef USE_TCL_STUBS @@ -441,7 +441,7 @@ #endif #endif - Tcl_SetVar( interp, "plversion", VERSION, TCL_GLOBAL_ONLY ); + Tcl_SetVar( interp, "plversion", PLPLOT_VERSION, TCL_GLOBAL_ONLY ); // Begin search for init script // Each search begins with a test of libDir, so rearrangement is easy. @@ -606,7 +606,7 @@ // We really need this so the TEA based 'make install' can // properly determine the package we have installed - Tcl_PkgProvide( interp, "Pltcl", VERSION ); + Tcl_PkgProvide( interp, "Pltcl", PLPLOT_VERSION ); return TCL_OK; } Modified: trunk/bindings/tk/Pltk_Init.c =================================================================== --- trunk/bindings/tk/Pltk_Init.c 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/tk/Pltk_Init.c 2013-11-12 00:54:54 UTC (rev 12677) @@ -101,7 +101,7 @@ } #endif - Tcl_PkgProvide( interp, "Pltk", VERSION ); + Tcl_PkgProvide( interp, "Pltk", PLPLOT_VERSION ); return TCL_OK; } Modified: trunk/bindings/tk/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tk/pkgIndex.tcl.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/tk/pkgIndex.tcl.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -90,4 +90,4 @@ rename load_pkg_Pltk {} } -package ifneeded Pltk @PLPLOT_TCL_VERSION@ [list load_pkg_Pltk $dir] +package ifneeded Pltk @PLPLOT_VERSION@ [list load_pkg_Pltk $dir] Modified: trunk/bindings/tk-x-plat/Plplotter_Init.c =================================================================== --- trunk/bindings/tk-x-plat/Plplotter_Init.c 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/tk-x-plat/Plplotter_Init.c 2013-11-12 00:54:54 UTC (rev 12677) @@ -90,7 +90,7 @@ Tcl_CreateCommand( interp, "plframe", (Tcl_CmdProc *) plPlotterCmd, (ClientData) NULL, (Tcl_CmdDeleteProc *) NULL ); - Tcl_PkgProvide( interp, "Plplotter", VERSION ); + Tcl_PkgProvide( interp, "Plplotter", PLPLOT_VERSION ); return TCL_OK; } Modified: trunk/bindings/tk-x-plat/pkgIndex.tcl.in =================================================================== --- trunk/bindings/tk-x-plat/pkgIndex.tcl.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/bindings/tk-x-plat/pkgIndex.tcl.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -90,5 +90,5 @@ rename load_pkg_Plplotter {} } -package ifneeded Plplotter @PLPLOT_TCL_VERSION@ [list load_pkg_Plplotter $dir] +package ifneeded Plplotter @PLPLOT_VERSION@ [list load_pkg_Plplotter $dir] Modified: trunk/cmake/modules/docbook.cmake =================================================================== --- trunk/cmake/modules/docbook.cmake 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/cmake/modules/docbook.cmake 2013-11-12 00:54:54 UTC (rev 12677) @@ -333,11 +333,11 @@ # The "MANIFEST" variables needed in top-level CMakeLists.txt and # in doc/docbook/src/CMakeLists.txt. if(BUILD_DOC OR PREBUILT_DOC) - set(BASE "${PACKAGE}-${VERSION}") + set(BASE "${PACKAGE}-${PLPLOT_VERSION}") set(INFO_MANIFEST "INFO-MANIFEST") - set(BASE_INFO "${PACKAGE}-info-${VERSION}") + set(BASE_INFO "${PACKAGE}-info-${PLPLOT_VERSION}") set(MAN_MANIFEST "MAN-MANIFEST") - set(BASE_MAN "${PACKAGE}-man-${VERSION}") + set(BASE_MAN "${PACKAGE}-man-${PLPLOT_VERSION}") set(HTML_MANIFEST "HTML-MANIFEST") - set(BASE_HTML "${PACKAGE}-html-${VERSION}") + set(BASE_HTML "${PACKAGE}-html-${PLPLOT_VERSION}") endif(BUILD_DOC OR PREBUILT_DOC) Modified: trunk/cmake/modules/instdirs.cmake =================================================================== --- trunk/cmake/modules/instdirs.cmake 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/cmake/modules/instdirs.cmake 2013-11-12 00:54:54 UTC (rev 12677) @@ -75,7 +75,7 @@ # cached values above. # Data. -set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${PACKAGE}${VERSION}) +set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${PACKAGE}${PLPLOT_VERSION}) # Libraries. set(LIB_DIR ${CMAKE_INSTALL_LIBDIR}) @@ -90,7 +90,7 @@ set(SHLIB_DIR ${CMAKE_INSTALL_LIBDIR}) # Tcl files. -set(TCL_DIR ${CMAKE_INSTALL_DATADIR}/${PACKAGE}${VERSION}/tcl) +set(TCL_DIR ${CMAKE_INSTALL_DATADIR}/${PACKAGE}${PLPLOT_VERSION}/tcl) # Ada source files (*.adb, *.ads) (following recommendations in # http://www.ada-france.org/debian/debian-ada-policy.html @@ -101,7 +101,7 @@ set(ADA_LIB_DIR ${CMAKE_INSTALL_LIBDIR}/ada/adalib/plplotada${LIB_TAG}) # Drivers. -set(DRV_DIR ${CMAKE_INSTALL_LIBDIR}/${PACKAGE}${VERSION}/drivers${LIB_TAG}) +set(DRV_DIR ${CMAKE_INSTALL_LIBDIR}/${PACKAGE}${PLPLOT_VERSION}/drivers${LIB_TAG}) # Documentation. set(DOC_DIR ${CMAKE_INSTALL_DATADIR}/doc/${PACKAGE}) Modified: trunk/cmake/modules/plplot_version.cmake =================================================================== --- trunk/cmake/modules/plplot_version.cmake 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/cmake/modules/plplot_version.cmake 2013-11-12 00:54:54 UTC (rev 12677) @@ -4,16 +4,9 @@ # Version data that need review and possible modification for each release. -set(VERSION 5.9.10) +# Overall PLplot version number. +set(PLPLOT_VERSION 5.9.10) -# According to man package, PLPLOT_TCL_VERSION (used in the various -# pkgIndex.tcl scripts) should be strictly numbers alternating with -# decimal points with the first number (the major number) signifying -# incompatible changes in the scripts. To keep our life simple, let us -# use the same as the VERSION above so long as it is strictly numerical. - -set(PLPLOT_TCL_VERSION ${VERSION}) - # CPack version numbers for release tarball name. set(CPACK_PACKAGE_VERSION_MAJOR 5) set(CPACK_PACKAGE_VERSION_MINOR 9) Modified: trunk/config.h.in =================================================================== --- trunk/config.h.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/config.h.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -276,12 +276,17 @@ // Define to 1 if you have the ANSI C header files. #cmakedefine STDC_HEADERS 1 +// Overall PLplot version number +#define PLPLOT_VERSION "@PLPLOT_VERSION@" + // Location of Tcl stuff -#define TCL_DIR "@TCL_DIR@" +#define TCL_DIR "@TCL_DIR@" +// Consistent package versions for Itcl and friends found by PLplot +// If PLplot could not find consistent values these are set to 0.0.0 +#define PLPLOT_ITCL_VERSION "@PLPLOT_ITCL_VERSION@" +#define PLPLOT_ITK_VERSION "@PLPLOT_ITK_VERSION@" +#define PLPLOT_IWIDGETS_VERSION "@PLPLOT_IWIDGETS_VERSION@" -// Version number of package -#define VERSION "@VERSION@" - // Define if csa is desired #cmakedefine WITH_CSA Modified: trunk/doc/Doxyfile.in =================================================================== --- trunk/doc/Doxyfile.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/doc/Doxyfile.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -32,7 +32,7 @@ # This could be handy for archiving the generated documentation or # if some version control system is used. -PROJECT_NUMBER = @VERSION@ +PROJECT_NUMBER = @PLPLOT_VERSION@ # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer Modified: trunk/drivers/ps.c =================================================================== --- trunk/drivers/ps.c 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/drivers/ps.c 2013-11-12 00:54:54 UTC (rev 12677) @@ -252,7 +252,7 @@ fprintf( OF, "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%\n" ); fprintf( OF, "%%%%Title: PLplot Graph\n" ); - fprintf( OF, "%%%%Creator: PLplot Version %s\n", VERSION ); + fprintf( OF, "%%%%Creator: PLplot Version %s\n", PLPLOT_VERSION ); fprintf( OF, "%%%%CreationDate: %s\n", ps_getdate() ); fprintf( OF, "%%%%Pages: (atend)\n" ); fprintf( OF, "%%%%EndComments\n\n" ); Modified: trunk/drivers/psttf.cc =================================================================== --- trunk/drivers/psttf.cc 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/drivers/psttf.cc 2013-11-12 00:54:54 UTC (rev 12677) @@ -319,7 +319,7 @@ doc->osHeader() << "%%%%%%%%%%%%%%%%%%%%%%%%%%%\n"; doc->osHeader() << "%%Title: PLplot Graph\n"; - doc->osHeader() << "%%Creator: PLplot Version " << VERSION << "\n"; + doc->osHeader() << "%%Creator: PLplot Version " << PLPLOT_VERSION << "\n"; doc->osHeader() << "%%CreationDate: " << ps_getdate() << "\n"; doc->osHeader() << "%%Pages: (atend)\n"; doc->osHeader() << "%%EndComments\n\n"; Modified: trunk/pkgcfg/plplot-template.pc.in =================================================================== --- trunk/pkgcfg/plplot-template.pc.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/pkgcfg/plplot-template.pc.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -1,10 +1,10 @@ libdir=@SHLIB_DIR@ includedir=@INCLUDE_DIR@ -drvdir=@LIB_DIR@/plplot@VERSION@/drivers@LIB_TAG@ +drvdir=@LIB_DIR@/plplot@PLPLOT_VERSION@/drivers@LIB_TAG@ Name: PLplot @PC_SHORT_NAME@ Description: Scientific plotting library (@PC_LONG_NAME@@PC_PRECISION@ precision) @PC_REQUIRES_TAG@: @PC_REQUIRES@ -Version: @VERSION@ +Version: @PLPLOT_VERSION@ Libs: -L${libdir} @PC_LINK_FLAGS@ Cflags: -I${includedir} @PC_COMPILE_FLAGS@ Modified: trunk/plplot_test/plplot-test.sh.in =================================================================== --- trunk/plplot_test/plplot-test.sh.in 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/plplot_test/plplot-test.sh.in 2013-11-12 00:54:54 UTC (rev 12677) @@ -33,7 +33,7 @@ # (e.g., gv for postscript files and kview or a browser for png, gif, # or jpeg files on Linux systems) to make sure they display properly. -version=@VERSION@ +version=@PLPLOT_VERSION@ EXAMPLES_DIR=${EXAMPLES_DIR:-.} SRC_EXAMPLES_DIR=${SRC_EXAMPLES_DIR:-.} Modified: trunk/src/plargs.c =================================================================== --- trunk/src/plargs.c 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/src/plargs.c 2013-11-12 00:54:54 UTC (rev 12677) @@ -1578,7 +1578,7 @@ opt_v( const char * PL_UNUSED( opt ), const char * PL_UNUSED( opt_arg ), void * PL_UNUSED( client_data ) ) { if ( !mode_quiet ) - fprintf( stderr, "PLplot library version: %s\n", VERSION ); + fprintf( stderr, "PLplot library version: %s\n", PLPLOT_VERSION ); return 2; } Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2013-11-11 22:23:48 UTC (rev 12676) +++ trunk/src/plcore.c 2013-11-12 00:54:54 UTC (rev 12677) @@ -3823,7 +3823,7 @@ void c_plgver( char *p_ver ) { - strcpy( p_ver, VERSION ); + strcpy( p_ver, PLPLOT_VERSION ); } // Set inferior X window This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-11 22:23:51
|
Revision: 12676 http://sourceforge.net/p/plplot/code/12676 Author: airwin Date: 2013-11-11 22:23:48 +0000 (Mon, 11 Nov 2013) Log Message: ----------- Fix up CMake logic for version numbers associated with Itcl, Itk, and Iwidgets. In preparation for making these variables accessible from the PLplot C environment, replace ITCL_VERSION, ITK_VERSION, and IWIDGETS_VERSION everywhere with PLPLOT_ITCL_VERSION, PLPLOT_ITK_VERSION, and PLPLOT_IWIDGETS_VERSION Set PLPLOT_ITCL_VERSION to 0.0.0 to mark when this version number should not be used (i.e., when enable_itcl if OFF). Set PLPLOT_ITK_VERSION and PLPLOT_IWIDGETS_VERSION to 0.0.0 to mark when these version numbers should not be used (i.e., when enable_itk if OFF). Drop plitcl_packagename, plikt_packagename, and pliwidgets_packagename everywhere since the plan for making those variables accessible from the PLplot C environment has been dropped. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-11 21:28:53 UTC (rev 12675) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-11 22:23:48 UTC (rev 12676) @@ -42,7 +42,7 @@ #TCL_LIBRARY #ITCL_INCLUDE_PATH #ITCL_LIBRARY -#HAVE_ITCL (On when itcl header and library has been found. +#HAVE_ITCL (On when itcl header and library have been found. # Otherwise, undefined. # Used for source file configuration.) #HAVE_ITCLDECLS_H (defined [actually as a path, but we don't use that] @@ -52,9 +52,12 @@ #TK_LIBRARY #ITK_INCLUDE_PATH #ITK_LIBRARY -#HAVE_ITK (On when itcl header and library has been found. +#HAVE_ITK (On when itcl header and library have been found. # Otherwise, undefined. # Used for source file configuration.) +#PLPLOT_ITCL_VERSION (Consistent Itcl version number found by PLplot). +#PLPLOT_ITK_VERSION (Consistent Itk version number found by PLplot). +#PLPLOT_IWIDGETS_VERSION (Consistent Iwidgets version number found by PLplot). if(ENABLE_tcl) message(STATUS "Start determining consistent system data for Tcl and friends") @@ -75,8 +78,11 @@ else(TCL_FOUND) message(STATUS "Looking for include paths and libraries for Tcl - not found") endif(TCL_FOUND) + + # Initially mark various quantities as as unfound in case that turns out to be the case. set(HAVE_ITCL OFF) set(HAVE_ITK OFF) + if(TCL_FOUND AND TCL_TCLSH) if(ENABLE_itcl) if(USE_INCRTCL_VERSION_4) @@ -89,16 +95,14 @@ execute_process( COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_Available.tcl RESULT_VARIABLE ITCL_RC - OUTPUT_VARIABLE ITCL_VERSION + OUTPUT_VARIABLE PLPLOT_ITCL_VERSION ERROR_VARIABLE ITCL_STDERR ) if(NOT ITCL_RC) - set(ITCL_PACKAGE_NAME "Itcl ${ITCL_VERSION}") - message(STATUS "ITCL_PACKAGE_NAME = ${ITCL_PACKAGE_NAME}") message(STATUS "Looking for itcl.h") if(NOT USE_INCRTCL_VERSION_4) # Search first for epa_build install location. - find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}/itcl${ITCL_VERSION}) + find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}/itcl${PLPLOT_ITCL_VERSION}) endif(NOT USE_INCRTCL_VERSION_4) find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}) @@ -107,8 +111,8 @@ message(STATUS "ITCL_INCLUDE_PATH = ${ITCL_INCLUDE_PATH}") message(STATUS "Checking for Itcl header version consistency") - string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITCL_MAJOR_VERSION "${ITCL_VERSION}") - string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITCL_MINOR_VERSION "${ITCL_VERSION}") + string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITCL_MAJOR_VERSION "${PLPLOT_ITCL_VERSION}") + string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITCL_MINOR_VERSION "${PLPLOT_ITCL_VERSION}") message(STATUS "ITCL_MAJOR_VERSION = ${ITCL_MAJOR_VERSION}") message(STATUS "ITCL_MINOR_VERSION = ${ITCL_MINOR_VERSION}") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_VERSION.c @@ -142,8 +146,8 @@ if(ENABLE_itcl) message(STATUS "Looking for itcl library") # Search first for epa_build install location. - find_library(ITCL_LIBRARY itcl${ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}/itcl${ITCL_VERSION}) - find_library(ITCL_LIBRARY itcl${ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}) + find_library(ITCL_LIBRARY itcl${PLPLOT_ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}/itcl${PLPLOT_ITCL_VERSION}) + find_library(ITCL_LIBRARY itcl${PLPLOT_ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}) if(ITCL_LIBRARY) message(STATUS "Looking for itcl library - found") message(STATUS "ITCL_LIBRARY = ${ITCL_LIBRARY}") @@ -162,16 +166,6 @@ endif(NOT ITCL_RC) endif(ENABLE_itcl) - # ------------------------------------------------------------------------ - # figure out how to build tclIndex - # ------------------------------------------------------------------------ - set(MKTCLINDEX ${CMAKE_SOURCE_DIR}/scripts/mktclIndex) - if(ENABLE_itcl) - set(MKTCLINDEX_ARGS "-itcl") - else(ENABLE_itcl) - set(MKTCLINDEX_ARGS "-tcl") - endif(ENABLE_itcl) - if(ENABLE_tk AND NOT TK_FOUND) message(STATUS "WARNING: Tk not found so disabling Tk interface code") set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) @@ -209,17 +203,14 @@ execute_process( COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_Available.tcl RESULT_VARIABLE ITK_RC - OUTPUT_VARIABLE ITK_VERSION + OUTPUT_VARIABLE PLPLOT_ITK_VERSION ERROR_VARIABLE ITK_STDERR ) if(NOT ITK_RC) - set(ITK_PACKAGE_NAME "Itk ${ITK_VERSION}") - message(STATUS "ITK_PACKAGE_NAME = ${ITK_PACKAGE_NAME}") - message(STATUS "Looking for itk.h") if(NOT USE_INCRTCL_VERSION_4) # Search first for epa_build install location. - find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}/itcl${ITCL_VERSION}) + find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}/itcl${PLPLOT_ITCL_VERSION}) endif(NOT USE_INCRTCL_VERSION_4) find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}) @@ -228,8 +219,8 @@ message(STATUS "ITK_INCLUDE_PATH = ${ITK_INCLUDE_PATH}") message(STATUS "Checking for Itk header version consistency") - string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITK_MAJOR_VERSION "${ITK_VERSION}") - string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITK_MINOR_VERSION "${ITK_VERSION}") + string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITK_MAJOR_VERSION "${PLPLOT_ITK_VERSION}") + string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITK_MINOR_VERSION "${PLPLOT_ITK_VERSION}") message(STATUS "ITK_MAJOR_VERSION = ${ITK_MAJOR_VERSION}") message(STATUS "ITK_MINOR_VERSION = ${ITK_MINOR_VERSION}") file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_VERSION.c @@ -264,8 +255,8 @@ if(ENABLE_itk) message(STATUS "Looking for itk library") # Search first for epa_build install location. - find_library(ITK_LIBRARY itk${ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}/itk${ITK_VERSION}) - find_library(ITK_LIBRARY itk${ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}) + find_library(ITK_LIBRARY itk${PLPLOT_ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}/itk${PLPLOT_ITK_VERSION}) + find_library(ITK_LIBRARY itk${PLPLOT_ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}) if(ITK_LIBRARY) message(STATUS "Looking for itk library - found") message(STATUS "ITK_LIBRARY = ${ITK_LIBRARY}") @@ -309,30 +300,19 @@ list(GET IWIDGETS_VERSIONS_LIST 1 CONSISTENT_ITK_VERSION) list(GET IWIDGETS_VERSIONS_LIST 2 CONSISTENT_ITCL_VERSION) message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent") - if(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) - if(USE_INCRTCL_VERSION_4) - set(IWIDGETS_PACKAGE_NAME "Iwidgets ${IWIDGETS_VERSION}") - else(USE_INCRTCL_VERSION_4) - # Must use exact to distinguish from 4.1 version with - # the same major version number. This should not be - # an issue after install since it is rare/nonexistent to - # change the patch number of this really old version of - # iwidgets between the build and post-install eras. - set(IWIDGETS_PACKAGE_NAME "-exact Iwidgets ${IWIDGETS_VERSION}") - endif(USE_INCRTCL_VERSION_4) + if(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent - true") - message(STATUS "IWIDGETS_PACKAGE_NAME = ${IWIDGETS_PACKAGE_NAME}") - else(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) + else(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) message(STATUS "IWIDGETS_VERSION = ${IWIDGETS_VERSION}") - message(STATUS "ITK_VERSION = ${ITK_VERSION}") + message(STATUS "PLPLOT_ITK_VERSION = ${PLPLOT_ITK_VERSION}") message(STATUS "CONSISTENT_ITK_VERSION = ${CONSISTENT_ITK_VERSION}") - message(STATUS "ITCL_VERSION = ${ITCL_VERSION}") + message(STATUS "PLPLOT_ITCL_VERSION = ${PLPLOT_ITCL_VERSION}") message(STATUS "CONSISTENT_ITCL_VERSION = ${CONSISTENT_ITCL_VERSION}") message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent - false") message(STATUS "WARNING: Consistent combination of Iwidgets, Itk, and Itcl not found so disabling Itcl and Itk") set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) - endif(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) + endif(CONSISTENT_ITCL_VERSION STREQUAL PLPLOT_ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL PLPLOT_ITK_VERSION) else(NOT IWIDGETS_RC) message(STATUS "WARNING: Iwidgets could not be found so disabling Itcl and Itk") set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) @@ -351,6 +331,16 @@ endif(NOT ITK_RC) endif(ENABLE_itk) + # ------------------------------------------------------------------------ + # figure out how to build tclIndex + # ------------------------------------------------------------------------ + set(MKTCLINDEX ${CMAKE_SOURCE_DIR}/scripts/mktclIndex) + if(ENABLE_itcl) + set(MKTCLINDEX_ARGS "-itcl") + else(ENABLE_itcl) + set(MKTCLINDEX_ARGS "-tcl") + endif(ENABLE_itcl) + else(TCL_FOUND AND TCL_TCLSH) message(STATUS "Tcl not found OR tclsh not found") message(STATUS "WARNING: Disabling everything that is Tcl/Tk related") @@ -366,6 +356,13 @@ set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(ENABLE_tcl) + +if(NOT ENABLE_itcl) + set(PLPLOT_ITCL_VERSION 0.0.0) +endif(NOT ENABLE_itcl) + if(NOT ENABLE_itk) set(itk_true "#") + set(PLPLOT_ITK_VERSION 0.0.0) + set(PLPLOT_IWIDGETS_VERSION 0.0.0) endif(NOT ENABLE_itk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-11 21:28:55
|
Revision: 12675 http://sourceforge.net/p/plplot/code/12675 Author: airwin Date: 2013-11-11 21:28:53 +0000 (Mon, 11 Nov 2013) Log Message: ----------- Style previous commit. Modified Paths: -------------- trunk/examples/c/x22c.c Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-10 01:14:57 UTC (rev 12674) +++ trunk/examples/c/x22c.c 2013-11-11 21:28:53 UTC (rev 12675) @@ -198,9 +198,9 @@ PLFLT Q, b, dbdx; PLcGrid2 cgrid2; PLFLT **u, **v; - const int nx = 20; - const int ny = 20; -#define NC 11 + const int nx = 20; + const int ny = 20; +#define NC 11 const int nc = NC; const int nseg = 20; PLFLT clev[NC]; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-10 01:15:02
|
Revision: 12674 http://sourceforge.net/p/plplot/code/12674 Author: airwin Date: 2013-11-10 01:14:57 +0000 (Sun, 10 Nov 2013) Log Message: ----------- Add Itcl and Itk header consistency checks using the version numbers in the itcl.h and itk.h headers that are found. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-09 19:59:07 UTC (rev 12673) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-10 01:14:57 UTC (rev 12674) @@ -22,17 +22,17 @@ if(DEFAULT_NO_BINDINGS) option(ENABLE_tcl "Enable Tcl bindings" OFF) - option(ENABLE_itcl "Enable incr Tcl interface code" OFF) + option(ENABLE_itcl "Enable Itcl interface code" OFF) option(ENABLE_tk "Enable Tk interface code" OFF) - option(ENABLE_itk "Enable incr Tk interface code" OFF) + option(ENABLE_itk "Enable Itk interface code" OFF) else(DEFAULT_NO_BINDINGS) option(ENABLE_tcl "Enable Tcl bindings" ON) - option(ENABLE_itcl "Enable incr Tcl interface code" ON) + option(ENABLE_itcl "Enable Itcl interface code" ON) option(ENABLE_tk "Enable Tk interface code" ON) - option(ENABLE_itk "Enable incr Tk interface code" ON) + option(ENABLE_itk "Enable Itk interface code" ON) endif(DEFAULT_NO_BINDINGS) -option(USE_INCRTCL_VERSION_4 "Use [incr Tcl] version 4" OFF) +option(USE_INCRTCL_VERSION_4 "Use version 4 of Itcl and Itcl, version 4.1 of Iwidgets" OFF) # Depending on these above options and system resources may also determine # the following variables which are largely self-explanatory unless documented @@ -57,7 +57,7 @@ # Used for source file configuration.) if(ENABLE_tcl) - message(STATUS "Use system introspection to determine data for Tcl and friends") + message(STATUS "Start determining consistent system data for Tcl and friends") find_package(TCL QUIET) if(TCL_FOUND) message(STATUS "Looking for include paths and libraries for Tcl - found") @@ -101,9 +101,45 @@ find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}/itcl${ITCL_VERSION}) endif(NOT USE_INCRTCL_VERSION_4) find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}) + if(ITCL_INCLUDE_PATH) message(STATUS "Looking for itcl.h - found") message(STATUS "ITCL_INCLUDE_PATH = ${ITCL_INCLUDE_PATH}") + + message(STATUS "Checking for Itcl header version consistency") + string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITCL_MAJOR_VERSION "${ITCL_VERSION}") + string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITCL_MINOR_VERSION "${ITCL_VERSION}") + message(STATUS "ITCL_MAJOR_VERSION = ${ITCL_MAJOR_VERSION}") + message(STATUS "ITCL_MINOR_VERSION = ${ITCL_MINOR_VERSION}") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_VERSION.c + "// #define RC_INVOKED to avoid sucking in lots of additional includes for +// efficiency and simplicity. +#define RC_INVOKED 1 +#include <itcl.h> +#if ITCL_MAJOR_VERSION != ${ITCL_MAJOR_VERSION} || ITCL_MINOR_VERSION != ${ITCL_MINOR_VERSION} + #error ITCL_VERSION mismatch +#endif +void main(void){} +" + ) + try_compile(CONSISTENT_HEADER_ITCL_VERSION ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_VERSION.c + CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${ITCL_INCLUDE_PATH};${TCL_INCLUDE_PATH}" + ) + if(CONSISTENT_HEADER_ITCL_VERSION) + message(STATUS "Checking for Itcl header version consistency - true") + else(CONSISTENT_HEADER_ITCL_VERSION) + message(STATUS "Checking for Itcl header version consistency - false") + message(STATUS "WARNING: Disabling Itcl interface code") + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) + endif(CONSISTENT_HEADER_ITCL_VERSION) + else(ITCL_INCLUDE_PATH) + message(STATUS "Looking for itcl.h - not found") + message(STATUS "WARNING: Disabling Itcl interface code") + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) + endif(ITCL_INCLUDE_PATH) + + if(ENABLE_itcl) message(STATUS "Looking for itcl library") # Search first for epa_build install location. find_library(ITCL_LIBRARY itcl${ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}/itcl${ITCL_VERSION}) @@ -115,18 +151,14 @@ find_path(HAVE_ITCLDECLS_H itclDecls.h HINTS ${ITCL_INCLUDE_PATH}) else(ITCL_LIBRARY) message(STATUS "Looking for itcl library - not found") - message(STATUS "WARNING: Disabling incr Tcl interface code") - set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) + message(STATUS "WARNING: Disabling Itcl interface code") + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) endif(ITCL_LIBRARY) - else(ITCL_INCLUDE_PATH) - message(STATUS "Looking for itcl.h - not found") - message(STATUS "WARNING: Disabling incr Tcl interface code") - set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) - endif(ITCL_INCLUDE_PATH) + endif(ENABLE_itcl) else(NOT ITCL_RC) message(STATUS "Itcl not available or not compatible with current Tcl shell") - message(STATUS "WARNING: Disabling incr Tcl interface code") - set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) + message(STATUS "WARNING: Disabling Itcl interface code") + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) endif(NOT ITCL_RC) endif(ENABLE_itcl) @@ -162,8 +194,8 @@ message(STATUS "WARNING: the Tcl and Tk library locations are inconsistent so those libraries are likely not compatible") endif(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH}) else(ENABLE_tk) - message(STATUS "WARNING: Because Tk is disabled must disable incr Tk as well") - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + message(STATUS "WARNING: Because Tk is disabled must disable Itk as well") + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(ENABLE_tk) if(ENABLE_itk) @@ -190,10 +222,46 @@ find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}/itcl${ITCL_VERSION}) endif(NOT USE_INCRTCL_VERSION_4) find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}) + if(ITK_INCLUDE_PATH) message(STATUS "Looking for itk.h - found") message(STATUS "ITK_INCLUDE_PATH = ${ITK_INCLUDE_PATH}") + message(STATUS "Checking for Itk header version consistency") + string(REGEX REPLACE "^([0-9]*)\\.[0-9]*.*$" "\\1" ITK_MAJOR_VERSION "${ITK_VERSION}") + string(REGEX REPLACE "^[0-9]*\\.([0-9]*).*$" "\\1" ITK_MINOR_VERSION "${ITK_VERSION}") + message(STATUS "ITK_MAJOR_VERSION = ${ITK_MAJOR_VERSION}") + message(STATUS "ITK_MINOR_VERSION = ${ITK_MINOR_VERSION}") + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_VERSION.c + "// #define RC_INVOKED to avoid sucking in lots of additional includes for +// efficiency and simplicity and also to avoid the header file disaster that has long +// been a problem for version 3.3 of itk.h +#define RC_INVOKED 1 +#include <itk.h> +#if ITK_MAJOR_VERSION != ${ITK_MAJOR_VERSION} || ITK_MINOR_VERSION != ${ITK_MINOR_VERSION} + #error ITK_VERSION mismatch +#endif +void main(void){} +" + ) + try_compile(CONSISTENT_HEADER_ITK_VERSION ${CMAKE_BINARY_DIR} + ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_VERSION.c + CMAKE_FLAGS -DINCLUDE_DIRECTORIES:PATH=${ITK_INCLUDE_PATH} + ) + if(CONSISTENT_HEADER_ITK_VERSION) + message(STATUS "Checking for Itk header version consistency - true") + else(CONSISTENT_HEADER_ITK_VERSION) + message(STATUS "Checking for Itk header version consistency - false") + message(STATUS "WARNING: Disabling Itk interface code") + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) + endif(CONSISTENT_HEADER_ITK_VERSION) + else(ITK_INCLUDE_PATH) + message(STATUS "Looking for itk.h - not found") + message(STATUS "WARNING: Disabling Itk interface code") + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) + endif(ITK_INCLUDE_PATH) + + if(ENABLE_itk) message(STATUS "Looking for itk library") # Search first for epa_build install location. find_library(ITK_LIBRARY itk${ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}/itk${ITK_VERSION}) @@ -240,6 +308,7 @@ list(GET IWIDGETS_VERSIONS_LIST 0 IWIDGETS_VERSION) list(GET IWIDGETS_VERSIONS_LIST 1 CONSISTENT_ITK_VERSION) list(GET IWIDGETS_VERSIONS_LIST 2 CONSISTENT_ITCL_VERSION) + message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent") if(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) if(USE_INCRTCL_VERSION_4) set(IWIDGETS_PACKAGE_NAME "Iwidgets ${IWIDGETS_VERSION}") @@ -251,6 +320,7 @@ # iwidgets between the build and post-install eras. set(IWIDGETS_PACKAGE_NAME "-exact Iwidgets ${IWIDGETS_VERSION}") endif(USE_INCRTCL_VERSION_4) + message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent - true") message(STATUS "IWIDGETS_PACKAGE_NAME = ${IWIDGETS_PACKAGE_NAME}") else(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) message(STATUS "IWIDGETS_VERSION = ${IWIDGETS_VERSION}") @@ -258,29 +328,26 @@ message(STATUS "CONSISTENT_ITK_VERSION = ${CONSISTENT_ITK_VERSION}") message(STATUS "ITCL_VERSION = ${ITCL_VERSION}") message(STATUS "CONSISTENT_ITCL_VERSION = ${CONSISTENT_ITCL_VERSION}") + message(STATUS "Checking that the Iwidgets, Itk, and Itcl packages are consistent - false") message(STATUS "WARNING: Consistent combination of Iwidgets, Itk, and Itcl not found so disabling Itcl and Itk") - set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) else(NOT IWIDGETS_RC) message(STATUS "WARNING: Iwidgets could not be found so disabling Itcl and Itk") - set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(NOT IWIDGETS_RC) else(ITK_LIBRARY) message(STATUS "Looking for itk library - not found") - message(STATUS "WARNING: Disabling incr Tk interface code") - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + message(STATUS "WARNING: Disabling Itk interface code") + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(ITK_LIBRARY) - else(ITK_INCLUDE_PATH) - message(STATUS "Looking for itk.h - not found") - message(STATUS "WARNING: Disabling incr Tk interface code") - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) - endif(ITK_INCLUDE_PATH) + endif(ENABLE_itk) else(NOT ITK_RC) message(STATUS "Itk not available or not compatible with current Tcl shell") - message(STATUS "WARNING: Disabling incr Tk interface code") - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + message(STATUS "WARNING: Disabling Itk interface code") + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(NOT ITK_RC) endif(ENABLE_itk) @@ -288,16 +355,16 @@ message(STATUS "Tcl not found OR tclsh not found") message(STATUS "WARNING: Disabling everything that is Tcl/Tk related") set(ENABLE_tcl OFF CACHE BOOL "Enable Tcl bindings" FORCE) - set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(TCL_FOUND AND TCL_TCLSH) - message(STATUS "Finished system introspection to determine data for Tcl and friends") + message(STATUS "Finished determining consistent system data for Tcl and friends") else(ENABLE_tcl) message(STATUS "WARNING: ENABLE_tcl is OFF so disabling everything else that is Tcl/Tk related") - set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) + set(ENABLE_itcl OFF CACHE BOOL "Enable Itcl interface code" FORCE) set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) - set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + set(ENABLE_itk OFF CACHE BOOL "Enable Itk interface code" FORCE) endif(ENABLE_tcl) if(NOT ENABLE_itk) set(itk_true "#") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-09 19:59:10
|
Revision: 12673 http://sourceforge.net/p/plplot/code/12673 Author: airwin Date: 2013-11-09 19:59:07 +0000 (Sat, 09 Nov 2013) Log Message: ----------- Add generic/itkDecls.h to the list of itk4.0.0 headers that must be installed. This patch has been publicly distributed at https://sourceforge.net/p/incrtcl/patches/53/ Modified Paths: -------------- trunk/cmake/build_projects/itk/bp.cmake Added Paths: ----------- trunk/cmake/build_projects/itk/itk4_header_list.patch Modified: trunk/cmake/build_projects/itk/bp.cmake =================================================================== --- trunk/cmake/build_projects/itk/bp.cmake 2013-11-09 02:31:53 UTC (rev 12672) +++ trunk/cmake/build_projects/itk/bp.cmake 2013-11-09 19:59:07 UTC (rev 12673) @@ -85,9 +85,7 @@ DEPENDS ${${BP_PACKAGE}_dependencies_targets} URL ${${BP_PACKAGE}_URL} URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH} - # Provide an exactly equivalent "Itk" and "itk" form of the package name to - # follow what is implemented for itcl version 4. - PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/itk4_case.patch + PATCH_COMMAND "" CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} CPPFLAGS=-I${BP_CMAKE_INSTALL_PREFIX}/include ${source_PATH}/${BP_CONFIGURE_COMMAND} --mandir=${BP_CMAKE_INSTALL_PREFIX}/share/man ${ITK_ENABLE_64_BIT} --with-itcl=${BP_CMAKE_INSTALL_PREFIX}/lib/itcl${ITCL_ITK_LIBVERSION} BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install @@ -95,6 +93,20 @@ add_custom_command( OUTPUT + ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-patch + COMMAND ${CMAKE_COMMAND} -E echo + "Provide an exactly equivalent \"Itk\" and \"itk\" form of the package name to follow what is implemented for itcl version 4." + # This patch has been publicly distributed at https://sourceforge.net/p/incrtcl/patches/52/ + COMMAND ${PATCH_EXECUTABLE} --directory=${EP_BASE}/Source/build_${BP_PACKAGE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/itk4_case.patch + COMMAND ${CMAKE_COMMAND} -E echo + "Add generic/itkDecls.h to the list of itk headers that must be installed." + # This patch has been publicly distributed at https://sourceforge.net/p/incrtcl/patches/53/ + COMMAND ${PATCH_EXECUTABLE} --directory=${EP_BASE}/Source/build_${BP_PACKAGE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/itk4_header_list.patch + APPEND + ) + +add_custom_command( + OUTPUT ${EP_BASE}/Stamp/build_${BP_PACKAGE}/build_${BP_PACKAGE}-build COMMAND echo "Replace build-tree locations by install-tree locations" COMMAND ${SED_EXECUTABLE} Added: trunk/cmake/build_projects/itk/itk4_header_list.patch =================================================================== --- trunk/cmake/build_projects/itk/itk4_header_list.patch (rev 0) +++ trunk/cmake/build_projects/itk/itk4_header_list.patch 2013-11-09 19:59:07 UTC (rev 12673) @@ -0,0 +1,24 @@ +diff -Naur itk4.0.0_orig/configure itk4.0.0/configure +--- itk4.0.0_orig/configure 2013-02-03 08:25:51.000000000 -0800 ++++ itk4.0.0/configure 2013-11-09 11:03:37.185416415 -0800 +@@ -5283,7 +5283,7 @@ + + + +- vars="generic/itk.h generic/itkInt.h" ++ vars="generic/itk.h generic/itkInt.h generic/itkDecls.h" + for i in $vars; do + # check for existence, be strict because it is installed + if test ! -f "${srcdir}/$i" ; then +diff -Naur itk4.0.0_orig/configure.in itk4.0.0/configure.in +--- itk4.0.0_orig/configure.in 2013-02-03 08:25:51.000000000 -0800 ++++ itk4.0.0/configure.in 2013-11-09 11:03:11.281906189 -0800 +@@ -87,7 +87,7 @@ + itkUtil.c + itkStubInit.c + ]) +-TEA_ADD_HEADERS([generic/itk.h generic/itkInt.h]) ++TEA_ADD_HEADERS([generic/itk.h generic/itkInt.h generic/itkDecls.h]) + TEA_ADD_INCLUDES([${ITCL_INCLUDES} -I\"`${CYGPATH} ${srcdir}/generic`\"]) + TEA_ADD_LIBS([]) + TEA_ADD_CFLAGS([]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-09 02:31:56
|
Revision: 12672 http://sourceforge.net/p/plplot/code/12672 Author: airwin Date: 2013-11-09 02:31:53 +0000 (Sat, 09 Nov 2013) Log Message: ----------- Continue to rationalize and strengthen Itcl, Itk, and Iwidgets detection and consistency checking. Tested by Alan W. Irwin <ai...@us...> on Linux using the output from cmake configuration of PLplot. The cases tested were as follows: 1. Ordinary PATH variable, use (the default) -DUSE_INCRTCL_VERSION_4=OFF. 2. Identical to (1.), except specify -DUSE_INCRTCL_VERSION_4=ON. 3. Identical to (1.), except the PATH was modified to put a special install location used by epa_build (a.k.a., build_projects) on the PATH. The result was the tclsh version built by epa_build was used for this test. 4. Identical to (3.), except specify -DUSE_INCRTCL_VERSION_4=ON. The result for (1.) was consistent data for Tcl8.5, Tk8.5, version 3 of Itcl and Itk, and version 4.0.1 of Iwidgets were found corresponding to the (old) Debian wheezy packages that have been installed on my system. The result for (2.) smoothly dropped Itcl, Itk, and Iwidgets (as expected since Debian wheezy does not give access to version 4 of Itcl and friends). The result for (3.) was consistent data for Tcl8.6, Tk8.6, version 3 of Itcl and Itk (both built against Tcl/Tk8.6), and version 4.0.1 of Iwidgets were found corresponding to the epa_build for version 3 of itcl and friends. The result for (4.) was consistent data for Tcl8.6, Tk8.6, version 4 of Itcl and Itk (both built against Tcl/Tk8.6), and version 4.1.0 of Iwidgets were found corresponding to the epa_build for version 3 of itcl and friends. So a simple manipulation of the PATH and/or the -DUSE_INCRTCL_VERSION_4 cmake option gives consistent results in all cases. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-08 21:41:30 UTC (rev 12671) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-09 02:31:53 UTC (rev 12672) @@ -57,17 +57,15 @@ # Used for source file configuration.) if(ENABLE_tcl) - message(STATUS "Looking for include paths and libraries for Tcl/Tk") - find_package(TCL) - # Supplement those results with iTcl and iTk include paths and libraries. + message(STATUS "Use system introspection to determine data for Tcl and friends") + find_package(TCL QUIET) if(TCL_FOUND) - message(STATUS - "Looking for include paths and libraries for Tcl/Tk - found" - ) + message(STATUS "Looking for include paths and libraries for Tcl - found") + message(STATUS "TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}") + message(STATUS "TCL_LIBRARY = ${TCL_LIBRARY}") get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH) + message(STATUS "TCL_LIBRARY_PATH = ${TCL_LIBRARY_PATH}") - message(STATUS "Looking for tclsh") - include(FindTclsh) if(TCL_TCLSH) message(STATUS "Looking for tclsh - found") message(STATUS "TCL_TCLSH = ${TCL_TCLSH}") @@ -75,13 +73,11 @@ message(STATUS "Looking for tclsh - not found") endif(TCL_TCLSH) else(TCL_FOUND) - message(STATUS - "Looking for include paths and libraries for Tcl/Tk - not found" - ) + message(STATUS "Looking for include paths and libraries for Tcl - not found") endif(TCL_FOUND) + set(HAVE_ITCL OFF) + set(HAVE_ITK OFF) if(TCL_FOUND AND TCL_TCLSH) - message(STATUS "TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}") - message(STATUS "TCL_LIBRARY = ${TCL_LIBRARY}") if(ENABLE_itcl) if(USE_INCRTCL_VERSION_4) set(SUGGESTED_ITCL_VERSION 4) @@ -97,19 +93,26 @@ ERROR_VARIABLE ITCL_STDERR ) if(NOT ITCL_RC) - set(ITCL_PACKAGE_NAME "-exact Itcl ${ITCL_VERSION}") + set(ITCL_PACKAGE_NAME "Itcl ${ITCL_VERSION}") message(STATUS "ITCL_PACKAGE_NAME = ${ITCL_PACKAGE_NAME}") message(STATUS "Looking for itcl.h") - find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH}) + if(NOT USE_INCRTCL_VERSION_4) + # Search first for epa_build install location. + find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}/itcl${ITCL_VERSION}) + endif(NOT USE_INCRTCL_VERSION_4) + find_path(ITCL_INCLUDE_PATH itcl.h HINTS ${TCL_INCLUDE_PATH}) if(ITCL_INCLUDE_PATH) message(STATUS "Looking for itcl.h - found") + message(STATUS "ITCL_INCLUDE_PATH = ${ITCL_INCLUDE_PATH}") message(STATUS "Looking for itcl library") - find_library(ITCL_LIBRARY itcl${ITCL_VERSION} PATHS ${TCL_LIBRARY_PATH} - PATH_SUFFIXES itcl${ITCL_VERSION}) + # Search first for epa_build install location. + find_library(ITCL_LIBRARY itcl${ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}/itcl${ITCL_VERSION}) + find_library(ITCL_LIBRARY itcl${ITCL_VERSION} HINTS ${TCL_LIBRARY_PATH}) if(ITCL_LIBRARY) message(STATUS "Looking for itcl library - found") + message(STATUS "ITCL_LIBRARY = ${ITCL_LIBRARY}") set(HAVE_ITCL ON) - find_path(HAVE_ITCLDECLS_H itclDecls.h ${TCL_INCLUDE_PATH}) + find_path(HAVE_ITCLDECLS_H itclDecls.h HINTS ${ITCL_INCLUDE_PATH}) else(ITCL_LIBRARY) message(STATUS "Looking for itcl library - not found") message(STATUS "WARNING: Disabling incr Tcl interface code") @@ -123,14 +126,10 @@ else(NOT ITCL_RC) message(STATUS "Itcl not available or not compatible with current Tcl shell") message(STATUS "WARNING: Disabling incr Tcl interface code") - set(HAVE_ITCL OFF) set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) endif(NOT ITCL_RC) endif(ENABLE_itcl) - if(ENABLE_itcl) - message(STATUS "ITCL_INCLUDE_PATH = ${ITCL_INCLUDE_PATH}") - message(STATUS "ITCL_LIBRARY = ${ITCL_LIBRARY}") - endif(ENABLE_itcl) + # ------------------------------------------------------------------------ # figure out how to build tclIndex # ------------------------------------------------------------------------ @@ -141,28 +140,32 @@ set(MKTCLINDEX_ARGS "-tcl") endif(ENABLE_itcl) + if(ENABLE_tk AND NOT TK_FOUND) + message(STATUS "WARNING: Tk not found so disabling Tk interface code") + set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) + endif(ENABLE_tk AND NOT TK_FOUND) + if(ENABLE_tk AND NOT X11_FOUND) - message(STATUS "WARNING: X11 not found, disabling Tk interface code") + message(STATUS "WARNING: X11 not found so disabling Tk interface code") set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) endif(ENABLE_tk AND NOT X11_FOUND) + if(ENABLE_tk) + message(STATUS "Looking for include paths and libraries for Tk - found") + set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR}) + message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}") + message(STATUS "TK_LIBRARY = ${TK_LIBRARY}") + get_filename_component(TK_LIBRARY_PATH ${TK_LIBRARY} PATH) + message(STATUS "TK_LIBRARY_PATH = ${TK_LIBRARY_PATH}") if(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH}) - message(STATUS "TCL_LIBRARY_PATH = ${TCL_LIBRARY_PATH}") - message(STATUS "TK_LIBRARY_PATH = ${TK_LIBRARY_PATH}") message(STATUS "WARNING: the Tcl and Tk library locations are inconsistent so those libraries are likely not compatible") endif(NOT ${TK_LIBRARY_PATH} STREQUAL ${TCL_LIBRARY_PATH}) - endif(ENABLE_tk) - if(ENABLE_tk) - set(TK_INCLUDE_PATH ${TK_INCLUDE_PATH} ${X11_INCLUDE_DIR}) - message(STATUS "TK_INCLUDE_PATH = ${TK_INCLUDE_PATH}") - message(STATUS "TK_LIBRARY = ${TK_LIBRARY}") else(ENABLE_tk) - message(STATUS - "WARNING: Because Tk is disabled must disable incr Tk as well" - ) + message(STATUS "WARNING: Because Tk is disabled must disable incr Tk as well") set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) endif(ENABLE_tk) + if(ENABLE_itk) if(USE_INCRTCL_VERSION_4) set(SUGGESTED_ITK_VERSION 4) @@ -178,18 +181,27 @@ ERROR_VARIABLE ITK_STDERR ) if(NOT ITK_RC) - set(ITK_PACKAGE_NAME "-exact Itk ${ITK_VERSION}") + set(ITK_PACKAGE_NAME "Itk ${ITK_VERSION}") message(STATUS "ITK_PACKAGE_NAME = ${ITK_PACKAGE_NAME}") + message(STATUS "Looking for itk.h") - find_path(ITK_INCLUDE_PATH itk.h ${TK_INCLUDE_PATH}) + if(NOT USE_INCRTCL_VERSION_4) + # Search first for epa_build install location. + find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}/itcl${ITCL_VERSION}) + endif(NOT USE_INCRTCL_VERSION_4) + find_path(ITK_INCLUDE_PATH itk.h HINTS ${TCL_INCLUDE_PATH}) if(ITK_INCLUDE_PATH) message(STATUS "Looking for itk.h - found") + message(STATUS "ITK_INCLUDE_PATH = ${ITK_INCLUDE_PATH}") + message(STATUS "Looking for itk library") - find_library(ITK_LIBRARY itk${ITK_VERSION} PATHS ${TCL_LIBRARY_PATH} - PATH_SUFFIXES itk${ITK_VERSION}) + # Search first for epa_build install location. + find_library(ITK_LIBRARY itk${ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}/itk${ITK_VERSION}) + find_library(ITK_LIBRARY itk${ITK_VERSION} HINTS ${TCL_LIBRARY_PATH}) if(ITK_LIBRARY) message(STATUS "Looking for itk library - found") - set(HAVE_ITK ON) + message(STATUS "ITK_LIBRARY = ${ITK_LIBRARY}") + set(HAVE_ITK ON) # Test version consistency between iwidgets, itk, and itcl. if(USE_INCRTCL_VERSION_4) @@ -211,8 +223,8 @@ # inaccessible to my google searches or privately made # available before all development of iwidgets4.0 # stopped. So add 4.0.2 to the list just in case. - foreach(SUGGESTED_ITK_VERSION 4.0.2 4.0.1 4.0.0) - file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") + foreach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require -exact Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") execute_process( COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl RESULT_VARIABLE IWIDGETS_RC @@ -222,16 +234,30 @@ if(NOT IWIDGETS_RC) break() endif(NOT IWIDGETS_RC) - endforeach(SUGGESTED_ITK_VERSION 4.0.2 4.0.1 4.0.0) + endforeach(SUGGESTED_IWIDGETS_VERSION 4.0.2 4.0.1 4.0.0) endif(USE_INCRTCL_VERSION_4) if(NOT IWIDGETS_RC) list(GET IWIDGETS_VERSIONS_LIST 0 IWIDGETS_VERSION) list(GET IWIDGETS_VERSIONS_LIST 1 CONSISTENT_ITK_VERSION) list(GET IWIDGETS_VERSIONS_LIST 2 CONSISTENT_ITCL_VERSION) if(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) - set(IWIDGETS_PACKAGE_NAME "-exact Iwidgets ${IWIDGETS_VERSION}") + if(USE_INCRTCL_VERSION_4) + set(IWIDGETS_PACKAGE_NAME "Iwidgets ${IWIDGETS_VERSION}") + else(USE_INCRTCL_VERSION_4) + # Must use exact to distinguish from 4.1 version with + # the same major version number. This should not be + # an issue after install since it is rare/nonexistent to + # change the patch number of this really old version of + # iwidgets between the build and post-install eras. + set(IWIDGETS_PACKAGE_NAME "-exact Iwidgets ${IWIDGETS_VERSION}") + endif(USE_INCRTCL_VERSION_4) message(STATUS "IWIDGETS_PACKAGE_NAME = ${IWIDGETS_PACKAGE_NAME}") else(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) + message(STATUS "IWIDGETS_VERSION = ${IWIDGETS_VERSION}") + message(STATUS "ITK_VERSION = ${ITK_VERSION}") + message(STATUS "CONSISTENT_ITK_VERSION = ${CONSISTENT_ITK_VERSION}") + message(STATUS "ITCL_VERSION = ${ITCL_VERSION}") + message(STATUS "CONSISTENT_ITCL_VERSION = ${CONSISTENT_ITCL_VERSION}") message(STATUS "WARNING: Consistent combination of Iwidgets, Itk, and Itcl not found so disabling Itcl and Itk") set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) @@ -254,27 +280,21 @@ else(NOT ITK_RC) message(STATUS "Itk not available or not compatible with current Tcl shell") message(STATUS "WARNING: Disabling incr Tk interface code") - set(HAVE_ITK OFF) set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) endif(NOT ITK_RC) endif(ENABLE_itk) - if(ENABLE_itk) - message(STATUS "ITK_INCLUDE_PATH = ${ITK_INCLUDE_PATH}") - message(STATUS "ITK_LIBRARY = ${ITK_LIBRARY}") - endif(ENABLE_itk) else(TCL_FOUND AND TCL_TCLSH) + message(STATUS "Tcl not found OR tclsh not found") message(STATUS "WARNING: Disabling everything that is Tcl/Tk related") set(ENABLE_tcl OFF CACHE BOOL "Enable Tcl bindings" FORCE) set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) endif(TCL_FOUND AND TCL_TCLSH) + message(STATUS "Finished system introspection to determine data for Tcl and friends") else(ENABLE_tcl) - message(STATUS - "ENABLE_tcl is OFF so disabling everything else that " - "is Tcl/Tk related" - ) + message(STATUS "WARNING: ENABLE_tcl is OFF so disabling everything else that is Tcl/Tk related") set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) set(ENABLE_tk OFF CACHE BOOL "Enable Tk interface code" FORCE) set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-08 21:41:38
|
Revision: 12671 http://sourceforge.net/p/plplot/code/12671 Author: airwin Date: 2013-11-08 21:41:30 +0000 (Fri, 08 Nov 2013) Log Message: ----------- Rationalize and strengthen Itcl, Itk, and Iwidgets detection and consistency checking. Use temporary files written by CMake in the build tree rather than permanent files in our source tree to do these checks using tclsh. Modified Paths: -------------- trunk/cmake/modules/tcl-related.cmake Removed Paths: ------------- trunk/cmake/modules/CheckITCL_Available.tcl trunk/cmake/modules/CheckTCL_GT_84.tcl trunk/cmake/modules/GetITCL_Version.tcl Deleted: trunk/cmake/modules/CheckITCL_Available.tcl =================================================================== --- trunk/cmake/modules/CheckITCL_Available.tcl 2013-11-08 07:52:13 UTC (rev 12670) +++ trunk/cmake/modules/CheckITCL_Available.tcl 2013-11-08 21:41:30 UTC (rev 12671) @@ -1 +0,0 @@ -puts -nonewline [expr {[catch {package require Itcl}]==1? 0: 1}]; exit Deleted: trunk/cmake/modules/CheckTCL_GT_84.tcl =================================================================== --- trunk/cmake/modules/CheckTCL_GT_84.tcl 2013-11-08 07:52:13 UTC (rev 12670) +++ trunk/cmake/modules/CheckTCL_GT_84.tcl 2013-11-08 21:41:30 UTC (rev 12671) @@ -1 +0,0 @@ -puts -nonewline [package vsatisfies [info patchlevel] 8.5]; exit Deleted: trunk/cmake/modules/GetITCL_Version.tcl =================================================================== --- trunk/cmake/modules/GetITCL_Version.tcl 2013-11-08 07:52:13 UTC (rev 12670) +++ trunk/cmake/modules/GetITCL_Version.tcl 2013-11-08 21:41:30 UTC (rev 12671) @@ -1,2 +0,0 @@ -# Extract the version of Itcl -puts -nonewline [package require Itcl]; exit Modified: trunk/cmake/modules/tcl-related.cmake =================================================================== --- trunk/cmake/modules/tcl-related.cmake 2013-11-08 07:52:13 UTC (rev 12670) +++ trunk/cmake/modules/tcl-related.cmake 2013-11-08 21:41:30 UTC (rev 12671) @@ -1,6 +1,6 @@ # cmake/modules/tcl-related.cmake # -# Copyright (C) 2006 Alan W. Irwin +# Copyright (C) 2006-2013 Alan W. Irwin # # This file is part of PLplot. # @@ -24,12 +24,12 @@ option(ENABLE_tcl "Enable Tcl bindings" OFF) option(ENABLE_itcl "Enable incr Tcl interface code" OFF) option(ENABLE_tk "Enable Tk interface code" OFF) - option(ENABLE_itk "Enable incr TK interface code" OFF) + option(ENABLE_itk "Enable incr Tk interface code" OFF) else(DEFAULT_NO_BINDINGS) option(ENABLE_tcl "Enable Tcl bindings" ON) option(ENABLE_itcl "Enable incr Tcl interface code" ON) option(ENABLE_tk "Enable Tk interface code" ON) - option(ENABLE_itk "Enable incr TK interface code" ON) + option(ENABLE_itk "Enable incr Tk interface code" ON) endif(DEFAULT_NO_BINDINGS) option(USE_INCRTCL_VERSION_4 "Use [incr Tcl] version 4" OFF) @@ -64,6 +64,8 @@ message(STATUS "Looking for include paths and libraries for Tcl/Tk - found" ) + get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH) + message(STATUS "Looking for tclsh") include(FindTclsh) if(TCL_TCLSH) @@ -81,29 +83,29 @@ message(STATUS "TCL_INCLUDE_PATH = ${TCL_INCLUDE_PATH}") message(STATUS "TCL_LIBRARY = ${TCL_LIBRARY}") if(ENABLE_itcl) + if(USE_INCRTCL_VERSION_4) + set(SUGGESTED_ITCL_VERSION 4) + else(USE_INCRTCL_VERSION_4) + set(SUGGESTED_ITCL_VERSION 3) + endif(USE_INCRTCL_VERSION_4) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_Available.tcl "puts -nonewline [package require Itcl ${SUGGESTED_ITCL_VERSION}]; exit") + # Refine SUGGESTED_ITCL_VERSION to exact value or fail. execute_process( - COMMAND ${TCL_TCLSH} CheckITCL_Available.tcl - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules - OUTPUT_VARIABLE AVAILABLE_ITCL) - if(AVAILABLE_ITCL) - execute_process( - COMMAND ${TCL_TCLSH} GetITCL_Version.tcl - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/cmake/modules - OUTPUT_VARIABLE itcl_library_versions) + COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITCL_Available.tcl + RESULT_VARIABLE ITCL_RC + OUTPUT_VARIABLE ITCL_VERSION + ERROR_VARIABLE ITCL_STDERR + ) + if(NOT ITCL_RC) + set(ITCL_PACKAGE_NAME "-exact Itcl ${ITCL_VERSION}") + message(STATUS "ITCL_PACKAGE_NAME = ${ITCL_PACKAGE_NAME}") message(STATUS "Looking for itcl.h") find_path(ITCL_INCLUDE_PATH itcl.h ${TCL_INCLUDE_PATH}) if(ITCL_INCLUDE_PATH) message(STATUS "Looking for itcl.h - found") message(STATUS "Looking for itcl library") - get_filename_component(TCL_LIBRARY_PATH ${TCL_LIBRARY} PATH) - set(itcl_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0) - if(USE_INCRTCL_VERSION_4) - set(itcl_library_versions 4.0.0 ${itcl_library_versions}) - endif(USE_INCRTCL_VERSION_4) - foreach(version ${itcl_library_versions}) - find_library(ITCL_LIBRARY itcl${version} PATHS ${TCL_LIBRARY_PATH} - PATH_SUFFIXES itcl${version}) - endforeach(version ${itcl_library_versions}) + find_library(ITCL_LIBRARY itcl${ITCL_VERSION} PATHS ${TCL_LIBRARY_PATH} + PATH_SUFFIXES itcl${ITCL_VERSION}) if(ITCL_LIBRARY) message(STATUS "Looking for itcl library - found") set(HAVE_ITCL ON) @@ -118,11 +120,12 @@ message(STATUS "WARNING: Disabling incr Tcl interface code") set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) endif(ITCL_INCLUDE_PATH) - else(AVAILABLE_ITCL) + else(NOT ITCL_RC) message(STATUS "Itcl not available or not compatible with current Tcl shell") + message(STATUS "WARNING: Disabling incr Tcl interface code") set(HAVE_ITCL OFF) set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) - endif(AVAILABLE_ITCL) + endif(NOT ITCL_RC) endif(ENABLE_itcl) if(ENABLE_itcl) message(STATUS "ITCL_INCLUDE_PATH = ${ITCL_INCLUDE_PATH}") @@ -161,33 +164,101 @@ set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) endif(ENABLE_tk) if(ENABLE_itk) - message(STATUS "Looking for itk.h") - find_path(ITK_INCLUDE_PATH itk.h ${TK_INCLUDE_PATH}) - if(ITK_INCLUDE_PATH) - message(STATUS "Looking for itk.h - found") - message(STATUS "Looking for itk library") - set(itk_library_versions 3.4 3.3 3.2 3.1 3.0 2.1 2.0) - if(USE_INCRTCL_VERSION_4) - set(itk_library_versions 4.0.0 ${itk_library_versions}) - endif(USE_INCRTCL_VERSION_4) - foreach(version ${itk_library_versions}) - find_library(ITK_LIBRARY itk${version} PATHS ${TCL_LIBRARY_PATH} - PATH_SUFFIXES itk${version}) - endforeach(version ${itk_library_versions}) - if(ITK_LIBRARY) - message(STATUS "Looking for itk library - found") - set(HAVE_ITK ON) - else(ITK_LIBRARY) - message(STATUS "Looking for itk library - not found") + if(USE_INCRTCL_VERSION_4) + set(SUGGESTED_ITK_VERSION 4) + else(USE_INCRTCL_VERSION_4) + set(SUGGESTED_ITK_VERSION 3) + endif(USE_INCRTCL_VERSION_4) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_Available.tcl "puts -nonewline [package require Itk ${SUGGESTED_ITK_VERSION}]; exit") + # Refine SUGGESTED_ITK_VERSION to exact value or fail. + execute_process( + COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/CheckITK_Available.tcl + RESULT_VARIABLE ITK_RC + OUTPUT_VARIABLE ITK_VERSION + ERROR_VARIABLE ITK_STDERR + ) + if(NOT ITK_RC) + set(ITK_PACKAGE_NAME "-exact Itk ${ITK_VERSION}") + message(STATUS "ITK_PACKAGE_NAME = ${ITK_PACKAGE_NAME}") + message(STATUS "Looking for itk.h") + find_path(ITK_INCLUDE_PATH itk.h ${TK_INCLUDE_PATH}) + if(ITK_INCLUDE_PATH) + message(STATUS "Looking for itk.h - found") + message(STATUS "Looking for itk library") + find_library(ITK_LIBRARY itk${ITK_VERSION} PATHS ${TCL_LIBRARY_PATH} + PATH_SUFFIXES itk${ITK_VERSION}) + if(ITK_LIBRARY) + message(STATUS "Looking for itk library - found") + set(HAVE_ITK ON) + + # Test version consistency between iwidgets, itk, and itcl. + if(USE_INCRTCL_VERSION_4) + set(SUGGESTED_IWIDGETS_VERSION 4.1) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") + execute_process( + COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl + RESULT_VARIABLE IWIDGETS_RC + OUTPUT_VARIABLE IWIDGETS_VERSIONS_LIST + ERROR_VARIABLE IWIDGETS_STDERR + ) + else(USE_INCRTCL_VERSION_4) + # Find maximum 4.0 version of iwidgets that is + # available. 4.0.1 (released in 2002) is the largest + # version of iwidgets4.0 (as opposed to the recently + # developed iwidgets4.1) I have found on the web in + # tarball form, but I have seen one reference to 4.0.2 + # which may have been publicly released somewhere + # inaccessible to my google searches or privately made + # available before all development of iwidgets4.0 + # stopped. So add 4.0.2 to the list just in case. + foreach(SUGGESTED_ITK_VERSION 4.0.2 4.0.1 4.0.0) + file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl "puts -nonewline \"[package require Iwidgets ${SUGGESTED_IWIDGETS_VERSION}];[package require Itk];[package require Itcl]\";exit") + execute_process( + COMMAND ${TCL_TCLSH} ${CMAKE_CURRENT_BINARY_DIR}/determine_versions.tcl + RESULT_VARIABLE IWIDGETS_RC + OUTPUT_VARIABLE IWIDGETS_VERSIONS_LIST + ERROR_VARIABLE IWIDGETS_STDERR + ) + if(NOT IWIDGETS_RC) + break() + endif(NOT IWIDGETS_RC) + endforeach(SUGGESTED_ITK_VERSION 4.0.2 4.0.1 4.0.0) + endif(USE_INCRTCL_VERSION_4) + if(NOT IWIDGETS_RC) + list(GET IWIDGETS_VERSIONS_LIST 0 IWIDGETS_VERSION) + list(GET IWIDGETS_VERSIONS_LIST 1 CONSISTENT_ITK_VERSION) + list(GET IWIDGETS_VERSIONS_LIST 2 CONSISTENT_ITCL_VERSION) + if(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) + set(IWIDGETS_PACKAGE_NAME "-exact Iwidgets ${IWIDGETS_VERSION}") + message(STATUS "IWIDGETS_PACKAGE_NAME = ${IWIDGETS_PACKAGE_NAME}") + else(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) + message(STATUS "WARNING: Consistent combination of Iwidgets, Itk, and Itcl not found so disabling Itcl and Itk") + set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) + set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + endif(CONSISTENT_ITCL_VERSION STREQUAL ITCL_VERSION AND CONSISTENT_ITK_VERSION STREQUAL ITK_VERSION) + else(NOT IWIDGETS_RC) + message(STATUS "WARNING: Iwidgets could not be found so disabling Itcl and Itk") + set(ENABLE_itcl OFF CACHE BOOL "Enable incr Tcl interface code" FORCE) + set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + endif(NOT IWIDGETS_RC) + else(ITK_LIBRARY) + message(STATUS "Looking for itk library - not found") + message(STATUS "WARNING: Disabling incr Tk interface code") + set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) + endif(ITK_LIBRARY) + else(ITK_INCLUDE_PATH) + message(STATUS "Looking for itk.h - not found") message(STATUS "WARNING: Disabling incr Tk interface code") set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) - endif(ITK_LIBRARY) - else(ITK_INCLUDE_PATH) - message(STATUS "Looking for itk.h - not found") + endif(ITK_INCLUDE_PATH) + else(NOT ITK_RC) + message(STATUS "Itk not available or not compatible with current Tcl shell") message(STATUS "WARNING: Disabling incr Tk interface code") + set(HAVE_ITK OFF) set(ENABLE_itk OFF CACHE BOOL "Enable incr Tk interface code" FORCE) - endif(ITK_INCLUDE_PATH) + endif(NOT ITK_RC) endif(ENABLE_itk) + if(ENABLE_itk) message(STATUS "ITK_INCLUDE_PATH = ${ITK_INCLUDE_PATH}") message(STATUS "ITK_LIBRARY = ${ITK_LIBRARY}") This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-08 07:52:16
|
Revision: 12670 http://sourceforge.net/p/plplot/code/12670 Author: airwin Date: 2013-11-08 07:52:13 +0000 (Fri, 08 Nov 2013) Log Message: ----------- I got completely fed up with the broken autoconf-based build system for iwidgets4.0.1 and the inflexible and limited binary distribution approach that was used for iwidgets4.1.0. So I implemented a CMake-based build system for iwidgets4.0/4.1, deleted the iwidgets4.0 directory that contained the separate autoconf-based build of iwidgets4.0.1, and configured CMake-based builds of both iwidgets4.0 and iwidgets (version 4.1.0 generated from iwidgets4.0 with a patch) in the one remaining iwidgets directory. Tested by Alan W. Irwin <ai...@us...> using the -DBUILD_THE_BUILDTOOLS=ON build_projects cmake option and the build_iwidgets and build_iwidgets4.0 targets. The builds (which included all the relevant Tcl/Tk8.6 builds and both the version 3 and version 4 builds of itcl/itk and the version 4.0 and version 4.1 builds of iwidgets) proceeded to conclusion without issues. Some simple testing under wish suceeded with such commands as "package require Iwidgets" (which loaded itcl/itk version 4 and iwidgets version 4.1.0) and "package require -exact Iwidgets 4.0.1) which loaded itcl/itk version 3 and iwidgets version 4.0.1. I also tested the calendar and watch iwidgets demos under both Iwidgets 4.0.1 and Iwidgets 4.1.0 with no issues. Additional testing with PLplot should follow. Modified Paths: -------------- trunk/cmake/build_projects/CMakeLists.txt trunk/cmake/build_projects/iwidgets/bp.cmake Added Paths: ----------- trunk/cmake/build_projects/iwidgets/CMakeLists.txt trunk/cmake/build_projects/iwidgets/iwidgets4_case.patch Removed Paths: ------------- trunk/cmake/build_projects/iwidgets4.0/ Modified: trunk/cmake/build_projects/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/CMakeLists.txt 2013-11-08 07:27:59 UTC (rev 12669) +++ trunk/cmake/build_projects/CMakeLists.txt 2013-11-08 07:52:13 UTC (rev 12670) @@ -292,14 +292,13 @@ # itcl version 4 is integrated into tcl # itk version 4 is not integrated into tk (or tcl). itk - # iwidgets version 4.1 is not integrated into itcl - iwidgets # itcl version 3 is an independent project itcl3 # itk version 3 is an independent project itk3 - # iwidgets version 4.0 is an independent project - iwidgets4.0 + # iwidgets subdirectory contains build configurations for both + # iwidgets (version 4.1) and iwidgets4.0 (version 4.0). + iwidgets ) else(BUILD_THE_BUILDTOOLS) # List of all configurations. Order doesn't matter because multiple Added: trunk/cmake/build_projects/iwidgets/CMakeLists.txt =================================================================== --- trunk/cmake/build_projects/iwidgets/CMakeLists.txt (rev 0) +++ trunk/cmake/build_projects/iwidgets/CMakeLists.txt 2013-11-08 07:52:13 UTC (rev 12670) @@ -0,0 +1,149 @@ +# Top-level CMakeLists.txt for the CMake-based build and test system +# of the iwidgets software. + +# Copyright (C) 2013 Alan W. Irwin + +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU Library General Public License as published +# by the Free Software Foundation; version 2 of the License. +# +# This file is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Library General Public License for more details. +# +# You should have received a copy of the GNU Library General Public License +# along with this file; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +# The traditional autoconf build of iwidgets that was created in 2002 +# or earlier is completely broken and difficult to understand because +# lots of the install is done in a low-level way. +# Therefore, this is an attempt to replace that build system with a +# rational CMake-based build system that actually works. + +# N.B. This "build" system only installs files so +# no compiler is required for this project +project(iwidgets NONE) + +message(STATUS "CMake version = ${CMAKE_VERSION}") +message(STATUS "CMAKE_SYSTEM = ${CMAKE_SYSTEM}") +message(STATUS "CMAKE_GENERATOR = ${CMAKE_GENERATOR}") +message(STATUS "CMAKE_INSTALL_PREFIX = ${CMAKE_INSTALL_PREFIX}") + +cmake_minimum_required(VERSION 2.8.11.2 FATAL_ERROR) + +option(BUILD_IWIDGETS_4.1 "Build iwidgets 4.1" OFF) + +if(BUILD_IWIDGETS_4.1) + # install iwidgets 4.1 that is associated with version 4 of itcl and itk. + # Note the only difference between iwidgets 4.1 and 4.0 source code + # is a small patch. We assume that patch has been applied for this case. + set(ITCL_VERSION 4.0) + set(VERSION 4.1.0) +else(BUILD_IWIDGETS_4.1) + # install iwidgets 4.0 that is associated with version 3 of itcl and itk. + set(ITCL_VERSION 3.2) + set(VERSION 4.0.1) +endif(BUILD_IWIDGETS_4.1) + +set(PACKAGE iwidgets${VERSION}) + +# Set up install locations. +set( + CMAKE_INSTALL_SCRIPTS_DIR + ${CMAKE_INSTALL_PREFIX}/lib/${PACKAGE} + CACHE PATH "install location for iwidgets scripts." + ) + +set( + CMAKE_INSTALL_DOC_DIR + ${CMAKE_INSTALL_PREFIX}/share/doc/${PACKAGE} + CACHE PATH "install location for iwidgets scripts." + ) + +set( + CMAKE_INSTALL_MAN_DIR + ${CMAKE_INSTALL_PREFIX}/share/man + CACHE PATH "install location for man documentation" + ) + +# Install configured iwidgets.tcl and pkgIndex.tcl. +configure_file(iwidgets.tcl.in iwidgets.tcl @ONLY) +configure_file(pkgIndex.tcl.in pkgIndex.tcl @ONLY) +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/iwidgets.tcl + ${CMAKE_CURRENT_BINARY_DIR}/pkgIndex.tcl + DESTINATION ${CMAKE_INSTALL_SCRIPTS_DIR} + ) + +# Install selected files from the generic subdirectory. + +file(GLOB generic_FILE_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} generic/*.itk generic/*.itcl generic/tclIndex generic/*.gif) +install( + FILES + ${generic_FILE_LIST} + DESTINATION ${CMAKE_INSTALL_SCRIPTS_DIR}/scripts + ) + +# Install some individual files to the documentation directory. +install( + FILES + CHANGES ChangeLog README license.terms + DESTINATION ${CMAKE_INSTALL_DOC_DIR} + ) + + +# Install demos, demos/images, and demos/html. + +file(GLOB demos_FILE_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} demos/*) +list(REMOVE_ITEM demos_FILE_LIST demos/images demos/html) +install( + FILES + ${demos_FILE_LIST} + DESTINATION ${CMAKE_INSTALL_DOC_DIR}/demos + ) + +file(GLOB demos_images_FILE_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} demos/images/*) +install( + FILES + ${demos_images_FILE_LIST} + DESTINATION ${CMAKE_INSTALL_DOC_DIR}/demos/images + ) +file(GLOB demos_html_FILE_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} demos/html/*) +install( + FILES + ${demos_html_FILE_LIST} + DESTINATION ${CMAKE_INSTALL_DOC_DIR}/demos/html + ) + +# Install transformed man pages using "iwidgets_" filename suffix. +# (All these changes copied exactly from the traditional build system +# except that I use default 644 permissions [which is consistent +# with the permissions of Debian man pages].) + +file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc) + +find_program(SED_EXECUTABLE sed) +if(NOT SED_EXECUTABLE) + message(FATAL_ERROR "sed required for build but not found") +endif(NOT SED_EXECUTABLE) + +file(GLOB man_FILE_LIST RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} doc/*.n) +foreach(manpage ${man_FILE_LIST}) + string(REGEX REPLACE "^doc/" "doc/iwidgets_" processed_manpage ${manpage}) + execute_process( + COMMAND + ${SED_EXECUTABLE} -e "/man\\.macros/r ${CMAKE_CURRENT_SOURCE_DIR}/doc/man.macros" -e "/man\\.macros/d" + INPUT_FILE ${CMAKE_CURRENT_SOURCE_DIR}/${manpage} + OUTPUT_FILE ${CMAKE_CURRENT_BINARY_DIR}/${processed_manpage} + ) +endforeach(manpage ${man_FILE_LIST}) + +file(GLOB man_FILE_LIST ${CMAKE_CURRENT_BINARY_DIR}/doc/*.n) +install( + FILES + ${man_FILE_LIST} + DESTINATION ${CMAKE_INSTALL_MAN_DIR}/mann + ) Property changes on: trunk/cmake/build_projects/iwidgets/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Modified: trunk/cmake/build_projects/iwidgets/bp.cmake =================================================================== --- trunk/cmake/build_projects/iwidgets/bp.cmake 2013-11-08 07:27:59 UTC (rev 12669) +++ trunk/cmake/build_projects/iwidgets/bp.cmake 2013-11-08 07:52:13 UTC (rev 12670) @@ -1,5 +1,5 @@ # iwidgets/bp.cmake -# CMakeLists.txt file to configure the build of iwidgets. +# CMakeLists.txt file to configure the build of iwidgets4.0 and iwidgets # Copyright (C) 2013 Alan W. Irwin @@ -23,9 +23,6 @@ # used below that configure how the External_Project functions # operate. -# These build configuration details for iwidgets adapted from -# <http://www.mail-archive.com/fin...@li.../msg113511.html> - # Protect against configuring a build twice in one CMake call if(iwidgets_configured) return() @@ -36,57 +33,111 @@ # ignored. set(BP_ignored_dependencies_LIST ${extra_ignored_dependencies_list}) -set(iwidgets_dependencies_LIST tk tcl itk) -# Remove dependencies that should be ignored. -if(iwidgets_dependencies_LIST) - list(REMOVE_ITEM iwidgets_dependencies_LIST ${BP_ignored_dependencies_LIST}) -endif(iwidgets_dependencies_LIST) +set(iwidgets4.0_dependencies_LIST itk3 itcl3 tk tcl) +set(iwidgets_dependencies_LIST itk tk tcl) -set(iwidgets_dependencies_targets) -foreach(build_configuration ${iwidgets_dependencies_LIST}) - if(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) - include(${build_configuration}/bp.cmake) - list(APPEND iwidgets_dependencies_targets build_${build_configuration}) - else(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) - message(STATUS "Warning: A build_configuration for ${build_configuration} does not exist so it is assumed this dependency of iwidgets has been installed another way.") - endif(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) -endforeach(build_configuration ${iwidgets_dependences_LIST}) +set(tags "4.0" "") +foreach(tag IN LISTS tags) + # Remove dependencies that should be ignored. + if(iwidgets${tag}_dependencies_LIST) + list(REMOVE_ITEM iwidgets${tag}_dependencies_LIST ${BP_ignored_dependencies_LIST}) + endif(iwidgets${tag}_dependencies_LIST) + set(iwidgets${tag}_dependencies_targets) + foreach(build_configuration ${iwidgets${tag}_dependencies_LIST}) + if(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) + include(${build_configuration}/bp.cmake) + list(APPEND iwidgets${tag}_dependencies_targets build_${build_configuration}) + else(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) + message(STATUS "Warning: A build_configuration for ${build_configuration} does not exist so it is assumed this dependency of iwidgets${tag} has been installed another way.") + endif(EXISTS ${CMAKE_SOURCE_DIR}/${build_configuration}/bp.cmake) + endforeach(build_configuration ${iwidgets${tag}_dependences_LIST}) +endforeach(tag IN LISTS tags) + # This can be safely done only after above includes. set(BP_PACKAGE iwidgets) -# Data that is related to downloads. -set(IWIDGETS_VERSION 41) -set(IWIDGETS_LIBVERSION 4.1) -set(${BP_PACKAGE}_URL http://downloads.sourceforge.net/project/kbskit/itk/iwidgets${IWIDGETS_VERSION}.tgz) -set(${BP_PACKAGE}_DOWNLOAD_HASH_TYPE MD5) -set(${BP_PACKAGE}_DOWNLOAD_HASH 5a60ec284bd8095c665287215ff2a69f) +set(${BP_PACKAGE}4.0_VERSION 4.0.1) +set(${BP_PACKAGE}4.0_LIBVERSION 4.0) +set(${BP_PACKAGE}4.0_ITCL_VERSION 3.2) +set(${BP_PACKAGE}4.0_CMAKE_OPTION -DBUILD_IWIDGETS_4.1=OFF) -# Data that is related to the PATH that must be used. -if(MSYS_PLATFORM) - #set(BP_PATH_NODLL "${BP_PATH}") - #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}/dll;${BP_PATH_NODLL}") - determine_msys_path(BP_PATH "${BP_PATH}") - # Must have all elements of env command in MSYS platform form - determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}") - set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}") -else(MSYS_PLATFORM) - set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}") - set(${BP_PACKAGE}_SET_CFLAGS "CFLAGS=$ENV{CFLAGS}") -endif(MSYS_PLATFORM) -#message(STATUS "modified BP_PATH for ${BP_PACKAGE} = ${BP_PATH}") +set(${BP_PACKAGE}_VERSION 4.1.0) +set(${BP_PACKAGE}_LIBVERSION 4.1) +set(${BP_PACKAGE}_ITCL_VERSION 4.0) +set(${BP_PACKAGE}_CMAKE_OPTION -DBUILD_IWIDGETS_4.1=ON) -ExternalProject_Add( - build_${BP_PACKAGE} - DEPENDS ${${BP_PACKAGE}_dependencies_targets} - URL ${${BP_PACKAGE}_URL} - URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH} - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND ${CMAKE_COMMAND} -E copy_directory ${EP_BASE}/Source/build_${BP_PACKAGE} ${BP_CMAKE_INSTALL_PREFIX}/lib/iwidgets${IWIDGETS_LIBVERSION} - ) +foreach(tag IN LISTS tags) + # Data that is related to downloads. + set(${BP_PACKAGE}${tag}_URL http://downloads.sourceforge.net/project/incrtcl/%5bIncr%20Widgets%5d/${${BP_PACKAGE}4.0_VERSION}/iwidgets${${BP_PACKAGE}4.0_VERSION}.tar.gz) + set(${BP_PACKAGE}${tag}_DOWNLOAD_HASH_TYPE MD5) + set(${BP_PACKAGE}${tag}_DOWNLOAD_HASH 0e9c140e81ea6015b56130127c7deb03) -list(APPEND build_target_LIST build_${BP_PACKAGE}) -# Restore BP_PATH to original state. -set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}") -#message(STATUS "${BP_PACKAGE} restored original BP_PATH = ${BP_PATH}") + # Data that is related to the PATH that must be used. + if(MSYS_PLATFORM) + #set(BP_PATH_NODLL "${BP_PATH}") + #set(BP_PATH "${EP_BASE}/Build/build_${BP_PACKAGE}${tag}/dll;${BP_PATH_NODLL}") + determine_msys_path(BP_PATH "${BP_PATH}") + # Must have all elements of env command in MSYS platform form + determine_msys_path(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}${tag}") + else(MSYS_PLATFORM) + set(source_PATH "${EP_BASE}/Source/build_${BP_PACKAGE}${tag}") + endif(MSYS_PLATFORM) + #message(STATUS "modified BP_PATH for ${BP_PACKAGE}${tag} = ${BP_PATH}") + + + ExternalProject_Add( + build_${BP_PACKAGE}${tag} + DEPENDS ${${BP_PACKAGE}${tag}_dependencies_targets} + URL ${${BP_PACKAGE}${tag}_URL} + URL_HASH ${${BP_PACKAGE}${tag}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}${tag}_DOWNLOAD_HASH} + PATCH_COMMAND "" + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_CMAKE_COMMAND} ${${BP_PACKAGE}${tag}_CMAKE_OPTION} ${EP_BASE}/Source/build_${BP_PACKAGE}${tag} + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_BUILD_COMMAND} install + ) + if(NOT "${tag}") + # Note this logic block executed for iwidget4.1 which has an empty + # tag. For this (4.1) case we do not use the + # http://downloads.sourceforge.net/project/kbskit/itk/iwidgets41.tar.gz + # tarball because there are some problems (incorrect install + # locations and only a subset of what is normally installed) for + # that binary distribution of iwidgets4.1. Instead, we build 4.1 + # similarly to 4.0 except we apply the following patch which was + # derived as follows: + # + # diff -Naur iwidgets4.0.1/README iwidgets4.1/README >iwidgets4.1.patch + # diff -Naur iwidgets4.0.1/license.terms iwidgets4.1/license.terms >>iwidgets4.1.patch + # diff -Naur --exclude=pkgIndex.tcl iwidgets4.0.1/generic iwidgets4.1/library >> iwidgets4.1.patch + # diff -Naur iwidgets4.0.1/tests iwidgets4.1/tests >> iwidgets4.1.patch + # + # N.B. this patch is somewhat larger than + # iwidgets4.1/iwidgets.patch because that latter patch is only + # concerned with generic subdirectory differences and it also + # appears to be taken against iwidgets-4.0.2 (which I cannot find + # anywhere on the net) rather than iwidgets-4.0.1. + add_custom_command( + OUTPUT + ${EP_BASE}/Stamp/build_${BP_PACKAGE}${tag}/build_${BP_PACKAGE}${tag}-patch + COMMAND echo "Apply iwidgets4.1 source code patch" + COMMAND ${PATCH_EXECUTABLE} --directory=${EP_BASE}/Source/build_${BP_PACKAGE}${tag} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/${BP_PACKAGE}4.1.patch + COMMAND echo "Apply patch to support both iwidgets and Iwidgets package names" + COMMAND ${PATCH_EXECUTABLE} --directory=${EP_BASE}/Source/build_${BP_PACKAGE}${tag} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/${BP_PACKAGE}4_case.patch + APPEND + ) + endif(NOT "${tag}") + + add_custom_command( + OUTPUT + ${EP_BASE}/Stamp/build_${BP_PACKAGE}${tag}/build_${BP_PACKAGE}${tag}-patch + COMMAND echo "Add CMake-based build system" + COMMAND ${CMAKE_COMMAND} -E copy_if_different + ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/CMakeLists.txt + ${EP_BASE}/Source/build_${BP_PACKAGE}${tag}/CMakeLists.txt + APPEND + ) + list(APPEND build_target_LIST build_${BP_PACKAGE}${tag}) + # Restore BP_PATH to original state. + set(BP_PATH "${BP_ORIGINAL_NATIVE_PATH}") + #message(STATUS "${BP_PACKAGE}${tag} restored original BP_PATH = ${BP_PATH}") +endforeach(tag IN LISTS tags) Added: trunk/cmake/build_projects/iwidgets/iwidgets4_case.patch =================================================================== --- trunk/cmake/build_projects/iwidgets/iwidgets4_case.patch (rev 0) +++ trunk/cmake/build_projects/iwidgets/iwidgets4_case.patch 2013-11-08 07:52:13 UTC (rev 12670) @@ -0,0 +1,17 @@ +diff -Naur iwidgets4.0.1_orig/iwidgets.tcl.in iwidgets4.0.1/iwidgets.tcl.in +--- iwidgets4.0.1_orig/iwidgets.tcl.in 2001-08-07 12:56:47.000000000 -0700 ++++ iwidgets4.0.1/iwidgets.tcl.in 2013-11-07 18:57:47.610530341 -0800 +@@ -28,4 +28,5 @@ + lappend auto_path $iwidgets::library \ + [file join $iwidgets::library generic] \ + [file join $iwidgets::library scripts] ++package provide iwidgets $iwidgets::version + package provide Iwidgets $iwidgets::version +diff -Naur iwidgets4.0.1_orig/pkgIndex.tcl.in iwidgets4.0.1/pkgIndex.tcl.in +--- iwidgets4.0.1_orig/pkgIndex.tcl.in 1999-09-13 17:01:24.000000000 -0700 ++++ iwidgets4.0.1/pkgIndex.tcl.in 2013-11-07 18:59:00.941136073 -0800 +@@ -1,3 +1,4 @@ + # Tcl package index file, version 1.0 + ++package ifneeded iwidgets @VERSION@ [list source [file join $dir iwidgets.tcl]] + package ifneeded Iwidgets @VERSION@ [list source [file join $dir iwidgets.tcl]] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-08 07:28:04
|
Revision: 12669 http://sourceforge.net/p/plplot/code/12669 Author: airwin Date: 2013-11-08 07:27:59 +0000 (Fri, 08 Nov 2013) Log Message: ----------- Implement and use a small patch to itk version 4 so that both the Itk and itk package names can be used. The file itk4_case.patch has also been made publicly available at https://sourceforge.net/p/incrtcl/patches/52 Modified Paths: -------------- trunk/cmake/build_projects/itk/bp.cmake Added Paths: ----------- trunk/cmake/build_projects/itk/itk4_case.patch Modified: trunk/cmake/build_projects/itk/bp.cmake =================================================================== --- trunk/cmake/build_projects/itk/bp.cmake 2013-11-08 07:23:20 UTC (rev 12668) +++ trunk/cmake/build_projects/itk/bp.cmake 2013-11-08 07:27:59 UTC (rev 12669) @@ -85,6 +85,9 @@ DEPENDS ${${BP_PACKAGE}_dependencies_targets} URL ${${BP_PACKAGE}_URL} URL_HASH ${${BP_PACKAGE}_DOWNLOAD_HASH_TYPE}=${${BP_PACKAGE}_DOWNLOAD_HASH} + # Provide an exactly equivalent "Itk" and "itk" form of the package name to + # follow what is implemented for itcl version 4. + PATCH_COMMAND ${PATCH_EXECUTABLE} -p1 < ${CMAKE_SOURCE_DIR}/${BP_PACKAGE}/itk4_case.patch CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} CPPFLAGS=-I${BP_CMAKE_INSTALL_PREFIX}/include ${source_PATH}/${BP_CONFIGURE_COMMAND} --mandir=${BP_CMAKE_INSTALL_PREFIX}/share/man ${ITK_ENABLE_64_BIT} --with-itcl=${BP_CMAKE_INSTALL_PREFIX}/lib/itcl${ITCL_ITK_LIBVERSION} BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_PARALLEL_MAKE_COMMAND} install Added: trunk/cmake/build_projects/itk/itk4_case.patch =================================================================== --- trunk/cmake/build_projects/itk/itk4_case.patch (rev 0) +++ trunk/cmake/build_projects/itk/itk4_case.patch 2013-11-08 07:27:59 UTC (rev 12669) @@ -0,0 +1,20 @@ +diff -Naur itk4.0.0_orig/generic/itkBase.c itk4.0.0/generic/itkBase.c +--- itk4.0.0_orig/generic/itkBase.c 2013-02-03 08:25:51.000000000 -0800 ++++ itk4.0.0/generic/itkBase.c 2013-11-07 14:18:15.711783872 -0800 +@@ -231,6 +231,8 @@ + * end-of-the-line? + */ + ++ Tcl_PkgProvideEx(interp, "Itk", ITK_PATCH_LEVEL, ++ (ClientData) &itkStubs); + return Tcl_PkgProvideEx(interp, "itk", ITK_PATCH_LEVEL, + (ClientData) &itkStubs); + } +diff -Naur itk4.0.0_orig/pkgIndex.tcl.in itk4.0.0/pkgIndex.tcl.in +--- itk4.0.0_orig/pkgIndex.tcl.in 2013-02-03 08:25:51.000000000 -0800 ++++ itk4.0.0/pkgIndex.tcl.in 2013-11-07 14:16:18.585957142 -0800 +@@ -1,3 +1,4 @@ + # Tcl package index file, version 1.0 + + package ifneeded itk @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] itk] ++package ifneeded Itk @PACKAGE_VERSION@ [list load [file join $dir "@PKG_LIB_FILE@"] itk] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-08 07:23:23
|
Revision: 12668 http://sourceforge.net/p/plplot/code/12668 Author: airwin Date: 2013-11-08 07:23:20 +0000 (Fri, 08 Nov 2013) Log Message: ----------- Patch to upgrade iwidgets4.0.1 source tree to a iwidgets4.1.0 source tree. This patch was derived as follows: diff -Naur iwidgets4.0.1/README iwidgets4.1/README >iwidgets4.1.patch diff -Naur iwidgets4.0.1/license.terms iwidgets4.1/license.terms >>iwidgets4.1.patch diff -Naur --exclude=pkgIndex.tcl iwidgets4.0.1/generic iwidgets4.1/library >> iwidgets4.1.patch diff -Naur iwidgets4.0.1/tests iwidgets4.1/tests >> iwidgets4.1.patch Note iwidgets4.0.1 is created by unpacking the 2002 tarball available from Sourceforge, and iwidgets4.1 is created by unpacking the binary tarball (which only contains installed versions of files) recently released at https://sourceforge.net/projects/kbskit/files/itk/. So the current patch is a means of making the iwidgets4.1.0 build and install much more comprehensive (since the binary iwidgets4.1 is missing many files such as the man pages) and more flexible, i.e., the build system makes it easy to install files in different locations and make other changes. Also note I exclude pkgIndex.tcl from iwidgets4.1/library because that file is normally configured as part of the iwidgets4.0.1 and (reconstituted) iwidgets4.1.0 CMake-based build system that I am about to commit. Added Paths: ----------- trunk/cmake/build_projects/iwidgets/iwidgets4.1.patch Added: trunk/cmake/build_projects/iwidgets/iwidgets4.1.patch =================================================================== --- trunk/cmake/build_projects/iwidgets/iwidgets4.1.patch (rev 0) +++ trunk/cmake/build_projects/iwidgets/iwidgets4.1.patch 2013-11-08 07:23:20 UTC (rev 12668) @@ -0,0 +1,1008 @@ +--- iwidgets4.0.1/README 2002-09-13 11:39:48.000000000 -0700 ++++ iwidgets4.1/README 2012-09-28 07:05:35.000000000 -0700 +@@ -1,212 +1,44 @@ +------------------------------------------------------------------------------- +- [incr Widgets] - version 4.0.1 +------------------------------------------------------------------------------- +-Please send general comments, suggestions, and questions to cha...@ad... +-or it...@ya.... Much of this file was written by Mark Ulferts, the +-original [incr Widgets] guy, several years ago when the Iwidgets were first +-released. Chad has assumed responsibilities for updates and maintenance. +- +-============================================================================== +- Copyright (c) 1995 DSC Technologies Corporation +-============================================================================== +- This software is copyrighted by DSC Technologies and private individual +- contributors. The copyright holder is specifically listed in the header +- of each file. The following terms apply to all files associated with the +- software unless explicitly disclaimed in individual files by private +- contributors. +- +- Permission to use, copy, modify, distribute and license this software and +- its documentation for any purpose, and without fee or written agreement +- with DSC, is hereby granted, provided that the above copyright notice +- appears in all copies and that both the copyright notice and warranty +- disclaimer below appear in supporting documentation, and that the names of +- DSC Technologies Corporation or DSC Communications Corporation not be used +- in advertising or publicity pertaining to the software without specific, +- written prior permission. +- +- DSC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL +- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, AND NON-INFRINGEMENT. +- THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, AND THE AUTHORS AND +- DISTRIBUTORS HAVE NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, +- ENHANCEMENTS, OR MODIFICATIONS. IN NO EVENT SHALL DSC BE LIABLE FOR ANY +- SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER +- RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF +- CONTRACT, NEGLIGENCE OR OTHER TORTUOUS ACTION, ARISING OUT OF OR IN +- CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +- +- RESTRICTED RIGHTS: Use, duplication or disclosure by the government +- is subject to the restrictions as set forth in subparagraph (c) (1) (ii) +- of the Rights in Technical Data and Computer Software Clause as DFARS +- 252.227-7013 and FAR 52.227-19. +-============================================================================== +- +- OVERVIEW +------------------------------------------------------------------------------- +- - Introduction +- - Distribution +- - Web site +- - Getting started +- - Contributions +- - Acknowledgements +------------------------------------------------------------------------------- +- +- +- Introduction +------------------------------------------------------------------------------- +- [incr Widgets] is an object-oriented mega-widget set which extends +- Tcl/Tk and is based on [incr Tcl] and [incr Tk]. This set of mega-widgets +- delivers many new, general purpose widgets like option menus, comboboxes, +- selection boxes, and various dialogs whose couterparts are found in Motif +- and Windows. Since [incr Widgets] is based on the [incr Tk] extension, the +- Tk framework of configuration options, widget commands, and default bindings +- is maintained. In other words, each [incr Widgets] mega-widget seamlessly +- blends with the standard Tk widgets. They look, act and feel like Tk +- widgets. In addition, all [incr Widgets] mega-widgets are object oriented and +- may themselves be extended, using either inheritance or composition. +- +- [incr Widgets] offers a strong object-oriented foundation which addresses +- the need for a flexible and extensible mega-widget set. Its usage replaces +- common widget combinations with higher level abstractions, simplifying code, +- reducing errors, increasing readability, adding productivity, and promoting +- a singular look-and-feel. The ability to extend [incr Widgets] enables +- developers to create new mega-widgets based on previous work. +- +- In short, [incr Widgets] is a library of reusable mega-widgets that can +- be easily extended using composition or inheritance, allowing quicker +- development of large scale applications. Usage drastically reduces +- development time. New dialogs can be created in hours. Whole applications +- in a few days. Reuse becomes a reality. Many projects are benefitting frm +- the intergration of this mega-widget set into their development strategy. +- [incr Widgets] is an [incr Tcl] and [incr Tk] success story. Good products +- come from good foundations. +- +- +- Distribution +------------------------------------------------------------------------------- +- The [incr Widgets] distribution may be downloaded at SourceForge: +- www.sourceforge.net/projects/incrtcl. The current distribution is +- version 4.0.1. +- +- +- Web site +------------------------------------------------------------------------------- +- For the most current news regarding [incr Widgets] please consult the web +- site - http://incrtcl.sourceforge.net/iwidgets. Many thanks to Brett Schwarz +- who has done an incredible job overhauling this site. Take a look! +- +- +- Getting started +------------------------------------------------------------------------------- +- The "doc" directory contains man pages and a technical paper. The man +- pages are installed under the man directory off your --prefix, and as of +- version 4.0.1 are prepended with the text "iwidgets_" to easily differentiate +- [incr Widgets] man pages from those of other extensions. +- +- doc/iwidgets.ps ... Updated paper presented at Tcl Workshop 95. +- +- doc/*.n ........... Man pages +- +- The "demos" directory contains demo scripts for each mega-widget as +- well as html versions of all the [incr Widgets] man pages. The +- demos are also installed under the lib directory off your --prefix. +- +- demos/catalog ..... Comprehensive demo package which illustrates +- [incr Widgets] usage additionally displaying the +- source. +- +- demos/html ..... HTML version of the [incr Widgets] man pages. +- +- The "tests" directory contains a set of test scripts for [incr Widgets]. +- They also make for a great demo of the flexiblity of the mega-widgets. +- +- +- Installation +------------------------------------------------------------------------------- +- NOTE: Having the itcl distribution is a prerequsite to using iwidgets. +- Thus, if you don't have itcl you need to visit Source Forge to download +- and install it first. Once you have downloaded and installed [incr Tcl] +- and [incr Tk], you can proceed with [incr Widgets] installation as follows: +- +- 1) Copy the iwidgets4.0.1.tar.gz file to your toplevel [incr Tcl] +- directory. For example, if you have the itcl3.2.1 distribution in +- a directory named /usr/local/tcl/itcl3.2.1, then you should copy +- the iwidgets file to this directory. +- +- Note, if you don't copy the iwidgets archive to this directory, +- then you will need to specify the --with-itcl flag when you run +- the configure script. +- +- 2) Untar/unzip the archive: +- +- gunzip -c iwidgets4.0.1.tar.gz |tar xvf - +- +- 3) Run the configuration script: +- +- cd iwidgets4.0.0 +- ./configure +- +- By default, the configuration script will set things up to be +- installed in "/usr/local". You can change this by specifying a +- different "prefix" in the "configure" command. You'll want to +- use the same value you used for the prefix in the configuration +- of your [incr Tcl/Tk] distribution. +- +- ./configure --prefix=/your/install/path +- +- The "configure" script generates a Makefile from the Makefile.in +- template. +- +- Also, as mentioned eariler, you may need to tell the [incr Widgets] +- where the [incr Tcl] source is located. For example, if your toplevel +- [incr Tcl] directory is located in /opt/tools/tcl/itcl3.2.1 and you +- are building the [incr Widgets] in a directory other than this, then +- you will need to use the following: +- +- ./configure --prefix=/your/install/path \ +- --with-itcl=/opt/tools/tcl/itcl3.2.1 +- +- 4) Run the test suite: +- +- make test +- +- 7) Install the [incr Widgets] man pages, demos, and script files. +- +- make install +- +- +- Acknowledgements +------------------------------------------------------------------------------- +- Thanks to Brett Schwarz for a ton of work done on the new [incr Widgets] +- web site, http://incrtcl.sourceforge.net/iwidgets. +- +- Thanks to the original develment team, comprised of Mark Ulferts, Sue +- Yockey, Bret Schuhmacher, Alfredo Jahn, John Sigler, and Bill Scott. Also +- thanks to Mark Harrison for his influence, confidence, and ideas. +- +- Thanks also to the new set of contributors which include John Tucker, +- Mitch Gorman, John Reekie, Alfredo Jahn, Ken Copeland, Tako Schotanus, +- Tony Parent and Michael McLennan +- +- Thanks to Michael McLennan, creator of [incr Tcl] and [incr Tk], for the +- beta copies, training, assistance, and his infectious enthusiasm. +- +- Thanks to DSC Communications for picking up the copyright and supporting +- the public release of this software. +- +- Thanks to John P. Davis for creating the [incr Widgets] "Flaming Toaster" +- logo which can be seen at http://www.tcltk.com/iwidgets +- +- Thanks to WebNet Technologies for their assistance is designing the [incr +- Widgets] web site, as well as hosting it. +- +- Special thanks to my wife Karen for supporting this effort and to our two +- girls, Katelyn and Bailey, who occasionally shared the PC with me. Also +- thanks to my Discman and its relentless power supply as well as my rock +- and roll CD collection. No music, no software. +- +--- +- ____________________________________________________________________________ +- _/_/ _/_/ _/ _/ _/ Mark L. Ulferts +- _/ _/ _/ _/ _/ _/ _/ ul...@sw... +- _/ _/_/ _/ _/ _/ _/ mul...@au... +- _/ _/ _/ _/ _/_/_/ _/ _/_/_/_/ _/ DSC Communications Corp, Austin Texas ++iwidgets 4.1 -- iwidgets for itk4 ++================================= ++ ++Slightly modified iwidgets implementation for itk4. ++For changes see the iwidgets.patch file. ++ ++Sources ++------- ++ ++The itk repository is hosted at: ++ http://chiselapp.com/user/rene/repository/itk/ ++A slightly modified iwidgets (see iwidgets.patch) is hosted at: ++ http://chiselapp.com/user/rene/repository/iwidgets/ ++ ++Ready to run binaries (*-itk) can be found at: ++ https://sourceforge.net/projects/kbskit/files/itk/ ++ ++To load itk call: ++ package require itk 4.0 ++and to load itk and iwidgets call: ++ package require iwidgets 4.1 ++ ++Install ++------- ++ ++Copy the library directory as iwidgets4.1 in your tcl library path. ++ cp -r library <your-install-path>/iwidgets4.1 ++ ++Documentation ++------------- ++ ++Please refer to the original documantation at ++ http://incrtcl.sourceforge.net/iwidgets/ ++ ++License & support ++----------------- ++ ++This work is under BSD license (see file 'license.terms') ++ ++Acknowledgements ++---------------- ++ ++This work is based on the original "iwidgets" work at ++ http://incrtcl.sourceforge.net/iwidgets/ +--- iwidgets4.0.1/license.terms 1998-07-27 11:50:16.000000000 -0700 ++++ iwidgets4.1/license.terms 2012-09-28 07:05:34.000000000 -0700 +@@ -1,3 +1,7 @@ ++This software is copyrighted by Rene Zaumseil (the maintainer). ++The following terms apply to all files associated with the software ++unless explicitly disclaimed in individual files. ++ + This software is copyrighted by DSC Technologies and private individual + contributors. The copyright holder is specifically listed in the header + of each file. The following terms apply to all files associated with the +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/calendar.itk iwidgets4.1/library/calendar.itk +--- iwidgets4.0.1/generic/calendar.itk 2002-09-05 12:33:06.000000000 -0700 ++++ iwidgets4.1/library/calendar.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -20,7 +20,7 @@ + # mega-widget and the command and option interface was expanded to make + # it even more configurable, but the underlying logic is the same. + # +-# @(#) $Id: calendar.itk,v 1.7 2002/09/05 19:33:06 smithc Exp $ ++# @(#) $Id: calendar.itk,v 1.9 2007/05/24 22:41:02 hobbs Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1997 DSC Technologies Corporation + # ====================================================================== +@@ -614,11 +614,11 @@ + if {$date_ == $now_} { + $canvas_ itemconfigure $item \ + -font $itk_option(-currentdatefont) \ +- -tags [list all-page date text now] ++ -tags [list all-page date $date_-date text now] + } else { + $canvas_ itemconfigure $item \ + -font $itk_option(-datefont) \ +- -tags [list all-page date text] ++ -tags [list all-page date $date_-date text] + } + } + +@@ -789,6 +789,9 @@ + + $itk_component(page) bind $date-sensor <ButtonPress-1> \ + [itcl::code $this _selectEvent $date] ++ ++ $itk_component(page) bind $date-date <ButtonPress-1> \ ++ [itcl::code $this _selectEvent $date] + } + + # +@@ -859,10 +862,15 @@ + set month [clock format $time_ -format "%m"] + set year [clock format $time_ -format "%Y"] + +- foreach lastday {31 30 29 28} { +- if {[catch {clock scan "$month/$lastday/$year"}] == 0} { +- break +- } ++ if {[info tclversion] >= 8.5} { ++ set startOfMonth [clock scan "$year-$month-01" -format %Y-%m-%d] ++ set lastday [clock format [clock add $startOfMonth 1 month -1 day] -format %d] ++ } else { ++ foreach lastday {31 30 29 28} { ++ if {[catch {clock scan "$month/$lastday/$year"}] == 0} { ++ break ++ } ++ } + } + set seconds [clock scan "$month/1/$year"] + set firstday [_adjustday [clock format $seconds -format %w]] +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/combobox.itk iwidgets4.1/library/combobox.itk +--- iwidgets4.0.1/generic/combobox.itk 2002-09-08 23:43:55.000000000 -0700 ++++ iwidgets4.1/library/combobox.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -282,7 +282,7 @@ + } + } + 0 - false - no - off { +- $itk_component(entry) configure -state disabled ++ $itk_component(entry) configure -state readonly + } + default { + error "bad editable option \"$itk_option(-editable)\":\ +@@ -355,7 +355,7 @@ + $itk_component(entry) configure -state normal + } + 0 - false - no - off { +- $itk_component(entry) configure -state disabled ++ $itk_component(entry) configure -state readonly + } + } + } +@@ -521,7 +521,8 @@ + } else { + if {$itk_option(-state) == "normal"} { + eval iwidgets::Entryfield::insert $index $args +- [itcl::code $this _lookup ""] ++ #RZ [itcl::code $this _lookup ""] ++ eval [itcl::code $this _lookup ""] + } + } + } +@@ -788,7 +789,7 @@ + set rtrn [delete $first $last] + switch -- $itk_option(-editable) { + 0 - false - no - off { +- $itk_component(entry) configure -state disabled ++ $itk_component(entry) configure -state readonly + } + } + return $rtrn +@@ -1067,7 +1068,7 @@ + $itk_component(entry) insert 0 $item + switch -- $itk_option(-editable) { + 0 - false - no - off { +- $itk_component(entry) configure -state disabled ++ $itk_component(entry) configure -state readonly + } + } + } +@@ -1134,7 +1135,7 @@ + $itk_component(entry) configure -state normal + } + 0 - false - no - off { +- $itk_component(entry) configure -state disabled ++ $itk_component(entry) configure -state readonly + } + } + +@@ -1441,3 +1442,5 @@ + set _inlookup 0 + return + } ++ ++ +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/dateentry.itk iwidgets4.1/library/dateentry.itk +--- iwidgets4.0.1/generic/dateentry.itk 2002-09-05 12:33:58.000000000 -0700 ++++ iwidgets4.1/library/dateentry.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -8,7 +8,7 @@ + # ---------------------------------------------------------------------- + # AUTHOR: Mark L. Ulferts E-mail: mul...@au... + # +-# @(#) $Id: dateentry.itk,v 1.6 2002/09/05 19:33:58 smithc Exp $ ++# @(#) $Id: dateentry.itk,v 1.7 2003/01/30 20:56:05 smithc Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1997 DSC Technologies Corporation + # ====================================================================== +@@ -203,6 +203,8 @@ + # image displayed in the icon button. + # ------------------------------------------------------------------ + itcl::body iwidgets::Dateentry::_getDefaultIcon {} { ++#RZ ++ if {$_defaultIcon ne {}} {return $_defaultIcon} + if {[lsearch [image types] pixmap] != -1} { + set _defaultIcon [image create pixmap -data { + /* XPM */ +@@ -260,9 +262,9 @@ + # Since this image will only need to be created once, we redefine + # this method to just return the image name for subsequent calls. + # +- itcl::body ::iwidgets::Dateentry::_getDefaultIcon {} { +- return $_defaultIcon +- } ++#RZ itcl::body ::iwidgets::Dateentry::_getDefaultIcon {} { ++#RZ return $_defaultIcon ++#RZ } + + return $_defaultIcon + } +@@ -364,9 +366,9 @@ + # Perform either a local or global grab based on the -grab option. + # + if {$itk_option(-grab) == "local"} { +- grab $itk_component(popup) ++ ::grab $itk_component(popup) + } else { +- grab -global $itk_component(popup) ++ ::grab -global $itk_component(popup) + } + + # +@@ -417,7 +419,7 @@ + # to the icon button that engages the popup action. + # ------------------------------------------------------------------ + itcl::body iwidgets::Dateentry::_releaseGrab {} { +- grab release $itk_component(popup) ++ ::grab release $itk_component(popup) + $itk_component(iconbutton) configure -relief raised + destroy $itk_component(popup) + bind $itk_component(iconbutton) <Button-1> [itcl::code $this _popup] +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/datefield.itk iwidgets4.1/library/datefield.itk +--- iwidgets4.0.1/generic/datefield.itk 2002-02-24 20:45:02.000000000 -0800 ++++ iwidgets4.1/library/datefield.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -6,7 +6,7 @@ + # ---------------------------------------------------------------------- + # AUTHOR: Mark L. Ulferts E-mail: mul...@au... + # +-# @(#) $Id: datefield.itk,v 1.5 2002/02/25 04:45:02 mgbacke Exp $ ++# @(#) $Id: datefield.itk,v 1.6 2007/06/10 19:18:14 hobbs Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1997 DSC Technologies Corporation + # ====================================================================== +@@ -457,7 +457,7 @@ + # aren't attempting to insert more that 10 characters. If + # so ring the bell and break. + # +- if {[regexp {[0-9]} $char]} { ++ if {[string match {[0-9]} $char]} { + if {[$itk_component(date) index insert] == 10} { + bell + return -code break +@@ -467,7 +467,7 @@ + # If we are currently in the month field then we process the + # number entered based on the cursor position. If we are at + # at the first position and our iq is low, then accept any +- # input. ++ # input. + # + if {$_cfield == "month"} { + +@@ -475,7 +475,7 @@ + if {$itk_option(-iq) == "low"} { + $itk_component(date) delete $month_start_pos + $itk_component(date) insert $month_start_pos $char +- } else { ++ } else { + # + # Otherwise, we're slightly smarter. If the number + # is less than two insert it at position zero. If +@@ -497,7 +497,7 @@ + $itk_component(date) delete $month_second_pos + $itk_component(date) insert $month_second_pos 1 + $itk_component(date) icursor $month_second_pos +- } ++ } + + # + # Finally, if the number is greater than one we'll +@@ -838,8 +838,7 @@ + set day_pos 3 + set year_pos 8 + } +- +- ++ + switch $field { + "month" { + $itk_component(date) icursor $month_pos +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/disjointlistbox.itk iwidgets4.1/library/disjointlistbox.itk +--- iwidgets4.0.1/generic/disjointlistbox.itk 2002-03-24 23:49:07.000000000 -0800 ++++ iwidgets4.1/library/disjointlistbox.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -462,7 +462,11 @@ + grid configure $itk_component(bbox) \ + -in $itk_interior -row 0 -column 1 -columnspan 1 \ + -sticky nsew +- ++ ++ # Tk8.5: enforce compatibility to previous versions ++ # see Tk-ticket 2062394 ++ catch {grid anchor $itk_component(bbox) center} ++ + grid configure $itk_component(rhsbutton) \ + -in $itk_component(bbox) -row 0 -column 0 -sticky ew + grid configure $itk_component(lhsbutton) \ +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/entryfield.itk iwidgets4.1/library/entryfield.itk +--- iwidgets4.0.1/generic/entryfield.itk 2001-09-17 12:24:46.000000000 -0700 ++++ iwidgets4.1/library/entryfield.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -7,7 +7,7 @@ + # AUTHOR: Sue Yockey E-mail: yo...@ac... + # Mark L. Ulferts E-mail: mul...@au... + # +-# @(#) $Id: entryfield.itk,v 1.6 2001/09/17 19:24:46 smithc Exp $ ++# @(#) $Id: entryfield.itk,v 1.7 2002/09/23 05:10:38 mgbacke Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1995 DSC Technologies Corporation + # ====================================================================== +@@ -102,7 +102,7 @@ + component hull configure -borderwidth 0 + + itk_component add entry { +- entry $itk_interior.entry ++ entry $itk_interior.entry + } { + keep -borderwidth -cursor -exportselection \ + -foreground -highlightcolor \ +@@ -120,7 +120,7 @@ + # Create the child site widget. + # + itk_component add -protected efchildsite { +- frame $itk_interior.efchildsite ++ frame $itk_interior.efchildsite + } + set itk_interior $itk_component(efchildsite) + +@@ -203,27 +203,27 @@ + # to enter into the entryfield. + # ------------------------------------------------------------------ + itcl::configbody iwidgets::Entryfield::pasting { +- set oldtags [bindtags $itk_component(entry)] +- if {[lindex $oldtags 0] != "pastetag"} { +- bindtags $itk_component(entry) [linsert $oldtags 0 pastetag] +- } +- +- if ($itk_option(-pasting)) { +- bind pastetag <ButtonRelease-2> [itcl::code $this _checkLength] +- bind pastetag <Control-v> [itcl::code $this _checkLength] +- bind pastetag <Insert> [itcl::code $this _checkLength] +- bind pastetag <KeyPress> {} +- } else { +- bind pastetag <ButtonRelease-2> {break} +- bind pastetag <Control-v> {break} +- bind pastetag <Insert> {break} +- bind pastetag <KeyPress> { +- # Disable function keys > F9. +- if {[regexp {^F[1,2][0-9]+$} "%K"]} { +- break +- } ++ set oldtags [bindtags $itk_component(entry)] ++ if {[lindex $oldtags 0] != "pastetag"} { ++ bindtags $itk_component(entry) [linsert $oldtags 0 pastetag] ++ } ++ ++ if {($itk_option(-pasting))} { ++ bind pastetag <ButtonRelease-2> [itcl::code $this _checkLength] ++ bind pastetag <Control-v> [itcl::code $this _checkLength] ++ bind pastetag <Insert> [itcl::code $this _checkLength] ++ bind pastetag <KeyPress> {} ++ } else { ++ bind pastetag <ButtonRelease-2> {break} ++ bind pastetag <Control-v> {break} ++ bind pastetag <Insert> {break} ++ bind pastetag <KeyPress> { ++ # Disable function keys > F9. ++ if {[regexp {^F[1,2][0-9]+$} "%K"]} { ++ break ++ } ++ } + } +- } + } + + # ------------------------------------------------------------------ +@@ -494,15 +494,22 @@ + # A Return key invokes the optionally specified command option. + # + if {$sym == "Return"} { +- uplevel #0 $itk_option(-command) +- return -code break 1 ++ if {$itk_option(-command) == ""} { ++ # ++ # Allow <Return> to propagate to parent if the -command option ++ # isn't defined. ++ # ++ return -code continue 1 ++ } ++ uplevel #0 $itk_option(-command) ++ return -code break 1 + } + + # + # Tabs, BackSpace, and Delete are passed on for other bindings. + # + if {($sym == "Tab") || ($sym == "BackSpace") || ($sym == "Delete")} { +- return -code continue 1 ++ return -code continue 1 + } + + # +@@ -523,18 +530,18 @@ + set CTRL 4 + global tcl_platform + if {$tcl_platform(platform) == "unix"} { +- set ALT 8 ++ set ALT 8 + } elseif {$tcl_platform(platform) == "windows"} { +- set ALT 16 ++ set ALT 16 + } else { +- # This is something other than UNIX or WINDOWS. Default to the +- # old behavior (UNIX). +- set ALT 8 ++ # This is something other than UNIX or WINDOWS. Default to the ++ # old behavior (UNIX). ++ set ALT 8 + } + # Thanks to Rolf Schroedter for the following elegant conditional. This + # masks out all <Ctrl> and <Alt> key combinations. + if {($char == "") || ($state & ($CTRL | $ALT))} { +- return -code continue 1 ++ return -code continue 1 + } + + # +@@ -543,10 +550,10 @@ + # invoke the invalid command procedure. + # + if {$itk_option(-fixed) != 0} { +- if {[string length [get]] >= $itk_option(-fixed)} { +- uplevel #0 $itk_option(-invalid) +- return -code break 0 +- } ++ if {[string length [get]] >= $itk_option(-fixed)} { ++ uplevel #0 $itk_option(-invalid) ++ return -code break 0 ++ } + } + + # +@@ -558,20 +565,20 @@ + # invalid procedure is called. + # + if {$itk_option(-validate) != {}} { +- set cmd $itk_option(-validate) ++ set cmd $itk_option(-validate) + +- regsub -all "%W" "$cmd" $itk_component(hull) cmd +- regsub -all "%P" "$cmd" [list [_peek $char]] cmd +- regsub -all "%S" "$cmd" [list [get]] cmd +- regsub -all "%c" "$cmd" [list $char] cmd ++ regsub -all "%W" "$cmd" $itk_component(hull) cmd ++ regsub -all "%P" "$cmd" [list [_peek $char]] cmd ++ regsub -all "%S" "$cmd" [list [get]] cmd ++ regsub -all "%c" "$cmd" [list $char] cmd + regsub -all {\\} "$cmd" {\\\\} cmd + +- set valid [uplevel #0 $cmd] ++ set valid [uplevel #0 $cmd] + +- if {($valid == "") || ([regexp 0|false|off|no $valid])} { +- uplevel #0 $itk_option(-invalid) +- return -code break 0 +- } ++ if {($valid == "") || ([regexp 0|false|off|no $valid])} { ++ uplevel #0 $itk_option(-invalid) ++ return -code break 0 ++ } + } + + return -code continue 1 +@@ -586,18 +593,18 @@ + # specified by the -fixed option. + # ------------------------------------------------------------------ + itcl::body iwidgets::Entryfield::_checkLength {} { +- if {$itk_option(-fixed) != 0} { +- if [catch {::selection get -selection CLIPBOARD} pending] { +- # Nothing in the clipboard. Check the primary selection. +- if [catch {::selection get -selection PRIMARY} pending] { +- # Nothing here either. Goodbye. +- return +- } +- } +- set len [expr {[string length $pending] + [string length [get]]}] +- if {$len > $itk_option(-fixed)} { +- uplevel #0 $itk_option(-invalid) +- return -code break 0 ++ if {$itk_option(-fixed) != 0} { ++ if {[catch {::selection get -selection CLIPBOARD} pending]} { ++ # Nothing in the clipboard. Check the primary selection. ++ if {[catch {::selection get -selection PRIMARY} pending]} { ++ # Nothing here either. Goodbye. ++ return ++ } ++ } ++ set len [expr {[string length $pending] + [string length [get]]}] ++ if {$len > $itk_option(-fixed)} { ++ uplevel #0 $itk_option(-invalid) ++ return -code break 0 ++ } + } +- } + } +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/extfileselectionbox.itk iwidgets4.1/library/extfileselectionbox.itk +--- iwidgets4.0.1/generic/extfileselectionbox.itk 2002-03-09 23:34:51.000000000 -0800 ++++ iwidgets4.1/library/extfileselectionbox.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -11,7 +11,7 @@ + # AUTHOR: Mark L. Ulferts EMAIL: mul...@sp... + # Anthony L. Parent ton...@sy... + # +-# @(#) $Id: extfileselectionbox.itk,v 1.5 2002/03/10 07:34:51 mgbacke Exp $ ++# @(#) $Id: extfileselectionbox.itk,v 1.6 2006/04/11 19:50:38 hobbs Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1997 DSC Technologies Corporation + # ====================================================================== +@@ -797,11 +797,11 @@ + itcl::body iwidgets::Extfileselectionbox::_setDirList {} { + $itk_component(dirs) clear + ++ set currentIndex "" + if {$itk_option(-dirsearchcommand) == {}} { + set cwd "$_pwd" + +- set counter 0 +- set currentIndex "" ++ set counter 0 + foreach i [lsort [glob -nocomplain \ + [file join $cwd .*] [file join $cwd *]]] { + if {[file isdirectory $i]} { +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/labeledframe.itk iwidgets4.1/library/labeledframe.itk +--- iwidgets4.0.1/generic/labeledframe.itk 2001-08-15 11:32:51.000000000 -0700 ++++ iwidgets4.1/library/labeledframe.itk 2012-09-28 07:05:34.000000000 -0700 +@@ -155,7 +155,6 @@ + + set tags [bindtags $itk_hull] + bindtags $itk_hull [linsert $tags 0 itk-delete-$itk_hull] +- + # + # Create the childsite frame window + # _______ +@@ -211,7 +210,6 @@ + if {$_reposition != ""} { + after cancel $_reposition + } +- + if {[winfo exists $itk_hull]} { + set tags [bindtags $itk_hull] + set i [lsearch $tags itk-delete-$itk_hull] +@@ -289,6 +287,7 @@ + # {"-relx" "-rely" <rowconfigure|columnconfigure> <row/column number>} + # ----------------------------------------------------------------------------- + itcl::body iwidgets::Labeledframe::_initTable {} { ++ if {![catch {set _LAYOUT_TABLE(nw-relx)}]} return ;#RZ + array set _LAYOUT_TABLE { + nw-relx 0.0 nw-rely 0.0 nw-wrap 0 nw-conf rowconfigure nw-num 0 + n-relx 0.5 n-rely 0.0 n-wrap 0 n-conf rowconfigure n-num 0 +@@ -313,7 +312,7 @@ + # + # NOTE: Be careful to use the "body" command, or the proc will get lost! + # +- itcl::body ::iwidgets::Labeledframe::_initTable {} {} ++ #RZ itcl::body ::iwidgets::Labeledframe::_initTable {} {} + } + + # ----------------------------------------------------------------------------- +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/menubar.itk iwidgets4.1/library/menubar.itk +--- iwidgets4.0.1/generic/menubar.itk 2001-08-15 11:33:13.000000000 -0700 ++++ iwidgets4.1/library/menubar.itk 2012-09-28 07:05:34.000000000 -0700 +@@ -160,6 +160,7 @@ + + variable _menuOption ;# The -menu option + variable _helpString ;# The -helpstr optio ++ variable _fixed 0 ;#RZ bug fix + } + } + +@@ -198,7 +199,7 @@ + set _pathMap(.) $itk_component(menubar) + + eval itk_initialize $args +- ++ set _fixed 1 ;#RZ + # + # HACK HACK HACK + # Tk expects some variables to be defined and due to some +@@ -357,7 +358,8 @@ + + # IF one exists already, delete the old one and create + # a new one +- if { ! [catch {_parsePath .0}] } { ++ #RZ if { ! [catch {_parsePath .0}] } ++ if { $_fixed && ! [catch {_parsePath .0}] } { + delete .0 .last + } + +@@ -2071,9 +2073,7 @@ + + set concatPath "" + foreach seg $segments { +- + set concatPath [_getSymbolicPath $concatPath $seg] +- + if { [catch {set _pathMap($concatPath)} ] } { + error "bad path: \"$path\" does not exist. \"$seg\" not valid" + } +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/pushbutton.itk iwidgets4.1/library/pushbutton.itk +--- iwidgets4.0.1/generic/pushbutton.itk 2001-08-17 12:03:44.000000000 -0700 ++++ iwidgets4.1/library/pushbutton.itk 2012-09-28 07:05:34.000000000 -0700 +@@ -11,7 +11,7 @@ + # AUTHOR: Mark L. Ulferts EMAIL: mul...@au... + # Bret A. Schuhmacher EMAIL: ba...@wn... + # +-# @(#) $Id: pushbutton.itk,v 1.3 2001/08/17 19:03:44 smithc Exp $ ++# @(#) $Id: pushbutton.itk,v 1.4 2007/06/10 19:28:30 hobbs Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1995 DSC Technologies Corporation + # ====================================================================== +@@ -100,19 +100,24 @@ + itk_option add hull.borderwidth hull.relief + itk_option add hull.highlightcolor + itk_option add hull.highlightbackground +- +- component hull configure \ ++ ++ if {$::tk_version > 8.3} { ++ # Tk 8.4+ frame -padx -pady options creates inadvertant margin box ++ component hull configure -padx 0 -pady 0 \ + -borderwidth [$this cget -borderwidth] +- ++ } else { ++ component hull configure -borderwidth [$this cget -borderwidth] ++ } ++ + pack propagate $itk_component(hull) no + + itk_component add pushbutton { + button $itk_component(hull).pushbutton \ + } { + usual +- keep -underline -wraplength -state -command ++ keep -underline -wraplength -state -command + } +- pack $itk_component(pushbutton) -expand 1 -fill both ++ pack $itk_component(pushbutton) -expand 1 -fill both + + # + # Initialize the widget based on the command line options. +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/scrolledhtml.itk iwidgets4.1/library/scrolledhtml.itk +--- iwidgets4.0.1/generic/scrolledhtml.itk 2002-02-15 21:11:08.000000000 -0800 ++++ iwidgets4.1/library/scrolledhtml.itk 2012-09-28 07:05:34.000000000 -0700 +@@ -42,7 +42,7 @@ + # ---------------------------------------------------------------------- + # AUTHOR: Kris Raney EMAIL: kr...@sp... + # +-# @(#) $Id: scrolledhtml.itk,v 1.7 2002/02/16 05:11:08 mgbacke Exp $ ++# @(#) $Id: scrolledhtml.itk,v 1.8 2004/12/02 17:49:18 davygrvy Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1996 DSC Technologies Corporation + # ====================================================================== +@@ -139,7 +139,7 @@ + itk_option define -alink alink ALink red + itk_option define -linkhighlight alink ALink red + itk_option define -unknownimage unknownimage File {} +- itk_option define -textbackground textBackground Background {} ++ itk_option define -textbackground textBackground Background {#ffffff};#RZ + itk_option define -update update Update 1 + itk_option define -debug debug Debug 0 + +@@ -352,7 +352,8 @@ + foreach x $_images { + ::image delete $x + } +- if {$_unknownimg != $_defUnknownImg} { ++ #RZ if {$_unknownimg != $_defUnknownImg} ++ if {$_unknownimg != "" && $_unknownimg != $_defUnknownImg} { + ::image delete $_unknownimg + } + } +@@ -1418,7 +1419,7 @@ + if {![regexp {^[+-].*} $ar(size)]} { + set _pointsndx $ar(size) + } else { +- set _pointsndx [expr {$_basefontsize $ar(size)}] ++ set _pointsndx [expr $_basefontsize $ar(size)] + } + if { $_pointsndx > 6 } { + set _pointsndx 6 +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/shell.itk iwidgets4.1/library/shell.itk +--- iwidgets4.0.1/generic/shell.itk 2002-02-24 22:43:26.000000000 -0800 ++++ iwidgets4.1/library/shell.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -8,7 +8,7 @@ + # AUTHOR: Mark L. Ulferts EMAIL: mul...@au... + # Kris Raney EMAIL: kr...@sp... + # +-# @(#) $Id: shell.itk,v 1.7 2002/02/25 06:43:26 mgbacke Exp $ ++# @(#) $Id: shell.itk,v 1.9 2007/06/10 19:35:04 hobbs Exp $ + # ---------------------------------------------------------------------- + # Copyright (c) 1996 DSC Technologies Corporation + # ====================================================================== +@@ -60,7 +60,8 @@ + public method deactivate {args} + public method center {{widget {}}} + +- private variable _result {} ;# Resultant value for modal activation. ++ protected variable _result {} ;# Resultant value for modal activation. ++ + private variable _busied {} ;# List of busied top level widgets. + + common grabstack {} +@@ -243,6 +244,17 @@ + raise $itk_component(hull) + wm deiconify $itk_component(hull) + tkwait visibility $itk_component(hull) ++ # For some mysterious reason, Tk sometimes returns too late from the ++ # "tkwait visibility", i.e. after the "deactivate" method was invoked, ++ # i.e. after the dialog window already disappeared. This would lead to ++ # an infinite vwait on _wait($this) further on. Trap this case. ++ # See also 2002-03-15 message to the Tcl/Tk newsgroup. ++ # Remark that tests show that if "raise" is given *after* "deiconify" ++ # (see above), "tkwait visibility" always returns duly on time..... ++ if {![winfo ismapped $itk_component(hull)]} { ++ # means "deactivate" went already through the grab-release stuff. ++ return $_result ++ } + + # Need to flush the event loop. This line added as a result of + # SF ticket #227885. +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/timeentry.itk iwidgets4.1/library/timeentry.itk +--- iwidgets4.0.1/generic/timeentry.itk 2001-08-17 12:05:08.000000000 -0700 ++++ iwidgets4.1/library/timeentry.itk 2012-09-28 07:05:34.000000000 -0700 +@@ -192,7 +192,8 @@ + # image displayed in the icon button. + # ------------------------------------------------------------------ + itcl::body iwidgets::Timeentry::_getDefaultIcon {} { +- ++#RZ ++ if {$_defaultIcon ne {}} {return $_defaultIcon} + if {[lsearch [image types] pixmap] != -1} { + set _defaultIcon [image create pixmap -data { + /* XPM */ +@@ -249,9 +250,9 @@ + # Since this image will only need to be created once, we redefine + # this method to just return the image name for subsequent calls. + # +- itcl::body ::iwidgets::Timeentry::_getDefaultIcon {} { +- return $_defaultIcon +- } ++#RZ itcl::body ::iwidgets::Timeentry::_getDefaultIcon {} { ++#RZ return $_defaultIcon ++#RZ } + + return $_defaultIcon + } +diff -Naur '--exclude=pkgIndex.tcl' iwidgets4.0.1/generic/toolbar.itk iwidgets4.1/library/toolbar.itk +--- iwidgets4.0.1/generic/toolbar.itk 2001-08-17 12:05:54.000000000 -0700 ++++ iwidgets4.1/library/toolbar.itk 2012-09-28 07:05:35.000000000 -0700 +@@ -684,7 +684,8 @@ + foreach optionSet [$itk_component($name) configure] { + set option [lindex $optionSet 0] + if { [lsearch $_optionList $option] != -1 } { +- itk_option add $name.$option ++ #RZ itk_option add $name.$option ++ itk_option add $name.[string range $option 1 end] + } + } + +diff -Naur iwidgets4.0.1/tests/all.tcl iwidgets4.1/tests/all.tcl +--- iwidgets4.0.1/tests/all.tcl 2000-07-05 23:43:38.000000000 -0700 ++++ iwidgets4.1/tests/all.tcl 2012-09-28 07:05:35.000000000 -0700 +@@ -80,6 +80,7 @@ + # Print results to ::tcltest::outputChannel. + puts $::tcltest::outputChannel $msg + } ++} + + # Now concatenate the temporary log file to + # ::tcltest::outputChannel +@@ -105,8 +106,6 @@ + } msg]} { + puts $::tcltest::outputChannel $msg + } +-} +- + set numFailures [llength $::tcltest::failFiles] + + # cleanup This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2013-11-07 22:00:50
|
Revision: 12667 http://sourceforge.net/p/plplot/code/12667 Author: andrewross Date: 2013-11-07 22:00:46 +0000 (Thu, 07 Nov 2013) Log Message: ----------- Fix from Phil Rosenberg for code which uses a const variable to initialise the size of an array. This is not strictly C compliant, though it is valid in C++. Visual studio complains about this. Modified Paths: -------------- trunk/examples/c/x22c.c Modified: trunk/examples/c/x22c.c =================================================================== --- trunk/examples/c/x22c.c 2013-11-06 02:05:21 UTC (rev 12666) +++ trunk/examples/c/x22c.c 2013-11-07 22:00:46 UTC (rev 12667) @@ -200,9 +200,10 @@ PLFLT **u, **v; const int nx = 20; const int ny = 20; - const int nc = 11; +#define NC 11 + const int nc = NC; const int nseg = 20; - PLFLT clev[nc]; + PLFLT clev[NC]; dx = 1.0; dy = 1.0; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-06 02:05:26
|
Revision: 12666 http://sourceforge.net/p/plplot/code/12666 Author: airwin Date: 2013-11-06 02:05:21 +0000 (Wed, 06 Nov 2013) Log Message: ----------- Fix location of installed man pages. Modified Paths: -------------- trunk/cmake/build_projects/iwidgets4.0/bp.cmake Modified: trunk/cmake/build_projects/iwidgets4.0/bp.cmake =================================================================== --- trunk/cmake/build_projects/iwidgets4.0/bp.cmake 2013-11-06 00:39:14 UTC (rev 12665) +++ trunk/cmake/build_projects/iwidgets4.0/bp.cmake 2013-11-06 02:05:21 UTC (rev 12666) @@ -89,8 +89,9 @@ # itcl header. CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${${BP_PACKAGE}_SET_CFLAGS} "CPPFLAGS=-I${INCRTCL3_PREFIX}/include/itcl${ITCL3_LIBVERSION} -I${BP_CMAKE_INSTALL_PREFIX}/include" ${source_PATH}/configure --prefix=${INCRTCL3_PREFIX} --exec-prefix=${INCRTCL3_PREFIX} --includedir=${INCRTCL3_PREFIX}/include/itcl${ITCL3_LIBVERSION} --mandir=${INCRTCL3_PREFIX}/share/man --with-tcl=${BP_CMAKE_INSTALL_PREFIX}/lib --with-tk=${BP_CMAKE_INSTALL_PREFIX}/lib # Possible make race conditions so use non-parallel make - BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND} - INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND} install + # Also, above --mandir option is ignored, so must specify MAN_INSTALL_DIR + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND} MAN_INSTALL_DIR=${INCRTCL3_PREFIX}/share/man/mann + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${BP_PATH} ${BP_MAKE_COMMAND} MAN_INSTALL_DIR=${INCRTCL3_PREFIX}/share/man/mann install ) add_custom_command( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2013-11-06 00:39:18
|
Revision: 12665 http://sourceforge.net/p/plplot/code/12665 Author: airwin Date: 2013-11-06 00:39:14 +0000 (Wed, 06 Nov 2013) Log Message: ----------- Move back to using a common install prefix for version 3 and version 4 of itcl and friends since there is no practical benefit to a separate version 3 install prefix (you still have to use versioned package names) and that separate version 3 install prefix also has the drawback that you have to set auto_path appropriately to find it. Modified Paths: -------------- trunk/cmake/build_projects/itcl3/bp.cmake Modified: trunk/cmake/build_projects/itcl3/bp.cmake =================================================================== --- trunk/cmake/build_projects/itcl3/bp.cmake 2013-11-06 00:35:15 UTC (rev 12664) +++ trunk/cmake/build_projects/itcl3/bp.cmake 2013-11-06 00:39:14 UTC (rev 12665) @@ -83,7 +83,11 @@ set(ITCL3_ENABLE_64_BIT --enable-64bit) endif(BP_HAVE_64_BIT_OS) -set(INCRTCL3_PREFIX ${BP_CMAKE_INSTALL_PREFIX}/lib/incrtcl3) +# This variable provides the opportunity to set an alternative install +# prefix to distinguish what files are installed by version 3 of itcl +# and friends from what is installed by version 4 of itcl and friends. +# But currently just use the ordinary install location. +set(INCRTCL3_PREFIX ${BP_CMAKE_INSTALL_PREFIX}) ExternalProject_Add( build_${BP_PACKAGE} This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |