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: <phi...@us...> - 2014-08-07 21:29:15
|
Revision: 13138 http://sourceforge.net/p/plplot/code/13138 Author: philrosenberg Date: 2014-08-07 21:29:02 +0000 (Thu, 07 Aug 2014) Log Message: ----------- Added new mapping functionality for shapefiles. Added the functions plmapline, plmapstring, plmaptex, plmapfill, which will perform appropriate drawing of the data in the shapefile, they also allow filtering which items in the shapefile are drawn. The original plmap function is left intact. The new functions are currently available from C and C++. Modified Paths: -------------- trunk/bindings/c++/plstream.cc trunk/bindings/c++/plstream.h trunk/examples/c/x19c.c trunk/examples/c++/x19.cc trunk/include/plplot.h trunk/src/plmap.c Added Paths: ----------- trunk/data/ss/ trunk/data/ss/os_open_conditions.txt trunk/data/ss/ss64ne_Building_Area.dbf trunk/data/ss/ss64ne_Building_Area.prj trunk/data/ss/ss64ne_Building_Area.shp trunk/data/ss/ss64ne_Building_Area.shx trunk/data/ss/ss64ne_General_Text.dbf trunk/data/ss/ss64ne_General_Text.prj trunk/data/ss/ss64ne_General_Text.shp trunk/data/ss/ss64ne_General_Text.shx trunk/data/ss/ss64ne_Height_Contours.dbf trunk/data/ss/ss64ne_Height_Contours.prj trunk/data/ss/ss64ne_Height_Contours.shp trunk/data/ss/ss64ne_Height_Contours.shx trunk/data/ss/ss64ne_Landform_Area.dbf trunk/data/ss/ss64ne_Landform_Area.prj trunk/data/ss/ss64ne_Landform_Area.shp trunk/data/ss/ss64ne_Landform_Area.shx trunk/data/ss/ss64ne_Landform_Line.dbf trunk/data/ss/ss64ne_Landform_Line.prj trunk/data/ss/ss64ne_Landform_Line.shp trunk/data/ss/ss64ne_Landform_Line.shx trunk/data/ss/ss64ne_Road_Centreline.dbf trunk/data/ss/ss64ne_Road_Centreline.prj trunk/data/ss/ss64ne_Road_Centreline.shp trunk/data/ss/ss64ne_Road_Centreline.shx trunk/data/ss/ss64ne_Water_Area.dbf trunk/data/ss/ss64ne_Water_Area.prj trunk/data/ss/ss64ne_Water_Area.shp trunk/data/ss/ss64ne_Water_Area.shx trunk/data/ss/ss64ne_Water_Line.dbf trunk/data/ss/ss64ne_Water_Line.prj trunk/data/ss/ss64ne_Water_Line.shp trunk/data/ss/ss64ne_Water_Line.shx Modified: trunk/bindings/c++/plstream.cc =================================================================== --- trunk/bindings/c++/plstream.cc 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/bindings/c++/plstream.cc 2014-08-07 21:29:02 UTC (rev 13138) @@ -1069,7 +1069,7 @@ pllsty( lin ); } -// plot continental outline in world coordinates +// Plot continental outline in world coordinates void plstream::map( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, PLFLT minlong, PLFLT maxlong, @@ -1080,6 +1080,52 @@ plmap( mapform, type, minlong, maxlong, minlat, maxlat ); } +// Plot map lines + +void plstream::mapline( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int* plotentries, int nplotentries) +{ + set_stream(); + + plmapline( mapform, type, minlong, maxlong, minlat, maxlat, plotentries, nplotentries ); +} + +// Plot map points + +void plstream::mapstring( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, const char *string, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int* plotentries, int nplotentries) +{ + set_stream(); + + plmapstring( mapform, type, string, minlong, maxlong, minlat, maxlat, plotentries, nplotentries ); +} + +// Plot map text + +void plstream::maptex( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, PLFLT dx, PLFLT dy, PLFLT just, const char *text, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int plotentry) +{ + set_stream(); + + plmaptex( mapform, type, dx, dy, just, text, minlong, maxlong, minlat, maxlat, plotentry ); +} + +// Plot map fills + +void plstream::mapfill( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, + PLFLT maxlat, int* plotentries, int nplotentries) +{ + set_stream(); + + plmapfill( mapform, type, minlong, maxlong, minlat, maxlat, plotentries, nplotentries ); +} + // Plot the latitudes and longitudes on the background. void plstream::meridians( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), Modified: trunk/bindings/c++/plstream.h =================================================================== --- trunk/bindings/c++/plstream.h 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/bindings/c++/plstream.h 2014-08-07 21:29:02 UTC (rev 13138) @@ -468,11 +468,37 @@ void lsty( PLINT lin ); -// plot continental outline in world coordinates +// Plot continental outline in world coordinates void map( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); +// Plot map lines + + void mapline( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int* plotentries, int nplotentries); + +// Plot map points + + void mapstring( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, const char *string, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int* plotentries, int nplotentries); + +// Plot map text + + void maptex( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, PLFLT dx, PLFLT dy, PLFLT just, const char *text, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int plotentry); + +// Plot map fills + + void mapfill( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, + PLFLT maxlat, int* plotentries, int nplotentries); + // Plot the latitudes and longitudes on the background. void meridians( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), Added: trunk/data/ss/os_open_conditions.txt =================================================================== --- trunk/data/ss/os_open_conditions.txt (rev 0) +++ trunk/data/ss/os_open_conditions.txt 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +Your use of OS OpenData is subject to the terms at http://www.ordnancesurvey.co.uk/oswebsite/opendata/docs/os-opendata-licence.pdf Added: trunk/data/ss/ss64ne_Building_Area.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Building_Area.dbf =================================================================== --- trunk/data/ss/ss64ne_Building_Area.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Building_Area.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Building_Area.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Building_Area.prj =================================================================== --- trunk/data/ss/ss64ne_Building_Area.prj (rev 0) +++ trunk/data/ss/ss64ne_Building_Area.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_Building_Area.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Building_Area.shp =================================================================== --- trunk/data/ss/ss64ne_Building_Area.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Building_Area.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Building_Area.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Building_Area.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Building_Area.shx =================================================================== --- trunk/data/ss/ss64ne_Building_Area.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Building_Area.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Building_Area.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_General_Text.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_General_Text.dbf =================================================================== --- trunk/data/ss/ss64ne_General_Text.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_General_Text.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_General_Text.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_General_Text.prj =================================================================== --- trunk/data/ss/ss64ne_General_Text.prj (rev 0) +++ trunk/data/ss/ss64ne_General_Text.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_General_Text.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_General_Text.shp =================================================================== --- trunk/data/ss/ss64ne_General_Text.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_General_Text.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_General_Text.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_General_Text.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_General_Text.shx =================================================================== --- trunk/data/ss/ss64ne_General_Text.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_General_Text.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_General_Text.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Height_Contours.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Height_Contours.dbf =================================================================== --- trunk/data/ss/ss64ne_Height_Contours.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Height_Contours.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Height_Contours.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Height_Contours.prj =================================================================== --- trunk/data/ss/ss64ne_Height_Contours.prj (rev 0) +++ trunk/data/ss/ss64ne_Height_Contours.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_Height_Contours.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Height_Contours.shp =================================================================== --- trunk/data/ss/ss64ne_Height_Contours.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Height_Contours.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Height_Contours.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Height_Contours.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Height_Contours.shx =================================================================== --- trunk/data/ss/ss64ne_Height_Contours.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Height_Contours.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Height_Contours.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Landform_Area.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Landform_Area.dbf =================================================================== --- trunk/data/ss/ss64ne_Landform_Area.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Landform_Area.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Landform_Area.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Landform_Area.prj =================================================================== --- trunk/data/ss/ss64ne_Landform_Area.prj (rev 0) +++ trunk/data/ss/ss64ne_Landform_Area.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_Landform_Area.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Landform_Area.shp =================================================================== --- trunk/data/ss/ss64ne_Landform_Area.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Landform_Area.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Landform_Area.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Landform_Area.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Landform_Area.shx =================================================================== --- trunk/data/ss/ss64ne_Landform_Area.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Landform_Area.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Landform_Area.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Landform_Line.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Landform_Line.dbf =================================================================== --- trunk/data/ss/ss64ne_Landform_Line.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Landform_Line.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Landform_Line.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Landform_Line.prj =================================================================== --- trunk/data/ss/ss64ne_Landform_Line.prj (rev 0) +++ trunk/data/ss/ss64ne_Landform_Line.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_Landform_Line.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Landform_Line.shp =================================================================== --- trunk/data/ss/ss64ne_Landform_Line.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Landform_Line.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Landform_Line.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Landform_Line.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Landform_Line.shx =================================================================== --- trunk/data/ss/ss64ne_Landform_Line.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Landform_Line.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Landform_Line.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Road_Centreline.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Road_Centreline.dbf =================================================================== --- trunk/data/ss/ss64ne_Road_Centreline.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Road_Centreline.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Road_Centreline.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Road_Centreline.prj =================================================================== --- trunk/data/ss/ss64ne_Road_Centreline.prj (rev 0) +++ trunk/data/ss/ss64ne_Road_Centreline.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_Road_Centreline.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Road_Centreline.shp =================================================================== --- trunk/data/ss/ss64ne_Road_Centreline.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Road_Centreline.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Road_Centreline.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Road_Centreline.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Road_Centreline.shx =================================================================== --- trunk/data/ss/ss64ne_Road_Centreline.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Road_Centreline.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Road_Centreline.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Water_Area.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Water_Area.dbf =================================================================== --- trunk/data/ss/ss64ne_Water_Area.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Water_Area.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Water_Area.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Water_Area.prj =================================================================== --- trunk/data/ss/ss64ne_Water_Area.prj (rev 0) +++ trunk/data/ss/ss64ne_Water_Area.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_Water_Area.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Water_Area.shp =================================================================== --- trunk/data/ss/ss64ne_Water_Area.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Water_Area.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Water_Area.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Water_Area.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Water_Area.shx =================================================================== --- trunk/data/ss/ss64ne_Water_Area.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Water_Area.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Water_Area.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Water_Line.dbf =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Water_Line.dbf =================================================================== --- trunk/data/ss/ss64ne_Water_Line.dbf 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Water_Line.dbf 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Water_Line.dbf ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Water_Line.prj =================================================================== --- trunk/data/ss/ss64ne_Water_Line.prj (rev 0) +++ trunk/data/ss/ss64ne_Water_Line.prj 2014-08-07 21:29:02 UTC (rev 13138) @@ -0,0 +1 @@ +PROJCS["OSGB_1936_British_National_Grid",GEOGCS["GCS_OSGB 1936",DATUM["D_OSGB_1936",SPHEROID["Airy_1830",6377563.396,299.3249646]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],UNIT["Meter",1]] \ No newline at end of file Added: trunk/data/ss/ss64ne_Water_Line.shp =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Water_Line.shp =================================================================== --- trunk/data/ss/ss64ne_Water_Line.shp 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Water_Line.shp 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Water_Line.shp ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Added: trunk/data/ss/ss64ne_Water_Line.shx =================================================================== (Binary files differ) Index: trunk/data/ss/ss64ne_Water_Line.shx =================================================================== --- trunk/data/ss/ss64ne_Water_Line.shx 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/data/ss/ss64ne_Water_Line.shx 2014-08-07 21:29:02 UTC (rev 13138) Property changes on: trunk/data/ss/ss64ne_Water_Line.shx ___________________________________________________________________ Added: svn:mime-type ## -0,0 +1 ## +application/octet-stream \ No newline at end of property Modified: trunk/examples/c/x19c.c =================================================================== --- trunk/examples/c/x19c.c 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/examples/c/x19c.c 2014-08-07 21:29:02 UTC (rev 13138) @@ -125,6 +125,17 @@ { PLFLT minx, maxx, miny, maxy; PLFLT x, y; + //variables for the shapelib example + const PLINT nbeachareas = 2; + PLINT beachareas[] = { 23, 24 }; + const PLINT nwoodlandareas = 94; + PLINT woodlandareas[94]; + const PLINT nshingleareas = 22; + PLINT shingleareas[]={ 0, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 217, 2424, 2425, 2426, 2427, 2428, 2491, 2577 }; + const PLINT ncragareas = 2024; + PLINT cragareas[2024]; + PLINT majorroads[]={ 33, 48, 71, 83, 89, 90, 101, 102, 111 }; + int i; // Parse and process command line arguments @@ -201,6 +212,112 @@ // For C, this is how the global transform is cleared plstransform( NULL, NULL ); + // An example using shapefiles. The shapefiles used are from Ordnance Survey, UK. + // These were chosen because they provide shapefiles for small grid boxes which + // are easilly manageable for this demo. + + pllsty( 1 ); + + + minx=240570; + maxx=621109; + miny=87822; + maxy=722770; + plscol0(0, 255, 255, 255 ); + plscol0(1, 0, 0, 0 ); + plscol0(2, 150, 150, 150 ); + plscol0(3, 0, 50, 200 ); + plscol0(4, 50, 50, 50 ); + plscol0(5, 150, 0, 0 ); + plscol0(6, 100, 100, 255 ); + + + minx=265000; + maxx=270000; + miny=145000; + maxy=150000; + plscol0( 0, 255, 255, 255 ); //white + plscol0( 1, 0, 0, 0 ); //black + plscol0( 2, 255, 200, 0 ); //yelow for sand + plscol0( 3, 60, 230, 60 ); // green for woodland + plscol0( 4, 210, 120, 60 ); //brown for contours + plscol0( 5, 150, 0, 0 ); //red for major roads + plscol0( 6, 180, 180, 255 ); //pale blue for water + plscol0( 7, 100, 100, 100 ); //pale grey for shingle or boulders + plscol0( 8, 100, 100, 100 ); //dark grey for custom polygons - generally crags + + + plcol0(1); + plenv( minx, maxx, miny, maxy, 1, -1 ); + pllab( "", "", "Martinhoe CP, Exmoor National Park, UK (shapelib only)" ); + + + //Beach + plcol0( 2 ); + plmapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, beachareas, nbeachareas ); + + //woodland + plcol0( 3 ); + for( i=0; i < nwoodlandareas; ++ i ) + woodlandareas[i] = i + 218; + plmapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, woodlandareas, nwoodlandareas ); + + //shingle or boulders + plcol0( 7 ); + plmapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, shingleareas, nshingleareas ); + + //crags + plcol0( 8 ); + for( i=0; i < ncragareas; ++ i ) + cragareas[i] = i + 325; + plmapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, cragareas, ncragareas ); + + //draw contours, we need to separate contours from high/low coastline + //draw_contours(pls, "ss/SS64_line", 433, 20, 4, 3, minx, maxx, miny, maxy ); + plcol0( 4 ); + plmapline(NULL, "ss/ss64ne_Height_Contours", minx, maxx, miny, maxy, NULL, 0 ); + + //draw the sea and surface water + plwidth( 0.0 ); + plcol0(6); + plmapfill(NULL, "ss/ss64ne_Water_Area", minx, maxx, miny, maxy, NULL, 0 ); + plwidth( 2.0 ); + plmapfill(NULL, "ss/ss64ne_Water_Line", minx, maxx, miny, maxy, NULL, 0 ); + + //draw the roads, first with black and then thinner with colour to give an + //an outlined appearance + plwidth( 5.0 ); + plcol0( 1 ); + plmapline(NULL, "ss/ss64ne_Road_Centreline", minx, maxx, miny, maxy, NULL, 0 ); + plwidth( 3.0 ); + plcol0( 0 ); + plmapline(NULL, "ss/ss64ne_Road_Centreline", minx, maxx, miny, maxy, NULL, 0 ); + plcol0( 5 ); + plmapline(NULL, "ss/ss64ne_Road_Centreline", minx, maxx, miny, maxy, majorroads, 9 ); + + //draw buildings + plwidth( 1.0 ); + plcol0( 1 ); + plmapfill(NULL, "ss/ss64ne_Building_Area", minx, maxx, miny, maxy, NULL, 0 ); + + //labels + plsfci( 0x80000100 ); + plschr(0, 0.8); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "MARTINHOE CP", minx, maxx, miny, maxy, 202); + plschr(0,0.7); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Heale\nDown", minx, maxx, miny, maxy, 13); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "South\nDown", minx, maxx, miny, maxy, 34); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Martinhoe\nCommon", minx, maxx, miny, maxy, 42); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Woody Bay", minx, maxx, miny, maxy, 211); + plschr(0, 0.6); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Mill Wood", minx, maxx, miny, maxy, 16); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Heale Wood", minx, maxx, miny, maxy, 17); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 1.0, "Bodley", minx, maxx, miny, maxy, 31); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.0, "Martinhoe", minx, maxx, miny, maxy, 37); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Woolhanger\nCommon", minx, maxx, miny, maxy, 60); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "West Ilkerton\nCommon", minx, maxx, miny, maxy, 61); + plmaptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Caffyns\nHeanton\nDown", minx, maxx, miny, maxy, 62); + plend(); exit( 0 ); } Modified: trunk/examples/c++/x19.cc =================================================================== --- trunk/examples/c++/x19.cc 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/examples/c++/x19.cc 2014-08-07 21:29:02 UTC (rev 13138) @@ -144,10 +144,33 @@ } } +//a function to draw the contour data and coastline from the example shapefiles +void +draw_contours(plstream *pls, const char *file, PLINT ncontours, PLINT nwater, PLINT colourcontours, PLINT colourwater, PLFLT minx, PLFLT maxx, PLFLT miny, PLFLT maxy) +{ + PLINT i; + PLINT *contours = ( PLINT* ) malloc ( ncontours * sizeof( PLINT ) ); + PLINT *water = ( PLINT* ) malloc ( nwater * sizeof( PLINT ) ); + for( i = 0; i < ncontours; ++i ) + contours[i] = i; + for( i = 0; i < nwater; ++i ) + water[i] = i + ncontours; + + pls->col0(colourcontours); + pls->mapline( NULL, file, minx, maxx, miny, maxy, contours, ncontours ); + pls->col0(colourwater); + pls->mapline( NULL, file, minx, maxx, miny, maxy, water, nwater ); + + free( contours ); + free( water ); +} + + x19::x19( int argc, const char ** argv ) { PLFLT minx, maxx, miny, maxy; + PLINT i; // plplot initialization @@ -166,6 +189,7 @@ // Cartesian plots // Most of world + minx = -170; maxx = minx + 360; @@ -225,6 +249,122 @@ // For C, this is how the global transform is cleared pls->stransform( NULL, NULL ); + + // An example using shapefiles. The shapefiles used are from Ordnance Survey, UK. + // These were chosen because they provide shapefiles for small grid boxes which + // are easilly manageable for this demo. + + pls->lsty( 1 ); + + + minx=240570; + maxx=621109; + miny=87822; + maxy=722770; + pls->scol0(0, 255, 255, 255 ); + pls->scol0(1, 0, 0, 0 ); + pls->scol0(2, 150, 150, 150 ); + pls->scol0(3, 0, 50, 200 ); + pls->scol0(4, 50, 50, 50 ); + pls->scol0(5, 150, 0, 0 ); + pls->scol0(6, 100, 100, 255 ); + + + minx=265000; + maxx=270000; + miny=145000; + maxy=150000; + pls->scol0( 0, 255, 255, 255 ); //white + pls->scol0( 1, 0, 0, 0 ); //black + pls->scol0( 2, 255, 200, 0 ); //yelow for sand + pls->scol0( 3, 60, 230, 60 ); // green for woodland + pls->scol0( 4, 210, 120, 60 ); //brown for contours + pls->scol0( 5, 150, 0, 0 ); //red for major roads + pls->scol0( 6, 180, 180, 255 ); //pale blue for water + pls->scol0( 7, 100, 100, 100 ); //pale grey for shingle or boulders + pls->scol0( 8, 100, 100, 100 ); //dark grey for custom polygons - generally crags + + + pls->col0(1); + pls->env( minx, maxx, miny, maxy, 1, -1 ); + pls->lab( "", "", "Martinhoe CP, Exmoor National Park, UK (shapelib only)" ); + + + //Beach + pls->col0( 2 ); + const PLINT nbeachareas = 2; + PLINT beachareas[] = { 23, 24 }; + pls->mapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, beachareas, nbeachareas ); + + //woodland + pls->col0( 3 ); + const PLINT nwoodlandareas = 94; + PLINT woodlandareas[nwoodlandareas]; + for( i=0; i < nwoodlandareas; ++ i ) + woodlandareas[i] = i + 218; + pls->mapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, woodlandareas, nwoodlandareas ); + + //shingle or boulders + pls->col0( 7 ); + const PLINT nshingleareas = 22; + PLINT shingleareas[]={ 0, 1, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 217, 2424, 2425, 2426, 2427, 2428, 2491, 2577 }; + pls->mapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, shingleareas, nshingleareas ); + + //crags + pls->col0( 8 ); + const PLINT ncragareas = 2024; + PLINT cragareas[ncragareas]; + for( i=0; i < ncragareas; ++ i ) + cragareas[i] = i + 325; + pls->mapfill(NULL, "ss/ss64ne_Landform_Area", minx, maxx, miny, maxy, cragareas, ncragareas ); + + //draw contours, we need to separate contours from high/low coastline + //draw_contours(pls, "ss/SS64_line", 433, 20, 4, 3, minx, maxx, miny, maxy ); + pls->col0( 4 ); + pls->mapline(NULL, "ss/ss64ne_Height_Contours", minx, maxx, miny, maxy, NULL, 0 ); + + //draw the sea and surface water + pls->width( 0.0 ); + pls->col0(6); + pls->mapfill(NULL, "ss/ss64ne_Water_Area", minx, maxx, miny, maxy, NULL, 0 ); + pls->width( 2.0 ); + pls->mapfill(NULL, "ss/ss64ne_Water_Line", minx, maxx, miny, maxy, NULL, 0 ); + + //draw the roads, first with black and then thinner with colour to give an + //an outlined appearance + pls->width( 5.0 ); + pls->col0( 1 ); + pls->mapline(NULL, "ss/ss64ne_Road_Centreline", minx, maxx, miny, maxy, NULL, 0 ); + pls->width( 3.0 ); + pls->col0( 0 ); + pls->mapline(NULL, "ss/ss64ne_Road_Centreline", minx, maxx, miny, maxy, NULL, 0 ); + PLINT majorroads[]={ 33, 48, 71, 83, 89, 90, 101, 102, 111 }; + pls->col0( 5 ); + pls->mapline(NULL, "ss/ss64ne_Road_Centreline", minx, maxx, miny, maxy, majorroads, 9 ); + + //draw buildings + pls->width( 1.0 ); + pls->col0( 1 ); + pls->mapfill(NULL, "ss/ss64ne_Building_Area", minx, maxx, miny, maxy, NULL, 0 ); + + //labels + pls->sfci( 0x80000100 ); + pls->schr(0, 0.8); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "MARTINHOE CP", minx, maxx, miny, maxy, 202); + pls->schr(0,0.7); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Heale\nDown", minx, maxx, miny, maxy, 13); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "South\nDown", minx, maxx, miny, maxy, 34); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Martinhoe\nCommon", minx, maxx, miny, maxy, 42); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Woody Bay", minx, maxx, miny, maxy, 211); + pls->schr(0, 0.6); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Mill Wood", minx, maxx, miny, maxy, 16); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Heale Wood", minx, maxx, miny, maxy, 17); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 1.0, "Bodley", minx, maxx, miny, maxy, 31); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.0, "Martinhoe", minx, maxx, miny, maxy, 37); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Woolhanger\nCommon", minx, maxx, miny, maxy, 60); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "West Ilkerton\nCommon", minx, maxx, miny, maxy, 61); + pls->maptex(NULL, "ss/ss64ne_General_Text", 1.0, 0.0, 0.5, "Caffyns\nHeanton\nDown", minx, maxx, miny, maxy, 62); + delete pls; } Modified: trunk/include/plplot.h =================================================================== --- trunk/include/plplot.h 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/include/plplot.h 2014-08-07 21:29:02 UTC (rev 13138) @@ -660,6 +660,10 @@ #define plline3 c_plline3 #define pllsty c_pllsty #define plmap c_plmap +#define plmapline c_plmapline +#define plmapstring c_plmapstring +#define plmaptex c_plmaptex +#define plmapfill c_plmapfill #define plmeridians c_plmeridians #define plmesh c_plmesh #define plmeshc c_plmeshc @@ -1287,12 +1291,42 @@ PLDLLIMPEXP void c_pllsty( PLINT lin ); -// plot continental outline in world coordinates +// Plot continental outline in world coordinates PLDLLIMPEXP void c_plmap( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ); +// Plot map outlines + +PLDLLIMPEXP void +c_plmapline( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int* plotentries, int nplotentries); + +// Plot map points + +PLDLLIMPEXP void +c_plmapstring( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, const char *string, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int* plotentries, int nplotentries); + +// Plot map text + +PLDLLIMPEXP void +c_plmaptex( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, PLFLT dx, PLFLT dy, PLFLT just, const char *text, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, + int plotentry); + +// Plot map fills + +PLDLLIMPEXP void +c_plmapfill( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), + const char *type, PLFLT minlong, PLFLT maxlong, PLFLT minlat, + PLFLT maxlat, int* plotentries, int nplotentries); + // Plot the latitudes and longitudes on the background. PLDLLIMPEXP void Modified: trunk/src/plmap.c =================================================================== --- trunk/src/plmap.c 2014-07-11 18:32:21 UTC (rev 13137) +++ trunk/src/plmap.c 2014-08-07 21:29:02 UTC (rev 13138) @@ -51,120 +51,282 @@ #ifdef HAVE_SAHOOKS static void CustomErrors( const char *message ); -#endif +#endif //HAVE_SAHOOKS -#endif - -//-------------------------------------------------------------------------- -// void plmap(void (*mapform)(PLINT, PLFLT *, PLFLT *), const char *type, -// PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat); -// -// plot continental outline in world coordinates -// -// v1.4: machine independant version -// v1.3: replaced plcontinent by plmap, added plmeridians -// v1.2: 2 arguments: mapform, type of plot -// -// mapform(PLINT n, PLFLT *x, PLFLT *y) is a routine to transform the -// coordinate longitudes and latitudes to a plot coordinate system. By -// using this transform, we can change from a longitude, latitude -// coordinate to a polar stereographic project, for example. Initially, -// x[0]..[n-1] are the longitudes and y[0]..y[n-1] are the corresponding -// latitudes. After the call to mapform(), x[] and y[] should be replaced -// by the corresponding plot coordinates. If no transform is desired, -// mapform can be replaced by NULL. -// -// type is a character string. The value of this parameter determines the -// type of background. The possible values are, -// -// "globe" continental outlines -// "usa" USA and state boundaries -// "cglobe" continental outlines and countries -// "usaglobe" USA, state boundaries and continental outlines -// alternatively the filename of a shapefile can be passed if PLplot has -// been compiled with shapelib. In this case either the base name of the -// file can be passed or the filename including the .shp or .shx suffix. -// Only the .shp and .shx files are used. -// -// minlong, maxlong are the values of the longitude on the left and right -// side of the plot, respectively. The value of minlong must be less than -// the values of maxlong, and the values of maxlong-minlong must be less -// or equal to 360. -// -// minlat, maxlat are the minimum and maximum latitudes to be plotted on -// the background. One can always use -90.0 and 90.0 as the boundary -// outside the plot window will be automatically eliminated. However, the -// program will be faster if one can reduce the size of the background -// plotted. -//-------------------------------------------------------------------------- - -#ifdef HAVE_SHAPELIB #define MAP_FILE "" #define OpenMap OpenShapeFile #define CloseMap SHPClose -#else + +#else //HAVE_SHAPELIB + #define MAP_FILE ".map" #define OpenMap plLibOpenPdfstrm #define CloseMap pdf_close #define OFFSET ( 180 * 100 ) #define SCALE 100.0 #define W_BUFSIZ ( 32 * 1024 ) -#endif +#define SHPT_ARC 1 +#define SHPT_POINT 2 +#define SHPT_POLYGON 3 +#endif //HAVE_SHAPELIB + +//redistributes the lon value onto either 0-360 or -180-180 for wrapping +//purposes. void -plmap( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, - PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat ) +rebaselon( PLFLT *lon, PLFLT midlon ) { + if( *lon > midlon + 180.0 ) + *lon -= floor( ( *lon - midlon - 180.0 ) / 360.0 + 1.0 ) * 360.0; + else if( *lon < midlon - 180.0 ) + *lon += floor( ( midlon - 180.0 - *lon ) / 360.0 + 1.0 ) * 360.0; + +} + +//append a PLFLT to an array of PLFLTs. array is a pointer to the array, +//n is the current size of the array, val is the value to append. +//returns 0 for success, 1 for could not allocate new memory. If memory +//could not be allocated then the previous array remains intact +int appendflt( PLFLT **array, size_t n, PLFLT val ) +{ + size_t i; + PLFLT *temp = ( PLFLT* ) malloc( ( n + 1 ) * sizeof( PLFLT ) ); + if( !temp) + return 1; + for( i = 0; i < n; ++i ) + temp[i]=(*array)[i]; + temp[n] = val; + free ( *array ); + *array = temp; + return 0; +} + +//As for appendflt, but for an array of ints +int appendint( int **array, size_t n, int val ) +{ + size_t i; + int *temp = ( int* ) malloc( ( n + 1 ) * sizeof( int ) ); + if( !temp) + return 1; + for( i = 0; i < n; ++i ) + temp[i]=(*array)[i]; + temp[n] = val; + free ( *array ); + *array = temp; + return 0; +} + +//As for appendflt, but for an array of pointers to PLFLTs +int appendfltptr( PLFLT ***array, size_t n, PLFLT *val ) +{ + size_t i; + PLFLT **temp = ( PLFLT** ) malloc( ( n + 1 ) * sizeof( PLFLT *) ); + if( !temp) + return 1; + for(i = 0; i < n; ++i) + temp[i]=(*array)[i]; + temp[n] = val; + free ( *array ); + *array = temp; + return 0; +} + +//Check to see if the mapform wraps round longitudes. For example, a polar +// projection wraps round longitudes, but a cylindrical projection does not. +//Returns 1 if the mapform wraps or 0 if not. +char +checkwrap( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), PLFLT lon, PLFLT lat ) +{ + PLFLT x[]={lon}; + PLFLT y[]={lat}; + PLFLT resultx; + PLFLT resulty; + + if( !mapform ) + return 0; + + mapform( 1, x, y ); + resultx = x[0]; + resulty = y[0]; + x[0] = lon + 360; + y[0] = lat; + return ( ( ABS( x[0] - resultx ) < 1.0e-12 ) && ( ABS( y[0] - resulty ) < 1.0e-12 ) ); +} + +//------------------------------------------------------------------------------------- +//Actually draw the map lines points and text. +//------------------------------------------------------------------------------------- +void +drawmapdata( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), int shapetype, PLINT n, PLFLT *x, PLFLT *y, PLFLT dx, PLFLT dy, PLFLT just, const char *text ) +{ + PLINT i; + + //do the transform if needed + if ( mapform != NULL ) + ( *mapform )( n, x, y ); + + if ( shapetype == SHPT_ARC ) + plline( n, x, y ); + else if ( shapetype == SHPT_POINT ) + for ( i = 0; i < n; ++i ) + plptex( x[i], y[i], dx, dy, just, text ); + else if ( shapetype == SHPT_POLYGON ) + plfill( n, x, y ); +#ifdef HAVE_SHAPELIB + else if( shapetype == SHPT_ARCZ || shapetype == SHPT_ARCM ) + plline( n, x, y ); + else if( shapetype == SHPT_POLYGON || shapetype == SHPT_POLYGONZ || shapetype == SHPT_POLYGONM ) + plfill( n, x, y ); + else if( shapetype == SHPT_POINT || shapetype ==SHPT_POINTM || shapetype == SHPT_POINTZ ) + for ( i = 0; i < n; ++i ) + plptex( x[i], y[i], dx, dy, just, text ); +#endif //HAVE_SHAPELIB +} + + +//------------------------------------------------------------------------------------- +//This is a function called by the front end map functions to do the map drawing. Its +//parameters are: +//mapform: The transform used to convert the data in raw coordinates to x, y positions +//on the plot +//type: either one of the plplot provided lat/lon maps or the path/file name of a +//shapefile +//dx/dy: the gradient of text/symbols drawn if text is non-null +//shapetype: one of ARC, SHPT_ARCZ, SHPT_ARCM, SHPT_POLYGON, SHPT_POLYGONZ, +//SHPT_POLYGONM, SHPT_POINT, SHPT_POINTM, SHPT_POINTZ. See drawmapdata() for the +//how each type is rendered. But Basically the ARC options are lines, the POLYGON +//options are filled polygons, the POINT options are points/text. Options beginning +//SHPT will only be defined if HAVE_SHAPELIB is true +//text: The text (which can be actual text or a unicode symbol) to be drawn at +//each point +//minlong/maxlong: The min/max longitude when using a plplot provided map or x value if +//using a shapefile +//minlat/maxlat: The min/max latitude when using a plplot provided map or y value if +//using a shapefile +//plotentries: used only for shapefiles, as one shapefile contains multiple vectors +//each representing a different item (e.g. multiple boundaries, multiple height +//contours etc. plotentries is an array containing the indices of the +//entries within the shapefile that you wish to plot. if plotentries is null all +//entries are plotted +//nplotentries: the number of elements in plotentries. Ignored if plplot was not built +//with shapefile support or if plotentries is null +//------------------------------------------------------------------------------------- +void +drawmap( void ( *mapform )( PLINT, PLFLT *, PLFLT * ), const char *type, + PLFLT dx, PLFLT dy, int shapetype, PLFLT just, const char *text, + PLFLT minlong, PLFLT maxlong, PLFLT minlat, PLFLT maxlat, int* plotentries, int nplotentries ) +{ #if defined ( HAVE_SHAPELIB ) || defined ( PL_DEPRECATED ) int i, j; - char *filename; - char *warning; - int n = 200; + char *filename = NULL; + char truncatedfilename[900]; + char warning[1024]; + int nVertices = 200; PLFLT minsectlon, maxsectlon, minsectlat, maxsectlat; - const int ncopies = 5; //must be odd - original plus copies shifted by multiples of +/- 360 - const int mid = ncopies / 2 + 1; - PLFLT **bufx = NULL, **bufy = NULL; + PLFLT *bufx = NULL, *bufy = NULL; int bufsize = 0; + int filenamelen; + PLFLT **splitx = NULL; + PLFLT **splity = NULL; + int *splitsectionlengths = NULL; + int nsplitsections; + PLFLT lastsplitpointx; + PLFLT lastsplitpointy; + PLFLT penultimatesplitpointx; + PLFLT penultimatesplitpointy; + char islatlon = 1; + #ifdef HAVE_SHAPELIB SHPHandle in; int nentries; + int entryindex=0; // Unnecessarily set nparts to quiet -O3 -Wuninitialized warnings. - int nparts = 0; + //int nparts = 0; int entrynumber = 0; int partnumber = 0; - int shapetype; double mins[4]; double maxs[4]; SHPObject *object = NULL; double *bufxraw; double *bufyraw; + char *prjfilename = NULL; + PDFstrm *prjfile; + char prjtype[]={0, 0, 0, 0, 0, 0, 0}; + int appendresult=0; #else - register PDFstrm *in; + PDFstrm *in; //PLFLT bufx[ncopies][200], bufy[ncopies][200]; unsigned char n_buff[2], buff[800]; long int t; - int k; #endif // // read map outline // - filename = malloc( strlen( type ) + strlen( MAP_FILE ) + 1 ); - strcpy( filename, type ); + + //strip the .shp extension if a shapefile has been provided and add + //the needed map file extension if we are not using shapefile + if( strstr( type, ".shp" ) ) + filenamelen=( int )( type-strstr( type, ".shp" ) ); + else + filenamelen = ( int )strlen( type ); + filename = ( char* )malloc( filenamelen + strlen( MAP_FILE ) + 1 ); + if(!filename) + { + plabort("Could not allocate memory for concatenating map filename"); + return; + } + strncpy( filename, type, filenamelen ); + filename[ filenamelen ] = '\0'; strcat( filename, MAP_FILE ); - warning = malloc( strlen( type ) + strlen( MAP_FILE ) + 50 ); + //copy the filename to a fixed length array in case it is needed for warning messages + if( strlen( filename ) < 899 ) + strcpy( truncatedfilename, filename ); + else + { + memcpy( truncatedfilename, filename, 896 ); + truncatedfilename[896] = '.'; + truncatedfilename[897] = '.'; + truncatedfilename[898] = '.'; + truncatedfilename[899] = '\0'; + } + strcpy( warning, "Could not find " ); strcat( warning, filename ); strcat( warning, " file." ); #ifdef HAVE_SHAPELIB + //Open the shp and shx file using shapelib if ( ( in = OpenShapeFile( filename ) ) == NULL ) { - plwarn( warning ); + plabort( warning ); + free(filename); return; } SHPGetInfo( in, &nentries, &shapetype, mins, maxs ); + //also check for a prj file which will tell us if the data is lat/lon or projected + //if it is projected then set ncopies to 1 - i.e. don't wrap round longitudes + prjfilename = ( char* )malloc( filenamelen + 5 ); + if(!prjfilename) + { + plabort("Could not allocate memory for generating map projection filename"); + free(filename); + return; + } + strncpy( prjfilename, type, filenamelen ); + prjfilename[ filenamelen ] = '\0'; + strcat( prjfilename, ".prj" ); + prjfile = plLibOpenPdfstrm( prjfilename ); + if ( prjfile && prjfile->file ) + { + fread( prjtype, 1, 6, prjfile->file ); + if( strcmp ( prjtype, "PROJCS" ) == 0 ) + islatlon = 0; + pdf_close( prjfile ); + } + free ( prjfilename ); + prjfilename = NULL; #else if ( ( in = plLibOpenPdfstrm( filename ) ) == NULL ) { @@ -173,61 +335,90 @@ } #endif - bufx = malloc( (size_t) ncopies * sizeof ( PLFLT* ) ); - bufy = malloc( (size_t) ncopies * sizeof ( PLFLT* ) ); - for ( i = 0; i < ncopies; i++ ) - { - bufx[i] = NULL; - bufy[i] = NULL; - } + bufx = NULL; + bufy = NULL; for (;; ) { #ifdef HAVE_SHAPELIB + //each object in the shapefile is split into parts. + //If we are need to plot the first part of an object then read in a new object + //and check how many parts it has. Otherwise use the object->panPartStart vector + //to check the offset of this part and the next part and allocate memory. Copy + //the data to this memory converting it to PLFLT and draw it. + //finally increment the part number or if we have finished with the object reset the + //part numberand increment the object. + //break condition if we've reached the end of the file - if ( entrynumber == nentries ) + if ( ( !plotentries && ( entrynumber == nentries ) ) || ( plotentries && ( entryindex == nplotentries ) ) ) break; + //if partnumber == 0 then we need to load the next object if ( partnumber == 0 ) { - object = SHPReadObject( in, entrynumber ); - nparts = object->nParts; + if( plotentries ) + object = SHPReadObject( in, plotentries[entryindex] ); + else + object = SHPReadObject( in, entrynumber ); } + //if the object could not be read, increment the object index to read and + //return to the top of the loop to try the next object. + if ( object == NULL ) + { + entrynumber++; + entryindex++; + partnumber = 0; + continue; + } //work out how many points are in the current part - if ( partnumber == ( nparts - 1 ) ) - n = object->nVertices - object->panPartStart[partnumber]; + if( object->nParts == 0 ) + nVertices = object->nVertices; //if object->nParts==0, we can still have 1 vertex. A bit odd but it's the way it goes + else if ( partnumber == ( object->nParts - 1 ) ) + nVertices = object->nVertices - object->panPartStart[partnumber];//panPartStart holds the offset for each part else - n = object->panPartStart[partnumber + 1] - object->panPartStart[partnumber]; + nVertices = object->panPartStart[partnumber + 1] - object->panPartStart[partnumber];//panPartStart holds the offset for each part #endif //allocate memory for the data - if ( n > bufsize ) + if ( nVertices > bufsize ) { - bufsize = n; - for ( i = 0; i < ncopies; i++ ) - { - if ( bufx[i] ) - free( bufx[i] ); - if ( bufy[i] ) - free( bufy[i] ); - bufx[i] = malloc( (size_t) bufsize * sizeof ( double ) ); - bufy[i] = malloc( (size_t) bufsize * sizeof ( double ) ); - } + bufsize = nVertices; + free( bufx ); + free( bufy ); + bufx = (PLFLT*)malloc( (size_t) bufsize * sizeof ( PLFLT ) ); + bufy = (PLFLT*)malloc( (size_t) bufsize * sizeof ( PLFLT ) ); + if(!bufx || ! bufy) + { + plabort("Could not allocate memory for map data"); + free(filename); + free (bufx); + free (bufy); + return; + } } #ifdef HAVE_SHAPELIB //point the plot buffer to the correct starting vertex - //and copy it to the PLFLT arrays - bufxraw = object->padfX + object->panPartStart[partnumber]; - bufyraw = object->padfY + object->panPartStart[partnumber]; - for ( i = 0; i < n; i++ ) + //and copy it to the PLFLT arrays. If we had object->nParts == 0 + //then panPartStart will be NULL + if(object->nParts>0) + { + bufxraw = object->padfX + object->panPartStart[partnumber]; + bufyraw = object->padfY + object->panPartStart[partnumber]; + } + else + { + bufxraw = object->padfX; + bufyraw = object->padfY; + } + + for ( i = 0; i < nVertices; i++ ) { - bufx[mid][i] = (PLFLT) bufxraw[i]; - for ( j = 0; j < ncopies; j++ ) - bufy[j][i] = (PLFLT) bufyraw[i]; + bufx[i] = (PLFLT) bufxraw[i]; + bufy[i] = (PLFLT) bufyraw[i]; } - //set the minlat/lon of the object + //set the min x/y of the object minsectlon = object->dfXMin; maxsectlon = object->dfXMax; minsectlat = object->dfYMin; @@ -235,36 +426,40 @@ //increment the partnumber or if we've reached the end of //an entry increment the entrynumber and set partnumber to 0 - if ( partnumber == nparts - 1 ) + if ( partnumber == object->nParts - 1 || object->nParts == 0 ) { entrynumber++; + entryindex++; partnumber = 0; + SHPDestroyObject( object ); + object=NULL; } else partnumber++; + + if (nVertices==0) + continue; #else // read in # points in segment if ( pdf_rdx( n_buff, (long) sizeof ( unsigned char ) * 2, in ) == 0 ) break; - n = ( n_buff[0] << 8 ) + n_buff[1]; - if ( n == 0 ) + nVertices = ( n_buff[0] << 8 ) + n_buff[1]; + if ( nVertices == 0 ) break; - pdf_rdx( buff, (long) sizeof ( unsigned char ) * 4 * n, in ); - if ( n == 1 ) + pdf_rdx( buff, (long) sizeof ( unsigned char ) * 4 * nVertices, in ); + if ( nVertices == 1 ) continue; - for ( j = i = 0; i < n; i++, j += 2 ) + for ( j = i = 0; i < nVertices; i++, j += 2 ) { t = ( buff[j] << 8 ) + buff[j + 1]; - bufx[mid][i] = ( (PLFLT) t - OFFSET ) / SCALE; + bufx[i] = ( (PLFLT) t - OFFSET ) / SCALE; } - for ( i = 0; i < n; i++, j += 2 ) + for ( i = 0; i < nVertices; i++, j += 2 ) { t = ( buff[j] << 8 ) + buff[j + 1]; - bufy[0][i] = ( (PLFLT) t - OFFSET ) / SCALE; - for ( k = 1; k < ncopies; k++ ) - bufy[k][i] = bufy[0][i]; + bufy[i] = ( (PLFLT) t - OFFSET ) / SCALE; } //set the min/max section lat/lon with extreme values //to be overwritten later @@ -274,63 +469,165 @@ maxsectlat = -1000.; #endif - //two obvious issues exist here with plotting longitudes: - // - //1) wraparound causing lines which go the wrong way round - // the globe - //2) some people plot lon from 0-360 deg, others from -180 - +180 - // - //we can cure these problems by conditionally adding/subtracting - //360 degrees to each data point in order to ensure that the - //distance between adgacent points is always less than 180 - //degrees, then plotting up to 2 out of 5 copies of the data - //each separated by 360 degrees. - for ( i = 0; i < n - 1; i++ ) - { - if ( bufx[mid][i] - bufx[mid][i + 1] > 180. ) - bufx[mid][i + 1] += 360.; - else if ( bufx[mid][i] - bufx[mid][i + 1] < -180. ) - bufx[mid][i + 1] -= 360.; - } - for ( i = 0; i < n; i++... [truncated message content] |
From: <ai...@us...> - 2014-07-11 18:32:25
|
Revision: 13137 http://sourceforge.net/p/plplot/code/13137 Author: airwin Date: 2014-07-11 18:32:21 +0000 (Fri, 11 Jul 2014) Log Message: ----------- Implement a small change suggested by Jonathan Woithe <jw...@ju...> on the PLplot development mailing list. He reports this change removes intermittent "QColor::setRgb: RGB parameters out of range) warnings. My own tests using the test_interactive target on Linux show no issues with this change as well. Modified Paths: -------------- trunk/bindings/qt_gui/plqt.cpp Modified: trunk/bindings/qt_gui/plqt.cpp =================================================================== --- trunk/bindings/qt_gui/plqt.cpp 2014-07-07 01:42:58 UTC (rev 13136) +++ trunk/bindings/qt_gui/plqt.cpp 2014-07-11 18:32:21 UTC (rev 13137) @@ -674,7 +674,12 @@ resize( i_iWidth, i_iHeight ); lastColour.r = -1; setVisible( true ); - QApplication::processEvents(); + // Dropping this appears to give more reliable results + // (QColor::setRgb: RGB parameters out of range warnings go away) + // according to Jonathan Woithe <jw...@ju...> and according + // to my own tests does not affect results from the + // test_interactive target. + // QApplication::processEvents(); redrawFromLastFlush = false; redrawAll = true; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hba...@us...> - 2014-07-07 01:43:04
|
Revision: 13136 http://sourceforge.net/p/plplot/code/13136 Author: hbabcock Date: 2014-07-07 01:42:58 +0000 (Mon, 07 Jul 2014) Log Message: ----------- Add (not yet) working smoke bindings for the qtwidget and extqt drivers. Modified Paths: -------------- trunk/bindings/qt_gui/CMakeLists.txt trunk/cmake/modules/qt.cmake Added Paths: ----------- trunk/bindings/qt_gui/smoke/ trunk/bindings/qt_gui/smoke/CMakeLists.txt trunk/bindings/qt_gui/smoke/plplotqt.h trunk/bindings/qt_gui/smoke/plplotqt.pro trunk/bindings/qt_gui/smoke/plplotqt_smoke.h trunk/bindings/qt_gui/smoke/smokeconfig.xml Modified: trunk/bindings/qt_gui/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/CMakeLists.txt 2014-07-04 10:59:42 UTC (rev 13135) +++ trunk/bindings/qt_gui/CMakeLists.txt 2014-07-07 01:42:58 UTC (rev 13136) @@ -175,4 +175,5 @@ endif(PKG_CONFIG_EXECUTABLE) add_subdirectory(pyqt4) + add_subdirectory(smoke) endif(ENABLE_qt) Added: trunk/bindings/qt_gui/smoke/CMakeLists.txt =================================================================== --- trunk/bindings/qt_gui/smoke/CMakeLists.txt (rev 0) +++ trunk/bindings/qt_gui/smoke/CMakeLists.txt 2014-07-07 01:42:58 UTC (rev 13136) @@ -0,0 +1,95 @@ +# bindings/qt_gui/smoke/CMakeLists.txt +### Process this file with cmake to produce Makefile +### +# Copyright (C) 2014 Hazen Babcock +# +# This file is part of PLplot. +# +# PLplot 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. +# +# PLplot 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 PLplot; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + +if(ENABLE_smoke) + + set(plplot_smoke_SRC + ${CMAKE_CURRENT_BINARY_DIR}/smokedata.cpp + ${CMAKE_CURRENT_BINARY_DIR}/x_1.cpp + ) + set_source_files_properties( + ${plplot_smoke_SRC} + PROPERTIES + GENERATED ON + COMPILE_FLAGS "-DUSINGDLL" + ) + + add_custom_command( + OUTPUT ${plplot_smoke_SRC} + COMMAND ${SMOKE_GEN_BIN} + ARGS -config "${SMOKE_GEN_SHARED}/qt-config.xml" -smokeconfig "${CMAKE_CURRENT_SOURCE_DIR}/smokeconfig.xml" -I "${CMAKE_SOURCE_DIR}/include" -- ${CMAKE_CURRENT_SOURCE_DIR}/plplotqt.h + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/smokeconfig.xml ${CMAKE_CURRENT_SOURCE_DIR}/plplotqt.h + ) + add_custom_target(generate_smoke_source + DEPENDS ${plplot_smoke_SRC} + ) + + message("DEBUG: SMOKE_GEN_BIN = ${SMOKE_GEN_BIN}") + message("DEBUG: SMOKE_GEN_SHARED = ${SMOKE_GEN_SHARED}") + + include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_SOURCE_DIR}/include + ${CMAKE_SOURCE_DIR}/lib/qsastime + ${CMAKE_SOURCE_DIR}/lib/nistcd + ${CMAKE_SOURCE_DIR}/drivers + ${CMAKE_BINARY_DIR} + ${CMAKE_BINARY_DIR}/include + ) + + add_library(smokeplplotqt${LIB_TAG} ${plplot_smoke_SRC}) + + target_link_libraries( + smokeplplotqt${LIB_TAG} + plplotqt${LIB_TAG} + plplot${LIB_TAG} + ${QT_LIBRARIES} + ) + + add_dependencies(smokeplplotqt${LIB_TAG} generate_smoke_source) + + # Update the target COMPILE_DEFINITIONS and INCLUDE_DIRECTORIES + set_qt_target_properties(smokeplplotqt${LIB_TAG}) + + if(USE_RPATH) + + set_target_properties( + smokeplplotqt${LIB_TAG} + PROPERTIES + INSTALL_RPATH "${LIB_INSTALL_RPATH}" + INSTALL_NAME_DIR "${LIB_DIR}" + ) + + else(USE_RPATH) + set_target_properties( + smokeplplotqt${LIB_TAG} + PROPERTIES + INSTALL_NAME_DIR "${LIB_DIR}" + ) + endif(USE_RPATH) + + install(TARGETS smokeplplotqt${LIB_TAG} + EXPORT export_plplot + ARCHIVE DESTINATION ${LIB_DIR} + LIBRARY DESTINATION ${LIB_DIR} + RUNTIME DESTINATION ${BIN_DIR} + ) + +endif(ENABLE_smoke) Added: trunk/bindings/qt_gui/smoke/plplotqt.h =================================================================== --- trunk/bindings/qt_gui/smoke/plplotqt.h (rev 0) +++ trunk/bindings/qt_gui/smoke/plplotqt.h 2014-07-07 01:42:58 UTC (rev 13136) @@ -0,0 +1 @@ +#include "qt.h" Added: trunk/bindings/qt_gui/smoke/plplotqt.pro =================================================================== --- trunk/bindings/qt_gui/smoke/plplotqt.pro (rev 0) +++ trunk/bindings/qt_gui/smoke/plplotqt.pro 2014-07-07 01:42:58 UTC (rev 13136) @@ -0,0 +1,10 @@ +TEMPLATE = lib +CONFIG += qt dll +QT += svg +HEADERS += plplotqt_smoke.h +SOURCES += smokedata.cpp +SOURCES += x_1.cpp +INCLUDEPATH = /usr/local/include/plplot/ +LIBS += -lsmokeqtcore -lsmokeqtgui -lplplotqt +VERSION = 0.0.1 +TARGET = smokeplplotqt Added: trunk/bindings/qt_gui/smoke/plplotqt_smoke.h =================================================================== --- trunk/bindings/qt_gui/smoke/plplotqt_smoke.h (rev 0) +++ trunk/bindings/qt_gui/smoke/plplotqt_smoke.h 2014-07-07 01:42:58 UTC (rev 13136) @@ -0,0 +1,15 @@ +#ifndef QT_SMOKE_H +#define QT_SMOKE_H + +#include <smoke.h> + +extern "C" SMOKE_EXPORT Smoke* plplotqt_Smoke; +extern "C" SMOKE_EXPORT void init_plplotqt_Smoke(); +extern "C" SMOKE_EXPORT void delete_plplotqt_Smoke(); + +#ifndef QGLOBALSPACE_CLASS +#define QGLOBALSPACE_CLASS +class QGlobalSpace { }; +#endif + +#endif Added: trunk/bindings/qt_gui/smoke/smokeconfig.xml =================================================================== --- trunk/bindings/qt_gui/smoke/smokeconfig.xml (rev 0) +++ trunk/bindings/qt_gui/smoke/smokeconfig.xml 2014-07-07 01:42:58 UTC (rev 13136) @@ -0,0 +1,45 @@ +<config> + <moduleName>plplotqt</moduleName> + + <!-- Our classes inherit from classes that are in the qtcore and qtgui modules. --> + <parentModules> + <module>qtcore</module> + <module>qtgui</module> + </parentModules> + + <!-- how many source files should the generator create? --> + <parts>1</parts> + + <!-- the following two sections are needed for every Qt based module! --> + <scalarTypes> + <!-- QString is a class, but represented as a scalar (#) in munged names --> + <typeName>QString</typeName> + </scalarTypes> + <voidpTypes> + <!-- both are classes, but they are represented as Smoke::t_voidp --> + <typeName>QStringList</typeName> + <typeName>QString</typeName> + </voidpTypes> + + <!-- regexps for signatures of methods and functions that we don't want + to be wrapped in the smoke module --> + <exclude> + <!-- we don't want private stuff in smoke.. --> + <signature>.*::d_ptr.*</signature> + <signature>.*::q_ptr.*</signature> + + <!-- don't include these classes. --> + <signature>.*QMutex.*</signature> + </exclude> + + <functions> + <name>plsetqtdev</name> + <name>plfreeqtdev</name> + </functions> + + <classList> + <class>QtPLDriver</class> + <class>QtPLWidget</class> + <class>QtExtWidget</class> + </classList> +</config> Modified: trunk/cmake/modules/qt.cmake =================================================================== --- trunk/cmake/modules/qt.cmake 2014-07-04 10:59:42 UTC (rev 13135) +++ trunk/cmake/modules/qt.cmake 2014-07-07 01:42:58 UTC (rev 13136) @@ -52,6 +52,7 @@ # ENABLE_qt - ON means the plplot_qt library is enabled. # ENABLE_pyqt4 - ON means the plplot_pyqt4 Python extension module # is enabled. +# ENABLE_smoke - ON means the smoke plplotqt library is enabled. # SIP_EXECUTABLE - full path for sip # PYQT_SIP_DIR - sip system directory # PYQT_SIP_FLAGS - sip command flags @@ -59,9 +60,11 @@ if(DEFAULT_NO_BINDINGS) option(ENABLE_qt "Enable Qt bindings" OFF) option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" OFF) + option(ENABLE_smoke "Enable smoke Qt bindings" OFF) else(DEFAULT_NO_BINDINGS) option(ENABLE_qt "Enable Qt bindings" ON) option(ENABLE_pyqt4 "Enable pyqt4 Python extension module" ON) + option(ENABLE_smoke "Enable smoke Qt bindings" ON) endif(DEFAULT_NO_BINDINGS) if(ENABLE_qt) @@ -341,3 +344,17 @@ # COMMAND will work properly with these flags later on. string(REGEX REPLACE " " ";" PYQT_SIP_FLAGS "${PYQT_SIP_FLAGS}") endif(ENABLE_pyqt4) + +if(ENABLE_smoke) + find_package(Smoke) + if(NOT SMOKE_GEN_BIN) + message(STATUS + "WARNING: smoke not found so setting ENABLE_smoke to OFF." + ) + set(ENABLE_smoke OFF CACHE BOOL "Enable smoke Qt extension module " FORCE) + endif(NOT SMOKE_GEN_BIN) + + # Doesn't work so disable. + set(ENABLE_smoke OFF CACHE BOOL "Enable smoke Qt extension module " FORCE) + +endif(ENABLE_smoke) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2014-07-04 10:59:46
|
Revision: 13135 http://sourceforge.net/p/plplot/code/13135 Author: hezekiahcarty Date: 2014-07-04 10:59:42 +0000 (Fri, 04 Jul 2014) Log Message: ----------- Update OCaml-specific documentation Modified Paths: -------------- trunk/doc/docbook/src/ocaml.xml Modified: trunk/doc/docbook/src/ocaml.xml =================================================================== --- trunk/doc/docbook/src/ocaml.xml 2014-07-03 14:46:13 UTC (rev 13134) +++ trunk/doc/docbook/src/ocaml.xml 2014-07-04 10:59:42 UTC (rev 13135) @@ -176,11 +176,9 @@ from <ulink url="http://caml.inria.fr/">caml.inria.fr</ulink>. Several Linux distributions including Debian, Ubuntu and Fedora have OCaml binary packages available. Another route to obtaining OCaml is by - using GODI, a source-based distribution of OCaml and a number of OCaml - libraries. GODI can be retrieved from - <ulink url="http://godi.camlcity.org/">godi.camlcity.org</ulink>. - GODI has support for building and installing under Linux, Apple's OS X - and MS Windows. + using opam, a source-based distribution of OCaml and a number of OCaml + libraries. opam can be retrieved from + <ulink url="http://opam.ocaml.org/">opam.ocaml.org</ulink>. </para> </sect2> </sect1> @@ -277,11 +275,11 @@ (* Initialize a new plot, using the windowed Cairo device ("xcairo") *) let p = - P.init (-10.0, 0.0) (10.0, 100.0) P.Greedy (P.Window P.Cairo) + P.init (-10.0, 0.0) (10.0, 100.0) `greedy (`window `cairo) in (* Draw the parabola *) - P.plot ~stream:p [P.func P.Blue (fun x -> x ** 2.0) (-10.0, 10.0)]; + P.plot ~stream:p [P.func `blue (fun x -> x ** 2.0) (-10.0, 10.0)]; (* Draw the plot axes and close up the plot stream using the default spacing between tick marks. *) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2014-07-03 14:46:22
|
Revision: 13134 http://sourceforge.net/p/plplot/code/13134 Author: hezekiahcarty Date: 2014-07-03 14:46:13 +0000 (Thu, 03 Jul 2014) Log Message: ----------- Switch to a different OCaml Cairo binding ("cairo2" in opam) This is a more actively maintained binding to the Cairo library. It is unfortunately not packaged for Debian at this time so interested users would need to install the library through opam. opam is generally the recommended way to install and manage OCaml libraries (this cpan, pip, etc) so this isn't a particularly serious limitation. Modified Paths: -------------- trunk/bindings/ocaml/plcairo/CMakeLists.txt trunk/bindings/ocaml/plcairo/plcairo.ml trunk/bindings/ocaml/plcairo/plcairo.mli trunk/cmake/modules/ocaml.cmake trunk/examples/ocaml/CMakeLists.txt trunk/examples/ocaml/xgtk_interface.ml Modified: trunk/bindings/ocaml/plcairo/CMakeLists.txt =================================================================== --- trunk/bindings/ocaml/plcairo/CMakeLists.txt 2014-07-03 14:40:58 UTC (rev 13133) +++ trunk/bindings/ocaml/plcairo/CMakeLists.txt 2014-07-03 14:46:13 UTC (rev 13134) @@ -56,7 +56,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/plcairo.cmi # ocamlc *.mli source file must be in ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.mli ${CMAKE_CURRENT_BINARY_DIR}/plcairo.mli - COMMAND ${OCAMLFIND} ocamlc -package cairo -c ${CMAKE_CURRENT_BINARY_DIR}/plcairo.mli + COMMAND ${OCAMLFIND} ocamlc -package cairo2 -c ${CMAKE_CURRENT_BINARY_DIR}/plcairo.mli DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.mli WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} @@ -74,7 +74,7 @@ # ocamlc and ocamlopt *.ml source file must be in # ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.ml ${CMAKE_CURRENT_BINARY_DIR}/plcairo.ml - COMMAND ${OCAMLFIND} ocamlc -package cairo -I ${PATH_TO_PLPLOT_CMA} plplot.cma -c ${CMAKE_CURRENT_BINARY_DIR}/plcairo.ml + COMMAND ${OCAMLFIND} ocamlc -package cairo2 -I ${PATH_TO_PLPLOT_CMA} plplot.cma -c ${CMAKE_CURRENT_BINARY_DIR}/plcairo.ml DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.ml ${CMAKE_CURRENT_BINARY_DIR}/plcairo.cmi @@ -118,7 +118,7 @@ # ocamlc and ocamlopt *.ml source file must be in # ${CMAKE_CURRENT_BINARY_DIR}. COMMAND ${CMAKE_COMMAND} -E copy_if_different ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.ml ${CMAKE_CURRENT_BINARY_DIR}/plcairo.ml - COMMAND ${OCAMLFIND} ocamlopt -package cairo -I ${PATH_TO_PLPLOT_CMXA} -c ${CMAKE_CURRENT_BINARY_DIR}/plcairo.ml + COMMAND ${OCAMLFIND} ocamlopt -package cairo2 -I ${PATH_TO_PLPLOT_CMXA} -c ${CMAKE_CURRENT_BINARY_DIR}/plcairo.ml DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.ml ${CMAKE_CURRENT_BINARY_DIR}/plcairo.cmi @@ -193,7 +193,7 @@ # comments in the source file. Source can be a .ml or a .mli. add_custom_command( OUTPUT ${OCAMLDOC_FILES} - COMMAND ${OCAMLFIND} doc -package cairo -html ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.mli + COMMAND ${OCAMLFIND} doc -package cairo2 -html ${CMAKE_CURRENT_SOURCE_DIR}/plcairo.mli DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/plcairo.mli WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} Modified: trunk/bindings/ocaml/plcairo/plcairo.ml =================================================================== --- trunk/bindings/ocaml/plcairo/plcairo.ml 2014-07-03 14:40:58 UTC (rev 13133) +++ trunk/bindings/ocaml/plcairo/plcairo.ml 2014-07-03 14:46:13 UTC (rev 13134) @@ -40,22 +40,22 @@ end (** A record to keep track of the Cairo surface and context information *) -type ('a, 'b) t = { +type 'a t = { width : float; (** Width in device units *) height : float; (** Height in device units *) - surface : 'a Cairo.surface; (** Cairo surface to plot to *) - context : Cairo.t; (** Cairo context to plot to *) - file : 'b option; (** An optional file name or stream for the plot output *) + surface : Cairo.Surface.t; (** Cairo surface to plot to *) + context : Cairo.context; (** Cairo context to plot to *) + file : 'a option; (** An optional file name or stream for the plot output *) clear : bool; (** Should each new page be cleared? *) plstream : int; (** PLplot stream number associated with this plot *) } (** Types of Cairo surfaces available for {!init}. *) -type ('a, 'b) plcairo_sfc_t = - width:int -> height:int -> string option -> 'a option * 'b Cairo.surface +type 'a plcairo_sfc_t = + width:int -> height:int -> string option -> 'a option * Cairo.Surface.t (** Provide PLplot with a Cairo context to plot on. *) -external plset_cairo_context : Cairo.t -> unit = "ml_set_plplot_cairo_context" +external plset_cairo_context : Cairo.context -> unit = "ml_set_plplot_cairo_context" (** Get the various components of a {!t} instance *) let plget_dims t = t.width, t.height @@ -66,7 +66,7 @@ (** [plblit_to_cairo ?xoff ?yoff ?scale_by plcairo dest] *) let plblit_to_cairo ?(xoff = 0.0) ?(yoff = 0.0) ?scale_by t dest = - let sx, sy = + let x, y = match scale_by with | None -> 1.0, 1.0 | Some scale -> ( @@ -78,7 +78,7 @@ in Cairo.save dest; begin - Cairo.scale ~sx ~sy dest; + Cairo.scale ~x ~y dest; Cairo.set_source_surface dest t.surface xoff yoff; Cairo.paint dest; end; @@ -96,8 +96,8 @@ surface. Leave the background transparent, so only the plotted image is transfered over to the main plot surface. *) let img_sfc = - Cairo.image_surface_create - Cairo.FORMAT_ARGB32 + Cairo.Image.create + Cairo.Image.ARGB32 ~width:(int_of_float t.width) ~height:(int_of_float t.height) in @@ -115,11 +115,7 @@ f (); (* Blit the raster image on to the main plot surface *) Cairo.set_source_surface t.context img_sfc 0.0 0.0; - let () = - match alpha with - | None -> Cairo.paint t.context - | Some a -> Cairo.paint_with_alpha t.context a - in + Cairo.paint ?alpha t.context; (* Now set PLplot back to using the proper plot context. *) plset_cairo_context t.context; Cairo.set_matrix t.context t_matrix; @@ -177,9 +173,10 @@ | None -> raise (Invalid_argument "plpscairo needs a filename") in Some outfile, - Cairo_ps.surface_create_for_channel outfile - ~width_in_points:(float_of_int width) - ~height_in_points:(float_of_int height) + Cairo.PS.create_for_stream + ~output:(fun bytes -> output_string outfile bytes) + ~width:(float_of_int width) + ~height:(float_of_int height) let plpdfcairo ~width ~height filename = let outfile = @@ -188,22 +185,23 @@ | None -> raise (Invalid_argument "plpdfcairo needs a filename") in Some outfile, - Cairo_pdf.surface_create_for_channel outfile - ~width_in_points:(float_of_int width) - ~height_in_points:(float_of_int height) + Cairo.PDF.create_for_stream + ~output:(fun bytes -> output_string outfile bytes) + ~width:(float_of_int width) + ~height:(float_of_int height) let plimagecairo ~width ~height (filename : string option) = filename, - Cairo.image_surface_create Cairo.FORMAT_RGB24 ~width ~height + Cairo.Image.create Cairo.Image.RGB24 ~width ~height let plimagecairo_rgba ~width ~height (filename : string option) = filename, - Cairo.image_surface_create Cairo.FORMAT_ARGB32 ~width ~height + Cairo.Image.create Cairo.Image.ARGB32 ~width ~height (** [plinit_cairo ?filename ?clear ?pre (width, height) init] creates a Cairo context and associates it with a new PLplot stream. *) let plinit_cairo ?filename ?(clear = false) ?pre - (width, height) (init : ('a, 'b) plcairo_sfc_t) = + (width, height) (init : 'a plcairo_sfc_t) = let file, sfc = init ~width ~height filename in let context = Cairo.create sfc in (* Associate the Cairo context with PLplot, then initialize PLplot *) @@ -238,7 +236,7 @@ (** [plcairo_finish t] calls [Cairo.surface_finish] on the Cairo surface associated with [t]. *) let plcairo_finish t = - Cairo.surface_finish t.surface; + Cairo.Surface.finish t.surface; () (** [plsave_cairo_image ?filename t] saves the plot surface in [t] @@ -257,7 +255,7 @@ | None -> invalid_arg "No filename associated with this plot" ) in - Cairo_png.surface_write_to_file t.surface output_filename; + Cairo.PNG.write t.surface output_filename; () (** [plsave_cairo ?filename t] is like {!plsave_cairo_image} but for Modified: trunk/bindings/ocaml/plcairo/plcairo.mli =================================================================== --- trunk/bindings/ocaml/plcairo/plcairo.mli 2014-07-03 14:40:58 UTC (rev 13133) +++ trunk/bindings/ocaml/plcairo/plcairo.mli 2014-07-03 14:46:13 UTC (rev 13134) @@ -18,29 +18,29 @@ *) (** A record to keep track of the Cairo surface and context information *) -type ('a, 'b) t +type 'a t (** Types of Cairo surfaces available for {!plinit_cairo}. *) -type ('a, 'b) plcairo_sfc_t +type 'a plcairo_sfc_t (** Provide PLplot with a Cairo context to plot on. *) -external plset_cairo_context : Cairo.t -> unit +external plset_cairo_context : Cairo.context -> unit = "ml_set_plplot_cairo_context" (** Get the [(width, height)] of the surface in device units. *) -val plget_dims : ('a, 'b) t -> float * float +val plget_dims : 'a t -> float * float (** Get the Cairo surface associated with [t]. *) -val plget_surface : ('a, 'b) t -> 'a Cairo.surface +val plget_surface : 'a t -> Cairo.Surface.t (** Get the Cairo context associated with [t]. *) -val plget_context : ('a, 'b) t -> Cairo.t +val plget_context : 'a t -> Cairo.context (** Get the PLplot stream number associated with [t]. *) -val plget_stream : ('a, 'b) t -> int +val plget_stream : 'a t -> int (** Get the output (filename, output stream or nothing) associated with [t]. *) -val plget_output : ('a, 'b) t -> 'b option +val plget_output : 'a t -> 'a option (** [plblit_to_cairo ?xoff ?yoff ?scale_by plcairo dest] blits the contents of [plcairo] to [dest]. @@ -50,7 +50,7 @@ ?xoff:float -> ?yoff:float -> ?scale_by:[< `both of float * float | `height of float | `width of float ] -> - ([> `Any ], 'a) t -> Cairo.t -> unit + 'a t -> Cairo.context -> unit (** [plrasterize ?alpha t f] applies the plotting function [f ()] to [t], with the difference that the output will be rasterized for all plot @@ -61,20 +61,20 @@ Note that the plotting done by [f ()] will not be antialiased by default. *) val plrasterize : ?alpha:float -> - ?antialias:Cairo.antialias -> ('a, 'b) t -> (unit -> 'c) -> unit + ?antialias:Cairo.antialias -> 'a t -> (unit -> 'b) -> unit (** [plcairo_new_page t] will advance the Cairo context associated with [t] to a new page, for devices which support this. *) -val plcairo_new_page : ('a, 'b) t -> unit +val plcairo_new_page : 'a t -> unit (** The following 4 functions provide a relatively simple way to setup an appropriate Cairo surface for use with this library and the extcairo driver. They should be passed as the [init] argument to the [plinit_cairo] function.*) -val plpscairo : (out_channel, [ `Any | `PS ]) plcairo_sfc_t -val plpdfcairo : (out_channel, [ `Any | `PDF ]) plcairo_sfc_t -val plimagecairo : (string, [ `Any | `Image ]) plcairo_sfc_t -val plimagecairo_rgba : (string, [ `Any | `Image ]) plcairo_sfc_t +val plpscairo : out_channel plcairo_sfc_t +val plpdfcairo : out_channel plcairo_sfc_t +val plimagecairo : string plcairo_sfc_t +val plimagecairo_rgba : string plcairo_sfc_t (** [plinit_cairo ?filename ?clear ?pre (width, height) init] creates a Cairo context and associates it with a new PLplot stream. *) @@ -82,15 +82,15 @@ ?filename:string -> ?clear:bool -> ?pre:(unit -> unit) -> - int * int -> ('a, [> `Any ] as 'b) plcairo_sfc_t -> ('b, 'a) t + int * int -> 'a plcairo_sfc_t -> 'a t (** [plcairo_make_active t] sets PLplot to using the plot stream associated with [t] the active plot stream. *) -val plcairo_make_active : ('a, 'b) t -> unit +val plcairo_make_active : 'a t -> unit (** [plcairo_finish t] calls [Cairo.surface_finish] on the Cairo surface associated with [t]. *) -val plcairo_finish : ([> `Any ], 'a) t -> unit +val plcairo_finish : 'a t -> unit (** [plsave_cairo_image ?filename t] saves the plot surface in [t] as a png to its associated file. If [filename] is given then the file is @@ -98,14 +98,14 @@ [Plplot.plend1] should be called first or the plotting may not be complete! Raises [Invalid_argument "No filename associated with this plot"] if no filename is provided and [t] does not have a filename associated with it. *) -val plsave_cairo_image : ?filename:string -> ([> `Any ], string) t -> unit +val plsave_cairo_image : ?filename:string -> string t -> unit (** [plsave_cairo ?filename t] is like {!plsave_cairo_image} but for non-image surfaces. *) -val plsave_cairo : ([> `Any ], out_channel) t -> unit +val plsave_cairo : out_channel t -> unit (** NOTE: This function will almost definitely change in a future revision. [plcairo_copy_plot t driver filename] copies the plot stream from [t] to a new output stream, using the plot driver [driver], saving the output to [filename]. *) -val plcairo_copy_plot : ('a, 'b) t -> string -> string -> unit +val plcairo_copy_plot : 'a t -> string -> string -> unit Modified: trunk/cmake/modules/ocaml.cmake =================================================================== --- trunk/cmake/modules/ocaml.cmake 2014-07-03 14:40:58 UTC (rev 13133) +++ trunk/cmake/modules/ocaml.cmake 2014-07-03 14:46:13 UTC (rev 13134) @@ -200,7 +200,7 @@ set(text_cairo "module C = Cairo") file(WRITE ${CMAKE_BINARY_DIR}/test_cairo.ml ${text_cairo}) execute_process( - COMMAND ${OCAMLFIND} c -package cairo -linkpkg test_cairo.ml -o test_cairo + COMMAND ${OCAMLFIND} c -package cairo2 -linkpkg test_cairo.ml -o test_cairo WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE OCAML_HAS_CAIRO_RC OUTPUT_QUIET @@ -239,25 +239,25 @@ endif(OCAML_HAS_CAIRO) if(OCAML_HAS_CAIRO) - option(OCAML_HAS_GTK "OCaml has the cairo.lablgtk2 package" ON) + option(OCAML_HAS_GTK "OCaml has the cairo2.lablgtk2 package" ON) else(OCAML_HAS_CAIRO) message(STATUS "WARNING:" "Cairo OCaml library not found. Disabling lablgtk2 support") - set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE) + set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo2.lablgtk2 package" FORCE) endif(OCAML_HAS_CAIRO) if(DROP_GTK_PLUS_2_BUILDS) - set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE) + set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo2.lablgtk2 package" FORCE) endif(DROP_GTK_PLUS_2_BUILDS) if(OCAML_HAS_GTK) set(text_gtk "module G = Gtk - module C = Cairo_lablgtk" + module C = Cairo_gtk" ) file (WRITE ${CMAKE_BINARY_DIR}/test_gtk.ml ${text_gtk}) execute_process( - COMMAND ${OCAMLFIND} c -package cairo.lablgtk2 -linkpkg test_gtk.ml -o test_gtk + COMMAND ${OCAMLFIND} c -package cairo2.lablgtk2 -linkpkg test_gtk.ml -o test_gtk WORKING_DIRECTORY ${CMAKE_BINARY_DIR} RESULT_VARIABLE OCAML_HAS_GTK_RC OUTPUT_QUIET @@ -265,7 +265,7 @@ ) # non-zero return code indicates errors. if(OCAML_HAS_GTK_RC) - set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE) + set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo2.lablgtk2 package" FORCE) endif(OCAML_HAS_GTK_RC) endif(OCAML_HAS_GTK) @@ -279,11 +279,11 @@ message(STATUS "WARNING:" "ocamlfind not available. Disabling Plcairo module and lablgtk2 support") set(OCAML_HAS_CAIRO OFF CACHE BOOL "OCaml has the cairo package" FORCE) - set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE) + set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo2.lablgtk2 package" FORCE) endif(OCAMLFIND) else(ENABLE_ocaml) message(STATUS "WARNING:" "ENABLE_ocaml is OFF so disabling Plcairo module and lablgtk2 support") set(OCAML_HAS_CAIRO OFF CACHE BOOL "OCaml has the cairo package" FORCE) - set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo.lablgtk2 package" FORCE) + set(OCAML_HAS_GTK OFF CACHE BOOL "OCaml has the cairo2.lablgtk2 package" FORCE) endif(ENABLE_ocaml) Modified: trunk/examples/ocaml/CMakeLists.txt =================================================================== --- trunk/examples/ocaml/CMakeLists.txt 2014-07-03 14:40:58 UTC (rev 13133) +++ trunk/examples/ocaml/CMakeLists.txt 2014-07-03 14:46:13 UTC (rev 13134) @@ -254,7 +254,7 @@ add_custom_command( OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE_NAME} COMMAND ${OCAMLFIND} ${ocaml_compiler} - -package cairo.lablgtk2 + -package cairo2.lablgtk2 -linkpkg -g -I ${I_OPTION_PLPLOT} Modified: trunk/examples/ocaml/xgtk_interface.ml =================================================================== --- trunk/examples/ocaml/xgtk_interface.ml 2014-07-03 14:40:58 UTC (rev 13133) +++ trunk/examples/ocaml/xgtk_interface.ml 2014-07-03 14:46:13 UTC (rev 13134) @@ -34,7 +34,7 @@ (** Get a Cairo context from the Gtk drawing area. *) let get_cairo w = - Cairo_lablgtk.create w#misc#window + Cairo_gtk.create w#misc#window (** Callback to redraw the plot contents. If the window is resized then the plot will be stretched to fit the new window dimensions. *) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <hez...@us...> - 2014-07-03 14:41:06
|
Revision: 13133 http://sourceforge.net/p/plplot/code/13133 Author: hezekiahcarty Date: 2014-07-03 14:40:58 +0000 (Thu, 03 Jul 2014) Log Message: ----------- Fix gtk initialization for newer lablgtk versions Modified Paths: -------------- trunk/examples/ocaml/xgtk_interface.ml Modified: trunk/examples/ocaml/xgtk_interface.ml =================================================================== --- trunk/examples/ocaml/xgtk_interface.ml 2014-07-01 11:41:11 UTC (rev 13132) +++ trunk/examples/ocaml/xgtk_interface.ml 2014-07-03 14:40:58 UTC (rev 13133) @@ -47,6 +47,7 @@ true let () = + ignore (GtkMain.Main.init ()); (* Make a simple plot. *) let plcairo = plinit_cairo ~clear:true (plot_width, plot_height) plimagecairo This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <and...@us...> - 2014-07-01 11:41:14
|
Revision: 13132 http://sourceforge.net/p/plplot/code/13132 Author: andrewross Date: 2014-07-01 11:41:11 +0000 (Tue, 01 Jul 2014) Log Message: ----------- Tidy up continuation lines to remove deprecated backslashes. Modified Paths: -------------- trunk/examples/octave/x01c.m trunk/examples/octave/x04c.m trunk/examples/octave/x07c.m trunk/examples/octave/x08c.m trunk/examples/octave/x26c.m trunk/examples/octave/x29c.m Modified: trunk/examples/octave/x01c.m =================================================================== --- trunk/examples/octave/x01c.m 2014-06-20 23:13:53 UTC (rev 13131) +++ trunk/examples/octave/x01c.m 2014-07-01 11:41:11 UTC (rev 13132) @@ -85,7 +85,7 @@ printf("\n\nYou are in Locate mode. Click any mouse button or press any key\n\ and the current cursor position will be printed.\n\ Please keep <NumLock> and <CapsLock> off.\n\ -Terminate locate mode with the <Enter> key.\n\ +Terminate locate mode with the <Enter> key.\n\ Finish the plot with the <Enter> or <ESC> key or the 3d mouse button\n"); fflush(stdout); Modified: trunk/examples/octave/x04c.m =================================================================== --- trunk/examples/octave/x04c.m 2014-06-20 23:13:53 UTC (rev 13131) +++ trunk/examples/octave/x04c.m 2014-07-01 11:41:11 UTC (rev 13132) @@ -155,7 +155,7 @@ plscol0a( 15, 32, 32, 32, 0.70 ); - [legend_width, legend_height] = \ + [legend_width, legend_height] = ... pllegend( bitor(PL_LEGEND_BACKGROUND, PL_LEGEND_BOUNDING_BOX), 0, 0.0, 0.0, 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, 1.0, 2.0, 1., text_colors, text, Modified: trunk/examples/octave/x07c.m =================================================================== --- trunk/examples/octave/x07c.m 2014-06-20 23:13:53 UTC (rev 13131) +++ trunk/examples/octave/x07c.m 2014-07-01 11:41:11 UTC (rev 13132) @@ -24,7 +24,7 @@ ## Initialize plplot */ plinit(); - base=[0, 100, 0, 100, 200, 500, 600, 700, 800, 900, \ + base=[0, 100, 0, 100, 200, 500, 600, 700, 800, 900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900]; plfontld(0); Modified: trunk/examples/octave/x08c.m =================================================================== --- trunk/examples/octave/x08c.m 2014-06-20 23:13:53 UTC (rev 13131) +++ trunk/examples/octave/x08c.m 2014-07-01 11:41:11 UTC (rev 13132) @@ -101,11 +101,9 @@ plmtex("t", 1.0, 0.5, 0.5, title(k,:)); plcol0(1); if (rosen) - plw3d(1.0, 1.0, 1.0, -1.5, 1.5, -0.5, 1.5, zmin, zmax, \ - alt(k), az(k)); + plw3d(1.0, 1.0, 1.0, -1.5, 1.5, -0.5, 1.5, zmin, zmax, alt(k), az(k)); else - plw3d(1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, zmin, zmax, \ - alt(k), az(k)); + plw3d(1.0, 1.0, 1.0, -1.0, 1.0, -1.0, 1.0, zmin, zmax, alt(k), az(k)); endif plbox3("bnstu", "x axis", 0.0, 0, Modified: trunk/examples/octave/x26c.m =================================================================== --- trunk/examples/octave/x26c.m 2014-06-20 23:13:53 UTC (rev 13131) +++ trunk/examples/octave/x26c.m 2014-07-01 11:41:11 UTC (rev 13132) @@ -240,7 +240,7 @@ plscol0a( 15, 32, 32, 32, 0.70 ); - [legend_width, legend_height] = \ + [legend_width, legend_height] = ... pllegend( bitor(PL_LEGEND_BACKGROUND, PL_LEGEND_BOUNDING_BOX), 0, 0.0, 0.0, 0.1, 15, 1, 1, 0, 0, opt_array, 1.0, 1.0, 2.0, 1., text_colors, text, Modified: trunk/examples/octave/x29c.m =================================================================== --- trunk/examples/octave/x29c.m 2014-06-20 23:13:53 UTC (rev 13131) +++ trunk/examples/octave/x29c.m 2014-07-01 11:41:11 UTC (rev 13132) @@ -120,8 +120,8 @@ i = 0:npts-1; x = i*60.0*60.0*24.0; p = asin(0.39795*cos(0.2163108 + 2*atan(0.9671396*tan(0.00860*(i-186))))); - d = 24.0 - (24.0/pi)*acos( (sin(0.8333*pi/180.0) + \ - sin(lat*pi/180.0)*sin(p)) \ + d = 24.0 - (24.0/pi)*acos( (sin(0.8333*pi/180.0) + ... + sin(lat*pi/180.0)*sin(p)) ... ./(cos(lat*pi/180.0)*cos(p)) ); y = d; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-06-20 23:14:02
|
Revision: 13131 http://sourceforge.net/p/plplot/code/13131 Author: airwin Date: 2014-06-20 23:13:53 +0000 (Fri, 20 Jun 2014) Log Message: ----------- Add epa_build configuration for libLASi. Tested on Linux using the build_libLASi target. That target configures, builds, installs, and tests (via ctest) libLASi. The ctest results look fine except that the detailed PostScript file results for the second example are different each time that example is run as discussed on the lasi-devel list. It appears the font commands at the head of the PostScript file are created in different order with different names, but the results look visually identical (as expected if just the font order is changed each time). So this bug is more a curiosity than not, but nevertheless it would be good to deal with it so that the second example produces file-identical results each time rather than different random orders of fonts. Modified Paths: -------------- trunk/cmake/epa_build/CMakeLists.txt Added Paths: ----------- trunk/cmake/epa_build/libLASi/ trunk/cmake/epa_build/libLASi/CMakeLists.txt Modified: trunk/cmake/epa_build/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/CMakeLists.txt 2014-06-20 20:28:03 UTC (rev 13130) +++ trunk/cmake/epa_build/CMakeLists.txt 2014-06-20 23:13:53 UTC (rev 13131) @@ -424,6 +424,7 @@ # qt4_lite qt5_lite freetype + libLASi ) endif(BUILD_THE_BUILDTOOLS) Added: trunk/cmake/epa_build/libLASi/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/libLASi/CMakeLists.txt (rev 0) +++ trunk/cmake/epa_build/libLASi/CMakeLists.txt 2014-06-20 23:13:53 UTC (rev 13131) @@ -0,0 +1,59 @@ +# libLASi/CMakeLists.txt + +# Configure the build of a "lite" version of PLplot (with fewer dependencies +# but with fewer features as well). + +# Copyright (C) 2013-2014 Alan W. Irwin + +# This file is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# 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 +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser 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 + +set(PACKAGE libLASi) + +# List of dependencies (most of which are build tools) which should be +# ignored. +set(ignored_dependencies_LIST ${extra_ignored_dependencies_list}) + +set(dependencies_LIST + freetype + pango + ) + +# Do boilerplate tasks that must be done for each different project +# that is configured as part of epa_build. +epa_boilerplate( + ignored_dependencies_LIST + PACKAGE + dependencies_LIST + dependencies_targets + EPA_PATH + source_PATH + ) + +set(CXXFLAGS "$ENV{CXXFLAGS}") + +# temporary until a libLASi release is made +set(URL /home/software/lasi_svn/HEAD/lasi_allura) + +ExternalProject_Add( + build_${PACKAGE} + DEPENDS "${dependencies_targets}" + URL ${URL} + #URL_MD5 ${URL_MD5} + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} "CXXFLAGS=${CXXFLAGS}" ${EPA_CMAKE_COMMAND} ${EPA_BASE}/Source/build_${PACKAGE} + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_BUILD_COMMAND} + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_BUILD_COMMAND} install + TEST_AFTER_INSTALL 1 + TEST_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_CTEST_COMMAND} + ) Property changes on: trunk/cmake/epa_build/libLASi/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-06-20 20:28:12
|
Revision: 13130 http://sourceforge.net/p/plplot/code/13130 Author: airwin Date: 2014-06-20 20:28:03 +0000 (Fri, 20 Jun 2014) Log Message: ----------- Make harbuzz epa_build package depend on freetype_nohb to break the dependency loop between harbuzz and freetype as suggested by Linux from scratch. The result is freetype depends on harbuzz which depends on freetyp_nohb where the two freetype packages are identical (except for the package name and except for the --without-harfbuzz configure option for freetyp_nohb. Furthermore, installed file names are identical between the two freeype versions. Thus, the freetype install completely overwrites the freetype_nohb install. The result is that ldd -r shows libharfbuzz resolves symbols in libfreetype and vice versa without errors. This illustrates the fundamental dependency loop between these two libraries which is allowed but is nevertheless a configuration pain that has been resolved as above. Tested on Linux by building the build_freetype package and running ldd -r on the resulting libfreetype and libharfbuzz libraries. Modified Paths: -------------- trunk/cmake/epa_build/harfbuzz/CMakeLists.txt Modified: trunk/cmake/epa_build/harfbuzz/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/harfbuzz/CMakeLists.txt 2014-06-20 20:13:56 UTC (rev 13129) +++ trunk/cmake/epa_build/harfbuzz/CMakeLists.txt 2014-06-20 20:28:03 UTC (rev 13130) @@ -31,7 +31,7 @@ # ignored. set(ignored_dependencies_LIST pkg-config;bison;flex;python2-devel;libX11;libXft;xorg-kbproto;xorg-macros;xorg-xproto;dbus ${extra_ignored_dependencies_list}) -set(dependencies_LIST glib;ragel) +set(dependencies_LIST glib;ragel;freetype_nohb) # Do boilerplate tasks that must be done for each different project # that is configured as part of epa_build. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-06-20 20:14:04
|
Revision: 13129 http://sourceforge.net/p/plplot/code/13129 Author: airwin Date: 2014-06-20 20:13:56 +0000 (Fri, 20 Jun 2014) Log Message: ----------- If -fvisibility=hidden is one of the options in CFLAGS then drop that option since it produces incorrect results for the freetype library. Modified Paths: -------------- trunk/cmake/epa_build/freetype/CMakeLists.txt trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt Modified: trunk/cmake/epa_build/freetype/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/freetype/CMakeLists.txt 2014-05-21 22:13:13 UTC (rev 13128) +++ trunk/cmake/epa_build/freetype/CMakeLists.txt 2014-06-20 20:13:56 UTC (rev 13129) @@ -44,6 +44,8 @@ ) set(CFLAGS "$ENV{CFLAGS}") +# Drop -fvisibility=hidden since that option does not work for this package. +string(REGEX REPLACE "-fvisibility=hidden" "" CFLAGS "${CFLAGS}") # Data that is related to downloads. set(URL http://downloads.sourceforge.net/freetype/freetype-2.5.3.tar.bz2) Modified: trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt 2014-05-21 22:13:13 UTC (rev 13128) +++ trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt 2014-06-20 20:13:56 UTC (rev 13129) @@ -44,6 +44,8 @@ ) set(CFLAGS "$ENV{CFLAGS}") +# Drop -fvisibility=hidden since that option does not work for this package. +string(REGEX REPLACE "-fvisibility=hidden" "" CFLAGS "${CFLAGS}") # Data that is related to downloads. set(URL http://downloads.sourceforge.net/freetype/freetype-2.5.3.tar.bz2) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-21 22:13:17
|
Revision: 13128 http://sourceforge.net/p/plplot/code/13128 Author: airwin Date: 2014-05-21 22:13:13 +0000 (Wed, 21 May 2014) Log Message: ----------- Initial commit of epa_build configurations of freetype and freetype_nohb (the variant of freetype that does not depend on HarfBuzz which is recommended by BLFS to break the freetype-harfbuzz dependency loop). The epa_build configuration of freetype will ultimately be required for the planned epa_build configuration of libLASi. Modified Paths: -------------- trunk/cmake/epa_build/CMakeLists.txt Added Paths: ----------- trunk/cmake/epa_build/freetype/ trunk/cmake/epa_build/freetype/CMakeLists.txt trunk/cmake/epa_build/freetype_nohb/ trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt Modified: trunk/cmake/epa_build/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/CMakeLists.txt 2014-05-21 21:16:07 UTC (rev 13127) +++ trunk/cmake/epa_build/CMakeLists.txt 2014-05-21 22:13:13 UTC (rev 13128) @@ -423,6 +423,7 @@ # qt5_lite instead. # qt4_lite qt5_lite + freetype ) endif(BUILD_THE_BUILDTOOLS) Added: trunk/cmake/epa_build/freetype/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/freetype/CMakeLists.txt (rev 0) +++ trunk/cmake/epa_build/freetype/CMakeLists.txt 2014-05-21 22:13:13 UTC (rev 13128) @@ -0,0 +1,70 @@ +# freetype/CMakeLists.txt + +# Configure the build of freetype. + +# To follow what is recommended by BLFS, this package uses the +# --with-harfbuzz configuration option which means it depends on +# harfbuzz, which in turn depends on freetype_nohb (which is identical +# to the current package except it has the --without-harfbuzz +# configure option so has no package dependencies). + +# Copyright (C) 2014 Alan W. Irwin + +# This file is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# 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 +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser 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 + +set(PACKAGE freetype) + +# List of dependencies (most of which are build tools) which should be +# ignored. +set(ignored_dependencies_LIST ${extra_ignored_dependencies_list}) + +set(dependencies_LIST harfbuzz) + +# Do boilerplate tasks that must be done for each different project +# that is configured as part of epa_build. +epa_boilerplate( + ignored_dependencies_LIST + PACKAGE + dependencies_LIST + dependencies_targets + EPA_PATH + source_PATH + ) + +set(CFLAGS "$ENV{CFLAGS}") + +# Data that is related to downloads. +set(URL http://downloads.sourceforge.net/freetype/freetype-2.5.3.tar.bz2) +set(DOWNLOAD_HASH_TYPE MD5) +set(DOWNLOAD_HASH d6b60f06bfc046e43ab2a6cbfd171d65) + +ExternalProject_Add( + build_${PACKAGE} + DEPENDS ${dependencies_targets} + URL ${URL} + URL_HASH ${DOWNLOAD_HASH_TYPE}=${DOWNLOAD_HASH} + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} "CFLAGS=${CFLAGS}" ${source_PATH}/${EPA_CONFIGURE_COMMAND} --with-harfbuzz --disable-static + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} + BUILD_IN_SOURCE 0 + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} install + ) + +# Note BLFS recommends the extra steps of installing the +# documentation, enabling GX/AAT and OpenType table validation, and +# enabling Subpixel Rendering and Subpixel Hinting in order to improve +# font rendering. However, for simplicity we do none of those extra +# steps for now (which also renders moot the possibility [discussed in +# detail by BLFS] that Subpixel Rendering _might_ be patent +# encumbered). Property changes on: trunk/cmake/epa_build/freetype/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt (rev 0) +++ trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt 2014-05-21 22:13:13 UTC (rev 13128) @@ -0,0 +1,70 @@ +# freetype_nohb/CMakeLists.txt + +# Configure the build of freetype_nohb. + +# To follow what is recommended by BLFS, the freetype package (which +# is identical to the current package except for the --with-harfbuzz +# configure option) depends on harfbuzz, which in turn depends on the +# current package which because it uses the --without-harfbuzz +# configure option depends on no other package. + +# Copyright (C) 2014 Alan W. Irwin + +# This file is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 2.1 of the License, or (at your option) any later version. + +# 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 +# Lesser General Public License for more details. + +# You should have received a copy of the GNU Lesser 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 + +set(PACKAGE freetype_nohb) + +# List of dependencies (most of which are build tools) which should be +# ignored. +set(ignored_dependencies_LIST ${extra_ignored_dependencies_list}) + +set(dependencies_LIST) + +# Do boilerplate tasks that must be done for each different project +# that is configured as part of epa_build. +epa_boilerplate( + ignored_dependencies_LIST + PACKAGE + dependencies_LIST + dependencies_targets + EPA_PATH + source_PATH + ) + +set(CFLAGS "$ENV{CFLAGS}") + +# Data that is related to downloads. +set(URL http://downloads.sourceforge.net/freetype/freetype-2.5.3.tar.bz2) +set(DOWNLOAD_HASH_TYPE MD5) +set(DOWNLOAD_HASH d6b60f06bfc046e43ab2a6cbfd171d65) + +ExternalProject_Add( + build_${PACKAGE} + DEPENDS ${dependencies_targets} + URL ${URL} + URL_HASH ${DOWNLOAD_HASH_TYPE}=${DOWNLOAD_HASH} + CONFIGURE_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} "CFLAGS=${CFLAGS}" ${source_PATH}/${EPA_CONFIGURE_COMMAND} --without-harfbuzz --disable-static + BUILD_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} + BUILD_IN_SOURCE 0 + INSTALL_COMMAND ${ENV_EXECUTABLE} PATH=${EPA_PATH} ${EPA_PARALLEL_MAKE_COMMAND} install + ) + +# Note BLFS recommends the extra steps of installing the +# documentation, enabling GX/AAT and OpenType table validation, and +# enabling Subpixel Rendering and Subpixel Hinting in order to improve +# font rendering. However, for simplicity we do none of those extra +# steps for now (which also renders moot the possibility [discussed in +# detail by BLFS] that Subpixel Rendering _might_ be patent +# encumbered). Property changes on: trunk/cmake/epa_build/freetype_nohb/CMakeLists.txt ___________________________________________________________________ Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-21 21:16:11
|
Revision: 13127 http://sourceforge.net/p/plplot/code/13127 Author: airwin Date: 2014-05-21 21:16:07 +0000 (Wed, 21 May 2014) Log Message: ----------- Tweak commentary. Modified Paths: -------------- trunk/cmake/epa_build/add_packages.xml Modified: trunk/cmake/epa_build/add_packages.xml =================================================================== --- trunk/cmake/epa_build/add_packages.xml 2014-05-20 22:49:48 UTC (rev 13126) +++ trunk/cmake/epa_build/add_packages.xml 2014-05-21 21:16:07 UTC (rev 13127) @@ -1,7 +1,7 @@ <?xml version="1.0" ?> <!-- -Most of these data derived from http://www.linuxfromscratch.org, a -wonderful site that provides fundamental build information for a lot +Most of these data derived from http://www.linuxfromscratch.org/blfs/view/svn/ +a wonderful site that provides fundamental build information for a lot of different free software packages. --> <moduleset> This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-20 22:49:55
|
Revision: 13126 http://sourceforge.net/p/plplot/code/13126 Author: airwin Date: 2014-05-20 22:49:48 +0000 (Tue, 20 May 2014) Log Message: ----------- Tighten up plInBuildTree logic. Test that the current directory is exactly the same as the top-level build directory or a subdirectory of that directory. (The old logic did not distinguish say build_dir from build_dir_install since the first letters of "build_dir_install" coincided with "build_dir".) The subdirectory logic implies searching for the path delimiter, so make sure that is appropriately designated for the different Unix and Windows path delimiters. Finally, make the whole path name comparisons independent of case on Windows platforms (as opposed to the old code which only make the drive letter case insensitive). Lightly tested on Linux and MinGW/Wine. More comprehensive testing is requested. Modified Paths: -------------- trunk/src/plcore.c Modified: trunk/src/plcore.c =================================================================== --- trunk/src/plcore.c 2014-05-20 18:37:46 UTC (rev 13125) +++ trunk/src/plcore.c 2014-05-20 22:49:48 UTC (rev 13126) @@ -2786,16 +2786,18 @@ plsc->dispatch_table = dispatch_table[plsc->device - 1]; } -PLDLLIMPEXP int plInBuildTree() +int plInBuildTree() { static int inited = 0; static int inBuildTree = 0; if ( inited == 0 ) { - char currdir[PLPLOT_MAX_PATH]; - char builddir[PLPLOT_MAX_PATH]; + int len_currdir, len_builddir; + char currdir[PLPLOT_MAX_PATH], *pcurrdir = currdir; + char builddir[PLPLOT_MAX_PATH], *pbuilddir = builddir; + if ( getcwd( currdir, PLPLOT_MAX_PATH ) == NULL ) { pldebug( "plInBuildTree():", "Not enough buffer space" ); @@ -2813,9 +2815,29 @@ } else { - // On Windows the first character is the drive letter - it is case-insensitive - if ( strncmp( builddir + 1, currdir + 1, strlen( builddir + 1 ) ) == 0 && - tolower( builddir[0] ) == tolower( currdir[0] ) ) + len_currdir = strlen( currdir ); + len_builddir = strlen( builddir ); +#if defined ( _MSC_VER ) + // On Windows all parts of the path are case insensitive + // so convert to lower case for the comparison. + for (; *pcurrdir; ++pcurrdir ) + *pcurrdir = tolower( *pcurrdir ); + for (; *pbuilddir; ++pbuilddir ) + *pbuilddir = tolower( *pbuilddir ); +#define PLPLOT_PATH_DELIMITER '\\' +#else +#define PLPLOT_PATH_DELIMITER '/' +#endif + // builddir does not have trailing path delimiter + // so the strncmp comparison checks if currdir is + // exactly the builddir or builddir with a string + // appended. So if that test succeeds, then check + // further if the currdir is exactly the build_dir + // or the appended string starts with the path + // delimiter, i.e., whether currdir is the builddir or + // a subdirectory of that directory. + if ( strncmp( builddir, currdir, len_builddir ) == 0 && + ( len_currdir == len_builddir || currdir[len_builddir] == PLPLOT_PATH_DELIMITER ) ) { inBuildTree = 1; } @@ -2887,11 +2909,11 @@ int n; #ifdef ENABLE_DYNDRIVERS - char buf[BUFFER2_SIZE]; + char buf[BUFFER2_SIZE]; const char * drvdir; char *devnam, *devdesc, *devtype, *driver, *tag, *seqstr; - int seq; - int i, j, driver_found, done = 0; + int seq; + int i, j, driver_found, done = 0; FILE *fp_drvdb = NULL; DIR * dp_drvdir = NULL; struct dirent* entry; @@ -3129,9 +3151,9 @@ static void plSelectDev() { - int dev, i, count; + int dev, i, count; size_t length; - char response[80]; + char response[80]; char * devname_env; // If device name is not already specified, try to get it from environment @@ -3239,11 +3261,11 @@ plLoadDriver( void ) { #ifdef ENABLE_DYNDRIVERS - int i, drvidx; + int i, drvidx; char sym[BUFFER_SIZE]; char *tag; - int n = plsc->device - 1; + int n = plsc->device - 1; PLDispatchTable *dev = dispatch_table[n]; PLLoadableDriver *driver = 0; @@ -4240,7 +4262,7 @@ #if 0 // BEGIN dev_fastimg COMMENT PLINT i, npts; short *xscl, *yscl; - int plbuf_write; + int plbuf_write; plsc->page_status = DRAWING; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-20 18:37:51
|
Revision: 13125 http://sourceforge.net/p/plplot/code/13125 Author: airwin Date: 2014-05-20 18:37:46 +0000 (Tue, 20 May 2014) Log Message: ----------- Fix size_t formatting issue for Microsoft platforms. Modified Paths: -------------- trunk/src/plctrl.c Modified: trunk/src/plctrl.c =================================================================== --- trunk/src/plctrl.c 2014-05-18 22:05:54 UTC (rev 13124) +++ trunk/src/plctrl.c 2014-05-20 18:37:46 UTC (rev 13125) @@ -2466,7 +2466,14 @@ strcat_delim( *filespec ); strcat( *filespec, filename ); } +#ifdef WIN32 + // According to http://msdn.microsoft.com/en-us/library/vstudio/tcxf1dw6.aspx + // and also Wine tests, Microsoft does not support the c99 standard %zu + // format. Instead, %lu is recommended for size_t. + pldebug( "plGetName", "Maximum length of full pathname of file to be found is %lu\n", lfilespec - 1 ); +#else pldebug( "plGetName", "Maximum length of full pathname of file to be found is %zu\n", lfilespec - 1 ); +#endif pldebug( "plGetName", "Full pathname of file to be found is %s\n", *filespec ); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-18 22:06:01
|
Revision: 13124 http://sourceforge.net/p/plplot/code/13124 Author: airwin Date: 2014-05-18 22:05:54 +0000 (Sun, 18 May 2014) Log Message: ----------- Use specific (bash) shell for the traditional (Makefile + pkg-config) build system Makefiles for the installed examples. This solves potential bugs where bashisms in these Makefiles would lead to errors for systems where the default shell used by by the make command is not bash. Modified Paths: -------------- trunk/examples/Makefile.examples.in trunk/examples/ada/Makefile.examples.in trunk/examples/c/Makefile.examples.in trunk/examples/c++/Makefile.examples.in trunk/examples/d/Makefile.examples.in trunk/examples/f95/Makefile.examples.in trunk/examples/java/Makefile.examples.in trunk/examples/ocaml/Makefile.examples.in trunk/examples/tk/Makefile.examples.in Modified: trunk/examples/Makefile.examples.in =================================================================== --- trunk/examples/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -25,6 +25,7 @@ # It combines building all the examples that need to be built along # with testing all examples. +SHELL = @SH_EXECUTABLE@ all: c/x01c@EXEEXT@ c/x01c@EXEEXT@: cd c; $(MAKE) Modified: trunk/examples/ada/Makefile.examples.in =================================================================== --- trunk/examples/ada/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/ada/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -21,6 +21,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ GNAT_EXECUTABLE_BUILDER = @GNAT_EXECUTABLE_BUILDER@ \ -aI@ADA_INCLUDE_DIR@ -aL@ADA_LIB_DIR@ EXEEXT = @EXEEXT@ Modified: trunk/examples/c/Makefile.examples.in =================================================================== --- trunk/examples/c/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/c/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -21,6 +21,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ CC = @CC@ EXEEXT = @EXEEXT@ Modified: trunk/examples/c++/Makefile.examples.in =================================================================== --- trunk/examples/c++/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/c++/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -21,6 +21,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ CXX = @CXX@ EXEEXT = @EXEEXT@ Modified: trunk/examples/d/Makefile.examples.in =================================================================== --- trunk/examples/d/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/d/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -19,6 +19,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ DC = @DC@ EXEEXT = @EXEEXT@ Modified: trunk/examples/f95/Makefile.examples.in =================================================================== --- trunk/examples/f95/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/f95/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -21,6 +21,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ F95 = @FC@ EXEEXT = @EXEEXT@ Modified: trunk/examples/java/Makefile.examples.in =================================================================== --- trunk/examples/java/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/java/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -19,6 +19,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ JAVAC = @JAVAC@ PLPLOT_CLASSPATH = @JAVADATA_HARDDIR@/plplot.jar Modified: trunk/examples/ocaml/Makefile.examples.in =================================================================== --- trunk/examples/ocaml/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/ocaml/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -21,6 +21,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ OCAMLC = @OCAML_EXAMPLE_COMPILER@ EXEEXT = @EXEEXT@ Modified: trunk/examples/tk/Makefile.examples.in =================================================================== --- trunk/examples/tk/Makefile.examples.in 2014-05-18 21:59:51 UTC (rev 13123) +++ trunk/examples/tk/Makefile.examples.in 2014-05-18 22:05:54 UTC (rev 13124) @@ -20,6 +20,7 @@ # along with the file PLplot; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA +SHELL = @SH_EXECUTABLE@ CC = @CC@ EXEEXT = @EXEEXT@ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-18 21:59:53
|
Revision: 13123 http://sourceforge.net/p/plplot/code/13123 Author: airwin Date: 2014-05-18 21:59:51 +0000 (Sun, 18 May 2014) Log Message: ----------- Store all results of the examples run by ctest in their own unique subdirectory of the build tree. This keeps the plplot_test subdirectory much cleaner, and makes it easy to implement a clean and quick way to remove all those ctest-generated files. This change solves two bugs with the old method of removing all the generated files using a list of filenames; that method was inexact (the list of filenames was incomplete) and more seriously also ran into command-line length issues for the cmd environment used for the "MinGW Makefiles" generator case. Modified Paths: -------------- trunk/plplot_test/CMakeLists.txt Modified: trunk/plplot_test/CMakeLists.txt =================================================================== --- trunk/plplot_test/CMakeLists.txt 2014-05-18 21:53:26 UTC (rev 13122) +++ trunk/plplot_test/CMakeLists.txt 2014-05-18 21:59:51 UTC (rev 13123) @@ -23,9 +23,13 @@ # a shell is available. if(SH_EXECUTABLE) + + set(CTEST_EXAMPLES_OUTPUT_DIR ${CMAKE_BINARY_DIR}/ctest_examples_output_dir) + file(MAKE_DIRECTORY ${CTEST_EXAMPLES_OUTPUT_DIR}) + set(SCRIPTS) set(TEST_ENVIRONMENT - "EXAMPLES_DIR=${CMAKE_BINARY_DIR}/examples SRC_EXAMPLES_DIR=${CMAKE_SOURCE_DIR}/examples" + "EXAMPLES_DIR=${CMAKE_BINARY_DIR}/examples SRC_EXAMPLES_DIR=${CMAKE_SOURCE_DIR}/examples OUTPUT_DIR=${CTEST_EXAMPLES_OUTPUT_DIR}" ) set(TEST_DEVICE psc CACHE STRING "device used for ctest") @@ -120,16 +124,14 @@ ) list(APPEND SCRIPTS test_c_interactive.sh) - set(test_output_files_LIST) set(examples_compare_DEPENDS) if(PLD_TEST_DEVICE) - add_test(examples_c - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=c" + add_test(NAME examples_c + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=c" ) list(APPEND examples_compare_DEPENDS examples_c) - list_example_files(. ${TEST_DEVICE} c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) if(ENABLE_cxx) @@ -140,12 +142,11 @@ ) list(APPEND SCRIPTS test_cxx.sh) if(PLD_TEST_DEVICE) - add_test(examples_cxx - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=cxx" + add_test(NAME examples_cxx + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=cxx" ) list(APPEND examples_compare_DEPENDS examples_cxx) - list_example_files(. ${TEST_DEVICE} cxx output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_cxx) @@ -157,12 +158,11 @@ ) list(APPEND SCRIPTS test_f95.sh) if(PLD_TEST_DEVICE) - add_test(examples_f95 - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=f95" + add_test(NAME examples_f95 + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=f95" ) list(APPEND examples_compare_DEPENDS examples_f95) - list_example_files(. ${TEST_DEVICE} f95 output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_f95) @@ -174,12 +174,11 @@ ) list(APPEND SCRIPTS test_java.sh) if(PLD_TEST_DEVICE) - add_test(examples_java - ${SH_EXECUTABLE} -c "${JAVA_TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=java" + add_test(NAME examples_java + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${JAVA_TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=java" ) list(APPEND examples_compare_DEPENDS examples_java) - list_example_files(. ${TEST_DEVICE} j output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_java) @@ -199,12 +198,11 @@ ) list(APPEND SCRIPTS test_octave.sh) if(PLD_TEST_DEVICE) - add_test(examples_octave - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=octave" + add_test(NAME examples_octave + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=octave" ) list(APPEND examples_compare_DEPENDS examples_octave) - list_example_files(. ${TEST_DEVICE} o output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_octave) @@ -216,12 +214,11 @@ ) list(APPEND SCRIPTS test_python.sh) if(PLD_TEST_DEVICE) - add_test(examples_python - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=python" + add_test(NAME examples_python + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=python" ) list(APPEND examples_compare_DEPENDS examples_python) - list_example_files(. ${TEST_DEVICE} p output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_python) @@ -242,12 +239,11 @@ @ONLY ) if(PLD_TEST_DEVICE) - add_test(examples_tcl - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=tcl" + add_test(NAME examples_tcl + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=tcl" ) list(APPEND examples_compare_DEPENDS examples_tcl) - list_example_files(. ${TEST_DEVICE} t output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) set(PLTCL_DIR ${BIN_DIR}) # Transform drive-letter form to leading-slash form, see comment above. @@ -267,12 +263,11 @@ ) list(APPEND SCRIPTS test_pdl.sh) if(PLD_TEST_DEVICE) - add_test(examples_pdl - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=pdl" + add_test(NAME examples_pdl + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=pdl" ) list(APPEND examples_compare_DEPENDS examples_pdl) - list_example_files(. ${TEST_DEVICE} pdl output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_pdl) @@ -284,12 +279,11 @@ ) list(APPEND SCRIPTS test_ada.sh) if(PLD_TEST_DEVICE) - add_test(examples_ada - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ada" + add_test(NAME examples_ada + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ada" ) list(APPEND examples_compare_DEPENDS examples_ada) - list_example_files(. ${TEST_DEVICE} a output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_ada) @@ -301,12 +295,11 @@ ) list(APPEND SCRIPTS test_ocaml.sh) if(PLD_TEST_DEVICE) - add_test(examples_ocaml - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ocaml" + add_test(NAME examples_ocaml + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=ocaml" ) list(APPEND examples_compare_DEPENDS examples_ocaml) - list_example_files(. ${TEST_DEVICE} ocaml output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_ocaml) @@ -318,12 +311,11 @@ ) list(APPEND SCRIPTS test_lua.sh) if(PLD_TEST_DEVICE) - add_test(examples_lua - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=lua" + add_test(NAME examples_lua + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=lua" ) list(APPEND examples_compare_DEPENDS examples_lua) - list_example_files(. ${TEST_DEVICE} lua output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_lua) @@ -335,176 +327,155 @@ ) list(APPEND SCRIPTS test_d.sh) if(PLD_TEST_DEVICE) - add_test(examples_d - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=d" + add_test(NAME examples_d + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT_DEVICE} --front-end=d" ) list(APPEND examples_compare_DEPENDS examples_d) - list_example_files(. ${TEST_DEVICE} d output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_TEST_DEVICE) endif(ENABLE_d) # Run C examples with different drivers if(PLD_ps) if (NOT TEST_DEVICE STREQUAL "psc") - add_test(examples_psc - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psc" + add_test(NAME examples_psc + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psc" ) - list_example_files(. psc c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(NOT TEST_DEVICE STREQUAL "psc") endif(PLD_ps) if(PLD_psttf) - add_test(examples_psttfc - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psttfc" + add_test(NAME examples_psttfc + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=psttfc" ) - list_example_files(. psttfc c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_psttf) if(PLD_pstex) - add_test(examples_pstex - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pstex" + add_test(NAME examples_pstex + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pstex" ) - list_example_files(. pstex c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_pstex) if(PLD_png) - add_test(examples_png - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=png" + add_test(NAME examples_png + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=png" ) - list_example_files(. png c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_png) if(PLD_svg) - add_test(examples_svg - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=svg" + add_test(NAME examples_svg + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=svg" ) - list_example_files(. svg c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_svg) if(PLD_plmeta) - add_test(examples_plmeta - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=plmeta" + add_test(NAME examples_plmeta + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=plmeta" ) - list_example_files(. plmeta c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_plmeta) if(PLD_pscairo) - add_test(examples_pscairo - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pscairo" + add_test(NAME examples_pscairo + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pscairo" ) - list_example_files(. pscairo c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_pscairo) if(PLD_pngcairo) - add_test(examples_pngcairo - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pngcairo" + add_test(NAME examples_pngcairo + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pngcairo" ) - list_example_files(. pngcairo c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_pngcairo) if(PLD_xfig) - add_test(examples_xfig - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=xfig" + add_test(NAME examples_xfig + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=xfig" ) - list_example_files(. xfig c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_xfig) if(PLD_gif) - add_test(examples_gif - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=gif" + add_test(NAME examples_gif + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=gif" ) - list_example_files(. gif c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_gif) if(PLD_cgm) - add_test(examples_cgm - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=cgm" + add_test(NAME examples_cgm + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=cgm" ) - list_example_files(. cgm c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_cgm) if(PLD_bmpqt) - add_test(examples_bmpqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=bmpqt" + add_test(NAME examples_bmpqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=bmpqt" ) - list_example_files(. bmpqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_bmpqt) if(PLD_jpgqt) - add_test(examples_jpgqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=jpgqt" + add_test(NAME examples_jpgqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=jpgqt" ) - list_example_files(. jpgqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_jpgqt) if(PLD_pngqt) - add_test(examples_pngqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pngqt" + add_test(NAME examples_pngqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pngqt" ) - list_example_files(. pngqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_pngqt) if(PLD_ppmqt) - add_test(examples_ppmqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=ppmqt" + add_test(NAME examples_ppmqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=ppmqt" ) - list_example_files(. ppmqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_ppmqt) if(PLD_tiffqt) - add_test(examples_tiffqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=tiffqt" + add_test(NAME examples_tiffqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=tiffqt" ) - list_example_files(. tiffqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_tiffqt) if(PLD_svgqt) - add_test(examples_svgqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=svgqt" + add_test(NAME examples_svgqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=svgqt" ) - list_example_files(. svgqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_svgqt) if(PLD_epsqt) - add_test(examples_epsqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=epsqt" + add_test(NAME examples_epsqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=epsqt" ) - list_example_files(. epsqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_epsqt) if(PLD_pdfqt) - add_test(examples_pdfqt - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pdfqt" + add_test(NAME examples_pdfqt + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pdfqt" ) - list_example_files(. pdfqt c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_pdfqt) if(PLD_pdf) - add_test(examples_pdf - ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pdf" + add_test(NAME examples_pdf + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${SH_EXECUTABLE} -c "${TEST_ENVIRONMENT} ${TEST_SCRIPT} --front-end=c --device=pdf" ) - list_example_files(. pdf c output_list) - list(APPEND test_output_files_LIST ${output_list}) endif(PLD_pdf) if(CMP_EXECUTABLE OR DIFF_EXECUTABLE AND TAIL_EXECUTABLE) @@ -514,8 +485,9 @@ @ONLY ) list(APPEND SCRIPTS test_diff.sh) - add_test(examples_compare - ${SH_EXECUTABLE} -c "./test_diff.sh" + add_test(NAME examples_compare + WORKING_DIRECTORY ${CTEST_EXAMPLES_OUTPUT_DIR} + COMMAND ${SH_EXECUTABLE} -c "${CMAKE_CURRENT_BINARY_DIR}/test_diff.sh" ) # There is a bug in 2.8.x with x < 5 where tests are run out of # the order in which they are declared by default. Also, 2.8.x @@ -552,13 +524,14 @@ add_custom_target(lena_octave_file ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/lena.img) endif(ENABLE_octave) - # Custom target to remove everything created by ctest - # N.B. the test_output_files_LIST is extremely long and - # overflows the maximum line length of the shell if you - # replace "." above with ${CMAKE_CURRENT_BINARY_DIR} + # Implement custom target to remove all examples output files + # created by ctest in a convenient way. Use special directory to + # store these files since otherwise an attempt to remove these + # files by name from a multi-use directory can exceed the maximum + # command-line length for the "MinGW Makefiles" cmd environment. add_custom_target(clean_ctest_plot_files - COMMAND ${CMAKE_COMMAND} -E remove ${test_output_files_LIST} - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR} + COMMAND ${CMAKE_COMMAND} -E remove_directory ${CTEST_EXAMPLES_OUTPUT_DIR} + COMMAND ${CMAKE_COMMAND} -E make_directory ${CTEST_EXAMPLES_OUTPUT_DIR} ) endif(BUILD_TEST) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-18 21:53:31
|
Revision: 13122 http://sourceforge.net/p/plplot/code/13122 Author: airwin Date: 2014-05-18 21:53:26 +0000 (Sun, 18 May 2014) Log Message: ----------- Put test_noninteractive target example results in their own exclusive directory in the build tree which keeps the examples subdirectory of the build tree much cleaner and makes it easier to see how well the "make clean" command is cleaning up these files. The test_teclsh_standard_examples target has a showstopper Tcl exit problem (a non-zero return code) for certain configuration conditions (non-dynamic devices) on Windows. Therefore, to keep this showstopper error from propagating to the overall testing target, test_noninteractive, drop including the test_tclsh_standard_examples target as part of the list of dependencies for that overall target on Windows until this additional Tcl exit issue can be addressed. Modified Paths: -------------- trunk/examples/CMakeLists.txt Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2014-05-18 21:42:04 UTC (rev 13121) +++ trunk/examples/CMakeLists.txt 2014-05-18 21:53:26 UTC (rev 13122) @@ -475,14 +475,16 @@ set(plplot_test_debug) endif(VALGRIND_EXECUTABLE) + set(TEST_EXAMPLES_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/test_examples_output_dir) + file(MAKE_DIRECTORY ${TEST_EXAMPLES_OUTPUT_DIR}) if(CORE_BUILD) set(custom_test_script ${CMAKE_BINARY_DIR}/plplot_test/plplot-test.sh) - set(custom_env EXAMPLES_DIR=${CMAKE_BINARY_DIR}/examples SRC_EXAMPLES_DIR=${CMAKE_SOURCE_DIR}/examples) + set(custom_env EXAMPLES_DIR=${CMAKE_BINARY_DIR}/examples SRC_EXAMPLES_DIR=${CMAKE_SOURCE_DIR}/examples OUTPUT_DIR=${TEST_EXAMPLES_OUTPUT_DIR}) set(java_custom_env ${custom_env} PLPLOT_JAVA_WRAP_DIR=${CMAKE_BINARY_DIR}/bindings/java/ PLPLOT_CLASSPATH=${CMAKE_BINARY_DIR}/examples/java/plplot.jar) set(compare_script ${CMAKE_BINARY_DIR}/plplot_test/test_diff.sh) else(CORE_BUILD) set(custom_test_script ${CMAKE_CURRENT_SOURCE_DIR}/plplot-test.sh) - set(custom_env SRC_EXAMPLES_DIR=${CMAKE_CURRENT_SOURCE_DIR}) + set(custom_env SRC_EXAMPLES_DIR=${CMAKE_CURRENT_SOURCE_DIR} OUTPUT_DIR=${TEST_EXAMPLES_OUTPUT_DIR}) set(java_custom_env ${custom_env}) set(compare_script ${CMAKE_CURRENT_SOURCE_DIR}/test_diff.sh) endif(CORE_BUILD) @@ -544,7 +546,7 @@ set(environment ${custom_env}) endif(language STREQUAL "java") - list_example_files(${CMAKE_CURRENT_BINARY_DIR} psc ${suffix} output_list) + list_example_files(${TEST_EXAMPLES_OUTPUT_DIR} psc ${suffix} output_list) add_custom_command( OUTPUT ${output_list} COMMAND ${CMAKE_COMMAND} -E echo "Generate ${language} results for psc device" @@ -577,6 +579,7 @@ # a comparison of stdout and PostScript results. add_custom_target(test_diff_psc COMMAND ${compare_command} DEPENDS ${diff_files_LIST} + WORKING_DIRECTORY ${TEST_EXAMPLES_OUTPUT_DIR} ) add_dependencies(test_diff_psc ${diff_targets_LIST}) set(noninteractive_targets_LIST test_diff_psc) @@ -626,7 +629,7 @@ ) endif(ENABLE_DYNDRIVERS) #message("DEBUG:file_device_depends_${device} = ${file_device_depends_${device}}") - list_example_files(${CMAKE_CURRENT_BINARY_DIR} ${device} c output_list) + list_example_files(${TEST_EXAMPLES_OUTPUT_DIR} ${device} c output_list) add_custom_command( OUTPUT ${output_list} COMMAND ${CMAKE_COMMAND} -E echo "Generate C results for ${device} file device" @@ -984,7 +987,15 @@ if(FILE_DEPENDS_${generic_interactive_device}) add_dependencies(test_tclsh_standard_examples test_${generic_interactive_device}_dyndriver) endif(FILE_DEPENDS_${generic_interactive_device}) - list(APPEND interactive_targets_LIST test_tclsh_standard_examples) + if(WIN32_AND_NOT_CYGWIN) + message(STATUS "WARNING: The test_tclsh_standard_examples target can be run independently on + the Windows platform, but for the nondynamic drivers case the exit + command generates a non-zero return code so until this issue is + dealt with this target is excluded from being a dependency of other + more general interactive test targets") + else(WIN32_AND_NOT_CYGWIN) + list(APPEND interactive_targets_LIST test_tclsh_standard_examples) + endif(WIN32_AND_NOT_CYGWIN) endif(BUILD_SHARED_LIBS) endif(ENABLE_tcl AND PLD_${generic_interactive_device}) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-18 21:42:09
|
Revision: 13121 http://sourceforge.net/p/plplot/code/13121 Author: airwin Date: 2014-05-18 21:42:04 +0000 (Sun, 18 May 2014) Log Message: ----------- Distinguish between build command and traditional build command (used exclusively for the traditional build system (Makefile + pkg-config)) where for Windows the only build command that works is the MSYS-based make, (e.g., not the MinGW-based mingw32-make). Adjust default number of parallel builds from 8 to 4. Modified Paths: -------------- trunk/scripts/comprehensive_test.sh Modified: trunk/scripts/comprehensive_test.sh =================================================================== --- trunk/scripts/comprehensive_test.sh 2014-05-15 01:57:06 UTC (rev 13120) +++ trunk/scripts/comprehensive_test.sh 2014-05-18 21:42:04 UTC (rev 13121) @@ -193,21 +193,21 @@ cd "$INSTALL_TREE"/share/plplot[0-9].[0-9]*.[0-9]*/examples output="$OUTPUT_TREE"/traditional_make_noninteractive.out rm -f "$output" - echo "Traditional $build_command test_noninteractive in the installed examples tree" - $build_command test_noninteractive >& "$output" + echo "Traditional $traditional_build_command test_noninteractive in the installed examples tree" + $traditional_build_command test_noninteractive >& "$output" make_rc=$? if [ "$make_rc" -ne 0 ] ; then - echo "ERROR: Traditional $build_command test_noninteractive failed in the installed examples tree" + echo "ERROR: Traditional $traditional_build_command test_noninteractive failed in the installed examples tree" exit 1 fi if [ "$do_clean_as_you_go" = "yes" ] ; then output="$OUTPUT_TREE"/traditional_clean.out rm -f "$output" - echo "Traditional $build_command clean in the installed examples tree (since we are done with it at least for the non-interactive test case)" - $build_command clean >& "$output" + echo "Traditional $traditional_build_command clean in the installed examples tree (since we are done with it at least for the non-interactive test case)" + $traditional_build_command clean >& "$output" make_rc=$? if [ "$make_rc" -ne 0 ] ; then - echo "ERROR: Traditional $build_command clean failed in the installed examples tree" + echo "ERROR: Traditional $traditional_build_command clean failed in the installed examples tree" exit 1 fi fi @@ -283,21 +283,21 @@ cd "$INSTALL_TREE"/share/plplot[0-9].[0-9]*.[0-9]*/examples output="$OUTPUT_TREE"/traditional_make_interactive.out rm -f "$output" - echo "Traditional $build_command test_interactive in the installed examples tree" - $build_command test_interactive >& "$output" + echo "Traditional $traditional_build_command test_interactive in the installed examples tree" + $traditional_build_command test_interactive >& "$output" make_rc=$? if [ "$make_rc" -ne 0 ] ; then - echo "ERROR: Traditional $build_command test_interactive failed in the installed examples tree" + echo "ERROR: Traditional $traditional_build_command test_interactive failed in the installed examples tree" exit 1 fi if [ "$do_clean_as_you_go" = "yes" ] ; then output="$OUTPUT_TREE"/traditional_clean.out rm -f "$output" - echo "Traditional $build_command clean in the installed examples tree (since we are done with it)" - $build_command clean >& "$output" + echo "Traditional $traditional_build_command clean in the installed examples tree (since we are done with it)" + $traditional_build_command clean >& "$output" make_rc=$? if [ "$make_rc" -ne 0 ] ; then - echo "ERROR: Traditional $build_command clean failed in the installed examples tree" + echo "ERROR: Traditional $traditional_build_command clean failed in the installed examples tree" exit 1 fi fi @@ -325,8 +325,8 @@ The next four control how the builds and tests are done. [--generator_string (defaults to 'Unix Makefiles')] - [--ctest_command (defaults to 'ctest -j8')] - [--build_command (defaults to 'make -j8')] + [--ctest_command (defaults to 'ctest -j4')] + [--build_command (defaults to 'make -j4')] The next four control what kind of builds and tests are done. [--cmake_added_options (defaults to none, but can be used to specify any @@ -374,8 +374,8 @@ do_clean_as_you_go=yes generator_string="Unix Makefiles" -ctest_command="ctest -j8" -build_command="make -j8" +ctest_command="ctest -j4" +build_command="make -j4" cmake_added_options= do_shared=yes @@ -546,6 +546,21 @@ exit 1 fi +# The question of what to use for the traditional build command is a +# tricky one that depends on platform. Therefore, we hard code the +# value of this variable rather than allowing the user to change it. +if [ "$generator_string" = "MinGW Makefiles" -o "$generator_string" = "MSYS Makefiles" ] ; then + # For both these cases the MSYS make command should be used rather than + # the MinGW mingw32-make command. But a + # parallel version of the MSYS make command is problematic. + # Therefore, specify no -j option. + traditional_build_command="make" +else + # For all other cases, the traditional build command should be the + # same as the build command. + traditional_build_command="$build_command" +fi + echo "Summary of options used for these tests prefix=$prefix @@ -556,6 +571,7 @@ echo " ctest_command=$ctest_command build_command=$build_command +traditional_build_command=$traditional_build_command cmake_added_options=$cmake_added_options do_shared=$do_shared This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-15 01:57:13
|
Revision: 13120 http://sourceforge.net/p/plplot/code/13120 Author: airwin Date: 2014-05-15 01:57:06 +0000 (Thu, 15 May 2014) Log Message: ----------- Implement additional diagnostic output when pkg-config processing is failing in some way. Modified Paths: -------------- trunk/cmake/modules/cairo.cmake trunk/cmake/modules/pkg-config.cmake Modified: trunk/cmake/modules/cairo.cmake =================================================================== --- trunk/cmake/modules/cairo.cmake 2014-05-14 11:12:17 UTC (rev 13119) +++ trunk/cmake/modules/cairo.cmake 2014-05-15 01:57:06 UTC (rev 13120) @@ -145,7 +145,7 @@ list(APPEND DRIVERS_LINK_FLAGS ${cairo_LINK_FLAGS}) else(linkflags) message("includedir = ${includedir}") - message("libdir = ${libdir}") + message("linkdir = ${linkdir}") message("linkflags = ${linkflags}") message("cflags = ${cflags}") message(STATUS Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2014-05-14 11:12:17 UTC (rev 13119) +++ trunk/cmake/modules/pkg-config.cmake 2014-05-15 01:57:06 UTC (rev 13120) @@ -292,8 +292,10 @@ # If one or more of the libraries cannot be found, then return an # empty ${_link_flags_out} as a sign of that failure. if(NOT _success) + message(STATUS "cmake_link_flags WARNING: (original link flags) = ${_link_flags_in}") + message(STATUS "cmake_link_flags WARNING: ${_link_flags_out} = ${${_link_flags_out}}") + message(STATUS "cmake_link_flags WARNING: ${_link_flags_out} is invalid so it is set to nothing to signal the failure of cmake_link_flags for the original link flags printed out above.") set(${_link_flags_out}) endif(NOT _success) endif("${_link_flags_in}" STREQUAL "") endmacro(cmake_link_flags) - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-14 11:12:20
|
Revision: 13119 http://sourceforge.net/p/plplot/code/13119 Author: airwin Date: 2014-05-14 11:12:17 +0000 (Wed, 14 May 2014) Log Message: ----------- Help cmake find the correct version of the system gdi library that is a prerequisite of cairo on Windows. Modified Paths: -------------- trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain Modified: trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain =================================================================== --- trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain 2014-05-14 10:47:48 UTC (rev 13118) +++ trunk/cmake/epa_build/setup/setup_mingw_msys_wine_toolchain 2014-05-14 11:12:17 UTC (rev 13119) @@ -36,9 +36,11 @@ # N.B. $MINGW_PREFIX/msys/1.0/include is equivalent to /usr/include on bash. export CMAKE_INCLUDE_PATH=$MINGW_PREFIX/msys/1.0/include:$MINGW_PREFIX/include:$MINGW_PREFIX/lib/gcc/mingw32/$MINGW_VERSION/include:/z/home/wine/wine_build/install-$WINEVERSION/include/wine/msvcrt:/z/home/wine/wine_build/install-$WINEVERSION/include/wine/windows -# For MinGW on Wine, no help is required to find mingw, msys, or wine libraries -# because the appropriate dll's are on the PATH. -export CMAKE_LIBRARY_PATH= +# For MinGW on Wine, normally no help is required to find mingw, msys, +# or wine libraries because the appropriate dll's are on the PATH. +# However, gdi is an exception where for some reason the Wine version +# is not the appropriate format so use the MinGW version instead. +export CMAKE_LIBRARY_PATH=$MINGW_PREFIX/lib # Help CMake find Python headers and library. CMAKE_INCLUDE_PATH=$PYTHON_PATH/include:$CMAKE_INCLUDE_PATH This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-14 10:47:51
|
Revision: 13118 http://sourceforge.net/p/plplot/code/13118 Author: airwin Date: 2014-05-14 10:47:48 +0000 (Wed, 14 May 2014) Log Message: ----------- Use -DTEST_DYNDRIVERS=OFF option for Windows case to work around the issue where the simple test of dynamic loading works (i.e., it gives the correct result) but for some strange reason has a non-zero return code while the virtually identical PLplot dynamic loading works without the non-zero return code. Modified Paths: -------------- trunk/cmake/epa_build/plplot/CMakeLists.txt trunk/cmake/epa_build/plplot_lite/CMakeLists.txt Modified: trunk/cmake/epa_build/plplot/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/plplot/CMakeLists.txt 2014-05-14 10:44:26 UTC (rev 13117) +++ trunk/cmake/epa_build/plplot/CMakeLists.txt 2014-05-14 10:47:48 UTC (rev 13118) @@ -89,6 +89,12 @@ #-DDEFAULT_NO_CAIRO_DEVICES:BOOL=ON -DDEFAULT_NO_QT_DEVICES:BOOL=ON -DENABLE_qt=OFF + # Also turn off simple testing of dynamically loaded devices + # because on Windows sometimes the simple test fails (in the + # sense of giving the correct result while generating a + # non-zero return code for unknown reasons) but the + # actual dynload done by the PLplot library succeeds for some reason. + -DTEST_DYNDRIVERS=OFF ) endif(MSYS_PLATFORM) Modified: trunk/cmake/epa_build/plplot_lite/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/plplot_lite/CMakeLists.txt 2014-05-14 10:44:26 UTC (rev 13117) +++ trunk/cmake/epa_build/plplot_lite/CMakeLists.txt 2014-05-14 10:47:48 UTC (rev 13118) @@ -70,6 +70,12 @@ -DDEFAULT_NO_CAIRO_DEVICES:BOOL=ON -DDEFAULT_NO_QT_DEVICES:BOOL=ON -DENABLE_qt=OFF + # Also turn off simple testing of dynamically loaded devices + # because on Windows sometimes the simple test fails (in the + # sense of giving the correct result while generating a + # non-zero return code for unknown reasons) but the + # actual dynload done by the PLplot library succeeds for some reason. + -DTEST_DYNDRIVERS=OFF ) # Assumption that the top-level local PLplot source tree is two directories This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-14 10:44:31
|
Revision: 13117 http://sourceforge.net/p/plplot/code/13117 Author: airwin Date: 2014-05-14 10:44:26 +0000 (Wed, 14 May 2014) Log Message: ----------- Judiciously sprinkle the "env" command around so that bash scripts are recognized properly for the "MinGW Makefiles" case. Modified Paths: -------------- trunk/examples/CMakeLists.txt Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2014-05-14 05:45:44 UTC (rev 13116) +++ trunk/examples/CMakeLists.txt 2014-05-14 10:44:26 UTC (rev 13117) @@ -945,7 +945,7 @@ if(ENABLE_tcl AND PLD_${generic_interactive_device}) add_custom_target(test_pltcl_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/pltcl_standard_examples -dev ${generic_interactive_device} -np + COMMAND env ${CMAKE_CURRENT_BINARY_DIR}/tcl/pltcl_standard_examples -dev ${generic_interactive_device} -np DEPENDS ${${generic_interactive_device}_target} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl ) @@ -971,7 +971,7 @@ # tests that use "package require Pltcl" only work if # BUILD_SHARED_LIBS is true. add_custom_target(test_tclsh_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tcl/tclsh_standard_examples + COMMAND env ${CMAKE_CURRENT_BINARY_DIR}/tcl/tclsh_standard_examples DEPENDS ${${generic_interactive_device}_target} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tcl ) @@ -1046,7 +1046,7 @@ list(APPEND targets_examples_tk test_tk_plgrid) add_custom_target(test_plserver_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/plserver_standard_examples + COMMAND env ${CMAKE_CURRENT_BINARY_DIR}/tk/plserver_standard_examples DEPENDS ${xwin_target} WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk ) @@ -1067,7 +1067,7 @@ # tests that use "package require Pltk" only work if # BUILD_SHARED_LIBS is true. add_custom_target(test_wish_standard_examples - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples + COMMAND env ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_standard_examples WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk ) add_dependencies(test_wish_standard_examples @@ -1139,7 +1139,7 @@ endif(USE_INCRTCL_VERSION_4) add_custom_target(test_plserver_runAllDemos - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/plserver_runAllDemos + COMMAND env ${CMAKE_CURRENT_BINARY_DIR}/tk/plserver_runAllDemos WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk ) add_dependencies(test_plserver_runAllDemos @@ -1160,7 +1160,7 @@ # tests that use "package require Plplotter" only work if # BUILD_SHARED_LIBS is true. add_custom_target(test_wish_runAllDemos - COMMAND ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_runAllDemos + COMMAND env ${CMAKE_CURRENT_BINARY_DIR}/tk/wish_runAllDemos WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/tk ) add_dependencies(test_wish_runAllDemos This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-14 05:45:47
|
Revision: 13116 http://sourceforge.net/p/plplot/code/13116 Author: airwin Date: 2014-05-14 05:45:44 +0000 (Wed, 14 May 2014) Log Message: ----------- As a trial possibility we use a binary downloaded version of gtk+ on Windows. Tested for the "MinGW Makefiles" generator on Wine-1.6.1. cmake apparently configured the cairo devices without issues so that is a step forward for Walt Brainerd where this was a showstopper. However, at least on Wine, the gdi.dll library causes issues at "make install" time with the message c:\windows\system32\gdi32.dll: file not recognized: File format not recognized So this trial is a work in progress. Modified Paths: -------------- trunk/cmake/epa_build/plplot/CMakeLists.txt trunk/cmake/epa_build/setup/setup_mingw_makefiles trunk/cmake/epa_build/setup/setup_msys_makefiles Modified: trunk/cmake/epa_build/plplot/CMakeLists.txt =================================================================== --- trunk/cmake/epa_build/plplot/CMakeLists.txt 2014-05-14 05:36:26 UTC (rev 13115) +++ trunk/cmake/epa_build/plplot/CMakeLists.txt 2014-05-14 05:45:44 UTC (rev 13116) @@ -84,7 +84,9 @@ # until the pango and qt5_lite packages and all their dependencies # build properly on that platform list(APPEND cmake_args - -DDEFAULT_NO_CAIRO_DEVICES:BOOL=ON + # Except as a trial possibility we use a binary downloaded version + # of gtk+ on Windows. + #-DDEFAULT_NO_CAIRO_DEVICES:BOOL=ON -DDEFAULT_NO_QT_DEVICES:BOOL=ON -DENABLE_qt=OFF ) Modified: trunk/cmake/epa_build/setup/setup_mingw_makefiles =================================================================== --- trunk/cmake/epa_build/setup/setup_mingw_makefiles 2014-05-14 05:36:26 UTC (rev 13115) +++ trunk/cmake/epa_build/setup/setup_mingw_makefiles 2014-05-14 05:45:44 UTC (rev 13116) @@ -5,7 +5,7 @@ source setup_mingw_msys_wine_toolchain # Tailor this install location for "MinGW Makefiles" builds to your local needs: -export INSTALL_PREFIX=/z/home/wine/newstart/build_script/install-$WINEVERSION_mingw +export INSTALL_PREFIX=/z/home/wine/newstart/build_script/install-${WINEVERSION}_mingw # End of tailored values. @@ -40,4 +40,11 @@ # view) PATH processing. So make sure sh.exe is not on the PATH. PATH=$MINGW_PREFIX/msys/1.0/bin_without_sh/:$PATH +# Temporary until epa_build of pango and its dependencies works on either +# MinGW or MinGW/MSYS +# N.B. put all PATH additions at the bottom so the epa_build versions prevail +# (such as pkg-config) if they are available. +PATH=$PATH:/z/home/wine/gtkplus/3.6.4/bin +PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/z/home/wine/gtkplus/3.6.4/lib/pkgconfig + export GENERATOR_STRING="MinGW Makefiles" Modified: trunk/cmake/epa_build/setup/setup_msys_makefiles =================================================================== --- trunk/cmake/epa_build/setup/setup_msys_makefiles 2014-05-14 05:36:26 UTC (rev 13115) +++ trunk/cmake/epa_build/setup/setup_msys_makefiles 2014-05-14 05:45:44 UTC (rev 13116) @@ -37,4 +37,11 @@ # Put MSYS at the top of the PATH PATH=$MINGW_PREFIX/msys/1.0/bin/:$PATH +# Temporary until epa_build of pango and its dependencies works on either +# MinGW or MinGW/MSYS +# N.B. put all PATH additions at the bottom so the epa_build versions prevail +# (such as pkg-config) if they are available. +PATH=$PATH:/z/home/wine/gtkplus/3.6.4/bin +PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/z/home/wine/gtkplus/3.6.4/lib/pkgconfig + export GENERATOR_STRING="MSYS Makefiles" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <ai...@us...> - 2014-05-14 05:36:28
|
Revision: 13115 http://sourceforge.net/p/plplot/code/13115 Author: airwin Date: 2014-05-14 05:36:26 +0000 (Wed, 14 May 2014) Log Message: ----------- Work around GTK+ pgk-config configuration issue where -lm is included in library flags for the Windows case when that math library does not separately exist on that platform. Modified Paths: -------------- trunk/cmake/modules/pkg-config.cmake trunk/cmake/modules/plplot.cmake Modified: trunk/cmake/modules/pkg-config.cmake =================================================================== --- trunk/cmake/modules/pkg-config.cmake 2014-04-30 08:10:03 UTC (rev 13114) +++ trunk/cmake/modules/pkg-config.cmake 2014-05-14 05:36:26 UTC (rev 13115) @@ -222,6 +222,16 @@ # (such as "-framework whatever") so preserve those by splitting into # separate list elements only if the next element starts with a hyphen. string(REGEX REPLACE " -" ";-" _link_flags_list "${_link_flags_in}") + if(NOT MATH_LIB) + # On systems (normally Windows) where MATH_LIB is not defined + # filter out -lm from link flags. This works around a pkg-config + # configuration bug on Windows for the GTK+ stack of libraries where + # -lm is supplied as a required library flag when that library does + # not exist on Windows platforms. + list(REMOVE_ITEM _link_flags_list "-lm") + endif(NOT MATH_LIB) + #message("_link_flags_list = ${_link_flags_list}") + # Extract list of directories from -L options. list(LENGTH _link_flags_list _link_flags_length) math(EXPR _link_flags_length "${_link_flags_length} - 1") @@ -236,11 +246,10 @@ endif(_list_element STREQUAL "-L${_list_element1}") endforeach(_list_index RANGE ${_link_flags_length}) #message("_index_list = ${_index_list}") - if("${_index_list}" STREQUAL "") - else("${_index_list}" STREQUAL "") + if(NOT "${_index_list}" STREQUAL "") # Remove -L options from list. list(REMOVE_AT _link_flags_list ${_index_list}) - endif("${_index_list}" STREQUAL "") + endif(NOT "${_index_list}" STREQUAL "") #message("_link_directory_list = ${_link_directory_list}") #message("_link_flags_list (without -L options) = ${_link_flags_list}") Modified: trunk/cmake/modules/plplot.cmake =================================================================== --- trunk/cmake/modules/plplot.cmake 2014-04-30 08:10:03 UTC (rev 13114) +++ trunk/cmake/modules/plplot.cmake 2014-05-14 05:36:26 UTC (rev 13115) @@ -398,8 +398,21 @@ check_perl_modules(PERL_XML_PARSER XML::Parser) check_perl_modules(PERL_XML_DOM XML::DOM) endif(PERL_FOUND) - + # ======================================================================= +# MATH_LIB must be defined (or not) before pkg-config. +# ======================================================================= + +# On windows systems the math library is not separated so do not specify +# it unless you are on a non-windows system. +if(NOT WIN32_OR_CYGWIN) + find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib) + if(NOT MATH_LIB) + message(FATAL_ERROR "Cannot find required math library") + endif(NOT MATH_LIB) +endif(NOT WIN32_OR_CYGWIN) + +# ======================================================================= # pkg-config support as well as macros to put link flags in standard # *.pc (pkg-config) form as well as standard fullpath form used by cmake. # ======================================================================= @@ -521,14 +534,6 @@ # Support for shapelib library for reading shapefile map data include(shapelib) include(freetype) -# On windows systems the math library is not separated so do not specify -# it unless you are on a non-windows system. -if(NOT WIN32_OR_CYGWIN) - find_library(MATH_LIB NAMES m PATHS /usr/local/lib /usr/lib) - if(NOT MATH_LIB) - message(FATAL_ERROR "Cannot find required math library") - endif(NOT MATH_LIB) -endif(NOT WIN32_OR_CYGWIN) # csiro must come after MATH_LIB is defined (or not). # csiro must come after c++ and fortran because of use of filter_rpath include(csiro) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <arj...@us...> - 2014-04-30 08:10:07
|
Revision: 13114 http://sourceforge.net/p/plplot/code/13114 Author: arjenmarkus Date: 2014-04-30 08:10:03 +0000 (Wed, 30 Apr 2014) Log Message: ----------- Make sure messages about the wincairo device are only printed if this device is considered at all. This to prevent confusion - if you do not want the device (or the driver in general), there should be no message. Modified Paths: -------------- trunk/cmake/modules/cairo.cmake Modified: trunk/cmake/modules/cairo.cmake =================================================================== --- trunk/cmake/modules/cairo.cmake 2014-04-29 18:18:45 UTC (rev 13113) +++ trunk/cmake/modules/cairo.cmake 2014-04-30 08:10:03 UTC (rev 13114) @@ -24,23 +24,23 @@ # # PLD_extcairo - ON means the extcairo device is enabled. # PLD_memcairo - ON means the memcairo device is enabled. -# PLD_pdfcairo - ON means the pdfcairo device is enabled. -# PLD_pngcairo - ON means the pngcairo device is enabled. -# PLD_pscairo - ON means the pscairo device is enabled. -# PLD_epscairo - ON means the epscairo device is enabled. -# PLD_svgcairo - ON means the svgcairo device is enabled. -# PLD_xcairo - ON means the xcairo device is enabled. +# PLD_pdfcairo - ON means the pdfcairo device is enabled. +# PLD_pngcairo - ON means the pngcairo device is enabled. +# PLD_pscairo - ON means the pscairo device is enabled. +# PLD_epscairo - ON means the epscairo device is enabled. +# PLD_svgcairo - ON means the svgcairo device is enabled. +# PLD_xcairo - ON means the xcairo device is enabled. # PLD_wincairo - ON means the wincairo device is enabled. -# cairo_COMPILE_FLAGS - Blank-delimited COMPILE_FLAGS required to -# compile cairo device drivers. -# cairo_LINK_FLAGS - list of full path names of libraries and -# linker flags for dynamic cairo device driver. -# cairo_RPATH - RPATH directory list for cairo device driver. -# current assumption is the list only has one -# element corresponding to the pkg-config libdir -# variable for pangocairo. -# DRIVERS_LINK_FLAGS - list of device LINK_FLAGS for case -# when ENABLE_DYNDRIVERS OFF. +# cairo_COMPILE_FLAGS - Blank-delimited COMPILE_FLAGS required to +# compile cairo device drivers. +# cairo_LINK_FLAGS - list of full path names of libraries and +# linker flags for dynamic cairo device driver. +# cairo_RPATH - RPATH directory list for cairo device driver. +# current assumption is the list only has one +# element corresponding to the pkg-config libdir +# variable for pangocairo. +# DRIVERS_LINK_FLAGS - list of device LINK_FLAGS for case +# when ENABLE_DYNDRIVERS OFF. # Include file searches use FindPath. To add extra search directories # set the environment variable CMAKE_INCLUDE_PATH. @@ -125,13 +125,13 @@ if(PLD_xcairo AND X11_COMPILE_FLAGS) # Blank-delimited required. string(REGEX REPLACE ";" " " - cairo_COMPILE_FLAGS "${cflags} ${X11_COMPILE_FLAGS}" - ) + cairo_COMPILE_FLAGS "${cflags} ${X11_COMPILE_FLAGS}" + ) set(cairo_LINK_FLAGS ${linkflags} ${X11_LIBRARIES}) else(PLD_xcairo AND X11_COMPILE_FLAGS) message(STATUS - "WARNING: X windows not found. Setting xcairo driver to OFF." - ) + "WARNING: X windows not found. Setting xcairo driver to OFF." + ) # Blank-delimited required. set(PLD_xcairo OFF CACHE BOOL "Enable xcairo device" FORCE) # now deal with remaining cairo devices. @@ -184,16 +184,18 @@ set(extcairo_true "#") endif(NOT PLD_extcairo) -if(NOT WIN32_OR_CYGWIN) - message(STATUS - "Not a Windows platform so setting wincairo driver to OFF." - ) - set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE) -else(NOT WIN32_OR_CYGWIN) - if(CYGWIN) +if(PLD_wincairo) + if(NOT WIN32_OR_CYGWIN) message(STATUS - "Cygwin does not currently provide support for the wincairo driver - turning this OFF." + "Not a Windows platform so setting wincairo driver to OFF." ) set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE) - endif(CYGWIN) -endif(NOT WIN32_OR_CYGWIN) + else(NOT WIN32_OR_CYGWIN) + if(CYGWIN) + message(STATUS + "Cygwin does not currently provide support for the wincairo driver - turning this OFF." + ) + set(PLD_wincairo OFF CACHE BOOL "Enable wincairo device" FORCE) + endif(CYGWIN) + endif(NOT WIN32_OR_CYGWIN) +endif(PLD_wincairo) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |