From f53549ca65c5124eca819856a4ab9ee2e1f544a4 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 8 Aug 2012 10:19:16 -0700 Subject: [PATCH 01/75] add empty geom test --- tests/python_tests/postgis_test.py | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/tests/python_tests/postgis_test.py b/tests/python_tests/postgis_test.py index 24570409b..4f70fc6ae 100644 --- a/tests/python_tests/postgis_test.py +++ b/tests/python_tests/postgis_test.py @@ -111,7 +111,7 @@ INSERT INTO test5(non_id, manual_id, geom) values (0, -1, GeomFromEWKT('SRID=432 INSERT INTO test5(non_id, manual_id, geom) values (0, 1, GeomFromEWKT('SRID=4326;POINT(0 0)')); """ -insert_table_6 = ''' +insert_table_5b = ''' CREATE TABLE "tableWithMixedCase"(gid serial PRIMARY KEY, geom geometry); INSERT INTO "tableWithMixedCase"(geom) values (ST_MakePoint(0,0)); INSERT INTO "tableWithMixedCase"(geom) values (ST_MakePoint(0,1)); @@ -119,11 +119,17 @@ INSERT INTO "tableWithMixedCase"(geom) values (ST_MakePoint(1,0)); INSERT INTO "tableWithMixedCase"(geom) values (ST_MakePoint(1,1)); ''' -insert_table_7 = ''' +insert_table_6 = ''' CREATE TABLE test6(first_id int4, second_id int4,PRIMARY KEY (first_id,second_id), geom geometry); INSERT INTO test6(first_id, second_id, geom) values (0, 0, GeomFromEWKT('SRID=4326;POINT(0 0)')); ''' +insert_table_7 = ''' +CREATE TABLE test7(gid serial PRIMARY KEY, geom geometry); +INSERT INTO test7(gid, geom) values (1, GeomFromEWKT('SRID=4326;GEOMETRYCOLLECTION(MULTILINESTRING((10 10,20 20,10 40),(40 40,30 30,40 20,30 10)),LINESTRING EMPTY)')); +''' + + def postgis_setup(): call('dropdb %s' % MAPNIK_TEST_DBNAME,silent=True) call('createdb -T %s %s' % (POSTGIS_TEMPLATE_DBNAME,MAPNIK_TEST_DBNAME),silent=False) @@ -134,7 +140,8 @@ def postgis_setup(): call('''psql -q %s -c "%s"''' % (MAPNIK_TEST_DBNAME,insert_table_3),silent=False) call('''psql -q %s -c "%s"''' % (MAPNIK_TEST_DBNAME,insert_table_4),silent=False) call('''psql -q %s -c "%s"''' % (MAPNIK_TEST_DBNAME,insert_table_5),silent=False) - call("""psql -q %s -c '%s'""" % (MAPNIK_TEST_DBNAME,insert_table_6),silent=False) + call("""psql -q %s -c '%s'""" % (MAPNIK_TEST_DBNAME,insert_table_5b),silent=False) + call('''psql -q %s -c "%s"''' % (MAPNIK_TEST_DBNAME,insert_table_6),silent=False) call('''psql -q %s -c "%s"''' % (MAPNIK_TEST_DBNAME,insert_table_7),silent=False) def postgis_takedown(): @@ -438,6 +445,12 @@ if 'postgis' in mapnik.DatasourceCache.instance().plugin_names() \ eq_(fs.next().id(),4) eq_(fs.next(),None) + def test_empty_geom(): + ds = mapnik.PostGIS(dbname=MAPNIK_TEST_DBNAME,table='test7', + geometry_field='geom') + fs = ds.featureset() + eq_(fs.next()['gid'],1) + atexit.register(postgis_takedown) if __name__ == "__main__": From bee09477a805dea7ef19b17e1b011cbb2e58404e Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 14 Aug 2012 17:14:30 +0100 Subject: [PATCH 02/75] + cairo : fix shield scaling --- src/cairo_renderer.cpp | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index cfe8f174c..398e095f6 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -1162,7 +1162,9 @@ void cairo_renderer_base::render_marker(pixel_position const& pos, marker const& } else if (marker.is_bitmap()) { - context.add_image(pos.x, pos.y, **marker.get_bitmap_data(), opacity); + agg::trans_affine matrix = tr; + matrix *= agg::trans_affine_translation(pos.x, pos.y); + context.add_image(matrix, **marker.get_bitmap_data(), opacity); } } @@ -1239,9 +1241,17 @@ void cairo_renderer_base::process(shield_symbolizer const& sym, for (unsigned int ii = 0; ii < placements.size(); ++ii) { pixel_position marker_pos = helper.get_marker_position(placements[ii]); + double dx = 0.5 * helper.get_marker_width(); + double dy = 0.5 * helper.get_marker_height(); + agg::trans_affine marker_tr = agg::trans_affine_translation(-dx,-dy); + marker_tr *= agg::trans_affine_scaling(scale_factor_); + marker_tr *= agg::trans_affine_translation(dx,dy); + marker_tr *= helper.get_image_transform(); render_marker(marker_pos, - helper.get_marker(), helper.get_image_transform(), + helper.get_marker(), + marker_tr, sym.get_opacity()); + context.add_text(placements[ii], face_manager_, font_manager_, scale_factor_); } } From fbf9ac839992c611f307db6f8aececdfb521ca2a Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Aug 2012 10:43:46 -0700 Subject: [PATCH 03/75] support new clipping extent padding method in cairo line_symbolizer rendering as per #1282 - partial revert of 76569cccb8c1cfc --- src/cairo_renderer.cpp | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index cfe8f174c..6b2c4ffad 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -987,6 +987,9 @@ void cairo_renderer_base::process(line_symbolizer const& sym, mapnik::feature_impl & feature, proj_transform const& prj_trans) { + typedef boost::mpl::vector conv_types; cairo_context context(context_); mapnik::stroke const& stroke_ = sym.get_stroke(); context.set_operator(sym.comp_op()); @@ -1004,21 +1007,26 @@ void cairo_renderer_base::process(line_symbolizer const& sym, agg::trans_affine tr; evaluate_transform(tr, feature, sym.get_transform()); - box2d ext = query_extent_ * 1.1; - typedef boost::mpl::vector conv_types; + box2d clipping_extent = query_extent_; + if (sym.clip()) + { + double padding = (double)(query_extent_.width()/width_); + float half_stroke = stroke_.get_width()/2.0; + if (half_stroke > 1) + padding *= half_stroke; + if (fabs(sym.offset()) > 0) + padding *= fabs(sym.offset()) * 1.2; + double x0 = query_extent_.minx(); + double y0 = query_extent_.miny(); + double x1 = query_extent_.maxx(); + double y1 = query_extent_.maxy(); + clipping_extent.init(x0 - padding, y0 - padding, x1 + padding , y1 + padding); + } vertex_converter, cairo_context, line_symbolizer, CoordTransform, proj_transform, agg::trans_affine, conv_types> - converter(ext,context,sym,t_,prj_trans,tr,scale_factor_); + converter(clipping_extent,context,sym,t_,prj_trans,tr,scale_factor_); - if (sym.clip() && feature.paths().size() > 0) // optional clip (default: true) - { - eGeomType type = feature.paths()[0].type(); - if (type == Polygon) - converter.set(); - else if (type == LineString) - converter.set(); - // don't clip if type==Point - } + if (sym.clip()) converter.set(); // optional clip (default: true) converter.set(); // always transform if (fabs(sym.offset()) > 0.0) converter.set(); // parallel offset converter.set(); // optional affine transform From 8d14ac7e009198d92952e3938c821fd352f71306 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 14 Aug 2012 19:57:28 +0100 Subject: [PATCH 04/75] + use comma and space as delimiters --- include/mapnik/image_filter_parser.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/mapnik/image_filter_parser.hpp b/include/mapnik/image_filter_parser.hpp index 91d4d6969..d860d0e61 100644 --- a/include/mapnik/image_filter_parser.hpp +++ b/include/mapnik/image_filter_parser.hpp @@ -52,7 +52,7 @@ struct image_filter_grammar : #if BOOST_VERSION >= 104700 using qi::no_skip; - start = -(filter % no_skip[*char_("; ")]) + start = -(filter % no_skip[*char_(", ")]) ; #else start = -(filter) From 34ce6634600833749bfbb4f94362a2785e7cb65d Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 14 Aug 2012 20:03:49 +0100 Subject: [PATCH 05/75] + change agg-stack-filter grammar to expect fun(a,b) notation --- include/mapnik/image_filter_parser.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/mapnik/image_filter_parser.hpp b/include/mapnik/image_filter_parser.hpp index d860d0e61..ca7ba5d84 100644 --- a/include/mapnik/image_filter_parser.hpp +++ b/include/mapnik/image_filter_parser.hpp @@ -77,9 +77,10 @@ struct image_filter_grammar : lit("y-gradient")[push_back(_val,construct())] | (lit("agg-stack-blur")[_a = 1, _b = 1] - >> -( lit(':') >> radius_[_a = _1] + >> -( lit('(') >> radius_[_a = _1] >> lit(',') - >> radius_[_b = _1]) + >> radius_[_b = _1] + >> lit(')')) [push_back(_val,construct(_a,_b))]) | lit("invert")[push_back(_val,construct())] From 3d048c5f726873581c4ea53b59500780a7dc90d9 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Aug 2012 12:19:56 -0700 Subject: [PATCH 06/75] add ticket reference for workaround added in 60d843a7a8e0 --- bindings/python/mapnik_markers_symbolizer.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/bindings/python/mapnik_markers_symbolizer.cpp b/bindings/python/mapnik_markers_symbolizer.cpp index 9eefef2d7..132c2b0d6 100644 --- a/bindings/python/mapnik_markers_symbolizer.cpp +++ b/bindings/python/mapnik_markers_symbolizer.cpp @@ -86,6 +86,7 @@ struct markers_symbolizer_pickle_suite : boost::python::pickle_suite }; +// https://github.com/mapnik/mapnik/issues/1367 PyObject* get_fill_opacity_impl(markers_symbolizer & sym) { boost::optional fill_opacity = sym.get_fill_opacity(); From 7a5f06656c68f283cd2f39d073e4a3819060e6be Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Aug 2012 17:11:08 -0700 Subject: [PATCH 07/75] allow setting marker width/height together with transform --- include/mapnik/grid/grid_marker_helpers.hpp | 279 ++++++++++++++++++++ include/mapnik/marker_helpers.hpp | 6 +- src/agg/process_markers_symbolizer.cpp | 9 +- src/cairo_renderer.cpp | 3 +- src/grid/process_markers_symbolizer.cpp | 3 +- 5 files changed, 289 insertions(+), 11 deletions(-) create mode 100644 include/mapnik/grid/grid_marker_helpers.hpp diff --git a/include/mapnik/grid/grid_marker_helpers.hpp b/include/mapnik/grid/grid_marker_helpers.hpp new file mode 100644 index 000000000..4316f2777 --- /dev/null +++ b/include/mapnik/grid/grid_marker_helpers.hpp @@ -0,0 +1,279 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2012 Artem Pavlenko + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#ifndef MAPNIK_GRID_MARKER_HELPERS_HPP +#define MAPNIK_GRID_MARKER_HELPERS_HPP + +// mapnik +#include +#include + +// agg +#include "agg_renderer_scanline.h" +#include "agg_scanline_bin.h" +#include "agg_image_filters.h" +#include "agg_trans_bilinear.h" +#include "agg_span_allocator.h" +#include "agg_image_accessors.h" +#include "agg_span_image_filter_gray.h" + + +namespace mapnik { + +template +struct raster_markers_rasterizer_dispatch_grid +{ + typedef mapnik::gray32 color_type; + typedef typename RendererBase::pixfmt_type pixfmt_type; + + raster_markers_rasterizer_dispatch_grid(BufferType & render_buffer, + Rasterizer & ras, + image_data_32 const& src, + agg::trans_affine const& marker_trans, + markers_symbolizer const& sym, + Detector & detector, + double scale_factor, + mapnik::feature_impl & feature, + PixMapType & pixmap) + : buf_(render_buffer), + pixf_(buf_), + renb_(pixf_), + ras_(ras), + src_(src), + marker_trans_(marker_trans), + sym_(sym), + detector_(detector), + scale_factor_(scale_factor), + feature_(feature), + pixmap_(pixmap), + placed_(false) + { + // TODO - support basic binary operators + //pixf_.comp_op(static_cast(sym_.comp_op())); + } + + template + void add_path(T & path) + { + marker_placement_e placement_method = sym_.get_marker_placement(); + box2d bbox_(0,0, src_.width(),src_.height()); + if (placement_method != MARKER_LINE_PLACEMENT) + { + double x,y; + path.rewind(0); + if (placement_method == MARKER_INTERIOR_PLACEMENT) + { + label::interior_position(path, x, y); + } + else + { + label::centroid(path, x, y); + } + agg::trans_affine matrix = marker_trans_; + matrix.translate(x,y); + box2d transformed_bbox = bbox_ * matrix; + if (sym_.get_allow_overlap() || + detector_.has_placement(transformed_bbox)) + { + render_raster_marker(matrix); + if (!sym_.get_ignore_placement()) + { + detector_.insert(transformed_bbox); + } + if (!placed_) + { + pixmap_.add_feature(feature_); + placed_ = true; + } + } + } + else + { + markers_placement placement(path, bbox_, marker_trans_, detector_, + sym_.get_spacing() * scale_factor_, + sym_.get_max_error(), + sym_.get_allow_overlap()); + double x, y, angle; + while (placement.get_point(x, y, angle)) + { + agg::trans_affine matrix = marker_trans_; + matrix.rotate(angle); + matrix.translate(x, y); + render_raster_marker(matrix); + if (!placed_) + { + pixmap_.add_feature(feature_); + placed_ = true; + } + } + } + } + + void render_raster_marker(agg::trans_affine const& marker_tr) + { + double width = src_.width(); + double height = src_.height(); + double p[8]; + p[0] = 0; p[1] = 0; + p[2] = width; p[3] = 0; + p[4] = width; p[5] = height; + p[6] = 0; p[7] = height; + marker_tr.transform(&p[0], &p[1]); + marker_tr.transform(&p[2], &p[3]); + marker_tr.transform(&p[4], &p[5]); + marker_tr.transform(&p[6], &p[7]); + ras_.move_to_d(p[0],p[1]); + ras_.line_to_d(p[2],p[3]); + ras_.line_to_d(p[4],p[5]); + ras_.line_to_d(p[6],p[7]); + RendererType ren(renb_); + ren.color(mapnik::gray32(feature_.id())); + agg::render_scanlines(ras_, sl_, ren); + } + +private: + agg::scanline_bin sl_; + BufferType & buf_; + PixFmt pixf_; + RendererBase renb_; + Rasterizer & ras_; + image_data_32 const& src_; + agg::trans_affine const& marker_trans_; + markers_symbolizer const& sym_; + Detector & detector_; + double scale_factor_; + mapnik::feature_impl & feature_; + PixMapType & pixmap_; + bool placed_; +}; + + +template +struct vector_markers_rasterizer_dispatch_grid +{ + typedef typename SvgRenderer::renderer_base renderer_base; + typedef typename renderer_base::pixfmt_type pixfmt_type; + + vector_markers_rasterizer_dispatch_grid(BufferType & render_buffer, + SvgRenderer & svg_renderer, + Rasterizer & ras, + box2d const& bbox, + agg::trans_affine const& marker_trans, + markers_symbolizer const& sym, + Detector & detector, + double scale_factor, + mapnik::feature_impl & feature, + PixMapType & pixmap) + : buf_(render_buffer), + pixf_(buf_), + renb_(pixf_), + svg_renderer_(svg_renderer), + ras_(ras), + bbox_(bbox), + marker_trans_(marker_trans), + sym_(sym), + detector_(detector), + scale_factor_(scale_factor), + feature_(feature), + pixmap_(pixmap), + placed_(false) + { + // TODO + //pixf_.comp_op(static_cast(sym_.comp_op())); + } + + template + void add_path(T & path) + { + marker_placement_e placement_method = sym_.get_marker_placement(); + if (placement_method != MARKER_LINE_PLACEMENT) + { + double x,y; + path.rewind(0); + if (placement_method == MARKER_INTERIOR_PLACEMENT) + { + label::interior_position(path, x, y); + } + else + { + label::centroid(path, x, y); + } + agg::trans_affine matrix = marker_trans_; + matrix.translate(x,y); + box2d transformed_bbox = bbox_ * matrix; + if (sym_.get_allow_overlap() || + detector_.has_placement(transformed_bbox)) + { + svg_renderer_.render_id(ras_, sl_, renb_, feature_.id(), matrix, sym_.get_opacity(), bbox_); + if (!sym_.get_ignore_placement()) + { + detector_.insert(transformed_bbox); + } + if (!placed_) + { + pixmap_.add_feature(feature_); + placed_ = true; + } + } + } + else + { + markers_placement placement(path, bbox_, marker_trans_, detector_, + sym_.get_spacing() * scale_factor_, + sym_.get_max_error(), + sym_.get_allow_overlap()); + double x, y, angle; + while (placement.get_point(x, y, angle)) + { + agg::trans_affine matrix = marker_trans_; + matrix.rotate(angle); + matrix.translate(x, y); + svg_renderer_.render_id(ras_, sl_, renb_, feature_.id(), matrix, sym_.get_opacity(), bbox_); + if (!placed_) + { + pixmap_.add_feature(feature_); + placed_ = true; + } + } + } + } +private: + agg::scanline_bin sl_; + BufferType & buf_; + pixfmt_type pixf_; + renderer_base renb_; + SvgRenderer & svg_renderer_; + Rasterizer & ras_; + box2d const& bbox_; + agg::trans_affine const& marker_trans_; + markers_symbolizer const& sym_; + Detector & detector_; + double scale_factor_; + mapnik::feature_impl & feature_; + PixMapType & pixmap_; + bool placed_; +}; + + +} +#endif + diff --git a/include/mapnik/marker_helpers.hpp b/include/mapnik/marker_helpers.hpp index 439bd8c43..2b90d3579 100644 --- a/include/mapnik/marker_helpers.hpp +++ b/include/mapnik/marker_helpers.hpp @@ -359,7 +359,7 @@ bool push_explicit_style(Attr const& src, Attr & dst, markers_symbolizer const& } template -void setup_label_transform(agg::trans_affine & tr, box2d const& bbox, mapnik::feature_impl const& feature, T const& sym) +void setup_transform_scaling(agg::trans_affine & tr, box2d const& bbox, mapnik::feature_impl const& feature, T const& sym) { double width = 0; double height = 0; @@ -388,10 +388,6 @@ void setup_label_transform(agg::trans_affine & tr, box2d const& bbox, ma double sy = height/bbox.height(); tr *= agg::trans_affine_scaling(sy); } - else - { - evaluate_transform(tr, feature, sym.get_image_transform()); - } } } diff --git a/src/agg/process_markers_symbolizer.cpp b/src/agg/process_markers_symbolizer.cpp index 263e2566b..570161ef9 100644 --- a/src/agg/process_markers_symbolizer.cpp +++ b/src/agg/process_markers_symbolizer.cpp @@ -82,8 +82,7 @@ void agg_renderer::process(markers_symbolizer const& sym, ras_ptr->gamma(agg::gamma_power()); agg::trans_affine geom_tr; evaluate_transform(geom_tr, feature, sym.get_transform()); - agg::trans_affine tr; - tr *= agg::trans_affine_scaling(scale_factor_); + agg::trans_affine tr = agg::trans_affine_scaling(scale_factor_); if ((*mark)->is_vector()) { @@ -144,7 +143,8 @@ void agg_renderer::process(markers_symbolizer const& sym, else { box2d const& bbox = (*mark)->bounding_box(); - setup_label_transform(tr, bbox, feature, sym); + setup_transform_scaling(tr, bbox, feature, sym); + evaluate_transform(tr, feature, sym.get_image_transform()); coord2d center = bbox.center(); agg::trans_affine_translation recenter(-center.x, -center.y); agg::trans_affine marker_trans = recenter * tr; @@ -179,7 +179,8 @@ void agg_renderer::process(markers_symbolizer const& sym, else // raster markers { box2d const& bbox = (*mark)->bounding_box(); - setup_label_transform(tr, bbox, feature, sym); + setup_transform_scaling(tr, bbox, feature, sym); + evaluate_transform(tr, feature, sym.get_image_transform()); coord2d center = bbox.center(); agg::trans_affine_translation recenter(-center.x, -center.y); agg::trans_affine marker_trans = recenter * tr; diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index ba34355f8..bdc01b0a0 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -1628,7 +1628,8 @@ void cairo_renderer_base::process(markers_symbolizer const& sym, agg::trans_affine geom_tr; evaluate_transform(geom_tr, feature, sym.get_transform()); box2d const& bbox = (*mark)->bounding_box(); - setup_label_transform(tr, bbox, feature, sym); + setup_transform_scaling(tr, bbox, feature, sym); + evaluate_transform(tr, feature, sym.get_image_transform()); if ((*mark)->is_vector()) { diff --git a/src/grid/process_markers_symbolizer.cpp b/src/grid/process_markers_symbolizer.cpp index cef9cb478..823bad284 100644 --- a/src/grid/process_markers_symbolizer.cpp +++ b/src/grid/process_markers_symbolizer.cpp @@ -129,7 +129,8 @@ void grid_renderer::process(markers_symbolizer const& sym, box2d const& bbox = (*marker)->bounding_box(); agg::trans_affine tr; - setup_label_transform(tr, bbox, feature, sym); + setup_transform_scaling(tr, bbox, feature, sym); + evaluate_transform(tr, feature, sym.get_image_transform()); // - clamp sizes to > 4 pixels of interactivity if (tr.scale() < 0.5) { From a57996e6610ee1d518dfa622f7b845baee75b027 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Aug 2012 17:18:44 -0700 Subject: [PATCH 08/75] sync markers rendering between agg and grid - closes #1309 --- src/grid/process_markers_symbolizer.cpp | 277 +++++++++++++----------- 1 file changed, 151 insertions(+), 126 deletions(-) diff --git a/src/grid/process_markers_symbolizer.cpp b/src/grid/process_markers_symbolizer.cpp index 823bad284..91d120dc7 100644 --- a/src/grid/process_markers_symbolizer.cpp +++ b/src/grid/process_markers_symbolizer.cpp @@ -24,22 +24,15 @@ porting notes --> - - grid includes - - detector + - rasterizer -> grid_rasterizer + - current_buffer_ -> pixmap_ + - agg::rendering_buffer -> grid_renderering_buffer - no gamma - mapnik::pixfmt_gray32 - agg::scanline_bin sl - grid_rendering_buffer - agg::renderer_scanline_bin_solid - - clamping: - // - clamp sizes to > 4 pixels of interactivity - if (tr.scale() < 0.5) - { - agg::trans_affine tr2; - tr2 *= agg::trans_affine_scaling(0.5); - tr = tr2; - } - tr *= agg::trans_affine_scaling(scale_factor_*(1.0/pixmap_.get_resolution())); + - TODO - clamp sizes to > 4 pixels of interactivity - svg_renderer.render_id - only encode feature if placements are found: if (placed) @@ -55,6 +48,7 @@ porting notes --> #include #include #include +#include #include #include @@ -67,7 +61,6 @@ porting notes --> #include #include #include -#include #include // agg @@ -75,15 +68,6 @@ porting notes --> #include "agg_rendering_buffer.h" #include "agg_pixfmt_rgba.h" #include "agg_rasterizer_scanline_aa.h" -#include "agg_scanline_u.h" -#include "agg_path_storage.h" -#include "agg_conv_clip_polyline.h" -#include "agg_conv_transform.h" -#include "agg_image_filters.h" -#include "agg_trans_bilinear.h" -#include "agg_span_allocator.h" -#include "agg_image_accessors.h" -#include "agg_span_image_filter_rgba.h" // boost #include @@ -99,8 +83,12 @@ void grid_renderer::process(markers_symbolizer const& sym, mapnik::feature_impl & feature, proj_transform const& prj_trans) { - typedef agg::renderer_base renderer_base; + typedef grid_rendering_buffer buf_type; + typedef mapnik::pixfmt_gray32 pixfmt_type; + typedef agg::renderer_base renderer_base; typedef agg::renderer_scanline_bin_solid renderer_type; + typedef label_collision_detector4 detector_type; + typedef boost::mpl::vector conv_types; std::string filename = path_processor_type::evaluate(*sym.get_filename(), feature); @@ -109,129 +97,166 @@ void grid_renderer::process(markers_symbolizer const& sym, boost::optional mark = mapnik::marker_cache::instance()->find(filename, true); if (mark && *mark) { - if (!(*mark)->is_vector()) - { - MAPNIK_LOG_DEBUG(agg_renderer) << "agg_renderer: markers_symbolizer does not yet support non-SVG markers"; - return; - } - ras_ptr->reset(); - agg::scanline_bin sl; - grid_rendering_buffer buf(pixmap_.raw_data(), width_, height_, width_); - mapnik::pixfmt_gray32 pixf(buf); - renderer_base renb(pixf); - renderer_type ren(renb); - agg::trans_affine geom_tr; evaluate_transform(geom_tr, feature, sym.get_transform()); + agg::trans_affine tr = agg::trans_affine_scaling(scale_factor_*(1.0/pixmap_.get_resolution())); - boost::optional marker = (*mark)->get_vector_data(); - box2d const& bbox = (*marker)->bounding_box(); - - agg::trans_affine tr; - setup_transform_scaling(tr, bbox, feature, sym); - evaluate_transform(tr, feature, sym.get_image_transform()); - // - clamp sizes to > 4 pixels of interactivity - if (tr.scale() < 0.5) + if ((*mark)->is_vector()) { - agg::trans_affine tr2; - tr2 *= agg::trans_affine_scaling(0.5); - tr = tr2; - } - tr *= agg::trans_affine_scaling(scale_factor_*(1.0/pixmap_.get_resolution())); + using namespace mapnik::svg; + typedef agg::pod_bvector svg_attribute_type; + typedef svg_renderer svg_renderer_type; + typedef vector_markers_rasterizer_dispatch_grid dispatch_type; + boost::optional const& stock_vector_marker = (*mark)->get_vector_data(); + expression_ptr const& width_expr = sym.get_width(); + expression_ptr const& height_expr = sym.get_height(); - coord2d center = bbox.center(); - agg::trans_affine_translation recenter(-center.x, -center.y); - agg::trans_affine marker_trans = recenter * tr; - - using namespace mapnik::svg; - vertex_stl_adapter stl_storage((*marker)->source()); - svg_path_adapter svg_path(stl_storage); - - agg::pod_bvector attributes; - bool result = push_explicit_style( (*marker)->attributes(), attributes, sym); - - svg_renderer, - renderer_type, - mapnik::pixfmt_gray32 > svg_renderer(svg_path, result ? attributes : (*marker)->attributes()); - - marker_placement_e placement_method = sym.get_marker_placement(); - - bool placed = false; - BOOST_FOREACH( geometry_type & geom, feature.paths()) - { - // TODO - merge this code with point_symbolizer rendering - if (placement_method == MARKER_POINT_PLACEMENT || geom.size() <= 1) + // special case for simple ellipse markers + // to allow for full control over rx/ry dimensions + if (filename == "shape://ellipse" + && (width_expr || height_expr)) { - double x; - double y; - double z=0; - label::interior_position(geom, x, y); - prj_trans.backward(x,y,z); - t_.forward(&x,&y); - geom_tr.transform(&x,&y); - agg::trans_affine matrix = marker_trans; - matrix.translate(x,y); - box2d transformed_bbox = bbox * matrix; - - if (sym.get_allow_overlap() || - detector_->has_placement(transformed_bbox)) + svg_storage_type marker_ellipse; + vertex_stl_adapter stl_storage(marker_ellipse.source()); + svg_path_adapter svg_path(stl_storage); + // TODO - clamping to >= 4 pixels + build_ellipse(sym, feature, marker_ellipse, svg_path); + svg_attribute_type attributes; + bool result = push_explicit_style( (*stock_vector_marker)->attributes(), attributes, sym); + svg_renderer_type svg_renderer(svg_path, result ? attributes : (*stock_vector_marker)->attributes()); + evaluate_transform(tr, feature, sym.get_image_transform()); + box2d bbox = marker_ellipse.bounding_box(); + coord2d center = bbox.center(); + agg::trans_affine_translation recenter(-center.x, -center.y); + agg::trans_affine marker_trans = recenter * tr; + buf_type render_buf(pixmap_.raw_data(), width_, height_, width_); + dispatch_type rasterizer_dispatch(render_buf, + svg_renderer, + *ras_ptr, + bbox, + marker_trans, + sym, + *detector_, + scale_factor_, + feature, + pixmap_); + vertex_converter, dispatch_type, markers_symbolizer, + CoordTransform, proj_transform, agg::trans_affine, conv_types> + converter(query_extent_, rasterizer_dispatch, sym,t_,prj_trans,tr,scale_factor_); + if (sym.clip() && feature.paths().size() > 0) // optional clip (default: true) { - placed = true; - svg_renderer.render_id(*ras_ptr, sl, renb, feature.id(), matrix, 1, bbox); - if (!sym.get_ignore_placement()) - detector_->insert(transformed_bbox); + eGeomType type = feature.paths()[0].type(); + if (type == Polygon) + converter.template set(); + else if (type == LineString) + converter.template set(); + // don't clip if type==Point } - } - else if (sym.clip()) - { - typedef agg::conv_clip_polyline clipped_geometry_type; - typedef coord_transform path_type; - typedef agg::conv_transform transformed_path_type; - - clipped_geometry_type clipped(geom); - clipped.clip_box(query_extent_.minx(),query_extent_.miny(),query_extent_.maxx(),query_extent_.maxy()); - path_type path(t_,clipped,prj_trans); - transformed_path_type path_transformed(path,geom_tr); - markers_placement placement(path_transformed, bbox, marker_trans, *detector_, - sym.get_spacing() * scale_factor_, - sym.get_max_error(), - sym.get_allow_overlap()); - double x, y, angle; - while (placement.get_point(x, y, angle)) + converter.template set(); //always transform + if (sym.smooth() > 0.0) converter.template set(); // optional smooth converter + BOOST_FOREACH(geometry_type & geom, feature.paths()) { - placed = true; - agg::trans_affine matrix = marker_trans; - matrix.rotate(angle); - matrix.translate(x, y); - svg_renderer.render_id(*ras_ptr, sl, renb, feature.id(), matrix, 1, bbox); + converter.apply(geom); } } else { - typedef coord_transform path_type; - typedef agg::conv_transform transformed_path_type; - path_type path(t_,geom,prj_trans); - transformed_path_type path_transformed(path,geom_tr); - markers_placement placement(path_transformed, bbox, marker_trans, *detector_, - sym.get_spacing() * scale_factor_, - sym.get_max_error(), - sym.get_allow_overlap()); - double x, y, angle; - while (placement.get_point(x, y, angle)) + box2d const& bbox = (*mark)->bounding_box(); + setup_transform_scaling(tr, bbox, feature, sym); + evaluate_transform(tr, feature, sym.get_image_transform()); + // TODO - clamping to >= 4 pixels + coord2d center = bbox.center(); + agg::trans_affine_translation recenter(-center.x, -center.y); + agg::trans_affine marker_trans = recenter * tr; + vertex_stl_adapter stl_storage((*stock_vector_marker)->source()); + svg_path_adapter svg_path(stl_storage); + svg_attribute_type attributes; + bool result = push_explicit_style( (*stock_vector_marker)->attributes(), attributes, sym); + svg_renderer_type svg_renderer(svg_path, result ? attributes : (*stock_vector_marker)->attributes()); + buf_type render_buf(pixmap_.raw_data(), width_, height_, width_); + dispatch_type rasterizer_dispatch(render_buf, + svg_renderer, + *ras_ptr, + bbox, + marker_trans, + sym, + *detector_, + scale_factor_, + feature, + pixmap_); + vertex_converter, dispatch_type, markers_symbolizer, + CoordTransform, proj_transform, agg::trans_affine, conv_types> + converter(query_extent_, rasterizer_dispatch, sym,t_,prj_trans,tr,scale_factor_); + if (sym.clip() && feature.paths().size() > 0) // optional clip (default: true) { - placed = true; - agg::trans_affine matrix = marker_trans; - matrix.rotate(angle); - matrix.translate(x, y); - svg_renderer.render_id(*ras_ptr, sl, renb, feature.id(), matrix, 1, bbox); + eGeomType type = feature.paths()[0].type(); + if (type == Polygon) + converter.template set(); + else if (type == LineString) + converter.template set(); + // don't clip if type==Point + } + converter.template set(); //always transform + if (sym.smooth() > 0.0) converter.template set(); // optional smooth converter + BOOST_FOREACH(geometry_type & geom, feature.paths()) + { + converter.apply(geom); } } } - if (placed) + else // raster markers { - pixmap_.add_feature(feature); + box2d const& bbox = (*mark)->bounding_box(); + setup_transform_scaling(tr, bbox, feature, sym); + evaluate_transform(tr, feature, sym.get_image_transform()); + // - clamp sizes to > 4 pixels of interactivity + coord2d center = bbox.center(); + agg::trans_affine_translation recenter(-center.x, -center.y); + agg::trans_affine marker_trans = recenter * tr; + boost::optional marker = (*mark)->get_bitmap_data(); + typedef raster_markers_rasterizer_dispatch_grid dispatch_type; + buf_type render_buf(pixmap_.raw_data(), width_, height_, width_); + dispatch_type rasterizer_dispatch(render_buf, + *ras_ptr, + **marker, + marker_trans, + sym, + *detector_, + scale_factor_, + feature, + pixmap_); + vertex_converter, dispatch_type, markers_symbolizer, + CoordTransform, proj_transform, agg::trans_affine, conv_types> + converter(query_extent_, rasterizer_dispatch, sym,t_,prj_trans,tr,scale_factor_); + if (sym.clip() && feature.paths().size() > 0) // optional clip (default: true) + { + eGeomType type = feature.paths()[0].type(); + if (type == Polygon) + converter.template set(); + else if (type == LineString) + converter.template set(); + // don't clip if type==Point + } + converter.template set(); //always transform + if (sym.smooth() > 0.0) converter.template set(); // optional smooth converter + BOOST_FOREACH(geometry_type & geom, feature.paths()) + { + converter.apply(geom); + } } } } From f057f43daca6a5941bb780d9cc98398611b1ca5d Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Tue, 14 Aug 2012 17:20:19 -0700 Subject: [PATCH 09/75] fix grid/markers tests after a57996e6610ee1d518dfa6 - refs #1309 --- tests/python_tests/render_grid_test.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/python_tests/render_grid_test.py b/tests/python_tests/render_grid_test.py index 74f27900d..b0e9740f4 100644 --- a/tests/python_tests/render_grid_test.py +++ b/tests/python_tests/render_grid_test.py @@ -67,12 +67,16 @@ grid_correct_old = {"keys": ["", "North West", "North East", "South West", "Sout # now using svg rendering grid_correct_old2 = {"data": {"North East": {"Name": "North East"}, "North West": {"Name": "North West"}, "South East": {"Name": "South East"}, "South West": {"Name": "South West"}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !!! ### ", " !!! ### ", " !!! ### ", " !!! ### ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " $$$ %%% ", " $$$ %%% ", " $$$ %%% ", " $$$ %%% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], "keys": ["", "North West", "North East", "South West", "South East"]} +grid_correct_old3 = {"data": {"North East": {"Name": "North East"}, "North West": {"Name": "North West"}, "South East": {"Name": "South East"}, "South West": {"Name": "South West"}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !!! ### ", " !!! ### ", " !!! ### ", " !!! ### ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " $$$ %%% ", " $$$ %%% ", " $$$ %%% ", " $$ %% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], "keys": ["", "North West", "North East", "South West", "South East"]} + # previous rendering using agg ellipse directly grid_correct_new = {"data": {"North East": {"Name": "North East"}, "North West": {"Name": "North West"}, "South East": {"Name": "South East"}, "South West": {"Name": "South West"}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !! ## ", " !!! ### ", " !! ## ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " $$ %% ", " $$$ %% ", " $$ %% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], "keys": ["", "North West", "North East", "South West", "South East"]} # newer rendering using svg grid_correct_new2 = {"data": {"North East": {"Name": "North East"}, "North West": {"Name": "North West"}, "South East": {"Name": "South East"}, "South West": {"Name": "South West"}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !! ## ", " !!! ### ", " !! ## ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " $$ %% ", " $$$ %% ", " $$ %% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], "keys": ["", "North West", "North East", "South West", "South East"]} +grid_correct_new3 = {"data": {"North East": {"Name": "North East"}, "North West": {"Name": "North West"}, "South East": {"Name": "South East"}, "South West": {"Name": "South West"}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !! ## ", " !!! ### ", " !! ## ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " $$ %% ", " $$$ %% ", " $ %% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], "keys": ["", "North West", "North East", "South West", "South East"]} + def resolve(grid,row,col): """ Resolve the attributes for a given pixel in a grid. """ @@ -138,7 +142,7 @@ def test_render_grid_old(): lr_lonlat = mapnik.Coord(143.40,-38.80) m.zoom_to_box(mapnik.Box2d(ul_lonlat,lr_lonlat)) grid = mapnik.render_grid(m,0,key='Name',resolution=4,fields=['Name']) - eq_(grid,grid_correct_old2,show_grids('old-markers',grid,grid_correct_old2)) + eq_(grid,grid_correct_old3,show_grids('old-markers',grid,grid_correct_old3)) eq_(resolve(grid,0,0),None) # check every pixel of the nw symbol @@ -164,7 +168,7 @@ def test_render_grid_new(): grid = mapnik.Grid(m.width,m.height,key='Name') mapnik.render_layer(m,grid,layer=0,fields=['Name']) utf1 = grid.encode('utf',resolution=4) - eq_(utf1,grid_correct_new2,show_grids('new-markers',utf1,grid_correct_new2)) + eq_(utf1,grid_correct_new3,show_grids('new-markers',utf1,grid_correct_new3)) # check a full view is the same as a full image grid_view = grid.view(0,0,width,height) @@ -190,6 +194,8 @@ grid_feat_id = {'keys': ['', '3', '4', '2', '1'], 'data': {'1': {'Name': 'South grid_feat_id2 = {"data": {"1": {"Name": "South East"}, "2": {"Name": "South West"}, "3": {"Name": "North West"}, "4": {"Name": "North East"}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !! ## ", " !!! ### ", " !! ## ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " $$ %% ", " $$$ %% ", " $$ %% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], "keys": ["", "3", "4", "2", "1"]} +grid_feat_id3 = {"data": {"1": {"Name": "South East"}, "2": {"Name": "South West"}, "3": {"Name": "North West"}, "4": {"Name": "North East"}}, "grid": [" ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " !! ## ", " !!! ### ", " !! ## ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " $$ %% ", " $$$ %% ", " $ %% ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " ", " "], "keys": ["", "3", "4", "2", "1"]} + def test_render_grid3(): """ test using feature id""" width,height = 256,256 @@ -204,7 +210,7 @@ def test_render_grid3(): grid = mapnik.Grid(m.width,m.height,key='__id__') mapnik.render_layer(m,grid,layer=0,fields=['__id__','Name']) utf1 = grid.encode('utf',resolution=4) - eq_(utf1,grid_feat_id2,show_grids('id-markers',utf1,grid_feat_id2)) + eq_(utf1,grid_feat_id3,show_grids('id-markers',utf1,grid_feat_id3)) # check a full view is the same as a full image grid_view = grid.view(0,0,width,height) # for kicks check at full res too From aecf0531f505f14503847e4da444f2c08d532468 Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 15 Aug 2012 09:47:03 +0100 Subject: [PATCH 10/75] + remove metawriters for the upcoming 2.1 release --- bindings/python/mapnik_inmem_metawriter.cpp | 67 ---- bindings/python/mapnik_map.cpp | 61 ---- bindings/python/mapnik_python.cpp | 2 - include/mapnik/attribute_collector.hpp | 14 - include/mapnik/feature_style_processor.hpp | 9 - include/mapnik/map.hpp | 61 +--- include/mapnik/metawriter.hpp | 169 --------- include/mapnik/metawriter_factory.hpp | 55 --- include/mapnik/metawriter_inmem.hpp | 119 ------- include/mapnik/metawriter_json.hpp | 160 --------- include/mapnik/rule.hpp | 2 - include/mapnik/symbolizer.hpp | 45 +-- include/mapnik/symbolizer_helpers.hpp | 5 +- src/agg/process_point_symbolizer.cpp | 6 - src/build.py | 3 - src/deepcopy.cpp | 1 - src/feature_style_processor.cpp | 29 -- src/load_map.cpp | 28 -- src/map.cpp | 88 +---- src/metawriter.cpp | 369 -------------------- src/metawriter_factory.cpp | 96 ----- src/metawriter_inmem.cpp | 148 -------- src/save_map.cpp | 25 -- src/symbolizer.cpp | 49 +-- src/symbolizer_helpers.cpp | 17 - tests/python_tests/map_deepcopy_test.py | 1 - 26 files changed, 8 insertions(+), 1621 deletions(-) delete mode 100644 bindings/python/mapnik_inmem_metawriter.cpp delete mode 100644 include/mapnik/metawriter.hpp delete mode 100644 include/mapnik/metawriter_factory.hpp delete mode 100644 include/mapnik/metawriter_inmem.hpp delete mode 100644 include/mapnik/metawriter_json.hpp delete mode 100644 src/metawriter.cpp delete mode 100644 src/metawriter_factory.cpp delete mode 100644 src/metawriter_inmem.cpp diff --git a/bindings/python/mapnik_inmem_metawriter.cpp b/bindings/python/mapnik_inmem_metawriter.cpp deleted file mode 100644 index 34760f45b..000000000 --- a/bindings/python/mapnik_inmem_metawriter.cpp +++ /dev/null @@ -1,67 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -// boost -#include -#include -#include - -// mapnik -#include - -using mapnik::metawriter_inmem; -using mapnik::metawriter_inmem_ptr; - -namespace { -std::map::const_iterator -mapnik_value_map_begin(const std::map &m) { - return m.begin(); -} - -std::map::const_iterator -mapnik_value_map_end(const std::map &m) { - return m.end(); -} -} - -void export_inmem_metawriter() { - using namespace boost::python; - - class_ > - ("MapnikProperties", "Retarded.", init<>()) - .def("__iter__", range(&mapnik_value_map_begin, &mapnik_value_map_end)) - ; - - class_ - ("MetaInstance", "Single rendered instance of meta-information.", no_init) - .def_readonly("box", &metawriter_inmem::meta_instance::box) - .def_readonly("properties", &metawriter_inmem::meta_instance::properties) - ; - - class_ - ("MetaWriterInMem", - "Collects meta-information about elements rendered.", - no_init) - .def("__iter__", range(&metawriter_inmem::inst_begin, - &metawriter_inmem::inst_end)) - ; -} diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index e2a21e674..c4160add4 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include "mapnik_enumeration.hpp" @@ -141,26 +140,6 @@ mapnik::font_set find_fontset(mapnik::Map const& m, std::string const& name) return *fontset; } -bool has_metawriter(mapnik::Map const& m) -{ - if (m.metawriters().size() >=1) - return true; - return false; -} - -// returns empty shared_ptr when the metawriter isn't found, or is -// of the wrong type. empty pointers make it back to Python as a None. -mapnik::metawriter_inmem_ptr find_inmem_metawriter(const mapnik::Map & m, std::string const& name) { - mapnik::metawriter_ptr metawriter = m.find_metawriter(name); - mapnik::metawriter_inmem_ptr inmem; - - if (metawriter) { - inmem = boost::dynamic_pointer_cast(metawriter); - } - - return inmem; -} - // TODO - we likely should allow indexing by negative number from python // for now, protect against negative values and kindly throw mapnik::featureset_ptr query_point(mapnik::Map const& m, int index, double x, double y) @@ -310,15 +289,6 @@ void export_map() "\n" ) - .def("has_metawriter", - has_metawriter, - "Check if the Map has any active metawriters\n" - "\n" - "Usage:\n" - ">>> m.has_metawriter()\n" - "False\n" - ) - .def("pan",&Map::pan, (arg("x"),arg("y")), "Set the Map center at a given x,y location\n" @@ -457,37 +427,6 @@ void export_map() ">>> extext = Box2d(-180.0, -90.0, 180.0, 90.0)\n" ">>> m.zoom_to_box(extent)\n" ) - .def("get_metawriter_property", &Map::get_metawriter_property, - (arg("name")), - "Reads a metawriter property.\n" - "These properties are completely user-defined and can be used to" - "create filenames, etc.\n" - "\n" - "Usage:\n" - ">>> map.set_metawriter_property(\"x\", \"10\")\n" - ">>> map.get_metawriter_property(\"x\")\n" - "10\n" - ) - .def("set_metawriter_property", &Map::set_metawriter_property, - (arg("name"),arg("value")), - "Sets a metawriter property.\n" - "These properties are completely user-defined and can be used to" - "create filenames, etc.\n" - "\n" - "Usage:\n" - ">>> map.set_metawriter_property(\"x\", str(x))\n" - ">>> map.set_metawriter_property(\"y\", str(y))\n" - ">>> map.set_metawriter_property(\"z\", str(z))\n" - "\n" - "Use a path like \"[z]/[x]/[y].json\" to create filenames.\n" - ) - .def("find_inmem_metawriter", find_inmem_metawriter, - (arg("name")), - "Gets an inmem metawriter, or None if no such metawriter " - "exists.\n" - "Use this after the map has been rendered to retrieve information " - "about the hit areas rendered on the map.\n" - ) .def("__deepcopy__",&map_deepcopy) .add_property("parameters",make_function(params_nonconst,return_value_policy()),"TODO") diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index f98cec7fa..441811050 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -66,7 +66,6 @@ void export_projection(); void export_proj_transform(); void export_view_transform(); void export_raster_colorizer(); -void export_inmem_metawriter(); void export_label_collision_detector(); void export_logger(); @@ -407,7 +406,6 @@ BOOST_PYTHON_MODULE(_mapnik) export_coord(); export_map(); export_raster_colorizer(); - export_inmem_metawriter(); export_label_collision_detector(); export_logger(); diff --git a/include/mapnik/attribute_collector.hpp b/include/mapnik/attribute_collector.hpp index 81cdad888..9ad579c5f 100644 --- a/include/mapnik/attribute_collector.hpp +++ b/include/mapnik/attribute_collector.hpp @@ -102,7 +102,6 @@ struct symbolizer_attributes : public boost::static_visitor<> { if (*it) boost::apply_visitor(f_attr, **it); } - collect_metawriter(sym); collect_transform(sym.get_transform()); } @@ -113,14 +112,12 @@ struct symbolizer_attributes : public boost::static_visitor<> { path_processor_type::collect_attributes(*filename_expr,names_); } - collect_metawriter(sym); collect_transform(sym.get_image_transform()); collect_transform(sym.get_transform()); } void operator () (line_symbolizer const& sym) { - collect_metawriter(sym); collect_transform(sym.get_transform()); } @@ -131,14 +128,12 @@ struct symbolizer_attributes : public boost::static_visitor<> { path_processor_type::collect_attributes(*filename_expr,names_); } - collect_metawriter(sym); collect_transform(sym.get_image_transform()); collect_transform(sym.get_transform()); } void operator () (polygon_symbolizer const& sym) { - collect_metawriter(sym); collect_transform(sym.get_transform()); } @@ -149,7 +144,6 @@ struct symbolizer_attributes : public boost::static_visitor<> { path_processor_type::collect_attributes(*filename_expr,names_); } - collect_metawriter(sym); collect_transform(sym.get_image_transform()); collect_transform(sym.get_transform()); } @@ -169,7 +163,6 @@ struct symbolizer_attributes : public boost::static_visitor<> { path_processor_type::collect_attributes(*filename_expr,names_); } - collect_metawriter(sym); collect_transform(sym.get_image_transform()); collect_transform(sym.get_transform()); } @@ -186,7 +179,6 @@ struct symbolizer_attributes : public boost::static_visitor<> { boost::apply_visitor(f_attr,*width_expr); } - collect_metawriter(sym); collect_transform(sym.get_image_transform()); collect_transform(sym.get_transform()); } @@ -198,7 +190,6 @@ struct symbolizer_attributes : public boost::static_visitor<> { boost::apply_visitor(f_attr,*height_expr); } - collect_metawriter(sym); collect_transform(sym.get_transform()); } // TODO - support remaining syms @@ -206,11 +197,6 @@ struct symbolizer_attributes : public boost::static_visitor<> private: std::set& names_; expression_attributes > f_attr; - void collect_metawriter(symbolizer_base const& sym) - { - metawriter_properties const& properties = sym.get_metawriter_properties(); - names_.insert(properties.begin(), properties.end()); - } void collect_transform(transform_list_ptr const& trans_expr) { if (trans_expr) diff --git a/include/mapnik/feature_style_processor.hpp b/include/mapnik/feature_style_processor.hpp index 4e799e69f..487a527d8 100644 --- a/include/mapnik/feature_style_processor.hpp +++ b/include/mapnik/feature_style_processor.hpp @@ -58,15 +58,6 @@ public: */ void apply(mapnik::layer const& lyr, std::set& names); private: - /*! - * @return initialize metawriters for a given map and projection. - */ - void start_metawriters(Map const& m_, projection const& proj); - /*! - * @return stop metawriters that were previously initialized. - */ - void stop_metawriters(Map const& m_); - /*! * @return render a layer given a projection and scale. */ diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index 400f081ac..a995c515c 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include // boost @@ -72,7 +72,6 @@ private: boost::optional background_; boost::optional background_image_; std::map styles_; - std::map metawriters_; std::map fontsets_; std::vector layers_; aspect_fix_mode aspectFixMode_; @@ -87,7 +86,6 @@ public: typedef std::map::iterator style_iterator; typedef std::map::const_iterator const_fontset_iterator; typedef std::map::iterator fontset_iterator; - typedef std::map::const_iterator const_metawriter_iterator; /*! \brief Default constructor. * @@ -167,40 +165,6 @@ public: */ boost::optional find_style(std::string const& name) const; - /*! \brief Insert a metawriter in the map. - * @param name The name of the writer. - * @param style A pointer to the writer to insert. - * @return true If success. - * @return false If no success. - */ - bool insert_metawriter(std::string const& name, metawriter_ptr const& writer); - - /*! \brief Remove a metawriter from the map. - * @param name The name of the writer. - */ - void remove_metawriter(const std::string& name); - - /*! \brief Find a metawriter. - * @param name The name of the writer. - * @return The writer if found. If not found return 0. - */ - metawriter_ptr find_metawriter(std::string const& name) const; - - /*! \brief Get all metawriters. - * @return Const reference to metawriters. - */ - std::map const& metawriters() const; - - /*! \brief Get first iterator in metawriters. - * @return Constant metawriter iterator. - */ - const_metawriter_iterator begin_metawriters() const; - - /*! \brief Get last iterator in metawriters. - * @return Constant metawriter iterator. - */ - const_metawriter_iterator end_metawriters() const; - /*! \brief Insert a fontset into the map. * @param name The name of the fontset. * @param style The fontset to insert. @@ -413,34 +377,11 @@ public: */ featureset_ptr query_map_point(unsigned index, double x, double y) const; - /*! - * @brief Resolve names to object references for metawriters. - */ - void init_metawriters(); - ~Map(); inline void set_aspect_fix_mode(aspect_fix_mode afm) { aspectFixMode_ = afm; } inline aspect_fix_mode get_aspect_fix_mode() const { return aspectFixMode_; } - /*! - * @brief Metawriter properties. - * - * These properties are defined by the user and are substituted in filenames, - * sepcial columns in tables, etc. - */ - metawriter_property_map metawriter_output_properties; - - /*! - * @brief Set a metawriter property. - */ - void set_metawriter_property(std::string name, std::string value); - - /*! - * @brief Get a metawriter property. - */ - std::string get_metawriter_property(std::string name) const; - /*! * @brief Get extra, arbitrary Parameters attached to the Map */ diff --git a/include/mapnik/metawriter.hpp b/include/mapnik/metawriter.hpp deleted file mode 100644 index 7041286d1..000000000 --- a/include/mapnik/metawriter.hpp +++ /dev/null @@ -1,169 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -#ifndef MAPNIK_METAWRITER_HPP -#define MAPNIK_METAWRITER_HPP - -// mapnik -#include -#include -#include - -// boost -#include -#include -#include -#include - -// stl -#include -#include - - -namespace mapnik { - -class text_placement_info; -class text_path; - -/** Implementation of std::map that also returns const& for operator[]. */ -class metawriter_property_map -{ -public: - typedef std::map property_map; - typedef property_map::const_iterator const_iterator; - - metawriter_property_map() : - m_(), - not_found_() {} - - UnicodeString const& operator[](std::string const& key) const; - UnicodeString& operator[](std::string const& key) {return m_[key];} - - std::map::const_iterator find(std::string const& key) const - { - return m_.find(key); - } - - std::map::const_iterator end() const - { - return m_.end(); - } - - UnicodeString const& get(std::string const& key) const - { - return (*this)[key]; - } - -private: - property_map m_; - UnicodeString not_found_; -}; - - -/** All properties to be output by a metawriter. */ -class metawriter_properties : public std::set -{ -public: - metawriter_properties(boost::optional str); - metawriter_properties() {} - template metawriter_properties( - InputIterator first, InputIterator last) : std::set(first, last) {} - std::string to_string() const; -}; - -/** Abstract baseclass for all metawriter classes. */ -class metawriter -{ -public: - typedef coord_transform path_type; - metawriter(metawriter_properties dflt_properties) : - dflt_properties_(dflt_properties), - width_(0), - height_(0) {} - virtual ~metawriter() {} - /** Output a rectangular area. - * \param box Area (in pixel coordinates) - * \param feature The feature being processed - * \param prj_trans Projection transformation - * \param t Coordinate transformation - * \param properties List of properties to output - */ - virtual void add_box(box2d const& box, Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties)=0; - virtual void add_text(boost::ptr_vector const& placements, - box2d const& extents, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties)=0; - virtual void add_polygon(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties)=0; - virtual void add_line(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties)=0; - - /** Start processing. - * Write file header, init database connection, ... - * - * \param properties metawriter_property_map object with userdefined values. - * Useful for setting filename etc. - */ - virtual void start(metawriter_property_map const& properties) - { - boost::ignore_unused_variable_warning(properties); - } - - /** Stop processing. - * Write file footer, close database connection, ... - */ - virtual void stop() {} - /** Set output size (pixels). - * All features that are completely outside this size are discarded. - */ - void set_size(int width, int height) { width_ = width; height_ = height; } - /** Set Map object's srs. */ - virtual void set_map_srs(projection const& proj) - { - boost::ignore_unused_variable_warning(proj); - } - - /** Return the list of default properties. */ - metawriter_properties const& get_default_properties() const { return dflt_properties_;} -protected: - metawriter_properties dflt_properties_; - /** Output width (pixels). */ - int width_; - /** Output height (pixels). */ - int height_; -}; - -/** Shared pointer to metawriter object. */ -typedef boost::shared_ptr metawriter_ptr; -/** Metawriter object + properties. */ -typedef std::pair metawriter_with_properties; - -} - -#endif // MAPNIK_METAWRITER_HPP diff --git a/include/mapnik/metawriter_factory.hpp b/include/mapnik/metawriter_factory.hpp deleted file mode 100644 index 1af7ff5d7..000000000 --- a/include/mapnik/metawriter_factory.hpp +++ /dev/null @@ -1,55 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -#ifndef MAPNIK_METAWRITER_FACTORY_HPP -#define MAPNIK_METAWRITER_FACTORY_HPP - -// mapnik -#include - -// boost -#include - -namespace mapnik { -class xml_node; - -/** - * Creates a metawriter with the properties specified in the property - * tree argument. Currently, this is hard-coded to the JSON and inmem - * metawriters, but should provide an easy point to make them a - * proper factory method if this is wanted in the future. - */ -metawriter_ptr metawriter_create(xml_node const& pt); - -/** - * Writes properties into the given property tree representing the - * metawriter argument, and which can be used to reconstruct it. - */ -void metawriter_save( - const metawriter_ptr &m, - boost::property_tree::ptree &pt, - bool explicit_defaults); - -} - -#endif // MAPNIK_METAWRITER_FACTORY_HPP - diff --git a/include/mapnik/metawriter_inmem.hpp b/include/mapnik/metawriter_inmem.hpp deleted file mode 100644 index 6b77bf728..000000000 --- a/include/mapnik/metawriter_inmem.hpp +++ /dev/null @@ -1,119 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -#ifndef MAPNIK_METAWRITER_INMEM_HPP -#define MAPNIK_METAWRITER_INMEM_HPP - -// mapnik -#include -#include - -// boost -#include - -// stl -#include - -namespace mapnik { - -/** - * Keeps metadata information in-memory, where it can be retrieved by whatever's - * calling Mapnik and custom output provided. - * - * Stored data is all in image coordinates in the current implementation. - * - * This is most useful when Mapnik is being called from Python, and the result - * of the metawriter can be queried and injected into the (meta)tile or whatever - * in a very flexible way. E.g: for a GUI app the metawriter can be used to - * create hit areas, for a web app it could be used to create an HTML image map. - * - * Because this is kept in-memory, applying this metawriter to features which are - * very common in the rendered image will increase memory usage, especially if - * many attributes are also kept. - */ -class MAPNIK_DECL metawriter_inmem - : public metawriter, private boost::noncopyable { -public: - /** - * Construct an in-memory writer which keeps properties specified by the - * dflt_properties argument. For example: if dflt_properties contains "name", - * then the name attribute of rendered features referencing this metawriter - * will be kept in memory. - */ - metawriter_inmem(metawriter_properties dflt_properties); - ~metawriter_inmem(); - - virtual void add_box(box2d const& box, Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - virtual void add_text(boost::ptr_vector const& placements, - box2d const& extents, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - virtual void add_polygon(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - virtual void add_line(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - - virtual void start(metawriter_property_map const& properties); - - /** - * An instance of a rendered feature. The box represents the image - * coordinates of a bounding box around the feature. The properties - * are the intersection of the features' properties and the "kept" - * properties of the metawriter. - */ - struct MAPNIK_DECL meta_instance { - box2d box; - std::map properties; - }; - - typedef std::list meta_instance_list; - - // const-only access to the instances. - const meta_instance_list &instances() const; - - // utility iterators for use in the python bindings. - meta_instance_list::const_iterator inst_begin() const; - meta_instance_list::const_iterator inst_end() const; - -private: - - std::list instances_; - - void add_vertices(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); -}; - -/** Shared pointer to metawriter_inmem object. */ -typedef boost::shared_ptr metawriter_inmem_ptr; - -} - -#endif // MAPNIK_METAWRITER_INMEM_HPP diff --git a/include/mapnik/metawriter_json.hpp b/include/mapnik/metawriter_json.hpp deleted file mode 100644 index ab02d81b4..000000000 --- a/include/mapnik/metawriter_json.hpp +++ /dev/null @@ -1,160 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -#ifndef MAPNIK_METAWRITER_JSON_HPP -#define MAPNIK_METAWRITER_JSON_HPP - -// mapnik -#include -#include - -// boost -#include - -// stl -#include - -namespace mapnik { - - -/** Write JSON data to a stream object. */ -class metawriter_json_stream : public metawriter, private boost::noncopyable -{ -public: - metawriter_json_stream(metawriter_properties dflt_properties); - ~metawriter_json_stream(); - virtual void add_box(box2d const& box, Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - virtual void add_text(boost::ptr_vector const& placements, - box2d const& extents, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - virtual void add_polygon(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - virtual void add_line(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties); - - virtual void start(metawriter_property_map const& properties); - virtual void stop(); - /** Set output stream. This function has to be called before the first output is made. */ - void set_stream(std::ostream *f) { f_ = f; } - /** Get output stream. */ - std::ostream *get_stream() const { return f_; } - /** Only write header/footer to file with one or more features. */ - void set_output_empty(bool output_empty) { output_empty_ = output_empty; } - /** See set_output_empty(). */ - bool get_output_empty() { return output_empty_; } - void set_pixel_coordinates(bool on) { pixel_coordinates_ = on; } - bool get_pixel_coordinates() { return pixel_coordinates_; } - virtual void set_map_srs(projection const& proj); - -protected: - enum { - HEADER_NOT_WRITTEN = -1, - STOPPED = -2, - STARTED = 0 - }; - - /** Features written. */ - int count_; - bool output_empty_; - /** Transformation from map srs to output srs. */ - proj_transform *trans_; - projection output_srs_; - bool pixel_coordinates_; - - virtual void write_header(); - - inline void write_feature_header(std::string type) { - if (count_ == STOPPED) - { - MAPNIK_LOG_WARN(metawrite_json) << "Metawriter: instance not started before using it."; - } - - if (count_ == HEADER_NOT_WRITTEN) write_header(); - if (count_++) *f_ << ",\n"; - - *f_ << "{ \"type\": \"Feature\",\n \"geometry\": { \"type\": \"" << type << "\",\n \"coordinates\":"; - } - - void write_properties(Feature const& feature, metawriter_properties const& properties); - - inline void write_point(CoordTransform const& t, double x, double y, bool last = false) - { - double z = 0.0; - if (!pixel_coordinates_) { - t.backward(&x, &y); - trans_->forward(x, y, z); - } - *f_ << "[" << x << "," << y << "]"; - if (!last) { - *f_ << ","; - } - } - - void write_line_polygon(path_type & path, CoordTransform const& t, bool polygon); - -private: - std::ostream *f_; -}; - -/** Shared pointer to metawriter_json_stream object. */ -typedef boost::shared_ptr metawriter_json_stream_ptr; - -/** JSON writer. */ -class metawriter_json : public metawriter_json_stream -{ -public: - metawriter_json(metawriter_properties dflt_properties, path_expression_ptr fn); - - virtual void start(metawriter_property_map const& properties); - virtual void stop(); - /** Set filename template. - * - * This template is processed with values from Map's metawriter properties to - * create the actual filename during start() call. - */ - void set_filename(path_expression_ptr fn); - /** Get filename template. */ - path_expression_ptr get_filename() const; - -private: - path_expression_ptr fn_; - std::fstream f_; - std::string filename_; - -protected: - virtual void write_header(); -}; - -/** Shared pointer to metawriter_json object. */ -typedef boost::shared_ptr metawriter_json_ptr; - -} - -#endif // MAPNIK_METAWRITER_JSON_HPP diff --git a/include/mapnik/rule.hpp b/include/mapnik/rule.hpp index 104f763e7..24451a2d5 100644 --- a/include/mapnik/rule.hpp +++ b/include/mapnik/rule.hpp @@ -249,8 +249,6 @@ public: symbolizers::const_iterator it = syms_.begin(); symbolizers::const_iterator end = syms_.end(); - // FIXME - metawriter_ptr? - for(; it != end; ++it) { boost::apply_visitor(deepcopy_symbolizer(),*it); diff --git a/include/mapnik/symbolizer.hpp b/include/mapnik/symbolizer.hpp index 2141d4833..dc8587a5f 100644 --- a/include/mapnik/symbolizer.hpp +++ b/include/mapnik/symbolizer.hpp @@ -26,7 +26,6 @@ // mapnik #include #include -#include #include #include @@ -44,45 +43,11 @@ MAPNIK_DECL void evaluate_transform(agg::trans_affine& tr, Feature const& featur class Map; -class MAPNIK_DECL symbolizer_base +class MAPNIK_DECL symbolizer_base { public: - symbolizer_base(); + symbolizer_base(); symbolizer_base(symbolizer_base const& other); - - /** Add a metawriter to this symbolizer using a name. */ - void add_metawriter(std::string const& name, metawriter_properties const& properties); - /** Add a metawriter to this symbolizer using a pointer. - * The name is only needed if you intend to call save_map() some time. - * You don't need to call cache_metawriters() when using this function. - * Call this function with an NULL writer_ptr to remove a metawriter. - */ - void add_metawriter(metawriter_ptr writer_ptr, - metawriter_properties const& properties = metawriter_properties(), - std::string const& name = ""); - /** Cache metawriter objects to avoid repeated lookups while processing. - * - * If the metawriter was added using a symbolic name (instead of a pointer) - * this function has to be called before the symbolizer is used, because - * the map object is not available in renderer::apply() to resolve the reference. - */ - void cache_metawriters(Map const &m); - /** Get the metawriter associated with this symbolizer or a NULL pointer if none exists. - * - * This functions requires that cache_metawriters() was called first. - */ - metawriter_with_properties get_metawriter() const; - /** Get metawriter properties. - * This functions returns the default attributes of the - * metawriter + symbolizer specific attributes. - * \note This function is a helperfunction for class attribute_collector. - */ - metawriter_properties const& get_metawriter_properties() const { return properties_complete_; } - /** Get metawriter properties which only apply to this symbolizer. - */ - metawriter_properties const& get_metawriter_properties_overrides() const { return properties_; } - /** Get metawriter name. */ - std::string const& get_metawriter_name() const { return writer_name_; } void set_comp_op(composite_mode_e comp_op); composite_mode_e comp_op() const; void set_transform(transform_type const& ); @@ -93,10 +58,6 @@ public: void set_smooth(double smooth); double smooth() const; private: - metawriter_properties properties_; - metawriter_properties properties_complete_; - std::string writer_name_; - metawriter_ptr writer_ptr_; composite_mode_e comp_op_; transform_type affine_transform_; bool clip_; @@ -104,7 +65,7 @@ private: }; -class MAPNIK_DECL symbolizer_with_image +class MAPNIK_DECL symbolizer_with_image { public: path_expression_ptr get_filename() const; diff --git a/include/mapnik/symbolizer_helpers.hpp b/include/mapnik/symbolizer_helpers.hpp index bf1376071..b8ff5e284 100644 --- a/include/mapnik/symbolizer_helpers.hpp +++ b/include/mapnik/symbolizer_helpers.hpp @@ -63,7 +63,6 @@ public: t_(t), font_manager_(font_manager), detector_(detector), - writer_(sym.get_metawriter()), dims_(0, 0, width, height), query_extent_(query_extent), text_(font_manager, scale_factor), @@ -101,7 +100,6 @@ protected: CoordTransform const& t_; FaceManagerT & font_manager_; DetectorT & detector_; - metawriter_with_properties writer_; box2d dims_; box2d const& query_extent_; //Processing @@ -182,7 +180,7 @@ protected: double marker_h_; double marker_x_; double marker_y_; - + using text_symbolizer_helper::geometries_to_process_; using text_symbolizer_helper::placement_; using text_symbolizer_helper::next_placement; @@ -190,7 +188,6 @@ protected: using text_symbolizer_helper::geo_itr_; using text_symbolizer_helper::point_itr_; using text_symbolizer_helper::points_; - using text_symbolizer_helper::writer_; using text_symbolizer_helper::font_manager_; using text_symbolizer_helper::feature_; using text_symbolizer_helper::t_; diff --git a/src/agg/process_point_symbolizer.cpp b/src/agg/process_point_symbolizer.cpp index 58e1fe9cd..d46e621f8 100644 --- a/src/agg/process_point_symbolizer.cpp +++ b/src/agg/process_point_symbolizer.cpp @@ -96,14 +96,8 @@ void agg_renderer::process(point_symbolizer const& sym, sym.get_opacity(), sym.comp_op()); - if (/* DEBUG */ 0) { - debug_draw_box(label_ext, 0, 0, 0.0); - } - if (!sym.get_ignore_placement()) detector_->insert(label_ext); - //metawriter_with_properties writer = sym.get_metawriter(); - //if (writer.first) writer.first->add_box(label_ext, feature, t_, writer.second); } } } diff --git a/src/build.py b/src/build.py index 5a74be3c3..5aee0524e 100644 --- a/src/build.py +++ b/src/build.py @@ -157,11 +157,8 @@ source = Split( symbolizer_helpers.cpp unicode.cpp markers_symbolizer.cpp - metawriter.cpp raster_colorizer.cpp wkt/wkt_factory.cpp - metawriter_inmem.cpp - metawriter_factory.cpp mapped_memory_cache.cpp marker_cache.cpp svg_parser.cpp diff --git a/src/deepcopy.cpp b/src/deepcopy.cpp index e14df4973..2a46bbaa5 100644 --- a/src/deepcopy.cpp +++ b/src/deepcopy.cpp @@ -49,7 +49,6 @@ namespace mapnik { namespace util { // * background_(rhs.background_), // * background_image_(rhs.background_image_), // * styles_(rhs.styles_), -// metawriters_(rhs.metawriters_), // fontsets_(rhs.fontsets_), // * layers_(rhs.layers_), // aspectFixMode_(rhs.aspectFixMode_), diff --git a/src/feature_style_processor.cpp b/src/feature_style_processor.cpp index d22d8caf1..a7d788ba3 100644 --- a/src/feature_style_processor.cpp +++ b/src/feature_style_processor.cpp @@ -152,9 +152,6 @@ void feature_style_processor::apply() try { projection proj(m_.srs()); - - start_metawriters(m_,proj); - double scale_denom = mapnik::scale_denominator(m_,proj.is_geographic()); scale_denom *= scale_factor_; @@ -166,8 +163,6 @@ void feature_style_processor::apply() apply_to_layer(lyr, p, proj, scale_denom, names); } } - - stop_metawriters(m_); } catch (proj_init_error& ex) { @@ -206,30 +201,6 @@ void feature_style_processor::apply(mapnik::layer const& lyr, std::se p.end_map_processing(m_); } -template -void feature_style_processor::start_metawriters(Map const& m_, projection const& proj) -{ - Map::const_metawriter_iterator metaItr = m_.begin_metawriters(); - Map::const_metawriter_iterator metaItrEnd = m_.end_metawriters(); - for (;metaItr!=metaItrEnd; ++metaItr) - { - metaItr->second->set_size(m_.width(), m_.height()); - metaItr->second->set_map_srs(proj); - metaItr->second->start(m_.metawriter_output_properties); - } -} - -template -void feature_style_processor::stop_metawriters(Map const& m_) -{ - Map::const_metawriter_iterator metaItr = m_.begin_metawriters(); - Map::const_metawriter_iterator metaItrEnd = m_.end_metawriters(); - for (;metaItr!=metaItrEnd; ++metaItr) - { - metaItr->second->stop(); - } -} - template void feature_style_processor::apply_to_layer(layer const& lay, Processor & p, projection const& proj0, diff --git a/src/load_map.cpp b/src/load_map.cpp index d98c0f94d..0dfc01de9 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -42,7 +42,6 @@ #include #include #include -#include #include #include #include @@ -91,7 +90,6 @@ private: void parse_map_include(Map & map, xml_node const& include); void parse_style(Map & map, xml_node const& sty); void parse_layer(Map & map, xml_node const& lay); - void parse_metawriter(Map & map, xml_node const& lay); void parse_symbolizer_base(symbolizer_base &sym, xml_node const& pt); void parse_fontset(Map & map, xml_node const & fset); @@ -329,10 +327,6 @@ void map_parser::parse_map_include(Map & map, xml_node const& include) { parse_fontset(map, *itr); } - else if (itr->is("MetaWriter")) - { - parse_metawriter(map, *itr); - } else if (itr->is("FileSource")) { std::string name = itr->get_attr("name"); @@ -398,8 +392,6 @@ void map_parser::parse_map_include(Map & map, xml_node const& include) ex.append_context(include); throw; } - - map.init_metawriters(); } void map_parser::parse_style(Map & map, xml_node const& sty) @@ -495,20 +487,6 @@ void map_parser::parse_style(Map & map, xml_node const& sty) } } -void map_parser::parse_metawriter(Map & map, xml_node const& pt) -{ - std::string name(""); - metawriter_ptr writer; - try - { - name = pt.get_attr("name"); - writer = metawriter_create(pt); - map.insert_metawriter(name, writer); - } catch (const config_error & ex) { - ex.append_context(std::string("in meta writer '") + name + "'", pt); - } -} - void map_parser::parse_fontset(Map & map, xml_node const& fset) { std::string name(""); @@ -885,11 +863,6 @@ void map_parser::parse_symbolizer_base(symbolizer_base &sym, xml_node const &pt) // smooth value optional smooth = pt.get_opt_attr("smooth"); if (smooth) sym.set_smooth(*smooth); - - optional writer = pt.get_opt_attr("meta-writer"); - if (!writer) return; - optional output = pt.get_opt_attr("meta-output"); - sym.add_metawriter(*writer, output); } void map_parser::parse_point_symbolizer(rule & rule, xml_node const & sym) @@ -1511,7 +1484,6 @@ void map_parser::parse_raster_symbolizer(rule & rule, xml_node const & sym) parse_raster_colorizer(colorizer, *cssIter); } } - //Note: raster_symbolizer doesn't support metawriters parse_symbolizer_base(raster_sym, sym); rule.append(raster_sym); } diff --git a/src/map.cpp b/src/map.cpp index c94509df7..fe4692402 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -42,19 +42,6 @@ namespace mapnik { -/** Call cache_metawriters for each symbolizer.*/ -struct metawriter_cache_dispatch : public boost::static_visitor<> -{ - metawriter_cache_dispatch (Map const &m) : m_(m) {} - - template void operator () (T &sym) const - { - sym.cache_metawriters(m_); - } - - Map const &m_; -}; - static const char * aspect_fix_mode_strings[] = { "GROW_BBOX", "GROW_CANVAS", @@ -93,7 +80,6 @@ Map::Map(const Map& rhs) background_(rhs.background_), background_image_(rhs.background_image_), styles_(rhs.styles_), - metawriters_(rhs.metawriters_), fontsets_(rhs.fontsets_), layers_(rhs.layers_), aspectFixMode_(rhs.aspectFixMode_), @@ -102,6 +88,8 @@ Map::Map(const Map& rhs) base_path_(rhs.base_path_), extra_params_(rhs.extra_params_) {} +Map::~Map() {} + Map& Map::operator=(const Map& rhs) { if (this==&rhs) return *this; @@ -112,7 +100,6 @@ Map& Map::operator=(const Map& rhs) background_=rhs.background_; background_image_=rhs.background_image_; styles_=rhs.styles_; - metawriters_ = rhs.metawriters_; fontsets_ = rhs.fontsets_; layers_=rhs.layers_; aspectFixMode_=rhs.aspectFixMode_; @@ -171,40 +158,6 @@ boost::optional Map::find_style(std::string const& na return boost::optional() ; } -bool Map::insert_metawriter(std::string const& name, metawriter_ptr const& writer) -{ - return metawriters_.insert(make_pair(name, writer)).second; -} - -void Map::remove_metawriter(std::string const& name) -{ - metawriters_.erase(name); -} - -metawriter_ptr Map::find_metawriter(std::string const& name) const -{ - std::map::const_iterator itr = metawriters_.find(name); - if (itr != metawriters_.end()) - return itr->second; - else - return metawriter_ptr(); -} - -std::map const& Map::metawriters() const -{ - return metawriters_; -} - -Map::const_metawriter_iterator Map::begin_metawriters() const -{ - return metawriters_.begin(); -} - -Map::const_metawriter_iterator Map::end_metawriters() const -{ - return metawriters_.end(); -} - bool Map::insert_fontset(std::string const& name, font_set const& fontset) { return fontsets_.insert(make_pair(name, fontset)).second; @@ -248,7 +201,6 @@ void Map::remove_all() { layers_.clear(); styles_.clear(); - metawriters_.clear(); } const layer& Map::getLayer(size_t index) const @@ -628,42 +580,6 @@ featureset_ptr Map::query_map_point(unsigned index, double x, double y) const return query_point(index,x,y); } -Map::~Map() {} - -void Map::init_metawriters() -{ - metawriter_cache_dispatch d(*this); - Map::style_iterator styIter = begin_styles(); - Map::style_iterator styEnd = end_styles(); - for (; styIter!=styEnd; ++styIter) { - std::vector& rules = styIter->second.get_rules_nonconst(); - std::vector::iterator ruleIter = rules.begin(); - std::vector::iterator ruleEnd = rules.end(); - for (; ruleIter!=ruleEnd; ++ruleIter) { - rule::symbolizers::iterator symIter = ruleIter->begin(); - rule::symbolizers::iterator symEnd = ruleIter->end(); - for (; symIter!=symEnd; ++symIter) { - boost::apply_visitor(d, *symIter); - } - } - } -} - -void Map::set_metawriter_property(std::string name, std::string value) -{ -#if (U_ICU_VERSION_MAJOR_NUM > 4) || (U_ICU_VERSION_MAJOR_NUM == 4 && U_ICU_VERSION_MINOR_NUM >=2) - metawriter_output_properties[name] = UnicodeString::fromUTF8(value); -#else - metawriter_output_properties[name] = UnicodeString(value.c_str()); -#endif -} - -std::string Map::get_metawriter_property(std::string name) const -{ - std::string result; - to_utf8(metawriter_output_properties[name], result); - return result; -} parameters const& Map::get_extra_parameters() const { diff --git a/src/metawriter.cpp b/src/metawriter.cpp deleted file mode 100644 index e37dfa976..000000000 --- a/src/metawriter.cpp +++ /dev/null @@ -1,369 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -// Mapnik -#include -#include -#include -#include -#include - -// Boost -#include -#include - -// STL -#include - -namespace mapnik { - -UnicodeString const& metawriter_property_map::operator[](std::string const& key) const -{ - std::map::const_iterator it; - it = m_.find(key); - if (it == m_.end()) return not_found_; - return (*it).second; -} - -metawriter_properties::metawriter_properties(boost::optional str) -{ - if (str) { - boost::split(*this, *str, boost::is_any_of(", "), boost::token_compress_on); - } -} - -std::string metawriter_properties::to_string() const -{ - return boost::algorithm::join(*this, ","); -} - -/********************************************************************************************/ - -void metawriter_json_stream::start(metawriter_property_map const& /*properties*/) -{ - assert(trans_); - if (output_empty_) { - write_header(); - } else { - count_ = HEADER_NOT_WRITTEN; - } -} - -void metawriter_json_stream::write_header() -{ - assert(f_); - *f_ << "{ \"type\": \"FeatureCollection\", \"features\": [\n" << std::fixed << std::setprecision(pixel_coordinates_ ? 0 : 8); - count_ = STARTED; -} - -void metawriter_json_stream::stop() -{ - if (count_ >= STARTED && f_) - { - *f_ << " ] }\n"; - } - count_ = STOPPED; -} - -metawriter_json_stream::~metawriter_json_stream() -{ - if (count_ >= STARTED) - { - MAPNIK_LOG_WARN(metawriter) << "WARNING: GeoJSON metawriter not stopped before destroying it."; - - stop(); - } - if (trans_) delete trans_; -} - - -metawriter_json_stream::metawriter_json_stream(metawriter_properties dflt_properties) - : metawriter(dflt_properties), count_(-1), output_empty_(true), - trans_(0), output_srs_("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs"), - pixel_coordinates_(false), f_(0) -{ -} - -void metawriter_json_stream::write_properties(Feature const& feature, metawriter_properties const& properties) -{ - *f_ << "}," << //Close coordinates object - "\n \"properties\": {"; - - int i = 0; - BOOST_FOREACH(std::string const& p, properties) - { - if (feature.has_key(p)) - { - mapnik::value const& val = feature.get(p); - std::string str = val.to_string(); - if (str.size() == 0) continue; // ignore empty attributes - - //Property found - std::string text = boost::replace_all_copy(boost::replace_all_copy(str, "\\", "\\\\"), "\"", "\\\""); - if (i++) *f_ << ","; - *f_ << "\n \"" << p << "\":\"" << text << "\""; - } - } - - *f_ << "\n} }"; -} - -/* Coordinate transform in renderer: - input: layer srs - prj_trans.backwards() [prj_trans: map -> layer] - intermediate: map srs - t_.forward() - output: pixels - - Our transform: - input: pixels - t_.backward() - intermediate: map srs - trans_.forward() - output: WGS84 -*/ - - -void metawriter_json_stream::add_box(box2d const &box, Feature const& feature, - CoordTransform const& t, metawriter_properties const& properties) -{ - /* Check if feature is in bounds. */ - if (box.maxx() < 0 || box.maxy() < 0 || box.minx() > width_ || box.miny() > height_) return; - double minx, miny, maxx, maxy; - if (pixel_coordinates_) { - minx = box.minx(); - miny = box.miny(); - maxx = box.maxx(); - maxy = box.maxy(); - } else { - //t_ coord transform has transform for box2d combined with proj_transform - box2d transformed = t.backward(box, *trans_); - - minx = transformed.minx(); - miny = transformed.miny(); - maxx = transformed.maxx(); - maxy = transformed.maxy(); - } - - write_feature_header("Polygon"); - - *f_ << " [ [ [" << - minx << ", " << miny << "], [" << - maxx << ", " << miny << "], [" << - maxx << ", " << maxy << "], [" << - minx << ", " << maxy << "] ] ]"; - - write_properties(feature, properties); - -} - -void metawriter_json_stream::add_text( - boost::ptr_vector const& placements, box2d const& extents, - Feature const& feature, CoordTransform const& t, - metawriter_properties const& properties) -{ - /* Note: - Map coordinate system (and starting_{x,y}) starts in upper left corner - and grows towards lower right corner. - Font + placement vertex coordinate system starts in lower left corner - and grows towards upper right corner. - Therefore y direction is different. Keep this in mind while doing calculations. - - The y value returned by vertex() is always the baseline. - Lowest y = baseline of bottom line - Hightest y = baseline of top line - - */ - for (unsigned n = 0; n < placements.size(); n++) - { - text_path const& current_placement = placements[n]; - - bool inside = false; /* Part of text is inside rendering region */ - bool straight = true; - char_info_ptr c; - double x, y, angle; - current_placement.rewind(); - for (int i = 0; i < current_placement.num_nodes(); ++i) - { - int cx = current_placement.center.x; - int cy = current_placement.center.y; - current_placement.vertex(&c, &x, &y, &angle); - if (cx+x >= 0 && cx+x < width_ && cy-y >= 0 && cy-y < height_) inside = true; - if (angle > 0.001 || angle < -0.001) straight = false; - if (inside && !straight) break; - } - if (!inside) continue; - - current_placement.rewind(); - - if (straight) { - //Reduce number of polygons - double minx = INT_MAX, miny = INT_MAX, maxx = INT_MIN, maxy = INT_MIN; - for (int i = 0; i < current_placement.num_nodes(); ++i) { - current_placement.vertex(&c, &x, &y, &angle); - minx = std::min(minx, x); - maxx = std::max(maxx, x+c->width); - maxy = std::max(maxy, y+c->ymax); - miny = std::min(miny, y+c->ymin); - } - add_box(box2d(current_placement.center.x+minx, - current_placement.center.y-miny, - current_placement.center.x+maxx, - current_placement.center.y-maxy), feature, t, properties); - continue; - } - - write_feature_header("MultiPolygon"); - *f_ << "["; - for (int i = 0; i < current_placement.num_nodes(); ++i) { - current_placement.vertex(&c, &x, &y, &angle); - if (c->c == ' ') continue; - *f_ << ","; - - double x0, y0, x1, y1, x2, y2, x3, y3; - double sina = sin(angle); - double cosa = cos(angle); - x0 = current_placement.center.x + x - sina*c->ymin; - y0 = current_placement.center.y - y - cosa*c->ymin; - x1 = x0 + c->width * cosa; - y1 = y0 - c->width * sina; - x2 = x0 + (c->width * cosa - c->height() * sina); - y2 = y0 - (c->width * sina + c->height() * cosa); - x3 = x0 - c->height() * sina; - y3 = y0 - c->height() * cosa; - - *f_ << "\n [["; - write_point(t, x0, y0); - write_point(t, x1, y1); - write_point(t, x2, y2); - write_point(t, x3, y3, true); - *f_ << "]]"; - } - *f_ << "]"; - write_properties(feature, properties); - } -} - -void metawriter_json_stream::add_polygon(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties) -{ - write_feature_header("Polygon"); - write_line_polygon(path, t, true); - write_properties(feature, properties); -} - -void metawriter_json_stream::add_line(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties) -{ - write_feature_header("MultiLineString"); - write_line_polygon(path, t, false); - write_properties(feature, properties); -} - -void metawriter_json_stream::write_line_polygon(path_type & path, CoordTransform const& t, bool /*polygon*/){ - *f_ << " ["; - double x, y, last_x=0.0, last_y=0.0; - unsigned cmd, last_cmd = SEG_END; - path.rewind(0); - - int polygon_count = 0; - while ((cmd = path.vertex(&x, &y)) != SEG_END) { - if (cmd == SEG_LINETO) { - if (last_cmd == SEG_MOVETO) { - //Start new polygon/line - if (polygon_count++) *f_ << "], "; - *f_ << "["; - write_point(t, last_x, last_y, true); - } - *f_ << ","; - write_point(t, x, y, true); - } - last_x = x; - last_y = y; - last_cmd = cmd; - } - *f_ << "]]"; -} - - -void metawriter_json_stream::set_map_srs(projection const& input_srs_) -{ - if (trans_) delete trans_; - trans_ = new proj_transform(input_srs_, output_srs_); -} - - -/********************************************************************************************/ - -metawriter_json::metawriter_json(metawriter_properties dflt_properties, path_expression_ptr fn) - : metawriter_json_stream(dflt_properties), fn_(fn) {} - - -void metawriter_json::start(metawriter_property_map const& properties) -{ - filename_ = path_processor::evaluate(*fn_, properties); - - MAPNIK_LOG_DEBUG(metawriter) << "metawriter_json: Filename=" << filename_; - - metawriter_json_stream::start(properties); -} - -void metawriter_json::write_header() -{ - f_.open(filename_.c_str(), std::fstream::out | std::fstream::trunc); - if (f_.fail()) - { - MAPNIK_LOG_DEBUG(metawriter) << "metawriter_json: Failed to open file " << filename_; - } - set_stream(&f_); - metawriter_json_stream::write_header(); -} - - -void metawriter_json::stop() -{ - metawriter_json_stream::stop(); - if (f_.is_open()) - { - f_.close(); - } - else if (count_ >= STARTED) - { - MAPNIK_LOG_DEBUG(metawriter) << "metawriter_json: File not open when stopping"; - } -} - -void metawriter_json::set_filename(path_expression_ptr fn) -{ - fn_ = fn; -} - -path_expression_ptr metawriter_json::get_filename() const -{ - return fn_; -} - -} diff --git a/src/metawriter_factory.cpp b/src/metawriter_factory.cpp deleted file mode 100644 index 2991dc207..000000000 --- a/src/metawriter_factory.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -// mapnik -#include -#include -#include -#include -#include -#include - -// boost -#include -#include - -using boost::optional; -using std::string; - -namespace mapnik -{ - -metawriter_ptr -metawriter_create(xml_node const& pt) -{ - metawriter_ptr writer; - string type = pt.get_attr("type"); - - optional properties = pt.get_opt_attr("default-output"); - if (type == "json") { - string file = pt.get_attr("file"); - metawriter_json_ptr json = boost::make_shared(properties, parse_path(file)); - optional output_empty = pt.get_opt_attr("output-empty"); - if (output_empty) { - json->set_output_empty(*output_empty); - } - - optional pixel_coordinates = pt.get_opt_attr("pixel-coordinates"); - if (pixel_coordinates) { - json->set_pixel_coordinates(*pixel_coordinates); - } - writer = json; - - } else if (type == "inmem") { - metawriter_inmem_ptr inmem = boost::make_shared(properties); - writer = inmem; - } else { - throw config_error(string("Unknown type '") + type + "'", pt); - } - - return writer; -} - -void -metawriter_save(const metawriter_ptr &metawriter, - boost::property_tree::ptree &metawriter_node, bool explicit_defaults) -{ - - metawriter_json *json = dynamic_cast(metawriter.get()); - if (json) { - set_attr(metawriter_node, "type", "json"); - std::string const& filename = path_processor_type::to_string(*(json->get_filename())); - if (!filename.empty() || explicit_defaults) { - set_attr(metawriter_node, "file", filename); - } - } - - metawriter_inmem *inmem = dynamic_cast(metawriter.get()); - if (inmem) { - set_attr(metawriter_node, "type", "inmem"); - } - - if (!metawriter->get_default_properties().empty() || explicit_defaults) { - set_attr(metawriter_node, "default-output", metawriter->get_default_properties().to_string()); - } -} - -} // namespace mapnik diff --git a/src/metawriter_inmem.cpp b/src/metawriter_inmem.cpp deleted file mode 100644 index 7cf0645be..000000000 --- a/src/metawriter_inmem.cpp +++ /dev/null @@ -1,148 +0,0 @@ -/***************************************************************************** - * - * This file is part of Mapnik (c++ mapping toolkit) - * - * Copyright (C) 2011 Artem Pavlenko - * - * This library 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 library 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 library; if not, write to the Free Software - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - * - *****************************************************************************/ - -// Mapnik -#include -#include -#include - -// Boost -#include - -using std::map; -using std::string; - -namespace { - -using mapnik::value; -using mapnik::Feature; -using mapnik::metawriter_properties; - -// intersect a set of properties with those in the feature descriptor -map intersect_properties(Feature const& feature, metawriter_properties const& properties) { - - map nprops; - BOOST_FOREACH(string p, properties) - { - if (feature.has_key(p)) - nprops.insert(std::make_pair(p,feature.get(p))); - } - - return nprops; -}} // end anonymous namespace - -namespace mapnik { - -metawriter_inmem::metawriter_inmem(metawriter_properties dflt_properties) - : metawriter(dflt_properties) { -} - -metawriter_inmem::~metawriter_inmem() { -} - -void -metawriter_inmem::add_box(box2d const& box, Feature const& feature, - CoordTransform const& /*t*/, - metawriter_properties const& properties) { - meta_instance inst; - inst.box = box; - inst.properties = intersect_properties(feature, properties); - instances_.push_back(inst); -} - -void -metawriter_inmem::add_text( - boost::ptr_vector const& /*text*/, - box2d const& extents, - Feature const& feature, - CoordTransform const& /*t*/, - metawriter_properties const& properties) -{ - if (extents.valid()) - { - meta_instance inst; - inst.properties = intersect_properties(feature, properties); - inst.box = extents; - instances_.push_back(inst); - } -} - -void -metawriter_inmem::add_polygon(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties) { - add_vertices(path, feature, t, properties); -} - -void -metawriter_inmem::add_line(path_type & path, - Feature const& feature, - CoordTransform const& t, - metawriter_properties const& properties) { - add_vertices(path, feature, t, properties); -} - -void -metawriter_inmem::add_vertices(path_type & path, - Feature const& feature, - CoordTransform const& /*t*/, - metawriter_properties const& properties) { - box2d box; - unsigned cmd; - double x = 0.0, y = 0.0; - - path.rewind(0); - while ((cmd = path.vertex(&x, &y)) != SEG_END) { - box.expand_to_include(x, y); - } - - if ((box.width() >= 0.0) && (box.height() >= 0.0)) { - meta_instance inst; - inst.properties = intersect_properties(feature, properties); - inst.box = box; - instances_.push_back(inst); - } -} - -void -metawriter_inmem::start(metawriter_property_map const& /*properties*/) { - instances_.clear(); -} - -const std::list & -metawriter_inmem::instances() const { - return instances_; -} - -metawriter_inmem::meta_instance_list::const_iterator -metawriter_inmem::inst_begin() const { - return instances_.begin(); -} - -metawriter_inmem::meta_instance_list::const_iterator -metawriter_inmem::inst_end() const { - return instances_.end(); -} - - -} diff --git a/src/save_map.cpp b/src/save_map.cpp index 3138ca040..dfc163a75 100644 --- a/src/save_map.cpp +++ b/src/save_map.cpp @@ -29,7 +29,6 @@ #include #include #include -#include #include #include #include @@ -342,12 +341,6 @@ private: void serialize_symbolizer_base(ptree & node, symbolizer_base const& sym) { symbolizer_base dfl = symbolizer_base(); - if (!sym.get_metawriter_name().empty() || explicit_defaults_) { - set_attr(node, "meta-writer", sym.get_metawriter_name()); - } - if (!sym.get_metawriter_properties_overrides().empty() || explicit_defaults_) { - set_attr(node, "meta-output", sym.get_metawriter_properties_overrides().to_string()); - } if (sym.get_transform()) { std::string tr_str = sym.get_transform_string(); @@ -773,18 +766,6 @@ void serialize_layer( ptree & map_node, const layer & layer, bool explicit_defau } } -void serialize_metawriter(ptree & map_node, Map::const_metawriter_iterator metawriter_it, bool explicit_defaults) -{ - std::string const& name = metawriter_it->first; - metawriter_ptr const& metawriter = metawriter_it->second; - - ptree & metawriter_node = map_node.push_back( - ptree::value_type("MetaWriter", ptree()))->second; - - set_attr(metawriter_node, "name", name); - metawriter_save(metawriter, metawriter_node, explicit_defaults); -} - void serialize_map(ptree & pt, Map const & map, bool explicit_defaults) { @@ -849,12 +830,6 @@ void serialize_map(ptree & pt, Map const & map, bool explicit_defaults) { serialize_layer( map_node, layers[i], explicit_defaults ); } - - Map::const_metawriter_iterator m_it = map.begin_metawriters(); - Map::const_metawriter_iterator m_end = map.end_metawriters(); - for (; m_it != m_end; ++m_it) { - serialize_metawriter(map_node, m_it, explicit_defaults); - } } void save_map(Map const & map, std::string const& filename, bool explicit_defaults) diff --git a/src/symbolizer.cpp b/src/symbolizer.cpp index 7825338c3..6144debcd 100644 --- a/src/symbolizer.cpp +++ b/src/symbolizer.cpp @@ -45,11 +45,7 @@ void evaluate_transform(agg::trans_affine& tr, Feature const& feature, // default ctor symbolizer_base::symbolizer_base() - : properties_(), - properties_complete_(), - writer_name_(), - writer_ptr_(), - comp_op_(src_over), + : comp_op_(src_over), clip_(true), smooth_value_(0.0) { @@ -62,49 +58,6 @@ symbolizer_base::symbolizer_base(symbolizer_base const& other) clip_(other.clip_), smooth_value_(other.smooth_value_) {} -void symbolizer_base::add_metawriter(std::string const& name, metawriter_properties const& properties) -{ - writer_name_ = name; - properties_ = properties; -} - -void symbolizer_base::add_metawriter(metawriter_ptr writer_ptr, metawriter_properties const& properties, - std::string const& name) -{ - writer_ptr_ = writer_ptr; - properties_ = properties; - writer_name_ = name; - if (writer_ptr) { - properties_complete_ = writer_ptr->get_default_properties(); - properties_complete_.insert(properties_.begin(), properties_.end()); - } else { - properties_complete_.clear(); - } -} - -void symbolizer_base::cache_metawriters(Map const &m) -{ - if (writer_name_.empty()) { - properties_complete_.clear(); - writer_ptr_ = metawriter_ptr(); - return; // No metawriter - } - - writer_ptr_ = m.find_metawriter(writer_name_); - if (writer_ptr_) { - properties_complete_ = writer_ptr_->get_default_properties(); - properties_complete_.insert(properties_.begin(), properties_.end()); - } else { - properties_complete_.clear(); - MAPNIK_LOG_WARN(symbolizer) << "Metawriter '" << writer_name_ << "' used but not defined."; - } -} - -metawriter_with_properties symbolizer_base::get_metawriter() const -{ - return metawriter_with_properties(writer_ptr_, properties_complete_); -} - void symbolizer_base::set_comp_op(composite_mode_e comp_op) { comp_op_ = comp_op; diff --git a/src/symbolizer_helpers.cpp b/src/symbolizer_helpers.cpp index a7dbcea08..51bfa456f 100644 --- a/src/symbolizer_helpers.cpp +++ b/src/symbolizer_helpers.cpp @@ -71,9 +71,6 @@ bool text_symbolizer_helper::next_line_placement() finder_->update_detector(); } geo_itr_ = geometries_to_process_.erase(geo_itr_); - if (writer_.first) writer_.first->add_text( - finder_->get_results(), finder_->get_extents(), - feature_, t_, writer_.second); return true; } //No placement for this geometry. Keep it in geometries_to_process_ for next try. @@ -116,9 +113,6 @@ bool text_symbolizer_helper::next_line_placement_clippe finder_->update_detector(); } geo_itr_ = geometries_to_process_.erase(geo_itr_); - if (writer_.first) writer_.first->add_text( - finder_->get_results(), finder_->get_extents(), - feature_, t_, writer_.second); return true; } //No placement for this geometry. Keep it in geometries_to_process_ for next try. @@ -146,9 +140,6 @@ bool text_symbolizer_helper::next_point_placement() { //Found a placement point_itr_ = points_.erase(point_itr_); - if (writer_.first) writer_.first->add_text( - finder_->get_results(), finder_->get_extents(), - feature_, t_, writer_.second); finder_->update_detector(); return true; } @@ -291,8 +282,6 @@ bool text_symbolizer_helper::next_placement() finder_ = boost::shared_ptr >(new placement_finder(feature_, *placement_, *info_, detector_, dims_)); // boost::make_shared >(feature_, *placement_, *info_, detector_, dims_); - if (writer_.first) finder_->set_collect_extents(true); - placement_valid_ = true; return true; } @@ -367,11 +356,6 @@ bool shield_symbolizer_helper::next_point_placement() { detector_.insert(marker_ext_); finder_->update_detector(); - if (writer_.first) { - writer_.first->add_box(marker_ext_, feature_, t_, writer_.second); - writer_.first->add_text(finder_->get_results(), finder_->get_extents(), - feature_, t_, writer_.second); - } point_itr_ = points_.erase(point_itr_); return true; } @@ -447,7 +431,6 @@ pixel_position shield_symbolizer_helper::get_marker_pos marker_ext_.re_center(lx, ly); //label is added to detector by get_line_placement(), but marker isn't detector_.insert(marker_ext_); - if (writer_.first) writer_.first->add_box(marker_ext_, feature_, t_, writer_.second); return pixel_position(px, py); } else { //collision_detector is already updated for point placement in get_point_placement() diff --git a/tests/python_tests/map_deepcopy_test.py b/tests/python_tests/map_deepcopy_test.py index bd5eaeda9..6d29623b1 100644 --- a/tests/python_tests/map_deepcopy_test.py +++ b/tests/python_tests/map_deepcopy_test.py @@ -28,7 +28,6 @@ def test_map_deepcopy1(): eq_(m2.scale(),m1.scale()) eq_(m2.scale_denominator(),m1.scale_denominator()) eq_(m2.maximum_extent,m1.maximum_extent) - eq_(id(m2.has_metawriter()),id(m1.has_metawriter())) eq_(id(m2.view_transform()),id(m1.view_transform())) eq_(id(m2.parameters),id(m1.parameters)) eq_(id(m2.layers),id(m1.layers)) From e2b657251d8b0029f9a4f041cf4596f443d57363 Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 15 Aug 2012 10:55:12 +0100 Subject: [PATCH 11/75] + various cleanups + remove alpha pre-multiplication from cairo_pattern to match agg output --- src/cairo_renderer.cpp | 49 ++++++++++++++++++++++++++++++------------ 1 file changed, 35 insertions(+), 14 deletions(-) diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index bdc01b0a0..a4096fed2 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -86,9 +86,9 @@ public: unsigned int b = (in >> 16) & 0xff; unsigned int a = (in >> 24) & 0xff; - r = r * a / 255; - g = g * a / 255; - b = b * a / 255; + //r = r * a / 255; + //g = g * a / 255; + //b = b * a / 255; *out_ptr++ = (a << 24) | (r << 16) | (g << 8) | b; } @@ -97,7 +97,7 @@ public: pattern_ = Cairo::SurfacePattern::create(surface_); } - ~cairo_pattern(void) + ~cairo_pattern() { } @@ -128,7 +128,7 @@ public: pattern_->set_filter(filter); } - Cairo::RefPtr const& pattern(void) const + Cairo::RefPtr const& pattern() const { return pattern_; } @@ -173,12 +173,12 @@ public: pattern_->set_matrix(Cairo::Matrix(m[0],m[1],m[2],m[3],m[4],m[5])); } - ~cairo_gradient(void) + ~cairo_gradient() { } - Cairo::RefPtr const& gradient(void) const + Cairo::RefPtr const& gradient() const { return pattern_; } @@ -209,7 +209,7 @@ public: cairo_face_ = Cairo::RefPtr(new Cairo::FontFace(c_face)); } - Cairo::RefPtr const& face(void) const + Cairo::RefPtr const& face() const { return cairo_face_; } @@ -270,7 +270,7 @@ public: context_->save(); } - ~cairo_context(void) + ~cairo_context() { context_->restore(); } @@ -568,17 +568,17 @@ public: context_->rectangle(x, y, w, h); } - void stroke(void) + void stroke() { context_->stroke(); } - void fill(void) + void fill() { context_->fill(); } - void paint(void) + void paint() { context_->paint(); } @@ -1343,6 +1343,9 @@ void cairo_renderer_base::process(polygon_pattern_symbolizer const& sym, mapnik::feature_impl & feature, proj_transform const& prj_trans) { + typedef agg::conv_clip_polygon clipped_geometry_type; + typedef coord_transform path_type; + cairo_context context(context_); context.set_operator(sym.comp_op()); @@ -1356,13 +1359,32 @@ void cairo_renderer_base::process(polygon_pattern_symbolizer const& sym, context.set_pattern(pattern); + //pattern_alignment_e align = sym.get_alignment(); + //unsigned offset_x=0; + //unsigned offset_y=0; + + //if (align == LOCAL_ALIGNMENT) + //{ + // double x0 = 0; + // double y0 = 0; + // if (feature.num_geometries() > 0) + // { + // clipped_geometry_type clipped(feature.get_geometry(0)); + // clipped.clip_box(query_extent_.minx(),query_extent_.miny(),query_extent_.maxx(),query_extent_.maxy()); + // path_type path(t_,clipped,prj_trans); + // path.vertex(&x0,&y0); + // } + // offset_x = unsigned(width_ - x0); + // offset_y = unsigned(height_ - y0); + //} + agg::trans_affine tr; evaluate_transform(tr, feature, sym.get_transform()); typedef boost::mpl::vector conv_types; vertex_converter, cairo_context, polygon_pattern_symbolizer, CoordTransform, proj_transform, agg::trans_affine, conv_types> - converter(query_extent_,context,sym,t_,prj_trans,tr,1.0); + converter(query_extent_,context,sym,t_,prj_trans,tr, scale_factor_); if (sym.clip()) converter.set(); //optional clip (default: true) converter.set(); //always transform @@ -1376,7 +1398,6 @@ void cairo_renderer_base::process(polygon_pattern_symbolizer const& sym, converter.apply(geom); } } - // fill polygon context.fill(); } From c4765d72ce9af83ad282842e4afa04933b6e68c6 Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 15 Aug 2012 16:42:46 +0100 Subject: [PATCH 12/75] + close linear_rings in WKT parser --- include/mapnik/geometry.hpp | 8 ++++++++ include/mapnik/vertex_vector.hpp | 8 ++++++++ include/mapnik/wkt/wkt_grammar.hpp | 19 ++++++++++++++++++- 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/include/mapnik/geometry.hpp b/include/mapnik/geometry.hpp index 3a7bc2db1..4475ca487 100644 --- a/include/mapnik/geometry.hpp +++ b/include/mapnik/geometry.hpp @@ -126,6 +126,14 @@ public: push_vertex(x,y,SEG_CLOSE); } + void close() + { + if (cont_.size() > 3) + { + cont_.set_command(cont_.size() - 1, SEG_CLOSE); + } + } + unsigned vertex(double* x, double* y) const { return cont_.get_vertex(itr_++,x,y); diff --git a/include/mapnik/vertex_vector.hpp b/include/mapnik/vertex_vector.hpp index 85bcd8857..e17a69320 100644 --- a/include/mapnik/vertex_vector.hpp +++ b/include/mapnik/vertex_vector.hpp @@ -115,6 +115,14 @@ public: return commands_[block] [pos & block_mask]; } + void set_command(unsigned pos, unsigned command) + { + if (pos < pos_) + { + unsigned block = pos >> block_shift; + commands_[block] [pos & block_mask] = command; + } + } private: void allocate_block(unsigned block) { diff --git a/include/mapnik/wkt/wkt_grammar.hpp b/include/mapnik/wkt/wkt_grammar.hpp index cd5967b28..ca6afe3cd 100644 --- a/include/mapnik/wkt/wkt_grammar.hpp +++ b/include/mapnik/wkt/wkt_grammar.hpp @@ -59,6 +59,22 @@ namespace mapnik { namespace wkt { } }; + struct close_path + { + template + struct result + { + typedef void type; + }; + + template + void operator() (T path) const + { + BOOST_ASSERT( path!=0 ); + path->close(); + } + }; + struct cleanup { template @@ -119,7 +135,7 @@ namespace mapnik { namespace wkt { ; // ::= | { }* - polygon_text = (lit('(') >> linestring_text(_r1) % lit(',') >> lit(')')) | empty_set; + polygon_text = (lit('(') >> linestring_text(_r1)[close_path_(_r1)] % lit(',') >> lit(')')) | empty_set; // ::= multipoint @@ -191,6 +207,7 @@ namespace mapnik { namespace wkt { qi::rule,void(geometry_type*),ascii::space_type> points; qi::rule empty_set; boost::phoenix::function push_vertex_; + boost::phoenix::function close_path_; boost::phoenix::function cleanup_; }; From a991c73a98249b18d3e4205053127b33733488bf Mon Sep 17 00:00:00 2001 From: artemp Date: Wed, 15 Aug 2012 16:53:28 +0100 Subject: [PATCH 13/75] + geojson grammar : close linear_rings --- include/mapnik/json/feature_grammar.hpp | 17 +++++++++++++++++ src/json/feature_grammar.cpp | 2 +- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/include/mapnik/json/feature_grammar.hpp b/include/mapnik/json/feature_grammar.hpp index b56a991b7..d8fe1bab3 100644 --- a/include/mapnik/json/feature_grammar.hpp +++ b/include/mapnik/json/feature_grammar.hpp @@ -116,6 +116,22 @@ struct push_vertex } }; +struct close_path +{ + template + struct result + { + typedef void type; + }; + + template + void operator() (T path) const + { + BOOST_ASSERT( path!=0 ); + path->close(); + } +}; + struct cleanup { template @@ -187,6 +203,7 @@ struct feature_grammar : phoenix::function put_property_; phoenix::function extract_geometry_; boost::phoenix::function push_vertex_; + boost::phoenix::function close_path_; boost::phoenix::function cleanup_; }; diff --git a/src/json/feature_grammar.cpp b/src/json/feature_grammar.cpp index 8c6386422..1eb98c915 100644 --- a/src/json/feature_grammar.cpp +++ b/src/json/feature_grammar.cpp @@ -183,7 +183,7 @@ feature_grammar::feature_grammar(mapnik::transcoder const& polygon_coordinates = eps[ _a = new_(Polygon) ] > ((lit('[') - > -(points(_a) % lit(',')) + > -(points(_a)[close_path_(_a)] % lit(',')) > lit(']')) [push_back(_r1,_a)] | eps[cleanup_(_a)][_pass = false]) ; From 6f5d6f65b1257dd3b57e1dc2e26588bd192418fc Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 10:24:56 -0700 Subject: [PATCH 14/75] include what you use --- bindings/python/mapnik_map.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index c4160add4..d0681c590 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -28,6 +28,8 @@ // mapnik #include #include +#include +#include #include #include #include "mapnik_enumeration.hpp" From f8e563b4fa6b05969a413627c8f5d61336d51075 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 10:25:29 -0700 Subject: [PATCH 15/75] fixup includes --- src/map.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/map.cpp b/src/map.cpp index fe4692402..cd5ba2821 100644 --- a/src/map.cpp +++ b/src/map.cpp @@ -27,6 +27,8 @@ #include #include #include +#include +#include #include #include #include @@ -36,9 +38,6 @@ // boost #include -// icu -#include - namespace mapnik { From 2b108b7cdb701294cb2c32899ce824fe10f583d3 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 10:26:20 -0700 Subject: [PATCH 16/75] fixup includes --- include/mapnik/feature_style_processor.hpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/include/mapnik/feature_style_processor.hpp b/include/mapnik/feature_style_processor.hpp index 487a527d8..152269ba1 100644 --- a/include/mapnik/feature_style_processor.hpp +++ b/include/mapnik/feature_style_processor.hpp @@ -25,10 +25,8 @@ // mapnik #include -#include #include - // stl #include #include @@ -40,6 +38,7 @@ namespace mapnik class Map; class layer; class projection; +class proj_transform; template class feature_style_processor From 71e0edc7bfe73c185c24f28787704e928677e397 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 10:33:31 -0700 Subject: [PATCH 17/75] forward declare CoordTransform in map.hpp --- include/mapnik/map.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/mapnik/map.hpp b/include/mapnik/map.hpp index a995c515c..bdfbf5bf2 100644 --- a/include/mapnik/map.hpp +++ b/include/mapnik/map.hpp @@ -28,7 +28,6 @@ #include #include #include -#include #include // boost @@ -36,6 +35,9 @@ namespace mapnik { + +class CoordTransform; + class MAPNIK_DECL Map { public: From 953186f37666fc99abeca38f2a66af918292ab9a Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 10:36:44 -0700 Subject: [PATCH 18/75] followup to aecf0531f505f1 --- workspace/bindings.pri | 1 - workspace/mapnik.pro | 7 ------- 2 files changed, 8 deletions(-) diff --git a/workspace/bindings.pri b/workspace/bindings.pri index 397285efd..61fdfce10 100644 --- a/workspace/bindings.pri +++ b/workspace/bindings.pri @@ -21,7 +21,6 @@ SOURCES += \ $$PWD/../bindings/python/mapnik_grid_view.cpp \ $$PWD/../bindings/python/mapnik_image.cpp \ $$PWD/../bindings/python/mapnik_image_view.cpp \ - $$PWD/../bindings/python/mapnik_inmem_metawriter.cpp \ $$PWD/../bindings/python/mapnik_layer.cpp \ $$PWD/../bindings/python/mapnik_logger.cpp \ $$PWD/../bindings/python/mapnik_line_pattern_symbolizer.cpp \ diff --git a/workspace/mapnik.pro b/workspace/mapnik.pro index 32b1d2333..44ddf1d96 100644 --- a/workspace/mapnik.pro +++ b/workspace/mapnik.pro @@ -136,10 +136,6 @@ HEADERS += \ ../include/mapnik/memory.hpp \ ../include/mapnik/memory_datasource.hpp \ ../include/mapnik/memory_featureset.hpp \ - ../include/mapnik/metawriter.hpp \ - ../include/mapnik/metawriter_factory.hpp \ - ../include/mapnik/metawriter_inmem.hpp \ - ../include/mapnik/metawriter_json.hpp \ ../include/mapnik/octree.hpp \ ../include/mapnik/palette.hpp \ ../include/mapnik/params.hpp \ @@ -279,9 +275,6 @@ SOURCES += \ ../src/markers_symbolizer.cpp \ ../src/memory.cpp \ ../src/memory_datasource.cpp \ - ../src/metawriter.cpp \ - ../src/metawriter_factory.cpp \ - ../src/metawriter_inmem.cpp \ ../src/palette.cpp \ ../src/parse_path.cpp \ ../src/placement_finder.cpp \ From 107c72563fd48c7a4ef68b0c2a866d3bccbe0548 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 12:37:17 -0700 Subject: [PATCH 19/75] avoid some msvc compiler warnings in gdal input- refs #1103 --- plugins/input/gdal/gdal_featureset.cpp | 7 ++++--- plugins/input/gdal/gdal_featureset.hpp | 4 ++-- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index 2b67bbcc5..d37132961 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -50,8 +50,8 @@ gdal_featureset::gdal_featureset(GDALDataset& dataset, int band, gdal_query q, mapnik::box2d extent, - double width, - double height, + unsigned width, + unsigned height, int nbands, double dx, double dy, @@ -515,7 +515,8 @@ feature_ptr gdal_featureset::get_feature_at_point(mapnik::coord2d const& pt) double Y = pt.y - gt[3] - gt[5]/2; double det1 = gt[1]*Y + gt[4]*X; double det2 = gt[2]*Y + gt[5]*X; - unsigned x = det2/det, y = det1/det; + unsigned x = static_cast(det2/det); + unsigned y = static_cast(det1/det); if (x < raster_xsize && y < raster_ysize) { diff --git a/plugins/input/gdal/gdal_featureset.hpp b/plugins/input/gdal/gdal_featureset.hpp index fc3856574..129f9132b 100644 --- a/plugins/input/gdal/gdal_featureset.hpp +++ b/plugins/input/gdal/gdal_featureset.hpp @@ -45,8 +45,8 @@ public: int band, gdal_query q, mapnik::box2d extent, - double width, - double height, + unsigned width, + unsigned height, int nbands, double dx, double dy, From 9e85944d93ea8fe37f35b5c0ab5debe9aa6373e8 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 13:27:10 -0700 Subject: [PATCH 20/75] remove unneeded import --- tests/python_tests/map_query_test.py | 1 - tests/python_tests/raster_alpha_test.py | 1 - tests/python_tests/test_fontset.py | 1 - 3 files changed, 3 deletions(-) diff --git a/tests/python_tests/map_query_test.py b/tests/python_tests/map_query_test.py index 145508ae9..63a7249da 100644 --- a/tests/python_tests/map_query_test.py +++ b/tests/python_tests/map_query_test.py @@ -2,7 +2,6 @@ from nose.tools import * from utilities import execution_path -from copy import deepcopy import os, mapnik diff --git a/tests/python_tests/raster_alpha_test.py b/tests/python_tests/raster_alpha_test.py index 0fb0ea986..d94805405 100644 --- a/tests/python_tests/raster_alpha_test.py +++ b/tests/python_tests/raster_alpha_test.py @@ -2,7 +2,6 @@ from nose.tools import * from utilities import execution_path -from copy import deepcopy import os, mapnik diff --git a/tests/python_tests/test_fontset.py b/tests/python_tests/test_fontset.py index d3647c25e..ec44a103d 100644 --- a/tests/python_tests/test_fontset.py +++ b/tests/python_tests/test_fontset.py @@ -2,7 +2,6 @@ from nose.tools import * from utilities import execution_path -from copy import deepcopy import os, mapnik From b8a0587c293b16118fbf2406fd29fea334e9a17b Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 13:27:44 -0700 Subject: [PATCH 21/75] disable deepcopy in python bindings until this is more solid - refs #1390 --- bindings/python/mapnik_map.cpp | 6 ++- tests/python_tests/map_deepcopy_test.py | 50 ++++++++++++------------- 2 files changed, 29 insertions(+), 27 deletions(-) diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index d0681c590..42e37d218 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -31,7 +31,7 @@ #include #include #include -#include +//#include #include "mapnik_enumeration.hpp" using mapnik::color; @@ -165,6 +165,7 @@ mapnik::featureset_ptr query_map_point(mapnik::Map const& m, int index, double x } // deepcopy +/* mapnik::Map map_deepcopy(mapnik::Map & m, boost::python::dict memo) { // FIXME: ignore memo for now @@ -172,6 +173,7 @@ mapnik::Map map_deepcopy(mapnik::Map & m, boost::python::dict memo) mapnik::util::deepcopy(m, result); return result; } +*/ void set_maximum_extent(mapnik::Map & m, boost::optional > const& box) { @@ -430,7 +432,7 @@ void export_map() ">>> m.zoom_to_box(extent)\n" ) - .def("__deepcopy__",&map_deepcopy) + //.def("__deepcopy__",&map_deepcopy) .add_property("parameters",make_function(params_nonconst,return_value_policy()),"TODO") .add_property("aspect_fix_mode", diff --git a/tests/python_tests/map_deepcopy_test.py b/tests/python_tests/map_deepcopy_test.py index 6d29623b1..2caf846c0 100644 --- a/tests/python_tests/map_deepcopy_test.py +++ b/tests/python_tests/map_deepcopy_test.py @@ -11,32 +11,32 @@ def setup(): # from another directory we need to chdir() os.chdir(execution_path('.')) -def test_map_deepcopy1(): - m1 = mapnik.Map(256,256) - m1.append_style('style',mapnik.Style()) - m1.append_fontset('fontset',mapnik.FontSet()) - m2 = deepcopy(m1) - eq_(m2.width, m1.width) - eq_(m2.height, m2.height) - eq_(m2.srs, m1.srs) - eq_(m2.base, m1.base) - eq_(m2.background, m1.background) - eq_(m2.buffer_size, m1.buffer_size) - eq_(m2.aspect_fix_mode, m1.aspect_fix_mode) - eq_(m2.envelope(),m1.envelope()) - eq_(m2.buffered_envelope(),m1.buffered_envelope()) - eq_(m2.scale(),m1.scale()) - eq_(m2.scale_denominator(),m1.scale_denominator()) - eq_(m2.maximum_extent,m1.maximum_extent) - eq_(id(m2.view_transform()),id(m1.view_transform())) - eq_(id(m2.parameters),id(m1.parameters)) - eq_(id(m2.layers),id(m1.layers)) - eq_(id(m2.layers),id(m1.layers)) - eq_(id(m2.find_fontset('fontset')),id(m2.find_fontset('fontset'))) - # fails for some reason on linux (not osx) - # but non-critical for now - #eq_(id(m2.find_style('style')),id(m2.find_style('style'))) +#def test_map_deepcopy1(): +# m1 = mapnik.Map(256,256) +# m1.append_style('style',mapnik.Style()) +# m1.append_fontset('fontset',mapnik.FontSet()) +# m2 = deepcopy(m1) +# eq_(m2.width, m1.width) +# eq_(m2.height, m2.height) +# eq_(m2.srs, m1.srs) +# eq_(m2.base, m1.base) +# eq_(m2.background, m1.background) +# eq_(m2.buffer_size, m1.buffer_size) +# eq_(m2.aspect_fix_mode, m1.aspect_fix_mode) +# eq_(m2.envelope(),m1.envelope()) +# eq_(m2.buffered_envelope(),m1.buffered_envelope()) +# eq_(m2.scale(),m1.scale()) +# eq_(m2.scale_denominator(),m1.scale_denominator()) +# eq_(m2.maximum_extent,m1.maximum_extent) +# eq_(id(m2.view_transform()),id(m1.view_transform())) +# eq_(id(m2.parameters),id(m1.parameters)) +# eq_(id(m2.layers),id(m1.layers)) +# eq_(id(m2.layers),id(m1.layers)) +# eq_(id(m2.find_fontset('fontset')),id(m2.find_fontset('fontset'))) +# # fails for some reason on linux (not osx) +# # but non-critical for now +# #eq_(id(m2.find_style('style')),id(m2.find_style('style'))) if __name__ == "__main__": setup() From 91b15c4cdfcd82604045f780baccfe407af99501 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 13:55:36 -0700 Subject: [PATCH 22/75] remove python pickling for map/style/rule/symbolizers/fontset/query - refs #1391 --- bindings/python/mapnik_fontset.cpp | 10 -- .../python/mapnik_line_pattern_symbolizer.cpp | 12 -- bindings/python/mapnik_line_symbolizer.cpp | 11 -- bindings/python/mapnik_map.cpp | 79 ------------ bindings/python/mapnik_markers_symbolizer.cpp | 38 ------ bindings/python/mapnik_point_symbolizer.cpp | 42 ------ .../mapnik_polygon_pattern_symbolizer.cpp | 36 ------ bindings/python/mapnik_polygon_symbolizer.cpp | 35 ----- bindings/python/mapnik_query.cpp | 10 -- bindings/python/mapnik_raster_symbolizer.cpp | 40 ------ bindings/python/mapnik_rule.cpp | 103 --------------- bindings/python/mapnik_shield_symbolizer.cpp | 1 - bindings/python/mapnik_stroke.cpp | 58 --------- bindings/python/mapnik_style.cpp | 42 ------ tests/python_tests/parameters_test.py | 10 -- tests/python_tests/pickling_test.py | 122 ++---------------- 16 files changed, 9 insertions(+), 640 deletions(-) diff --git a/bindings/python/mapnik_fontset.cpp b/bindings/python/mapnik_fontset.cpp index b50916229..f467d816f 100644 --- a/bindings/python/mapnik_fontset.cpp +++ b/bindings/python/mapnik_fontset.cpp @@ -30,21 +30,11 @@ using mapnik::font_set; -struct fontset_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const font_set& fs) - { - return boost::python::make_tuple(fs.get_name()); - } -}; - void export_fontset () { using namespace boost::python; class_("FontSet", init<>("default fontset constructor") ) - .def_pickle(fontset_pickle_suite()) .def("add_face_name",&font_set::add_face_name, (arg("name")), "Add a face-name to the fontset.\n" diff --git a/bindings/python/mapnik_line_pattern_symbolizer.cpp b/bindings/python/mapnik_line_pattern_symbolizer.cpp index e982edf05..ac8fa6c92 100644 --- a/bindings/python/mapnik_line_pattern_symbolizer.cpp +++ b/bindings/python/mapnik_line_pattern_symbolizer.cpp @@ -49,17 +49,6 @@ void set_filename(line_pattern_symbolizer & t, std::string const& file_expr) } -struct line_pattern_symbolizer_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const line_pattern_symbolizer& l) - { - std::string filename = path_processor_type::to_string(*l.get_filename()); - // FIXME : Do we need "type" parameter at all ? - return boost::python::make_tuple(filename, guess_type(filename)); - } -}; - void export_line_pattern_symbolizer() { using namespace boost::python; @@ -67,7 +56,6 @@ void export_line_pattern_symbolizer() class_("LinePatternSymbolizer", init ("")) - //.def_pickle(line_pattern_symbolizer_pickle_suite()) .add_property("transform", mapnik::get_svg_transform, mapnik::set_svg_transform) diff --git a/bindings/python/mapnik_line_symbolizer.cpp b/bindings/python/mapnik_line_symbolizer.cpp index bbf49164c..c836b4352 100644 --- a/bindings/python/mapnik_line_symbolizer.cpp +++ b/bindings/python/mapnik_line_symbolizer.cpp @@ -29,16 +29,6 @@ using mapnik::line_symbolizer; using mapnik::stroke; using mapnik::color; -struct line_symbolizer_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const line_symbolizer& l) - { - return boost::python::make_tuple(l.get_stroke()); - } - -}; - void export_line_symbolizer() { using namespace boost::python; @@ -50,7 +40,6 @@ void export_line_symbolizer() init<>("Default LineSymbolizer - 1px solid black")) .def(init("TODO")) .def(init()) - .def_pickle(line_symbolizer_pickle_suite()) .add_property("rasterizer", &line_symbolizer::get_rasterizer, &line_symbolizer::set_rasterizer, diff --git a/bindings/python/mapnik_map.cpp b/bindings/python/mapnik_map.cpp index 42e37d218..f7af30291 100644 --- a/bindings/python/mapnik_map.cpp +++ b/bindings/python/mapnik_map.cpp @@ -40,85 +40,9 @@ using mapnik::box2d; using mapnik::layer; using mapnik::Map; -struct map_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const Map& m) - { - return boost::python::make_tuple(m.width(),m.height(),m.srs()); - } - - static boost::python::tuple - getstate(const Map& m) - { - boost::python::list l; - for (unsigned i=0;ifirst; - const mapnik::feature_type_style & style = it->second; - boost::python::tuple style_pair = boost::python::make_tuple(name,style); - s.append(style_pair); - } - - return boost::python::make_tuple(m.get_current_extent(),m.background(),l,s,m.base_path()); - } - - static void - setstate (Map& m, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 5) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 5-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - box2d ext = extract >(state[0]); - m.zoom_to_box(ext); - if (state[1]) - { - color bg = extract(state[1]); - m.set_background(bg); - } - - boost::python::list l=extract(state[2]); - for (int i=0;i(l[i])); - } - - boost::python::list s=extract(state[3]); - for (int i=0;i(s[i]); - std::string name = extract(style_pair[0]); - mapnik::feature_type_style style = extract(style_pair[1]); - m.insert_style(name, style); - } - - if (state[4]) - { - std::string base_path = extract(state[4]); - m.set_base_path(base_path); - } - } -}; - std::vector& (Map::*layers_nonconst)() = &Map::layers; std::vector const& (Map::*layers_const)() const = &Map::layers; mapnik::parameters& (Map::*params_nonconst)() = &Map::get_extra_parameters; -//boost::optional > const& (Map::*maximum_extent_const)() const = &Map::maximum_extent; mapnik::feature_type_style find_style(mapnik::Map const& m, std::string const& name) { @@ -223,9 +147,6 @@ void export_map() "'+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'\n" )) - .def_pickle(map_pickle_suite() - ) - .def("append_style",&Map::insert_style, (arg("style_name"),arg("style_object")), "Insert a Mapnik Style onto the map by appending it.\n" diff --git a/bindings/python/mapnik_markers_symbolizer.cpp b/bindings/python/mapnik_markers_symbolizer.cpp index 132c2b0d6..366bdb882 100644 --- a/bindings/python/mapnik_markers_symbolizer.cpp +++ b/bindings/python/mapnik_markers_symbolizer.cpp @@ -49,43 +49,6 @@ void set_filename(mapnik::markers_symbolizer & symbolizer, std::string const& fi } -struct markers_symbolizer_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(markers_symbolizer const& p) - { - std::string filename = path_processor_type::to_string(*p.get_filename()); - return boost::python::make_tuple(filename,mapnik::guess_type(filename)); - } - - static boost::python::tuple - getstate(markers_symbolizer const& p) - { - return boost::python::make_tuple(p.get_allow_overlap(), - p.get_ignore_placement());//,p.get_opacity()); - } - - static void - setstate (markers_symbolizer& p, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 2) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 2-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - p.set_allow_overlap(extract(state[0])); - p.set_ignore_placement(extract(state[1])); - //p.set_opacity(extract(state[2])); - - } - -}; - // https://github.com/mapnik/mapnik/issues/1367 PyObject* get_fill_opacity_impl(markers_symbolizer & sym) { @@ -108,7 +71,6 @@ void export_markers_symbolizer() class_("MarkersSymbolizer", init<>("Default Markers Symbolizer - circle")) .def (init("")) - //.def_pickle(markers_symbolizer_pickle_suite()) .add_property("filename", &get_filename, &set_filename) diff --git a/bindings/python/mapnik_point_symbolizer.cpp b/bindings/python/mapnik_point_symbolizer.cpp index 2ca6c9acb..a618377c0 100644 --- a/bindings/python/mapnik_point_symbolizer.cpp +++ b/bindings/python/mapnik_point_symbolizer.cpp @@ -50,47 +50,6 @@ void set_filename(point_symbolizer & t, std::string const& file_expr) } -struct point_symbolizer_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const point_symbolizer& p) - { - std::string filename = path_processor_type::to_string(*p.get_filename()); - return boost::python::make_tuple(filename,mapnik::guess_type(filename)); - } - - static boost::python::tuple - getstate(const point_symbolizer& p) - { - return boost::python::make_tuple(p.get_allow_overlap(), - p.get_opacity(), - p.get_ignore_placement(), - p.get_point_placement()); - } - - static void - setstate (point_symbolizer& p, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 4) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 4-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - p.set_allow_overlap(extract(state[0])); - p.set_opacity(extract(state[1])); - p.set_ignore_placement(extract(state[2])); - p.set_point_placement(extract(state[3])); - - } - -}; - - void export_point_symbolizer() { using namespace boost::python; @@ -103,7 +62,6 @@ void export_point_symbolizer() class_("PointSymbolizer", init<>("Default Point Symbolizer - 4x4 black square")) .def (init("")) - .def_pickle(point_symbolizer_pickle_suite()) .add_property("filename", &get_filename, &set_filename) diff --git a/bindings/python/mapnik_polygon_pattern_symbolizer.cpp b/bindings/python/mapnik_polygon_pattern_symbolizer.cpp index dc155c5f6..cda55ce3d 100644 --- a/bindings/python/mapnik_polygon_pattern_symbolizer.cpp +++ b/bindings/python/mapnik_polygon_pattern_symbolizer.cpp @@ -49,41 +49,6 @@ void set_filename(polygon_pattern_symbolizer & t, std::string const& file_expr) } -struct polygon_pattern_symbolizer_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const polygon_pattern_symbolizer& p) - { - std::string filename = path_processor_type::to_string(*p.get_filename()); - return boost::python::make_tuple(filename,guess_type(filename)); - } - - static boost::python::tuple - getstate(const polygon_pattern_symbolizer& p) - { - return boost::python::make_tuple(p.get_alignment(),p.get_gamma(),p.get_gamma_method()); - } - - static void - setstate (polygon_pattern_symbolizer& p, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 3) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 3-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - p.set_alignment(extract(state[0])); - p.set_gamma(extract(state[1])); - p.set_gamma_method(extract(state[2])); - } - -}; - void export_polygon_pattern_symbolizer() { using namespace boost::python; @@ -95,7 +60,6 @@ void export_polygon_pattern_symbolizer() class_("PolygonPatternSymbolizer", init("")) - .def_pickle(polygon_pattern_symbolizer_pickle_suite()) .add_property("alignment", &polygon_pattern_symbolizer::get_alignment, &polygon_pattern_symbolizer::set_alignment, diff --git a/bindings/python/mapnik_polygon_symbolizer.cpp b/bindings/python/mapnik_polygon_symbolizer.cpp index 06f35f0d8..13a755db6 100644 --- a/bindings/python/mapnik_polygon_symbolizer.cpp +++ b/bindings/python/mapnik_polygon_symbolizer.cpp @@ -28,40 +28,6 @@ using namespace mapnik; using mapnik::polygon_symbolizer; using mapnik::color; -struct polygon_symbolizer_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const polygon_symbolizer& p) - { - return boost::python::make_tuple(p.get_fill()); - } - - static boost::python::tuple - getstate(const polygon_symbolizer& p) - { - return boost::python::make_tuple(p.get_opacity(),p.get_gamma(),p.get_gamma_method()); - } - - static void - setstate (polygon_symbolizer& p, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 3) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 3-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - p.set_opacity(extract(state[0])); - p.set_gamma(extract(state[1])); - p.set_gamma_method(extract(state[2])); - } - -}; - void export_polygon_symbolizer() { using namespace boost::python; @@ -69,7 +35,6 @@ void export_polygon_symbolizer() class_("PolygonSymbolizer", init<>("Default PolygonSymbolizer - solid fill grey")) .def(init("TODO")) - .def_pickle(polygon_symbolizer_pickle_suite()) .add_property("fill",make_function (&polygon_symbolizer::get_fill, return_value_policy()), diff --git a/bindings/python/mapnik_query.cpp b/bindings/python/mapnik_query.cpp index cd49ef967..f0041b8c0 100644 --- a/bindings/python/mapnik_query.cpp +++ b/bindings/python/mapnik_query.cpp @@ -32,15 +32,6 @@ using mapnik::box2d; namespace python = boost::python; -struct query_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(query const& q) - { - return boost::python::make_tuple(q.get_bbox(),q.resolution()); - } -}; - struct resolution_to_tuple { static PyObject* convert(query::resolution_type const& x) @@ -64,7 +55,6 @@ void export_query() class_("Query", "a spatial query data object", init,query::resolution_type const&,double>() ) .def(init >()) - .def_pickle(query_pickle_suite()) .add_property("resolution",make_function(&query::resolution, return_value_policy())) .add_property("bbox", make_function(&query::get_bbox, diff --git a/bindings/python/mapnik_raster_symbolizer.cpp b/bindings/python/mapnik_raster_symbolizer.cpp index 3830dd9f1..87b693e19 100644 --- a/bindings/python/mapnik_raster_symbolizer.cpp +++ b/bindings/python/mapnik_raster_symbolizer.cpp @@ -29,44 +29,6 @@ using mapnik::raster_symbolizer; -struct raster_symbolizer_pickle_suite : boost::python::pickle_suite -{ - /* - static boost::python::tuple - getinitargs(const raster_symbolizer& r) - { - return boost::python::make_tuple(); - } - */ - - static boost::python::tuple - getstate(raster_symbolizer const& r) - { - return boost::python::make_tuple(r.get_mode(),r.get_scaling_method(),r.get_opacity(),r.get_filter_factor(),r.get_mesh_size()); - } - - static void - setstate (raster_symbolizer & r, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 5) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 5-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - r.set_mode(extract(state[0])); - r.set_scaling_method(extract(state[1])); - r.set_opacity(extract(state[2])); - r.set_filter_factor(extract(state[3])); - r.set_mesh_size(extract(state[4])); - } - -}; - void export_raster_symbolizer() { using namespace boost::python; @@ -74,8 +36,6 @@ void export_raster_symbolizer() class_("RasterSymbolizer", init<>("Default ctor")) - .def_pickle(raster_symbolizer_pickle_suite()) - .add_property("mode", make_function(&raster_symbolizer::get_mode,return_value_policy()), &raster_symbolizer::set_mode, diff --git a/bindings/python/mapnik_rule.cpp b/bindings/python/mapnik_rule.cpp index 378e22f10..86d5d3522 100644 --- a/bindings/python/mapnik_rule.cpp +++ b/bindings/python/mapnik_rule.cpp @@ -48,108 +48,6 @@ using mapnik::markers_symbolizer; using mapnik::symbolizer; using mapnik::to_expression_string; -struct pickle_symbolizer : public boost::static_visitor<> -{ -public: - pickle_symbolizer( boost::python::list syms): - syms_(syms) {} - - template - void operator () ( T const& sym ) - { - syms_.append(sym); - } - -private: - boost::python::list syms_; -}; - - -struct extract_symbolizer : public boost::static_visitor<> -{ -public: - extract_symbolizer( rule& r): - r_(r) {} - - template - void operator () ( T const& sym ) - { - r_.append(sym); - } -private: - rule& r_; - -}; - -struct rule_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const rule& r) - { - return boost::python::make_tuple(r.get_name(),r.get_min_scale(),r.get_max_scale()); - } - - static boost::python::tuple - getstate(const rule& r) - { - boost::python::list syms; - - rule::symbolizers::const_iterator begin = r.get_symbolizers().begin(); - rule::symbolizers::const_iterator end = r.get_symbolizers().end(); - pickle_symbolizer serializer( syms ); - std::for_each( begin, end , boost::apply_visitor( serializer )); - - // We serialize filter expressions AST as strings - std::string filter_expr = to_expression_string(*r.get_filter()); - - return boost::python::make_tuple(filter_expr,r.has_else_filter(),r.has_also_filter(),syms); - } - - static void - setstate (rule& r, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 4) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 4-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - if (state[0]) - { - rule dfl; - std::string filter = extract(state[1]); - std::string default_filter = "";//dfl.get_filter()->to_string(); - if ( filter != default_filter) - { - r.set_filter(mapnik::parse_expression(filter,"utf8")); - } - } - - if (state[1]) - { - r.set_else(true); - } - - if (state[2]) - { - r.set_also(true); - } - - boost::python::list syms=extract(state[4]); - extract_symbolizer serializer( r ); - for (int i=0;i(syms[i]); - //boost::apply_visitor( serializer, symbol ); - } - } - -}; - void export_rule() { using namespace boost::python; @@ -171,7 +69,6 @@ void export_rule() class_("Rule",init<>("default constructor")) .def(init >()) - .def_pickle(rule_pickle_suite()) .add_property("name",make_function (&rule::get_name, return_value_policy()), diff --git a/bindings/python/mapnik_shield_symbolizer.cpp b/bindings/python/mapnik_shield_symbolizer.cpp index 8a08900bb..0278d8a3b 100644 --- a/bindings/python/mapnik_shield_symbolizer.cpp +++ b/bindings/python/mapnik_shield_symbolizer.cpp @@ -96,7 +96,6 @@ void export_shield_symbolizer() unsigned, mapnik::color const&, path_expression_ptr>() ) - //.def_pickle(shield_symbolizer_pickle_suite()) .add_property("allow_overlap", &shield_symbolizer::get_allow_overlap, &shield_symbolizer::set_allow_overlap, diff --git a/bindings/python/mapnik_stroke.cpp b/bindings/python/mapnik_stroke.cpp index 1f21071c3..70411b80e 100644 --- a/bindings/python/mapnik_stroke.cpp +++ b/bindings/python/mapnik_stroke.cpp @@ -49,63 +49,6 @@ list get_dashes_list(const stroke& stroke) } } -struct stroke_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getinitargs(const stroke& s) - { - - return boost::python::make_tuple(s.get_color(),s.get_width()); - - } - - static boost::python::tuple - getstate(const stroke& s) - { - boost::python::list dashes = get_dashes_list(s); - return boost::python::make_tuple(s.get_opacity(), - dashes, - s.get_line_cap(), - s.get_line_join(), - s.get_gamma(), - s.get_gamma_method()); - } - - static void - setstate (stroke& s, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 6) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 6-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - s.set_opacity(extract(state[0])); - - if (state[1]) - { - list dashes = extract(state[1]); - for(boost::python::ssize_t i=0; i(dashes[i][0]); - double ds2 = extract(dashes[i][1]); - s.add_dash(ds1,ds2); - } - } - - s.set_line_cap(extract(state[2])); - s.set_line_join(extract(state[3])); - s.set_gamma(extract(state[4])); - s.set_gamma_method(extract(state[5])); - - } - -}; - - void export_stroke () { using namespace boost::python; @@ -132,7 +75,6 @@ void export_stroke () (arg("color"),arg("width")), "Creates a new stroke object with a specified color and width.\n") ) - .def_pickle(stroke_pickle_suite()) .add_property("color",make_function (&stroke::get_color,return_value_policy()), &stroke::set_color, diff --git a/bindings/python/mapnik_style.cpp b/bindings/python/mapnik_style.cpp index c5a70dbad..ee0e1a2de 100644 --- a/bindings/python/mapnik_style.cpp +++ b/bindings/python/mapnik_style.cpp @@ -32,45 +32,6 @@ using mapnik::feature_type_style; using mapnik::rules; using mapnik::rule; -struct style_pickle_suite : boost::python::pickle_suite -{ - static boost::python::tuple - getstate(const feature_type_style& s) - { - boost::python::list rule_list; - - rules::const_iterator it = s.get_rules().begin(); - rules::const_iterator end = s.get_rules().end(); - for (; it != end; ++it) - { - rule_list.append( *it ); - } - - return boost::python::make_tuple(rule_list); - } - - static void - setstate (feature_type_style& s, boost::python::tuple state) - { - using namespace boost::python; - if (len(state) != 1) - { - PyErr_SetObject(PyExc_ValueError, - ("expected 1-item tuple in call to __setstate__; got %s" - % state).ptr() - ); - throw_error_already_set(); - } - - boost::python::list rules = extract(state[0]); - for (int i=0; i(rules[i])); - } - } - -}; - void export_style() { using namespace boost::python; @@ -85,9 +46,6 @@ void export_style() ; class_("Style",init<>("default style constructor")) - .def_pickle(style_pickle_suite() - ) - .add_property("rules",make_function (&feature_type_style::get_rules, return_value_policy()), diff --git a/tests/python_tests/parameters_test.py b/tests/python_tests/parameters_test.py index 7fcb483fb..44c55e4a3 100644 --- a/tests/python_tests/parameters_test.py +++ b/tests/python_tests/parameters_test.py @@ -6,7 +6,6 @@ from nose.tools import * from utilities import execution_path import mapnik -import pickle def setup(): os.chdir(execution_path('.')) @@ -43,15 +42,6 @@ def test_parameters(): eq_(params.get('float'),1.0777) -def test_parameters_pickling(): - params = mapnik.Parameters() - params.append(mapnik.Parameter('oh',str('yeah'))) - - params2 = pickle.loads(pickle.dumps(params,pickle.HIGHEST_PROTOCOL)) - - eq_(params[0][0],params2[0][0]) - eq_(params[0][1],params2[0][1]) - if __name__ == "__main__": setup() diff --git a/tests/python_tests/pickling_test.py b/tests/python_tests/pickling_test.py index 845dee117..e988ebee6 100644 --- a/tests/python_tests/pickling_test.py +++ b/tests/python_tests/pickling_test.py @@ -14,119 +14,6 @@ def setup(): # from another directory we need to chdir() os.chdir(execution_path('.')) -# PointSymbolizer pickling -def test_pointsymbolizer_pickle(): - raise Todo("point_symbolizer pickling currently disabled") - p = mapnik.PointSymbolizer(mapnik.PathExpression("../data/images/dummy.png")) - p2 = pickle.loads(pickle.dumps(p,pickle.HIGHEST_PROTOCOL)) - # image type, width, and height only used in contructor... - eq_(p.filename, p2.filename) - eq_(p.allow_overlap, p2.allow_overlap) - eq_(p.opacity, p2.opacity) - eq_(p.ignore_placement, p2.ignore_placement) - eq_(p.placement, p2.placement) - -# PolygonSymbolizer pickling -def test_polygonsymbolizer_pickle(): - p = mapnik.PolygonSymbolizer(mapnik.Color('black')) - p.fill_opacity = .5 - # does not work for some reason... - #eq_(pickle.loads(pickle.dumps(p)), p) - p2 = pickle.loads(pickle.dumps(p,pickle.HIGHEST_PROTOCOL)) - eq_(p.fill, p2.fill) - eq_(p.fill_opacity, p2.fill_opacity) - -# Stroke pickling -def test_stroke_pickle(): - s = mapnik.Stroke(mapnik.Color('black'),4.5) - - eq_(s.width, 4.5) - eq_(s.color, mapnik.Color('black')) - - s.add_dash(1,2) - s.add_dash(3,4) - s.add_dash(5,6) - - s2 = pickle.loads(pickle.dumps(s,pickle.HIGHEST_PROTOCOL)) - eq_(s.color, s2.color) - eq_(s.width, s2.width) - eq_(s.opacity, s2.opacity) - eq_(s.get_dashes(), s2.get_dashes()) - eq_(s.line_cap, s2.line_cap) - eq_(s.line_join, s2.line_join) - -# LineSymbolizer pickling -def test_linesymbolizer_pickle(): - p = mapnik.LineSymbolizer() - p2 = pickle.loads(pickle.dumps(p,pickle.HIGHEST_PROTOCOL)) - # line and stroke eq fails, so we compare attributes for now.. - s,s2 = p.stroke, p2.stroke - eq_(s.color, s2.color) - eq_(s.opacity, s2.opacity) - eq_(s.width, s2.width) - eq_(s.get_dashes(), s2.get_dashes()) - eq_(s.line_cap, s2.line_cap) - eq_(s.line_join, s2.line_join) - -# TextSymbolizer pickling -def test_textsymbolizer_pickle(): - raise Todo("text_symbolizer pickling currently disabled") - ts = mapnik.TextSymbolizer(mapnik.Expression('[Field_Name]'), 'Font Name', 8, mapnik.Color('black')) - - eq_(str(ts.name), str(mapnik.Expression('[Field_Name]'))) - eq_(ts.face_name, 'Font Name') - eq_(ts.text_size, 8) - eq_(ts.fill, mapnik.Color('black')) - - ts2 = pickle.loads(pickle.dumps(ts,pickle.HIGHEST_PROTOCOL)) - eq_(ts.name, ts2.name) - eq_(ts.face_name, ts2.face_name) - eq_(ts.allow_overlap, ts2.allow_overlap) - eq_(ts.displacement, ts2.displacement) - eq_(ts.anchor, ts2.anchor) - eq_(ts.fill, ts2.fill) - eq_(ts.force_odd_labels, ts2.force_odd_labels) - eq_(ts.halo_fill, ts2.halo_fill) - eq_(ts.halo_radius, ts2.halo_radius) - eq_(ts.label_placement, ts2.label_placement) - eq_(ts.minimum_distance, ts2.minimum_distance) - eq_(ts.text_ratio, ts2.text_ratio) - eq_(ts.text_size, ts2.text_size) - eq_(ts.wrap_width, ts2.wrap_width) - eq_(ts.vertical_alignment, ts2.vertical_alignment) - eq_(ts.label_spacing, ts2.label_spacing) - eq_(ts.label_position_tolerance, ts2.label_position_tolerance) - # 22.5 * M_PI/180.0 initialized by default - assert_almost_equal(s.max_char_angle_delta, 0.39269908169872414) - - eq_(ts.wrap_character, ts2.wrap_character) - eq_(ts.text_transform, ts2.text_transform) - eq_(ts.line_spacing, ts2.line_spacing) - eq_(ts.character_spacing, ts2.character_spacing) - - # r1341 - eq_(ts.wrap_before, ts2.wrap_before) - eq_(ts.horizontal_alignment, ts2.horizontal_alignment) - eq_(ts.justify_alignment, ts2.justify_alignment) - eq_(ts.opacity, ts2.opacity) - - # r2300 - eq_(s.minimum_padding, 0.0) - - eq_(len(ts.fontset.names), 0) - -def test_map_pickle(): - # Fails due to scale() not matching, possibly other things - raise(Todo("Map does not support pickling yet (Tickets #345).")) - - m = mapnik.Map(256, 256) - - eq_(pickle.loads(pickle.dumps(m)), m) - - m = mapnik.Map(256, 256, '+proj=latlong') - - eq_(pickle.loads(pickle.dumps(m)), m) - def test_color_pickle(): c = mapnik.Color('blue') @@ -145,6 +32,15 @@ def test_envelope_pickle(): eq_(pickle.loads(pickle.dumps(e)), e) +def test_parameters_pickle(): + params = mapnik.Parameters() + params.append(mapnik.Parameter('oh',str('yeah'))) + + params2 = pickle.loads(pickle.dumps(params,pickle.HIGHEST_PROTOCOL)) + + eq_(params[0][0],params2[0][0]) + eq_(params[0][1],params2[0][1]) + if __name__ == "__main__": setup() [eval(run)() for run in dir() if 'test_' in run] From e4a4fe41c24788957136f8ae22276df49412a83f Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 14:16:49 -0700 Subject: [PATCH 23/75] do not use /usr/local as default proj search path - instead match all other defaults as /usr/ - closes #1288 --- SConstruct | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index 755eb0f0a..1158b4f04 100644 --- a/SConstruct +++ b/SConstruct @@ -316,8 +316,8 @@ opts.AddVariables( PathVariable('JPEG_LIBS', 'Search path for libjpeg library files', '/usr/' + LIBDIR_SCHEMA, PathVariable.PathAccept), PathVariable('TIFF_INCLUDES', 'Search path for libtiff include files', '/usr/include', PathVariable.PathAccept), PathVariable('TIFF_LIBS', 'Search path for libtiff library files', '/usr/' + LIBDIR_SCHEMA, PathVariable.PathAccept), - PathVariable('PROJ_INCLUDES', 'Search path for PROJ.4 include files', '/usr/local/include', PathVariable.PathAccept), - PathVariable('PROJ_LIBS', 'Search path for PROJ.4 library files', '/usr/local/' + LIBDIR_SCHEMA, PathVariable.PathAccept), + PathVariable('PROJ_INCLUDES', 'Search path for PROJ.4 include files', '/usr/include', PathVariable.PathAccept), + PathVariable('PROJ_LIBS', 'Search path for PROJ.4 library files', '/usr/' + LIBDIR_SCHEMA, PathVariable.PathAccept), ('PKG_CONFIG_PATH', 'Use this path to point pkg-config to .pc files instead of the PKG_CONFIG_PATH environment setting',''), # Variables affecting rendering back-ends From 4cf1484b53da1e822b8fcbd493cd94f2ae0c0e8a Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 14:46:58 -0700 Subject: [PATCH 24/75] disable colorize-alpha comp-op as per #1371 --- deps/agg/include/agg_pixfmt_rgba.h | 8 ++++++-- include/mapnik/image_compositing.hpp | 4 ++-- src/cairo_renderer.cpp | 2 +- src/image_compositing.cpp | 2 +- tests/data/good_maps/colorize-alpha.xml | 5 ++++- 5 files changed, 14 insertions(+), 7 deletions(-) diff --git a/deps/agg/include/agg_pixfmt_rgba.h b/deps/agg/include/agg_pixfmt_rgba.h index 41e6923f0..576219d28 100644 --- a/deps/agg/include/agg_pixfmt_rgba.h +++ b/deps/agg/include/agg_pixfmt_rgba.h @@ -1450,6 +1450,9 @@ namespace agg }; // colorize alpha values + // TODO - consider moving to image-filters: + // https://github.com/mapnik/mapnik/issues/1371 + /* template struct comp_op_rgba_colorize_alpha { @@ -1503,6 +1506,7 @@ namespace agg } } }; + */ // grain extract (GIMP) // E = I - M + 128 @@ -1790,7 +1794,7 @@ namespace agg comp_op_rgba_saturation::blend_pix, comp_op_rgba_color::blend_pix, comp_op_rgba_value::blend_pix, - comp_op_rgba_colorize_alpha::blend_pix, + //comp_op_rgba_colorize_alpha::blend_pix, 0 }; @@ -1832,7 +1836,7 @@ namespace agg comp_op_saturation, //----comp_op_saturation comp_op_color, //----comp_op_color comp_op_value, //----comp_op_value - comp_op_colorize_alpha,//----comp_op_colorize_alpha + //comp_op_colorize_alpha,//----comp_op_colorize_alpha end_of_comp_op_e }; diff --git a/include/mapnik/image_compositing.hpp b/include/mapnik/image_compositing.hpp index c4fbef407..6d5d05fab 100644 --- a/include/mapnik/image_compositing.hpp +++ b/include/mapnik/image_compositing.hpp @@ -74,8 +74,8 @@ enum composite_mode_e hue, saturation, _color, - _value, - colorize_alpha + _value + //colorize_alpha }; MAPNIK_DECL boost::optional comp_op_from_string(std::string const& name); diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index a4096fed2..923562c0c 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -387,7 +387,7 @@ public: case saturation: case _color: case _value: - case colorize_alpha: + //case colorize_alpha: break; } } diff --git a/src/image_compositing.cpp b/src/image_compositing.cpp index e6c64100e..8912dae12 100644 --- a/src/image_compositing.cpp +++ b/src/image_compositing.cpp @@ -74,7 +74,7 @@ static const comp_op_lookup_type comp_lookup = boost::assign::list_of comp_op_from_string(std::string const& name) diff --git a/tests/data/good_maps/colorize-alpha.xml b/tests/data/good_maps/colorize-alpha.xml index 625a55b40..8fd39e7cd 100644 --- a/tests/data/good_maps/colorize-alpha.xml +++ b/tests/data/good_maps/colorize-alpha.xml @@ -7,8 +7,11 @@ - + + + + + + + style + style2 + + ../../data/shp/world_merc + shape + + + \ No newline at end of file From c7c8d910c422a6427e165680309b1484155caab0 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 19:16:11 -0700 Subject: [PATCH 32/75] fix linking with svg2png on windows - closes #1375 --- include/mapnik/image_util.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/mapnik/image_util.hpp b/include/mapnik/image_util.hpp index 0f438eeb8..19b65e60c 100644 --- a/include/mapnik/image_util.hpp +++ b/include/mapnik/image_util.hpp @@ -219,6 +219,11 @@ template MAPNIK_DECL void save_to_file(image_data_32 const&, std::string const&, std::string const&, rgba_palette const&); + +template MAPNIK_DECL void save_to_file(image_data_32 const&, + std::string const&, + std::string const&); + template MAPNIK_DECL void save_to_file(image_data_32 const&, std::string const&, rgba_palette const&); From af413aa9597a6a65e4d09c03854a50fdd5e27418 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Wed, 15 Aug 2012 19:22:47 -0700 Subject: [PATCH 33/75] conditionally run tests based on availability of datasources --- .../markers_complex_rendering_test.py | 49 ++++++++++--------- tests/python_tests/raster_alpha_test.py | 46 ++++++++--------- tests/python_tests/raster_colormapped_test.py | 46 ++++++++--------- tests/visual_tests/test.py | 15 +++--- 4 files changed, 81 insertions(+), 75 deletions(-) diff --git a/tests/python_tests/markers_complex_rendering_test.py b/tests/python_tests/markers_complex_rendering_test.py index 1b17e8f21..3a28ba7b7 100644 --- a/tests/python_tests/markers_complex_rendering_test.py +++ b/tests/python_tests/markers_complex_rendering_test.py @@ -9,30 +9,31 @@ def setup(): # from another directory we need to chdir() os.chdir(execution_path('.')) -def test_marker_ellipse_render1(): - m = mapnik.Map(256,256) - mapnik.load_map(m,'../data/good_maps/marker_ellipse_transform.xml') - m.zoom_all() - im = mapnik.Image(m.width,m.height) - mapnik.render(m,im) - actual = '/tmp/mapnik-marker-ellipse-render1.png' - expected = 'images/support/mapnik-marker-ellipse-render1.png' - im.save(actual) - expected_im = mapnik.Image.open(expected) - eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected (%s)' % (actual,'tests/python_tests/'+ expected)) - -def test_marker_ellipse_render2(): - # currently crashes https://github.com/mapnik/mapnik/issues/1365 - m = mapnik.Map(256,256) - mapnik.load_map(m,'../data/good_maps/marker_ellipse_transform2.xml') - m.zoom_all() - im = mapnik.Image(m.width,m.height) - mapnik.render(m,im) - actual = '/tmp/mapnik-marker-ellipse-render2.png' - expected = 'images/support/mapnik-marker-ellipse-render2.png' - im.save(actual) - expected_im = mapnik.Image.open(expected) - eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected (%s)' % (actual,'tests/python_tests/'+ expected)) +if 'csv' in mapnik.DatasourceCache.instance().plugin_names(): + def test_marker_ellipse_render1(): + m = mapnik.Map(256,256) + mapnik.load_map(m,'../data/good_maps/marker_ellipse_transform.xml') + m.zoom_all() + im = mapnik.Image(m.width,m.height) + mapnik.render(m,im) + actual = '/tmp/mapnik-marker-ellipse-render1.png' + expected = 'images/support/mapnik-marker-ellipse-render1.png' + im.save(actual) + expected_im = mapnik.Image.open(expected) + eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected (%s)' % (actual,'tests/python_tests/'+ expected)) + + def test_marker_ellipse_render2(): + # currently crashes https://github.com/mapnik/mapnik/issues/1365 + m = mapnik.Map(256,256) + mapnik.load_map(m,'../data/good_maps/marker_ellipse_transform2.xml') + m.zoom_all() + im = mapnik.Image(m.width,m.height) + mapnik.render(m,im) + actual = '/tmp/mapnik-marker-ellipse-render2.png' + expected = 'images/support/mapnik-marker-ellipse-render2.png' + im.save(actual) + expected_im = mapnik.Image.open(expected) + eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected (%s)' % (actual,'tests/python_tests/'+ expected)) if __name__ == "__main__": setup() diff --git a/tests/python_tests/raster_alpha_test.py b/tests/python_tests/raster_alpha_test.py index d94805405..3d1cd11a9 100644 --- a/tests/python_tests/raster_alpha_test.py +++ b/tests/python_tests/raster_alpha_test.py @@ -10,29 +10,31 @@ def setup(): # from another directory we need to chdir() os.chdir(execution_path('.')) -def test_map_alpha_compare(): - m = mapnik.Map(600,400) - mapnik.load_map(m,'../data/good_maps/raster-alpha.xml') - m.zoom_all() - actual = '/tmp/mapnik-raster-alpha.png' - expected = 'images/support/raster-alpha.png' - im = mapnik.Image(m.width,m.height) - mapnik.render(m,im) - im.save(actual) - expected_im = mapnik.Image.open(expected) - eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) +if 'gdal' in mapnik.DatasourceCache.instance().plugin_names(): -def test_map_alpha_gradient_compare(): - m = mapnik.Map(600,400) - mapnik.load_map(m,'../data/good_maps/raster-alpha-gradient.xml') - m.zoom_all() - actual = '/tmp/mapnik-raster-alpha-gradient.png' - expected = 'images/support/raster-alpha-gradient.png' - im = mapnik.Image(m.width,m.height) - mapnik.render(m,im) - im.save(actual) - expected_im = mapnik.Image.open(expected) - eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) + def test_map_alpha_compare(): + m = mapnik.Map(600,400) + mapnik.load_map(m,'../data/good_maps/raster-alpha.xml') + m.zoom_all() + actual = '/tmp/mapnik-raster-alpha.png' + expected = 'images/support/raster-alpha.png' + im = mapnik.Image(m.width,m.height) + mapnik.render(m,im) + im.save(actual) + expected_im = mapnik.Image.open(expected) + eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) + + def test_map_alpha_gradient_compare(): + m = mapnik.Map(600,400) + mapnik.load_map(m,'../data/good_maps/raster-alpha-gradient.xml') + m.zoom_all() + actual = '/tmp/mapnik-raster-alpha-gradient.png' + expected = 'images/support/raster-alpha-gradient.png' + im = mapnik.Image(m.width,m.height) + mapnik.render(m,im) + im.save(actual) + expected_im = mapnik.Image.open(expected) + eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) if __name__ == "__main__": diff --git a/tests/python_tests/raster_colormapped_test.py b/tests/python_tests/raster_colormapped_test.py index c700cd5f4..cf79c3f05 100644 --- a/tests/python_tests/raster_colormapped_test.py +++ b/tests/python_tests/raster_colormapped_test.py @@ -9,29 +9,31 @@ def setup(): # from another directory we need to chdir() os.chdir(execution_path('.')) -def test_vrt_rendering(): - m = mapnik.Map(512,512) - mapnik.load_map(m,'../data/good_maps/vrt_colortable.xml') - m.zoom_all() - im = mapnik.Image(512,512) - mapnik.render(m,im) - actual = '/tmp/vrt_colortable.png' - expected = 'images/support/vrt_colortable.png' - im.save(actual) - expected_im = mapnik.Image.open(expected) - eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) +if 'gdal' in mapnik.DatasourceCache.instance().plugin_names(): -def test_tif_rendering_nodata(): - m = mapnik.Map(512,512) - mapnik.load_map(m,'../data/good_maps/tiff_colortable.xml') - m.zoom_all() - im = mapnik.Image(512,512) - mapnik.render(m,im) - actual = '/tmp/tif_colortable.png' - expected = 'images/support/tif_colortable.png' - im.save(actual) - expected_im = mapnik.Image.open(expected) - eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) + def test_vrt_rendering(): + m = mapnik.Map(512,512) + mapnik.load_map(m,'../data/good_maps/vrt_colortable.xml') + m.zoom_all() + im = mapnik.Image(512,512) + mapnik.render(m,im) + actual = '/tmp/vrt_colortable.png' + expected = 'images/support/vrt_colortable.png' + im.save(actual) + expected_im = mapnik.Image.open(expected) + eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) + + def test_tif_rendering_nodata(): + m = mapnik.Map(512,512) + mapnik.load_map(m,'../data/good_maps/tiff_colortable.xml') + m.zoom_all() + im = mapnik.Image(512,512) + mapnik.render(m,im) + actual = '/tmp/tif_colortable.png' + expected = 'images/support/tif_colortable.png' + im.save(actual) + expected_im = mapnik.Image.open(expected) + eq_(im.tostring(),expected_im.tostring(), 'failed comparing actual (%s) and expected(%s)' % (actual,'tests/python_tests/'+ expected)) if __name__ == "__main__": setup() diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index 6d2a4f3aa..0f9fc0632 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -84,11 +84,12 @@ if __name__ == "__main__": for name in sys.argv[1:]: files.append({"name": name}) - for f in files: - config = dict(defaults) - config.update(f) - for size in config['sizes']: - m = render(config['name'], size[0], size[1], config['bbox'], quiet=quiet) - mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % config['name'])) + if 'osm' in mapnik.DatasourceCache.instance().plugin_names(): + for f in files: + config = dict(defaults) + config.update(f) + for size in config['sizes']: + m = render(config['name'], size[0], size[1], config['bbox'], quiet=quiet) + mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % config['name'])) - summary() + summary() From 7702a904f3460d5d34d78e73ac77bc54d280eca6 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 16 Aug 2012 10:37:51 +0100 Subject: [PATCH 34/75] + cairo : fix point_symbolizer transform calc --- src/cairo_renderer.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index 923562c0c..0d10610fc 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -1192,8 +1192,6 @@ void cairo_renderer_base::process(point_symbolizer const& sym, marker.reset(boost::make_shared()); } - agg::trans_affine mtx; - evaluate_transform(mtx, feature, sym.get_image_transform()); if (marker) { @@ -1212,16 +1210,18 @@ void cairo_renderer_base::process(point_symbolizer const& sym, prj_trans.backward(x, y, z); t_.forward(&x, &y); - int w = (*marker)->width(); - int h = (*marker)->height(); - - int px = int(floor(x - 0.5 * w)); - int py = int(floor(y - 0.5 * h)); - box2d label_ext (px, py, px + w, py + h); + double dx = 0.5 * (*marker)->width(); + double dy = 0.5 * (*marker)->height(); + box2d const& bbox = (*marker)->bounding_box(); + agg::trans_affine tr = agg::trans_affine_scaling(scale_factor_); + evaluate_transform(tr, feature, sym.get_image_transform()); + box2d label_ext (-dx, -dy, dx, dy); + label_ext *= tr; + label_ext *= agg::trans_affine_translation(x,y); if (sym.get_allow_overlap() || detector_.has_placement(label_ext)) { - render_marker(pixel_position(px,py),**marker, mtx, sym.get_opacity()); + render_marker(pixel_position(x,y),**marker, tr, sym.get_opacity()); if (!sym.get_ignore_placement()) detector_.insert(label_ext); From 1b92d81459aa63a212456cfe681caaa0d415a252 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 16 Aug 2012 10:41:48 +0100 Subject: [PATCH 35/75] + add missing header --- demo/viewer/mainwindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/demo/viewer/mainwindow.cpp b/demo/viewer/mainwindow.cpp index 436a31ddc..c4fc631b6 100644 --- a/demo/viewer/mainwindow.cpp +++ b/demo/viewer/mainwindow.cpp @@ -40,6 +40,7 @@ #include #include #include +#include #endif // qt From 572f3d3f491e37981cdff13643a30a3969953256 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 16 Aug 2012 10:42:12 +0100 Subject: [PATCH 36/75] + avoid applying scale_factor twice --- src/agg/process_point_symbolizer.cpp | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/agg/process_point_symbolizer.cpp b/src/agg/process_point_symbolizer.cpp index d46e621f8..5917835ec 100644 --- a/src/agg/process_point_symbolizer.cpp +++ b/src/agg/process_point_symbolizer.cpp @@ -66,8 +66,6 @@ void agg_renderer::process(point_symbolizer const& sym, agg::trans_affine tr; evaluate_transform(tr, feature, sym.get_image_transform()); - tr = agg::trans_affine_scaling(scale_factor_) * tr; - agg::trans_affine_translation recenter(-center.x, -center.y); agg::trans_affine recenter_tr = recenter * tr; box2d label_ext = bbox * recenter_tr; From e6e32fcb39202081115f490dbacd5a1b4ca04d61 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 16 Aug 2012 11:00:07 +0100 Subject: [PATCH 37/75] + applied patch from @lightmare - #1325 --- bindings/python/python_grid_utils.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/bindings/python/python_grid_utils.cpp b/bindings/python/python_grid_utils.cpp index f0b99f714..ab4a90b49 100644 --- a/bindings/python/python_grid_utils.cpp +++ b/bindings/python/python_grid_utils.cpp @@ -379,12 +379,15 @@ void render_layer_for_grid(const mapnik::Map& map, throw std::runtime_error(s.str()); } - // convert python list to std::vector + // convert python list to std::set + std::set attributes; boost::python::ssize_t num_fields = boost::python::len(fields); for(boost::python::ssize_t i=0; i name(fields[i]); - if (name.check()) { + if (name.check()) + { grid.add_property_name(name()); + attributes.insert(name()); } else { @@ -394,8 +397,6 @@ void render_layer_for_grid(const mapnik::Map& map, } } - // copy property names - std::set attributes = grid.property_names(); std::string const& key = grid.get_key(); // if key is special __id__ keyword @@ -405,13 +406,10 @@ void render_layer_for_grid(const mapnik::Map& map, // if __id__ is requested to be dumped out // remove it so that datasource queries will not break - if (attributes.find(key) != attributes.end()) - { - attributes.erase(key); - } + attributes.erase(key); } // if key is not the special __id__ keyword - else if (attributes.find(key) == attributes.end()) + else { // them make sure the datasource query includes this field attributes.insert(key); From 8bba93d299070e3c597b057e66dcf50ef1c5543a Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 16 Aug 2012 12:05:31 +0100 Subject: [PATCH 38/75] + don't pass std::string arg by value - use const& --- bindings/python/mapnik_grid.cpp | 2 +- bindings/python/mapnik_grid_view.cpp | 2 +- bindings/python/python_grid_utils.cpp | 6 +++--- bindings/python/python_grid_utils.hpp | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/bindings/python/mapnik_grid.cpp b/bindings/python/mapnik_grid.cpp index 87a7ef852..4bff835c8 100644 --- a/bindings/python/mapnik_grid.cpp +++ b/bindings/python/mapnik_grid.cpp @@ -32,7 +32,7 @@ using namespace boost::python; // help compiler see template definitions -static dict (*encode)( mapnik::grid const&, std::string, bool, unsigned int) = mapnik::grid_encode; +static dict (*encode)( mapnik::grid const&, std::string const& , bool, unsigned int) = mapnik::grid_encode; bool painted(mapnik::grid const& grid) { diff --git a/bindings/python/mapnik_grid_view.cpp b/bindings/python/mapnik_grid_view.cpp index 926ee18f6..aa29dda78 100644 --- a/bindings/python/mapnik_grid_view.cpp +++ b/bindings/python/mapnik_grid_view.cpp @@ -34,7 +34,7 @@ using namespace boost::python; // help compiler see template definitions -static dict (*encode)( mapnik::grid_view const&, std::string, bool, unsigned int) = mapnik::grid_encode; +static dict (*encode)( mapnik::grid_view const&, std::string const& , bool, unsigned int) = mapnik::grid_encode; void export_grid_view() { diff --git a/bindings/python/python_grid_utils.cpp b/bindings/python/python_grid_utils.cpp index ab4a90b49..3312c8246 100644 --- a/bindings/python/python_grid_utils.cpp +++ b/bindings/python/python_grid_utils.cpp @@ -342,7 +342,7 @@ void grid_encode_utf(T const& grid_type, } template -boost::python::dict grid_encode( T const& grid, std::string format, bool add_features, unsigned int resolution) +boost::python::dict grid_encode( T const& grid, std::string const& format, bool add_features, unsigned int resolution) { if (format == "utf") { boost::python::dict json; @@ -357,8 +357,8 @@ boost::python::dict grid_encode( T const& grid, std::string format, bool add_fea } } -template boost::python::dict grid_encode( mapnik::grid const& grid, std::string format, bool add_features, unsigned int resolution); -template boost::python::dict grid_encode( mapnik::grid_view const& grid, std::string format, bool add_features, unsigned int resolution); +template boost::python::dict grid_encode( mapnik::grid const& grid, std::string const& format, bool add_features, unsigned int resolution); +template boost::python::dict grid_encode( mapnik::grid_view const& grid, std::string const& format, bool add_features, unsigned int resolution); /* new approach: key comes from grid object * grid size should be same as the map diff --git a/bindings/python/python_grid_utils.hpp b/bindings/python/python_grid_utils.hpp index 30ed4ff43..2c4083d1b 100644 --- a/bindings/python/python_grid_utils.hpp +++ b/bindings/python/python_grid_utils.hpp @@ -64,7 +64,7 @@ void grid_encode_utf(T const& grid_type, unsigned int resolution); template -boost::python::dict grid_encode( T const& grid, std::string format, bool add_features, unsigned int resolution); +boost::python::dict grid_encode( T const& grid, std::string const& format, bool add_features, unsigned int resolution); /* new approach: key comes from grid object * grid size should be same as the map From 02e07f9c9c3b3cdcdf7a6cff07116a799cb62d4e Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 16 Aug 2012 12:26:00 +0100 Subject: [PATCH 39/75] + update scons to the latest version 2.2.0 --- scons/scons-LICENSE | 2 +- scons/scons-README | 2 +- .../SCons/Action.py | 6 +- .../SCons/Builder.py | 4 +- .../SCons/CacheDir.py | 4 +- .../SCons/Conftest.py | 2 +- .../SCons/Debug.py | 4 +- .../SCons/Defaults.py | 4 +- .../SCons/Environment.py | 36 +- .../SCons/Errors.py | 4 +- .../SCons/Executor.py | 4 +- .../SCons/Job.py | 4 +- .../SCons/Memoize.py | 4 +- .../SCons/Node/Alias.py | 4 +- .../SCons/Node/FS.py | 6 +- .../SCons/Node/Python.py | 4 +- .../SCons/Node/__init__.py | 7 +- .../SCons/Options/BoolOption.py | 4 +- .../SCons/Options/EnumOption.py | 4 +- .../SCons/Options/ListOption.py | 4 +- .../SCons/Options/PackageOption.py | 4 +- .../SCons/Options/PathOption.py | 4 +- .../SCons/Options/__init__.py | 4 +- .../SCons/PathList.py | 4 +- .../SCons/Platform/__init__.py | 4 +- .../SCons/Platform/aix.py | 4 +- .../SCons/Platform/cygwin.py | 4 +- .../SCons/Platform/darwin.py | 4 +- .../SCons/Platform/hpux.py | 4 +- .../SCons/Platform/irix.py | 4 +- .../SCons/Platform/os2.py | 4 +- .../SCons/Platform/posix.py | 4 +- .../SCons/Platform/sunos.py | 4 +- .../SCons/Platform/win32.py | 17 +- .../SCons/SConf.py | 4 +- .../SCons/SConsign.py | 4 +- .../SCons/Scanner/C.py | 4 +- .../SCons/Scanner/D.py | 4 +- .../SCons/Scanner/Dir.py | 4 +- .../SCons/Scanner/Fortran.py | 4 +- .../SCons/Scanner/IDL.py | 4 +- .../SCons/Scanner/LaTeX.py | 9 +- .../SCons/Scanner/Prog.py | 4 +- .../SCons/Scanner/RC.py | 4 +- .../SCons/Scanner/__init__.py | 4 +- .../SCons/Script/Interactive.py | 4 +- .../SCons/Script/Main.py | 9 +- .../SCons/Script/SConsOptions.py | 4 +- .../SCons/Script/SConscript.py | 4 +- .../SCons/Script/__init__.py | 4 +- .../SCons/Sig.py | 4 +- .../SCons/Subst.py | 4 +- .../SCons/Taskmaster.py | 35 +- .../SCons/Tool/386asm.py | 4 +- .../SCons/Tool/BitKeeper.py | 4 +- .../SCons/Tool/CVS.py | 4 +- .../SCons/Tool/FortranCommon.py | 4 +- .../SCons/Tool/GettextCommon.py | 429 ++++++++++++++++++ .../SCons/Tool/JavaCommon.py | 4 +- .../SCons/Tool/MSCommon/__init__.py | 4 +- .../SCons/Tool/MSCommon/arch.py | 4 +- .../SCons/Tool/MSCommon/common.py | 4 +- .../SCons/Tool/MSCommon/netframework.py | 4 +- .../SCons/Tool/MSCommon/sdk.py | 4 +- .../SCons/Tool/MSCommon/vc.py | 19 +- .../SCons/Tool/MSCommon/vs.py | 31 +- .../SCons/Tool/Perforce.py | 4 +- .../SCons/Tool/PharLapCommon.py | 4 +- .../SCons/Tool/RCS.py | 4 +- .../SCons/Tool/SCCS.py | 4 +- .../SCons/Tool/Subversion.py | 4 +- .../SCons/Tool/__init__.py | 4 +- .../SCons/Tool/aixc++.py | 4 +- .../SCons/Tool/aixcc.py | 4 +- .../SCons/Tool/aixf77.py | 4 +- .../SCons/Tool/aixlink.py | 4 +- .../SCons/Tool/applelink.py | 4 +- .../SCons/Tool/ar.py | 4 +- .../SCons/Tool/as.py | 4 +- .../SCons/Tool/bcc32.py | 4 +- .../SCons/Tool/c++.py | 4 +- .../SCons/Tool/cc.py | 4 +- .../SCons/Tool/cvf.py | 4 +- .../SCons/Tool/default.py | 4 +- .../SCons/Tool/dmd.py | 4 +- .../SCons/Tool/dvi.py | 4 +- .../SCons/Tool/dvipdf.py | 4 +- .../SCons/Tool/dvips.py | 4 +- .../SCons/Tool/f03.py | 4 +- .../SCons/Tool/f77.py | 4 +- .../SCons/Tool/f90.py | 4 +- .../SCons/Tool/f95.py | 4 +- .../SCons/Tool/filesystem.py | 4 +- .../SCons/Tool/fortran.py | 4 +- .../SCons/Tool/g++.py | 4 +- .../SCons/Tool/g77.py | 4 +- .../SCons/Tool/gas.py | 4 +- .../SCons/Tool/gcc.py | 4 +- scons/scons-local-2.2.0/SCons/Tool/gettext.py | 45 ++ .../SCons/Tool/gfortran.py | 4 +- .../SCons/Tool/gnulink.py | 4 +- .../SCons/Tool/gs.py | 4 +- .../SCons/Tool/hpc++.py | 4 +- .../SCons/Tool/hpcc.py | 4 +- .../SCons/Tool/hplink.py | 4 +- .../SCons/Tool/icc.py | 4 +- .../SCons/Tool/icl.py | 4 +- .../SCons/Tool/ifl.py | 4 +- .../SCons/Tool/ifort.py | 4 +- .../SCons/Tool/ilink.py | 4 +- .../SCons/Tool/ilink32.py | 4 +- .../SCons/Tool/install.py | 4 +- .../SCons/Tool/intelc.py | 4 +- .../SCons/Tool/ipkg.py | 4 +- .../SCons/Tool/jar.py | 4 +- .../SCons/Tool/javac.py | 14 +- .../SCons/Tool/javah.py | 4 +- .../SCons/Tool/latex.py | 4 +- .../SCons/Tool/lex.py | 4 +- .../SCons/Tool/link.py | 4 +- .../SCons/Tool/linkloc.py | 4 +- .../SCons/Tool/m4.py | 4 +- .../SCons/Tool/masm.py | 4 +- .../SCons/Tool/midl.py | 4 +- .../SCons/Tool/mingw.py | 12 +- scons/scons-local-2.2.0/SCons/Tool/msgfmt.py | 102 +++++ scons/scons-local-2.2.0/SCons/Tool/msginit.py | 114 +++++ .../scons-local-2.2.0/SCons/Tool/msgmerge.py | 98 ++++ .../SCons/Tool/mslib.py | 4 +- .../SCons/Tool/mslink.py | 21 +- .../SCons/Tool/mssdk.py | 4 +- .../SCons/Tool/msvc.py | 4 +- .../SCons/Tool/msvs.py | 81 ++-- .../SCons/Tool/mwcc.py | 4 +- .../SCons/Tool/mwld.py | 4 +- .../SCons/Tool/nasm.py | 4 +- .../SCons/Tool/packaging/__init__.py | 4 +- .../SCons/Tool/packaging/ipk.py | 4 +- .../SCons/Tool/packaging/msi.py | 4 +- .../SCons/Tool/packaging/rpm.py | 4 +- .../SCons/Tool/packaging/src_tarbz2.py | 4 +- .../SCons/Tool/packaging/src_targz.py | 4 +- .../SCons/Tool/packaging/src_zip.py | 4 +- .../SCons/Tool/packaging/tarbz2.py | 4 +- .../SCons/Tool/packaging/targz.py | 4 +- .../SCons/Tool/packaging/zip.py | 4 +- .../SCons/Tool/pdf.py | 4 +- .../SCons/Tool/pdflatex.py | 4 +- .../SCons/Tool/pdftex.py | 4 +- .../SCons/Tool/qt.py | 4 +- .../SCons/Tool/rmic.py | 4 +- .../SCons/Tool/rpcgen.py | 4 +- .../SCons/Tool/rpm.py | 4 +- .../SCons/Tool/sgiar.py | 4 +- .../SCons/Tool/sgic++.py | 4 +- .../SCons/Tool/sgicc.py | 4 +- .../SCons/Tool/sgilink.py | 4 +- .../SCons/Tool/sunar.py | 4 +- .../SCons/Tool/sunc++.py | 4 +- .../SCons/Tool/suncc.py | 4 +- .../SCons/Tool/sunf77.py | 4 +- .../SCons/Tool/sunf90.py | 4 +- .../SCons/Tool/sunf95.py | 4 +- .../SCons/Tool/sunlink.py | 4 +- .../SCons/Tool/swig.py | 4 +- .../SCons/Tool/tar.py | 4 +- .../SCons/Tool/tex.py | 90 +++- .../SCons/Tool/textfile.py | 4 +- .../SCons/Tool/tlib.py | 4 +- .../SCons/Tool/wix.py | 4 +- .../scons-local-2.2.0/SCons/Tool/xgettext.py | 333 ++++++++++++++ .../SCons/Tool/yacc.py | 4 +- .../SCons/Tool/zip.py | 4 +- .../SCons/Util.py | 18 +- .../SCons/Variables/BoolVariable.py | 4 +- .../SCons/Variables/EnumVariable.py | 4 +- .../SCons/Variables/ListVariable.py | 4 +- .../SCons/Variables/PackageVariable.py | 4 +- .../SCons/Variables/PathVariable.py | 4 +- .../SCons/Variables/__init__.py | 4 +- .../SCons/Warnings.py | 4 +- .../SCons/__init__.py | 14 +- .../SCons/compat/__init__.py | 4 +- .../SCons/compat/_scons_builtins.py | 4 +- .../SCons/compat/_scons_collections.py | 4 +- .../SCons/compat/_scons_dbm.py | 4 +- .../SCons/compat/_scons_hashlib.py | 4 +- .../SCons/compat/_scons_io.py | 4 +- .../SCons/compat/_scons_sets.py | 0 .../SCons/compat/_scons_subprocess.py | 0 .../SCons/cpp.py | 4 +- .../SCons/dblite.py | 0 .../SCons/exitfuncs.py | 4 +- .../scons-2.2.0.egg-info} | 2 +- scons/scons-time.py | 4 +- scons/scons.py | 14 +- scons/sconsign.py | 14 +- 197 files changed, 1736 insertions(+), 506 deletions(-) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Action.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Builder.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/CacheDir.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Conftest.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Debug.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Defaults.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Environment.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Errors.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Executor.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Job.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Memoize.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Node/Alias.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Node/FS.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Node/Python.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Node/__init__.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Options/BoolOption.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Options/EnumOption.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Options/ListOption.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Options/PackageOption.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Options/PathOption.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Options/__init__.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/PathList.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/__init__.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/aix.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/cygwin.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/darwin.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/hpux.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/irix.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/os2.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/posix.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/sunos.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Platform/win32.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/SConf.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/SConsign.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/C.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/D.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/Dir.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/Fortran.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/IDL.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/LaTeX.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/Prog.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/RC.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Scanner/__init__.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Script/Interactive.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Script/Main.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Script/SConsOptions.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Script/SConscript.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Script/__init__.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Sig.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Subst.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Taskmaster.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/386asm.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/BitKeeper.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/CVS.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/FortranCommon.py (98%) create mode 100644 scons/scons-local-2.2.0/SCons/Tool/GettextCommon.py rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/JavaCommon.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/MSCommon/__init__.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/MSCommon/arch.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/MSCommon/common.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/MSCommon/netframework.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/MSCommon/sdk.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/MSCommon/vc.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/MSCommon/vs.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/Perforce.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/PharLapCommon.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/RCS.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/SCCS.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/Subversion.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/__init__.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/aixc++.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/aixcc.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/aixf77.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/aixlink.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/applelink.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/ar.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/as.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/bcc32.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/c++.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/cc.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/cvf.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/default.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/dmd.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/dvi.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/dvipdf.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/dvips.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/f03.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/f77.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/f90.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/f95.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/filesystem.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/fortran.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/g++.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/g77.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/gas.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/gcc.py (95%) create mode 100644 scons/scons-local-2.2.0/SCons/Tool/gettext.py rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/gfortran.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/gnulink.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/gs.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/hpc++.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/hpcc.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/hplink.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/icc.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/icl.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/ifl.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/ifort.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/ilink.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/ilink32.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/install.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/intelc.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/ipkg.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/jar.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/javac.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/javah.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/latex.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/lex.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/link.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/linkloc.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/m4.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/masm.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/midl.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/mingw.py (94%) create mode 100644 scons/scons-local-2.2.0/SCons/Tool/msgfmt.py create mode 100644 scons/scons-local-2.2.0/SCons/Tool/msginit.py create mode 100644 scons/scons-local-2.2.0/SCons/Tool/msgmerge.py rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/mslib.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/mslink.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/mssdk.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/msvc.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/msvs.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/mwcc.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/mwld.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/nasm.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/__init__.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/ipk.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/msi.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/rpm.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/src_tarbz2.py (90%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/src_targz.py (90%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/src_zip.py (90%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/tarbz2.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/targz.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/packaging/zip.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/pdf.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/pdflatex.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/pdftex.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/qt.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/rmic.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/rpcgen.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/rpm.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sgiar.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sgic++.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sgicc.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sgilink.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sunar.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sunc++.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/suncc.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sunf77.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sunf90.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sunf95.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/sunlink.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/swig.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/tar.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/tex.py (89%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/textfile.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/tlib.py (92%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/wix.py (95%) create mode 100644 scons/scons-local-2.2.0/SCons/Tool/xgettext.py rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/yacc.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Tool/zip.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Util.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Variables/BoolVariable.py (94%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Variables/EnumVariable.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Variables/ListVariable.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Variables/PackageVariable.py (95%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Variables/PathVariable.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Variables/__init__.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/Warnings.py (97%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/__init__.py (81%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/__init__.py (98%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/_scons_builtins.py (96%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/_scons_collections.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/_scons_dbm.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/_scons_hashlib.py (93%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/_scons_io.py (91%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/_scons_sets.py (100%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/compat/_scons_subprocess.py (100%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/cpp.py (99%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/dblite.py (100%) rename scons/{scons-local-2.1.0 => scons-local-2.2.0}/SCons/exitfuncs.py (94%) rename scons/{scons-local-2.1.0/scons-2.1.0.egg-info => scons-local-2.2.0/scons-2.2.0.egg-info} (96%) diff --git a/scons/scons-LICENSE b/scons/scons-LICENSE index 74067e0df..4df86d1d4 100644 --- a/scons/scons-LICENSE +++ b/scons/scons-LICENSE @@ -3,7 +3,7 @@ This copyright and license do not apply to any other software with which this software may have been included. -Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/scons/scons-README b/scons/scons-README index a4a648fa0..f1d59d4b4 100644 --- a/scons/scons-README +++ b/scons/scons-README @@ -1,4 +1,4 @@ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation SCons - a software construction tool diff --git a/scons/scons-local-2.1.0/SCons/Action.py b/scons/scons-local-2.2.0/SCons/Action.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Action.py rename to scons/scons-local-2.2.0/SCons/Action.py index f4117a476..a648c6937 100644 --- a/scons/scons-local-2.1.0/SCons/Action.py +++ b/scons/scons-local-2.2.0/SCons/Action.py @@ -76,7 +76,7 @@ way for wrapping up the functions. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -97,7 +97,7 @@ way for wrapping up the functions. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Action.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Action.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.compat @@ -899,7 +899,7 @@ class CommandGeneratorAction(ActionBase): show=_null, execute=_null, chdir=_null, executor=None): act = self._generate(target, source, env, 0, executor) if act is None: - raise UserError("While building `%s': " + raise SCons.Errors.UserError("While building `%s': " "Cannot deduce file extension from source files: %s" % (repr(list(map(str, target))), repr(list(map(str, source))))) return act(target, source, env, exitstatfunc, presub, diff --git a/scons/scons-local-2.1.0/SCons/Builder.py b/scons/scons-local-2.2.0/SCons/Builder.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Builder.py rename to scons/scons-local-2.2.0/SCons/Builder.py index 8d480be53..5a8aff1aa 100644 --- a/scons/scons-local-2.1.0/SCons/Builder.py +++ b/scons/scons-local-2.2.0/SCons/Builder.py @@ -76,7 +76,7 @@ There are the following methods for internal use within this module: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -97,7 +97,7 @@ There are the following methods for internal use within this module: # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Builder.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Builder.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import collections diff --git a/scons/scons-local-2.1.0/SCons/CacheDir.py b/scons/scons-local-2.2.0/SCons/CacheDir.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/CacheDir.py rename to scons/scons-local-2.2.0/SCons/CacheDir.py index 09fbce04f..ec7e9eebf 100644 --- a/scons/scons-local-2.1.0/SCons/CacheDir.py +++ b/scons/scons-local-2.2.0/SCons/CacheDir.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/CacheDir.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/CacheDir.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """ CacheDir support diff --git a/scons/scons-local-2.1.0/SCons/Conftest.py b/scons/scons-local-2.2.0/SCons/Conftest.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Conftest.py rename to scons/scons-local-2.2.0/SCons/Conftest.py index 04a6bc2aa..d4662780c 100644 --- a/scons/scons-local-2.1.0/SCons/Conftest.py +++ b/scons/scons-local-2.2.0/SCons/Conftest.py @@ -554,7 +554,7 @@ def CheckDeclaration(context, symbol, includes = None, language = None): lang, suffix, msg = _lang2suffix(language) if msg: - context.Display("Cannot check for declaration %s: %s\n" % (type_name, msg)) + context.Display("Cannot check for declaration %s: %s\n" % (symbol, msg)) return msg src = includetext + includes diff --git a/scons/scons-local-2.1.0/SCons/Debug.py b/scons/scons-local-2.2.0/SCons/Debug.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Debug.py rename to scons/scons-local-2.2.0/SCons/Debug.py index b28f77d10..5f1b87c13 100644 --- a/scons/scons-local-2.1.0/SCons/Debug.py +++ b/scons/scons-local-2.2.0/SCons/Debug.py @@ -6,7 +6,7 @@ needed by most users. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ needed by most users. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Debug.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Debug.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import sys diff --git a/scons/scons-local-2.1.0/SCons/Defaults.py b/scons/scons-local-2.2.0/SCons/Defaults.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Defaults.py rename to scons/scons-local-2.2.0/SCons/Defaults.py index c17094047..96760cedc 100644 --- a/scons/scons-local-2.1.0/SCons/Defaults.py +++ b/scons/scons-local-2.2.0/SCons/Defaults.py @@ -10,7 +10,7 @@ from distutils.msvccompiler. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -33,7 +33,7 @@ from distutils.msvccompiler. # from __future__ import division -__revision__ = "src/engine/SCons/Defaults.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Defaults.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os diff --git a/scons/scons-local-2.1.0/SCons/Environment.py b/scons/scons-local-2.2.0/SCons/Environment.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Environment.py rename to scons/scons-local-2.2.0/SCons/Environment.py index de8e9ef7d..addf782a3 100644 --- a/scons/scons-local-2.1.0/SCons/Environment.py +++ b/scons/scons-local-2.2.0/SCons/Environment.py @@ -10,7 +10,7 @@ Environment """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ Environment # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Environment.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Environment.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import copy @@ -72,6 +72,7 @@ CleanTargets = {} CalculatorArgs = {} semi_deepcopy = SCons.Util.semi_deepcopy +semi_deepcopy_dict = SCons.Util.semi_deepcopy_dict # Pull UserError into the global name space for the benefit of # Environment().SourceSignatures(), which has some import statements @@ -303,7 +304,9 @@ class BuilderDict(UserDict): UserDict.__init__(self, dict) def __semi_deepcopy__(self): - return self.__class__(self.data, self.env) + # These cannot be copied since they would both modify the same builder object, and indeed + # just copying would modify the original builder + raise TypeError( 'cannot semi_deepcopy a BuilderDict' ) def __setitem__(self, item, val): try: @@ -1374,15 +1377,15 @@ class Base(SubstitutionEnvironment): (like a function). There are no references to any mutable objects in the original Environment. """ - clone = copy.copy(self) - clone._dict = semi_deepcopy(self._dict) - try: - cbd = clone._dict['BUILDERS'] + builders = self._dict['BUILDERS'] except KeyError: pass - else: - clone._dict['BUILDERS'] = BuilderDict(cbd, clone) + + clone = copy.copy(self) + # BUILDERS is not safe to do a simple copy + clone._dict = semi_deepcopy_dict(self._dict, ['BUILDERS']) + clone._dict['BUILDERS'] = BuilderDict(builders, clone) # Check the methods added via AddMethod() and re-bind them to # the cloned environment. Only do this if the attribute hasn't @@ -1733,7 +1736,7 @@ class Base(SubstitutionEnvironment): except KeyError: pass else: - kwbd = semi_deepcopy(kwbd) + kwbd = BuilderDict(kwbd,self) del kw['BUILDERS'] self.__setitem__('BUILDERS', kwbd) kw = copy_non_reserved_keywords(kw) @@ -2228,14 +2231,11 @@ class Base(SubstitutionEnvironment): sources.append(s) build_source(node.all_children()) - # THIS CODE APPEARS TO HAVE NO EFFECT - # # get the final srcnode for all nodes, this means stripping any - # # attached build node by calling the srcnode function - # for file in sources: - # srcnode = file.srcnode() - # while srcnode != file.srcnode(): - # srcnode = file.srcnode() - + def final_source(node): + while (node != node.srcnode()): + node = node.srcnode() + return node + sources = map( final_source, sources ); # remove duplicates return list(set(sources)) diff --git a/scons/scons-local-2.1.0/SCons/Errors.py b/scons/scons-local-2.2.0/SCons/Errors.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Errors.py rename to scons/scons-local-2.2.0/SCons/Errors.py index 2501e3612..8541c68ab 100644 --- a/scons/scons-local-2.1.0/SCons/Errors.py +++ b/scons/scons-local-2.2.0/SCons/Errors.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ and user errors in SCons. """ -__revision__ = "src/engine/SCons/Errors.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Errors.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Executor.py b/scons/scons-local-2.2.0/SCons/Executor.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Executor.py rename to scons/scons-local-2.2.0/SCons/Executor.py index f343568ec..9ea6e631d 100644 --- a/scons/scons-local-2.1.0/SCons/Executor.py +++ b/scons/scons-local-2.2.0/SCons/Executor.py @@ -6,7 +6,7 @@ Nodes. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Nodes. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Executor.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Executor.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import collections diff --git a/scons/scons-local-2.1.0/SCons/Job.py b/scons/scons-local-2.2.0/SCons/Job.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Job.py rename to scons/scons-local-2.2.0/SCons/Job.py index 04bb4c438..342f55e98 100644 --- a/scons/scons-local-2.1.0/SCons/Job.py +++ b/scons/scons-local-2.2.0/SCons/Job.py @@ -7,7 +7,7 @@ stop, and wait on jobs. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ stop, and wait on jobs. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Job.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Job.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.compat diff --git a/scons/scons-local-2.1.0/SCons/Memoize.py b/scons/scons-local-2.2.0/SCons/Memoize.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Memoize.py rename to scons/scons-local-2.2.0/SCons/Memoize.py index ea7d58f94..9850a841f 100644 --- a/scons/scons-local-2.1.0/SCons/Memoize.py +++ b/scons/scons-local-2.2.0/SCons/Memoize.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Memoize.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Memoize.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Memoizer diff --git a/scons/scons-local-2.1.0/SCons/Node/Alias.py b/scons/scons-local-2.2.0/SCons/Node/Alias.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Node/Alias.py rename to scons/scons-local-2.2.0/SCons/Node/Alias.py index 9996e64fc..fbef1fdd1 100644 --- a/scons/scons-local-2.1.0/SCons/Node/Alias.py +++ b/scons/scons-local-2.2.0/SCons/Node/Alias.py @@ -8,7 +8,7 @@ This creates a hash of global Aliases (dummy targets). """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ This creates a hash of global Aliases (dummy targets). # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/Alias.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Node/Alias.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import collections diff --git a/scons/scons-local-2.1.0/SCons/Node/FS.py b/scons/scons-local-2.2.0/SCons/Node/FS.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Node/FS.py rename to scons/scons-local-2.2.0/SCons/Node/FS.py index 9c1b05af9..3f3cf2870 100644 --- a/scons/scons-local-2.1.0/SCons/Node/FS.py +++ b/scons/scons-local-2.2.0/SCons/Node/FS.py @@ -11,7 +11,7 @@ that can be used by scripts or modules looking for the canonical default. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ that can be used by scripts or modules looking for the canonical default. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Node/FS.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Node/FS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import fnmatch import os @@ -2715,7 +2715,7 @@ class File(Base): so only do thread safe stuff here. Do thread unsafe stuff in built(). - Returns true iff the node was successfully retrieved. + Returns true if the node was successfully retrieved. """ if self.nocache: return None diff --git a/scons/scons-local-2.1.0/SCons/Node/Python.py b/scons/scons-local-2.2.0/SCons/Node/Python.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Node/Python.py rename to scons/scons-local-2.2.0/SCons/Node/Python.py index b97f9d4c2..5c302e6f7 100644 --- a/scons/scons-local-2.1.0/SCons/Node/Python.py +++ b/scons/scons-local-2.2.0/SCons/Node/Python.py @@ -5,7 +5,7 @@ Python nodes. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Python nodes. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Node/Python.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Node/Python.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Node diff --git a/scons/scons-local-2.1.0/SCons/Node/__init__.py b/scons/scons-local-2.2.0/SCons/Node/__init__.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Node/__init__.py rename to scons/scons-local-2.2.0/SCons/Node/__init__.py index a832a5f48..126d83c09 100644 --- a/scons/scons-local-2.1.0/SCons/Node/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Node/__init__.py @@ -20,7 +20,7 @@ be able to depend on any other type of "thing." """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -41,7 +41,7 @@ be able to depend on any other type of "thing." # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Node/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Node/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import collections import copy @@ -216,6 +216,7 @@ class Node(object): self.precious = None self.noclean = 0 self.nocache = 0 + self.cached = 0 # is this node pulled from cache? self.always_build = None self.includes = None self.attributes = self.Attrs() # Generic place to stick information about the Node. @@ -306,7 +307,7 @@ class Node(object): so only do thread safe stuff here. Do thread unsafe stuff in built(). - Returns true iff the node was successfully retrieved. + Returns true if the node was successfully retrieved. """ return 0 diff --git a/scons/scons-local-2.1.0/SCons/Options/BoolOption.py b/scons/scons-local-2.2.0/SCons/Options/BoolOption.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Options/BoolOption.py rename to scons/scons-local-2.2.0/SCons/Options/BoolOption.py index 2b8653377..be2de6ce7 100644 --- a/scons/scons-local-2.1.0/SCons/Options/BoolOption.py +++ b/scons/scons-local-2.2.0/SCons/Options/BoolOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/BoolOption.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Options/BoolOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.1.0/SCons/Options/EnumOption.py b/scons/scons-local-2.2.0/SCons/Options/EnumOption.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Options/EnumOption.py rename to scons/scons-local-2.2.0/SCons/Options/EnumOption.py index 529620965..b7aa8530e 100644 --- a/scons/scons-local-2.1.0/SCons/Options/EnumOption.py +++ b/scons/scons-local-2.2.0/SCons/Options/EnumOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/EnumOption.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Options/EnumOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.1.0/SCons/Options/ListOption.py b/scons/scons-local-2.2.0/SCons/Options/ListOption.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Options/ListOption.py rename to scons/scons-local-2.2.0/SCons/Options/ListOption.py index 5672689b0..ba4c4a98a 100644 --- a/scons/scons-local-2.1.0/SCons/Options/ListOption.py +++ b/scons/scons-local-2.2.0/SCons/Options/ListOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/ListOption.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Options/ListOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.1.0/SCons/Options/PackageOption.py b/scons/scons-local-2.2.0/SCons/Options/PackageOption.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Options/PackageOption.py rename to scons/scons-local-2.2.0/SCons/Options/PackageOption.py index 930c18fee..d65564077 100644 --- a/scons/scons-local-2.1.0/SCons/Options/PackageOption.py +++ b/scons/scons-local-2.2.0/SCons/Options/PackageOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/PackageOption.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Options/PackageOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.1.0/SCons/Options/PathOption.py b/scons/scons-local-2.2.0/SCons/Options/PathOption.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Options/PathOption.py rename to scons/scons-local-2.2.0/SCons/Options/PathOption.py index ebf0f249a..e7de97f89 100644 --- a/scons/scons-local-2.1.0/SCons/Options/PathOption.py +++ b/scons/scons-local-2.2.0/SCons/Options/PathOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/PathOption.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Options/PathOption.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.1.0/SCons/Options/__init__.py b/scons/scons-local-2.2.0/SCons/Options/__init__.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Options/__init__.py rename to scons/scons-local-2.2.0/SCons/Options/__init__.py index b1428e937..62edfa900 100644 --- a/scons/scons-local-2.1.0/SCons/Options/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Options/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Options/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Options/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.1.0/SCons/PathList.py b/scons/scons-local-2.2.0/SCons/PathList.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/PathList.py rename to scons/scons-local-2.2.0/SCons/PathList.py index 0ba07f53b..9a4145331 100644 --- a/scons/scons-local-2.1.0/SCons/PathList.py +++ b/scons/scons-local-2.2.0/SCons/PathList.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/PathList.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/PathList.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """SCons.PathList diff --git a/scons/scons-local-2.1.0/SCons/Platform/__init__.py b/scons/scons-local-2.2.0/SCons/Platform/__init__.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Platform/__init__.py rename to scons/scons-local-2.2.0/SCons/Platform/__init__.py index eb0108ef5..2cab3c865 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Platform/__init__.py @@ -20,7 +20,7 @@ their own platform definition. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -42,7 +42,7 @@ their own platform definition. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.compat diff --git a/scons/scons-local-2.1.0/SCons/Platform/aix.py b/scons/scons-local-2.2.0/SCons/Platform/aix.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Platform/aix.py rename to scons/scons-local-2.2.0/SCons/Platform/aix.py index c48aaff2e..df3ee4044 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/aix.py +++ b/scons/scons-local-2.2.0/SCons/Platform/aix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/aix.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/aix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os diff --git a/scons/scons-local-2.1.0/SCons/Platform/cygwin.py b/scons/scons-local-2.2.0/SCons/Platform/cygwin.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Platform/cygwin.py rename to scons/scons-local-2.2.0/SCons/Platform/cygwin.py index c04f50a20..31d822b96 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/cygwin.py +++ b/scons/scons-local-2.2.0/SCons/Platform/cygwin.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/cygwin.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/cygwin.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import posix from SCons.Platform import TempFileMunge diff --git a/scons/scons-local-2.1.0/SCons/Platform/darwin.py b/scons/scons-local-2.2.0/SCons/Platform/darwin.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Platform/darwin.py rename to scons/scons-local-2.2.0/SCons/Platform/darwin.py index bed6fce98..907ec45d1 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/darwin.py +++ b/scons/scons-local-2.2.0/SCons/Platform/darwin.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/darwin.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/darwin.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import posix import os diff --git a/scons/scons-local-2.1.0/SCons/Platform/hpux.py b/scons/scons-local-2.2.0/SCons/Platform/hpux.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/Platform/hpux.py rename to scons/scons-local-2.2.0/SCons/Platform/hpux.py index fbacc04d6..2312439a8 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/hpux.py +++ b/scons/scons-local-2.2.0/SCons/Platform/hpux.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/hpux.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/hpux.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import posix diff --git a/scons/scons-local-2.1.0/SCons/Platform/irix.py b/scons/scons-local-2.2.0/SCons/Platform/irix.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/Platform/irix.py rename to scons/scons-local-2.2.0/SCons/Platform/irix.py index 2c3bc157a..f0b089a86 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/irix.py +++ b/scons/scons-local-2.2.0/SCons/Platform/irix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/irix.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/irix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import posix diff --git a/scons/scons-local-2.1.0/SCons/Platform/os2.py b/scons/scons-local-2.2.0/SCons/Platform/os2.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Platform/os2.py rename to scons/scons-local-2.2.0/SCons/Platform/os2.py index 9c7641961..0576abdd6 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/os2.py +++ b/scons/scons-local-2.2.0/SCons/Platform/os2.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/os2.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/os2.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import win32 def generate(env): diff --git a/scons/scons-local-2.1.0/SCons/Platform/posix.py b/scons/scons-local-2.2.0/SCons/Platform/posix.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Platform/posix.py rename to scons/scons-local-2.2.0/SCons/Platform/posix.py index 6d99fdb71..cff1f93a4 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/posix.py +++ b/scons/scons-local-2.2.0/SCons/Platform/posix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/posix.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/posix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import errno import os diff --git a/scons/scons-local-2.1.0/SCons/Platform/sunos.py b/scons/scons-local-2.2.0/SCons/Platform/sunos.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Platform/sunos.py rename to scons/scons-local-2.2.0/SCons/Platform/sunos.py index 234490642..7ae60f840 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/sunos.py +++ b/scons/scons-local-2.2.0/SCons/Platform/sunos.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/sunos.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/sunos.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import posix diff --git a/scons/scons-local-2.1.0/SCons/Platform/win32.py b/scons/scons-local-2.2.0/SCons/Platform/win32.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Platform/win32.py rename to scons/scons-local-2.2.0/SCons/Platform/win32.py index fec9b4cad..2d6d970d3 100644 --- a/scons/scons-local-2.1.0/SCons/Platform/win32.py +++ b/scons/scons-local-2.2.0/SCons/Platform/win32.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Platform/win32.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Platform/win32.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path @@ -64,13 +64,12 @@ else: _builtin_file = builtins.file _builtin_open = builtins.open - - def _scons_file(*args, **kw): - fp = _builtin_file(*args, **kw) - win32api.SetHandleInformation(msvcrt.get_osfhandle(fp.fileno()), - win32con.HANDLE_FLAG_INHERIT, - 0) - return fp + + class _scons_file(_builtin_file): + def __init__(self, *args, **kw): + _builtin_file.__init__(self, *args, **kw) + win32api.SetHandleInformation(msvcrt.get_osfhandle(self.fileno()), + win32con.HANDLE_FLAG_INHERIT, 0) def _scons_open(*args, **kw): fp = _builtin_open(*args, **kw) diff --git a/scons/scons-local-2.1.0/SCons/SConf.py b/scons/scons-local-2.2.0/SCons/SConf.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/SConf.py rename to scons/scons-local-2.2.0/SCons/SConf.py index 11d62457a..5c99db9d3 100644 --- a/scons/scons-local-2.1.0/SCons/SConf.py +++ b/scons/scons-local-2.2.0/SCons/SConf.py @@ -4,7 +4,7 @@ Autoconf-like configuration support. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ Autoconf-like configuration support. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/SConf.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/SConf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.compat diff --git a/scons/scons-local-2.1.0/SCons/SConsign.py b/scons/scons-local-2.2.0/SCons/SConsign.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/SConsign.py rename to scons/scons-local-2.2.0/SCons/SConsign.py index bbe475b2c..aa59836b9 100644 --- a/scons/scons-local-2.1.0/SCons/SConsign.py +++ b/scons/scons-local-2.2.0/SCons/SConsign.py @@ -5,7 +5,7 @@ Writing and reading information to the .sconsign file or files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Writing and reading information to the .sconsign file or files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/SConsign.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/SConsign.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.compat diff --git a/scons/scons-local-2.1.0/SCons/Scanner/C.py b/scons/scons-local-2.2.0/SCons/Scanner/C.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Scanner/C.py rename to scons/scons-local-2.2.0/SCons/Scanner/C.py index 0b07c1369..6ba7eeac1 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/C.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/C.py @@ -5,7 +5,7 @@ This module implements the depenency scanner for C/C++ code. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ This module implements the depenency scanner for C/C++ code. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/C.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/C.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.1.0/SCons/Scanner/D.py b/scons/scons-local-2.2.0/SCons/Scanner/D.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Scanner/D.py rename to scons/scons-local-2.2.0/SCons/Scanner/D.py index b4b26ba8e..20ab5f0ac 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/D.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/D.py @@ -8,7 +8,7 @@ Coded by Andy Friesen """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ Coded by Andy Friesen # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/D.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/D.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import re diff --git a/scons/scons-local-2.1.0/SCons/Scanner/Dir.py b/scons/scons-local-2.2.0/SCons/Scanner/Dir.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Scanner/Dir.py rename to scons/scons-local-2.2.0/SCons/Scanner/Dir.py index aa1239fa2..7c199bcf3 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/Dir.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/Dir.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,7 +20,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Scanner/Dir.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/Dir.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.1.0/SCons/Scanner/Fortran.py b/scons/scons-local-2.2.0/SCons/Scanner/Fortran.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Scanner/Fortran.py rename to scons/scons-local-2.2.0/SCons/Scanner/Fortran.py index 13f670ded..4bb49cd78 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/Fortran.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/Fortran.py @@ -5,7 +5,7 @@ This module implements the dependency scanner for Fortran code. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ This module implements the dependency scanner for Fortran code. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Scanner/Fortran.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/Fortran.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import re diff --git a/scons/scons-local-2.1.0/SCons/Scanner/IDL.py b/scons/scons-local-2.2.0/SCons/Scanner/IDL.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Scanner/IDL.py rename to scons/scons-local-2.2.0/SCons/Scanner/IDL.py index 206a1068c..d43e0139d 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/IDL.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/IDL.py @@ -6,7 +6,7 @@ Definition Language) files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ Definition Language) files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/IDL.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/IDL.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.1.0/SCons/Scanner/LaTeX.py b/scons/scons-local-2.2.0/SCons/Scanner/LaTeX.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Scanner/LaTeX.py rename to scons/scons-local-2.2.0/SCons/Scanner/LaTeX.py index 913e64b64..4152fa2ae 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/LaTeX.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/LaTeX.py @@ -5,7 +5,7 @@ This module implements the dependency scanner for LaTeX code. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ This module implements the dependency scanner for LaTeX code. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/LaTeX.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/LaTeX.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import re @@ -159,6 +159,9 @@ class LaTeX(SCons.Scanner.Base): 'includegraphics': 'TEXINPUTS', 'bibliography': 'BIBINPUTS', 'bibliographystyle': 'BSTINPUTS', + 'addbibresource': 'BIBINPUTS', + 'addglobalbib': 'BIBINPUTS', + 'addsectionbib': 'BIBINPUTS', 'makeindex': 'INDEXSTYLE', 'usepackage': 'TEXINPUTS', 'lstinputlisting': 'TEXINPUTS'} @@ -172,7 +175,7 @@ class LaTeX(SCons.Scanner.Base): # line followed by one or more newline characters (i.e. blank # lines), interfering with a match on the next line. # add option for whitespace before the '[options]' or the '{filename}' - regex = r'^[^%\n]*\\(include|includegraphics(?:\s*\[[^\]]+\])?|lstinputlisting(?:\[[^\]]+\])?|input|bibliography|usepackage)\s*{([^}]*)}' + regex = r'^[^%\n]*\\(include|includegraphics(?:\s*\[[^\]]+\])?|lstinputlisting(?:\[[^\]]+\])?|input|bibliography|addbibresource|addglobalbib|addsectionbib|usepackage)\s*{([^}]*)}' self.cre = re.compile(regex, re.M) self.comment_re = re.compile(r'^((?:(?:\\%)|[^%\n])*)(.*)$', re.M) diff --git a/scons/scons-local-2.1.0/SCons/Scanner/Prog.py b/scons/scons-local-2.2.0/SCons/Scanner/Prog.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Scanner/Prog.py rename to scons/scons-local-2.2.0/SCons/Scanner/Prog.py index 0df80f818..fbdf8581e 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/Prog.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/Prog.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/Prog.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/Prog.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Node import SCons.Node.FS diff --git a/scons/scons-local-2.1.0/SCons/Scanner/RC.py b/scons/scons-local-2.2.0/SCons/Scanner/RC.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Scanner/RC.py rename to scons/scons-local-2.2.0/SCons/Scanner/RC.py index a650581a7..871fdf9a0 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/RC.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/RC.py @@ -6,7 +6,7 @@ Definition Language) files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ Definition Language) files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/RC.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/RC.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.1.0/SCons/Scanner/__init__.py b/scons/scons-local-2.2.0/SCons/Scanner/__init__.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Scanner/__init__.py rename to scons/scons-local-2.2.0/SCons/Scanner/__init__.py index d2d7a627a..9675e8dd5 100644 --- a/scons/scons-local-2.1.0/SCons/Scanner/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Scanner/__init__.py @@ -5,7 +5,7 @@ The Scanner package for the SCons software construction utility. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ The Scanner package for the SCons software construction utility. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Scanner/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Scanner/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import re diff --git a/scons/scons-local-2.1.0/SCons/Script/Interactive.py b/scons/scons-local-2.2.0/SCons/Script/Interactive.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Script/Interactive.py rename to scons/scons-local-2.2.0/SCons/Script/Interactive.py index f2151fa4e..e0822a7e3 100644 --- a/scons/scons-local-2.1.0/SCons/Script/Interactive.py +++ b/scons/scons-local-2.2.0/SCons/Script/Interactive.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,7 +20,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Script/Interactive.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Script/Interactive.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """ SCons interactive mode diff --git a/scons/scons-local-2.1.0/SCons/Script/Main.py b/scons/scons-local-2.2.0/SCons/Script/Main.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Script/Main.py rename to scons/scons-local-2.2.0/SCons/Script/Main.py index 2f00e5cc5..12d1bc256 100644 --- a/scons/scons-local-2.1.0/SCons/Script/Main.py +++ b/scons/scons-local-2.2.0/SCons/Script/Main.py @@ -13,7 +13,7 @@ it goes here. unsupported_python_version = (2, 3, 0) deprecated_python_version = (2, 4, 0) -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -34,7 +34,7 @@ deprecated_python_version = (2, 4, 0) # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Script/Main.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Script/Main.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.compat @@ -869,7 +869,8 @@ def _main(parser): script_dir = '' if script_dir and script_dir != os.getcwd(): - display("scons: Entering directory `%s'" % script_dir) + if not options.silent: + display("scons: Entering directory `%s'" % script_dir) try: os.chdir(script_dir) except OSError: @@ -1329,7 +1330,7 @@ def main(): pass parts.append(version_string("engine", SCons)) parts.append(path_string("engine", SCons)) - parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation") + parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation") version = ''.join(parts) import SConsOptions diff --git a/scons/scons-local-2.1.0/SCons/Script/SConsOptions.py b/scons/scons-local-2.2.0/SCons/Script/SConsOptions.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Script/SConsOptions.py rename to scons/scons-local-2.2.0/SCons/Script/SConsOptions.py index 79d992776..1d574f8cb 100644 --- a/scons/scons-local-2.1.0/SCons/Script/SConsOptions.py +++ b/scons/scons-local-2.2.0/SCons/Script/SConsOptions.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/SConsOptions.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Script/SConsOptions.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import optparse import re diff --git a/scons/scons-local-2.1.0/SCons/Script/SConscript.py b/scons/scons-local-2.2.0/SCons/Script/SConscript.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Script/SConscript.py rename to scons/scons-local-2.2.0/SCons/Script/SConscript.py index ee5e29048..18a9e310a 100644 --- a/scons/scons-local-2.1.0/SCons/Script/SConscript.py +++ b/scons/scons-local-2.2.0/SCons/Script/SConscript.py @@ -6,7 +6,7 @@ files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ files. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from __future__ import division -__revision__ = "src/engine/SCons/Script/SConscript.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Script/SConscript.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons import SCons.Action diff --git a/scons/scons-local-2.1.0/SCons/Script/__init__.py b/scons/scons-local-2.2.0/SCons/Script/__init__.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Script/__init__.py rename to scons/scons-local-2.2.0/SCons/Script/__init__.py index f2503ae9a..c0a031adb 100644 --- a/scons/scons-local-2.1.0/SCons/Script/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Script/__init__.py @@ -12,7 +12,7 @@ it goes here. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -34,7 +34,7 @@ it goes here. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Script/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Script/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import time start_time = time.time() diff --git a/scons/scons-local-2.1.0/SCons/Sig.py b/scons/scons-local-2.2.0/SCons/Sig.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Sig.py rename to scons/scons-local-2.2.0/SCons/Sig.py index 51c1b1a8d..41289a0f6 100644 --- a/scons/scons-local-2.1.0/SCons/Sig.py +++ b/scons/scons-local-2.2.0/SCons/Sig.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Sig.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Sig.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Place-holder for the old SCons.Sig module hierarchy diff --git a/scons/scons-local-2.1.0/SCons/Subst.py b/scons/scons-local-2.2.0/SCons/Subst.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Subst.py rename to scons/scons-local-2.2.0/SCons/Subst.py index d0c8c381e..8d9d3a43a 100644 --- a/scons/scons-local-2.1.0/SCons/Subst.py +++ b/scons/scons-local-2.2.0/SCons/Subst.py @@ -5,7 +5,7 @@ SCons string substitution. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ SCons string substitution. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Subst.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Subst.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import collections import re diff --git a/scons/scons-local-2.1.0/SCons/Taskmaster.py b/scons/scons-local-2.2.0/SCons/Taskmaster.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Taskmaster.py rename to scons/scons-local-2.2.0/SCons/Taskmaster.py index e98a8593b..cd95fb081 100644 --- a/scons/scons-local-2.1.0/SCons/Taskmaster.py +++ b/scons/scons-local-2.2.0/SCons/Taskmaster.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -47,7 +47,7 @@ interface and the SCons build engine. There are two key classes here: target(s) that it decides need to be evaluated and/or built. """ -__revision__ = "src/engine/SCons/Taskmaster.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Taskmaster.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from itertools import chain import operator @@ -227,20 +227,26 @@ class Task(object): if T: T.write(self.trace_message(u'Task.execute()', self.node)) try: - everything_was_cached = 1 + cached_targets = [] for t in self.targets: - if t.retrieve_from_cache(): - # Call the .built() method without calling the - # .push_to_cache() method, since we just got the - # target from the cache and don't need to push - # it back there. - t.set_state(NODE_EXECUTED) - t.built() - else: - everything_was_cached = 0 + if not t.retrieve_from_cache(): break - if not everything_was_cached: + cached_targets.append(t) + if len(cached_targets) < len(self.targets): + # Remove targets before building. It's possible that we + # partially retrieved targets from the cache, leaving + # them in read-only mode. That might cause the command + # to fail. + # + for t in cached_targets: + try: + t.fs.unlink(t.path) + except (IOError, OSError): + pass self.targets[0].build() + else: + for t in cached_targets: + t.cached = 1 except SystemExit: exc_value = sys.exc_info()[1] raise SCons.Errors.ExplicitExit(self.targets[0], exc_value.code) @@ -292,7 +298,8 @@ class Task(object): for side_effect in t.side_effects: side_effect.set_state(NODE_NO_STATE) t.set_state(NODE_EXECUTED) - t.push_to_cache() + if not t.cached: + t.push_to_cache() t.built() t.visited() diff --git a/scons/scons-local-2.1.0/SCons/Tool/386asm.py b/scons/scons-local-2.2.0/SCons/Tool/386asm.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/386asm.py rename to scons/scons-local-2.2.0/SCons/Tool/386asm.py index 27748cbf8..bf32a0b7d 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/386asm.py +++ b/scons/scons-local-2.2.0/SCons/Tool/386asm.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/386asm.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/386asm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.PharLapCommon import addPharLapPaths import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/BitKeeper.py b/scons/scons-local-2.2.0/SCons/Tool/BitKeeper.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/BitKeeper.py rename to scons/scons-local-2.2.0/SCons/Tool/BitKeeper.py index 2b8297b8f..60445db1e 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/BitKeeper.py +++ b/scons/scons-local-2.2.0/SCons/Tool/BitKeeper.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/BitKeeper.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/BitKeeper.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/CVS.py b/scons/scons-local-2.2.0/SCons/Tool/CVS.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/CVS.py rename to scons/scons-local-2.2.0/SCons/Tool/CVS.py index f1d3561db..87a6f1a32 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/CVS.py +++ b/scons/scons-local-2.2.0/SCons/Tool/CVS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/CVS.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/CVS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/FortranCommon.py b/scons/scons-local-2.2.0/SCons/Tool/FortranCommon.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/FortranCommon.py rename to scons/scons-local-2.2.0/SCons/Tool/FortranCommon.py index 4311cac9d..2efcfa27b 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/FortranCommon.py +++ b/scons/scons-local-2.2.0/SCons/Tool/FortranCommon.py @@ -5,7 +5,7 @@ Stuff for processing Fortran, common to all fortran dialects. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Stuff for processing Fortran, common to all fortran dialects. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/FortranCommon.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/FortranCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import re import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/GettextCommon.py b/scons/scons-local-2.2.0/SCons/Tool/GettextCommon.py new file mode 100644 index 000000000..b2d848c44 --- /dev/null +++ b/scons/scons-local-2.2.0/SCons/Tool/GettextCommon.py @@ -0,0 +1,429 @@ +"""SCons.Tool.GettextCommon module + +Used by several tools of `gettext` toolset. +""" + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/GettextCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +import SCons.Warnings +import re + +############################################################################# +class XgettextToolWarning(SCons.Warnings.Warning): pass +class XgettextNotFound(XgettextToolWarning): pass +class MsginitToolWarning(SCons.Warnings.Warning): pass +class MsginitNotFound(MsginitToolWarning): pass +class MsgmergeToolWarning(SCons.Warnings.Warning): pass +class MsgmergeNotFound(MsgmergeToolWarning): pass +class MsgfmtToolWarning(SCons.Warnings.Warning): pass +class MsgfmtNotFound(MsgfmtToolWarning): pass +############################################################################# +SCons.Warnings.enableWarningClass(XgettextToolWarning) +SCons.Warnings.enableWarningClass(XgettextNotFound) +SCons.Warnings.enableWarningClass(MsginitToolWarning) +SCons.Warnings.enableWarningClass(MsginitNotFound) +SCons.Warnings.enableWarningClass(MsgmergeToolWarning) +SCons.Warnings.enableWarningClass(MsgmergeNotFound) +SCons.Warnings.enableWarningClass(MsgfmtToolWarning) +SCons.Warnings.enableWarningClass(MsgfmtNotFound) +############################################################################# + +############################################################################# +class _POTargetFactory(object): + """ A factory of `PO` target files. + + Factory defaults differ from these of `SCons.Node.FS.FS`. We set `precious` + (this is required by builders and actions gettext) and `noclean` flags by + default for all produced nodes. + """ + def __init__( self, env, nodefault = True, alias = None, precious = True + , noclean = True ): + """ Object constructor. + + **Arguments** + + - *env* (`SCons.Environment.Environment`) + - *nodefault* (`boolean`) - if `True`, produced nodes will be ignored + from default target `'.'` + - *alias* (`string`) - if provided, produced nodes will be automatically + added to this alias, and alias will be set as `AlwaysBuild` + - *precious* (`boolean`) - if `True`, the produced nodes will be set as + `Precious`. + - *noclen* (`boolean`) - if `True`, the produced nodes will be excluded + from `Clean`. + """ + self.env = env + self.alias = alias + self.precious = precious + self.noclean = noclean + self.nodefault = nodefault + + def _create_node(self, name, factory, directory = None, create = 1): + """ Create node, and set it up to factory settings. """ + import SCons.Util + node = factory(name, directory, create) + node.set_noclean(self.noclean) + node.set_precious(self.precious) + if self.nodefault: + self.env.Ignore('.', node) + if self.alias: + self.env.AlwaysBuild(self.env.Alias(self.alias, node)) + return node + + def Entry(self, name, directory = None, create = 1): + """ Create `SCons.Node.FS.Entry` """ + return self._create_node(name, self.env.fs.Entry, directory, create) + + def File(self, name, directory = None, create = 1): + """ Create `SCons.Node.FS.File` """ + return self._create_node(name, self.env.fs.File, directory, create) +############################################################################# + +############################################################################# +_re_comment = re.compile(r'(#[^\n\r]+)$', re.M) +_re_lang = re.compile(r'([a-zA-Z0-9_]+)', re.M) +############################################################################# +def _read_linguas_from_files(env, linguas_files = None): + """ Parse `LINGUAS` file and return list of extracted languages """ + import SCons.Util + import SCons.Environment + global _re_comment + global _re_lang + if not SCons.Util.is_List(linguas_files) \ + and not SCons.Util.is_String(linguas_files) \ + and not isinstance(linguas_files, SCons.Node.FS.Base) \ + and linguas_files: + # If, linguas_files==True or such, then read 'LINGUAS' file. + linguas_files = [ 'LINGUAS' ] + if linguas_files is None: + return [] + fnodes = env.arg2nodes(linguas_files) + linguas = [] + for fnode in fnodes: + contents = _re_comment.sub("", fnode.get_text_contents()) + ls = [ l for l in _re_lang.findall(contents) if l ] + linguas.extend(ls) + return linguas +############################################################################# + +############################################################################# +from SCons.Builder import BuilderBase +############################################################################# +class _POFileBuilder(BuilderBase): + """ `PO` file builder. + + This is multi-target single-source builder. In typical situation the source + is single `POT` file, e.g. `messages.pot`, and there are multiple `PO` + targets to be updated from this `POT`. We must run + `SCons.Builder.BuilderBase._execute()` separatelly for each target to track + dependencies separatelly for each target file. + + **NOTE**: if we call `SCons.Builder.BuilderBase._execute(.., target, ...)` + with target being list of all targets, all targets would be rebuilt each time + one of the targets from this list is missing. This would happen, for example, + when new language `ll` enters `LINGUAS_FILE` (at this moment there is no + `ll.po` file yet). To avoid this, we override + `SCons.Builder.BuilerBase._execute()` and call it separatelly for each + target. Here we also append to the target list the languages read from + `LINGUAS_FILE`. + """ + # + #* The argument for overriding _execute(): We must use environment with + # builder overrides applied (see BuilderBase.__init__(). Here it comes for + # free. + #* The argument against using 'emitter': The emitter is called too late + # by BuilderBase._execute(). If user calls, for example: + # + # env.POUpdate(LINGUAS_FILE = 'LINGUAS') + # + # the builder throws error, because it is called with target=None, + # source=None and is trying to "generate" sources or target list first. + # If user calls + # + # env.POUpdate(['foo', 'baz'], LINGUAS_FILE = 'LINGUAS') + # + # the env.BuilderWrapper() calls our builder with target=None, + # source=['foo', 'baz']. The BuilderBase._execute() then splits execution + # and execute iterativelly (recursion) self._execute(None, source[i]). + # After that it calls emitter (which is quite too late). The emitter is + # also called in each iteration, what makes things yet worse. + def __init__(self, env, **kw): + if not 'suffix' in kw: + kw['suffix'] = '$POSUFFIX' + if not 'src_suffix' in kw: + kw['src_suffix'] = '$POTSUFFIX' + if not 'src_builder' in kw: + kw['src_builder'] = '_POTUpdateBuilder' + if not 'single_source' in kw: + kw['single_source'] = True + alias = None + if 'target_alias' in kw: + alias = kw['target_alias'] + del kw['target_alias'] + if not 'target_factory' in kw: + kw['target_factory'] = _POTargetFactory(env, alias=alias).File + BuilderBase.__init__(self, **kw) + + def _execute(self, env, target, source, *args, **kw): + """ Execute builder's actions. + + Here we append to `target` the languages read from `$LINGUAS_FILE` and + apply `SCons.Builder.BuilderBase._execute()` separatelly to each target. + The arguments and return value are same as for + `SCons.Builder.BuilderBase._execute()`. + """ + import SCons.Util + import SCons.Node + linguas_files = None + if env.has_key('LINGUAS_FILE') and env['LINGUAS_FILE']: + linguas_files = env['LINGUAS_FILE'] + # This prevents endless recursion loop (we'll be invoked once for + # each target appended here, we must not extend the list again). + env['LINGUAS_FILE'] = None + linguas = _read_linguas_from_files(env,linguas_files) + if SCons.Util.is_List(target): + target.extend(linguas) + elif target is not None: + target = [target] + linguas + else: + target = linguas + if not target: + # Let the SCons.BuilderBase to handle this patologic situation + return BuilderBase._execute( self, env, target, source, *args, **kw) + # The rest is ours + if not SCons.Util.is_List(target): + target = [ target ] + result = [] + for tgt in target: + r = BuilderBase._execute( self, env, [tgt], source, *args, **kw) + result.extend(r) + if linguas_files is not None: + env['LINGUAS_FILE'] = linguas_files + return SCons.Node.NodeList(result) +############################################################################# + +import SCons.Environment +############################################################################# +def _translate(env, target=[], source=SCons.Environment._null, *args, **kw): + """ Function for `Translate()` pseudo-builder """ + pot = env.POTUpdate(None, source, *args, **kw) + po = env.POUpdate(target, pot, *args, **kw) + return po +############################################################################# + +############################################################################# +class RPaths(object): + """ Callable object, which returns pathnames relative to SCons current + working directory. + + It seems like `SCons.Node.FS.Base.get_path()` returns absolute paths + for nodes that are outside of current working directory (`env.fs.getcwd()`). + Here, we often have `SConscript`, `POT` and `PO` files within `po/` + directory and source files (e.g. `*.c`) outside of it. When generating `POT` + template file, references to source files are written to `POT` template, so + a translator may later quickly jump to appropriate source file and line from + its `PO` editor (e.g. `poedit`). Relative paths in `PO` file are usually + interpreted by `PO` editor as paths relative to the place, where `PO` file + lives. The absolute paths would make resultant `POT` file nonportable, as + the references would be correct only on the machine, where `POT` file was + recently re-created. For such reason, we need a function, which always + returns relative paths. This is the purpose of `RPaths` callable object. + + The `__call__` method returns paths relative to current woking directory, but + we assume, that *xgettext(1)* is run from the directory, where target file is + going to be created. + + Note, that this may not work for files distributed over several hosts or + across different drives on windows. We assume here, that single local + filesystem holds both source files and target `POT` templates. + + Intended use of `RPaths` - in `xgettext.py`:: + + def generate(env): + from GettextCommon import RPaths + ... + sources = '$( ${_concat( "", SOURCES, "", __env__, XgettextRPaths, TARGET, SOURCES)} $)' + env.Append( + ... + XGETTEXTCOM = 'XGETTEXT ... ' + sources, + ... + XgettextRPaths = RPaths(env) + ) + """ + # NOTE: This callable object returns pathnames of dirs/files relative to + # current working directory. The pathname remains relative also for entries + # that are outside of current working directory (node, that + # SCons.Node.FS.File and siblings return absolute path in such case). For + # simplicity we compute path relative to current working directory, this + # seems be enough for our purposes (don't need TARGET variable and + # SCons.Defaults.Variable_Caller stuff). + + def __init__(self, env): + """ Initialize `RPaths` callable object. + + **Arguments**: + + - *env* - a `SCons.Environment.Environment` object, defines *current + working dir*. + """ + self.env = env + + # FIXME: I'm not sure, how it should be implemented (what the *args are in + # general, what is **kw). + def __call__(self, nodes, *args, **kw): + """ Return nodes' paths (strings) relative to current working directory. + + **Arguments**: + + - *nodes* ([`SCons.Node.FS.Base`]) - list of nodes. + - *args* - currently unused. + - *kw* - currently unused. + + **Returns**: + + - Tuple of strings, which represent paths relative to current working + directory (for given environment). + """ + # os.path.relpath is available only on python >= 2.6. We use our own + # implementation. It's taken from BareNecessities package: + # http://jimmyg.org/work/code/barenecessities/index.html + from posixpath import curdir + def relpath(path, start=curdir): + import posixpath + """Return a relative version of a path""" + if not path: + raise ValueError("no path specified") + start_list = posixpath.abspath(start).split(posixpath.sep) + path_list = posixpath.abspath(path).split(posixpath.sep) + # Work out how much of the filepath is shared by start and path. + i = len(posixpath.commonprefix([start_list, path_list])) + rel_list = [posixpath.pardir] * (len(start_list)-i) + path_list[i:] + if not rel_list: + return posixpath.curdir + return posixpath.join(*rel_list) + import os + import SCons.Node.FS + rpaths = () + cwd = self.env.fs.getcwd().get_abspath() + for node in nodes: + rpath = None + if isinstance(node, SCons.Node.FS.Base): + rpath = relpath(node.get_abspath(), cwd) + # FIXME: Other types possible here? + if rpath is not None: + rpaths += (rpath,) + return rpaths +############################################################################# + +############################################################################# +def _init_po_files(target, source, env): + """ Action function for `POInit` builder. """ + nop = lambda target, source, env : 0 + if env.has_key('POAUTOINIT'): + autoinit = env['POAUTOINIT'] + else: + autoinit = False + # Well, if everything outside works well, this loop should do single + # iteration. Otherwise we are rebuilding all the targets even, if just + # one has changed (but is this out fault?). + for tgt in target: + if not tgt.exists(): + if autoinit: + action = SCons.Action.Action('$MSGINITCOM', '$MSGINITCOMSTR') + else: + msg = 'File ' + repr(str(tgt)) + ' does not exist. ' \ + + 'If you are a translator, you can create it through: \n' \ + + '$MSGINITCOM' + action = SCons.Action.Action(nop, msg) + status = action([tgt], source, env) + if status: return status + return 0 +############################################################################# + +############################################################################# +def _detect_xgettext(env): + """ Detects *xgettext(1)* binary """ + if env.has_key('XGETTEXT'): + return env['XGETTEXT'] + xgettext = env.Detect('xgettext'); + if xgettext: + return xgettext + raise SCons.Errors.StopError(XgettextNotFound,"Could not detect xgettext") + return None +############################################################################# +def _xgettext_exists(env): + return _detect_xgettext(env) +############################################################################# + +############################################################################# +def _detect_msginit(env): + """ Detects *msginit(1)* program. """ + if env.has_key('MSGINIT'): + return env['MSGINIT'] + msginit = env.Detect('msginit'); + if msginit: + return msginit + raise SCons.Errors.StopError(MsginitNotFound, "Could not detect msginit") + return None +############################################################################# +def _msginit_exists(env): + return _detect_msginit(env) +############################################################################# + +############################################################################# +def _detect_msgmerge(env): + """ Detects *msgmerge(1)* program. """ + if env.has_key('MSGMERGE'): + return env['MSGMERGE'] + msgmerge = env.Detect('msgmerge'); + if msgmerge: + return msgmerge + raise SCons.Errors.StopError(MsgmergeNotFound, "Could not detect msgmerge") + return None +############################################################################# +def _msgmerge_exists(env): + return _detect_msgmerge(env) +############################################################################# + +############################################################################# +def _detect_msgfmt(env): + """ Detects *msgmfmt(1)* program. """ + if env.has_key('MSGFMT'): + return env['MSGFMT'] + msgfmt = env.Detect('msgfmt'); + if msgfmt: + return msgfmt + raise SCons.Errors.StopError(MsgfmtNotFound, "Could not detect msgfmt") + return None +############################################################################# +def _msgfmt_exists(env): + return _detect_msgfmt(env) +############################################################################# + +############################################################################# +def tool_list(platform, env): + """ List tools that shall be generated by top-level `gettext` tool """ + return [ 'xgettext', 'msginit', 'msgmerge', 'msgfmt' ] +############################################################################# + diff --git a/scons/scons-local-2.1.0/SCons/Tool/JavaCommon.py b/scons/scons-local-2.2.0/SCons/Tool/JavaCommon.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/JavaCommon.py rename to scons/scons-local-2.2.0/SCons/Tool/JavaCommon.py index f1eab7274..dc381053e 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/JavaCommon.py +++ b/scons/scons-local-2.2.0/SCons/Tool/JavaCommon.py @@ -5,7 +5,7 @@ Stuff for processing Java. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Stuff for processing Java. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/JavaCommon.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/JavaCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/__init__.py b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/MSCommon/__init__.py rename to scons/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py index a5e19e60a..8dc6c5a61 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """ Common functions for Microsoft Visual Studio and Visual C/C++. diff --git a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/arch.py b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/MSCommon/arch.py rename to scons/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py index 0abb9f1fc..1b6ac9ef0 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/arch.py +++ b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Module to define supported Windows chip architectures. """ diff --git a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/common.py b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/common.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/MSCommon/common.py rename to scons/scons-local-2.2.0/SCons/Tool/MSCommon/common.py index b99cd778d..d10b7636c 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/common.py +++ b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/common.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/MSCommon/common.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """ Common helper functions for working with the Microsoft tool chain. diff --git a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/netframework.py b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/MSCommon/netframework.py rename to scons/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py index a69a924a4..cc5aaf1bf 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/netframework.py +++ b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -20,7 +20,7 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """ """ diff --git a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/sdk.py b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/MSCommon/sdk.py rename to scons/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py index 1fc575181..fd22cd7be 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/sdk.py +++ b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Module to detect the Platform/Windows SDK diff --git a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/vc.py b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/MSCommon/vc.py rename to scons/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py index 6e3965ed8..9bbec2170 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/vc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ # * test on 64 bits XP + VS 2005 (and VS 6 if possible) # * SDK # * Assembly -__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Module for Visual C/C++ detection and configuration. """ @@ -124,17 +124,22 @@ def get_host_target(env): try: target = _ARCH_TO_CANONICAL[target_platform.lower()] except KeyError, e: - raise ValueError("Unrecognized target architecture %s" % target_platform) + all_archs = str(_ARCH_TO_CANONICAL.keys()) + raise ValueError("Unrecognized target architecture %s\n\tValid architectures: %s" % (target_platform, all_archs)) return (host, target,req_target_platform) -_VCVER = ["10.0Exp","10.0", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"] +_VCVER = ["11.0", "11.0Exp", "10.0", "10.0Exp", "9.0", "9.0Exp","8.0", "8.0Exp","7.1", "7.0", "6.0"] _VCVER_TO_PRODUCT_DIR = { - '10.0Exp' : [ - r'Microsoft\VCExpress\10.0\Setup\VC\ProductDir'], + '11.0': [ + r'Microsoft\VisualStudio\11.0\Setup\VC\ProductDir'], + '11.0Exp' : [ + r'Microsoft\VCExpress\11.0\Setup\VC\ProductDir'], '10.0': [ r'Microsoft\VisualStudio\10.0\Setup\VC\ProductDir'], + '10.0Exp' : [ + r'Microsoft\VCExpress\10.0\Setup\VC\ProductDir'], '9.0': [ r'Microsoft\VisualStudio\9.0\Setup\VC\ProductDir'], '9.0Exp' : [ @@ -356,7 +361,7 @@ def msvc_find_valid_batch_script(env,version): # The TARGET_ARCH is amd64 then also try 32 bits if there are no viable # 64 bit tools installed try_target_archs = [target_platform] - if not req_target_platform and target_platform=='amd64': + if not req_target_platform and target_platform in ('amd64','x86_64'): try_target_archs.append('x86') d = None diff --git a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/vs.py b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/MSCommon/vs.py rename to scons/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py index ee53e51e8..f5feb2a44 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/MSCommon/vs.py +++ b/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """Module to detect Visual Studio and/or Visual C/C++ """ @@ -211,6 +211,33 @@ SupportedVSList = [ # default_dirname='TBD', #), + # Visual Studio 11 + # The batch file we look for is in the VC directory, + # so the devenv.com executable is up in ..\..\Common7\IDE. + VisualStudio('11.0', + sdk_version='6.1', + hkeys=[r'Microsoft\VisualStudio\11.0\Setup\VS\ProductDir'], + common_tools_var='VS110COMNTOOLS', + executable_path=r'Common7\IDE\devenv.com', + batch_file_path=r'Common7\Tools\vsvars32.bat', + default_dirname='Microsoft Visual Studio 11', + supported_arch=['x86', 'amd64'], + ), + + # Visual C++ 11 Express Edition + # The batch file we look for is in the VC directory, + # so the VCExpress.exe executable is up in ..\..\Common7\IDE. + VisualStudio('11.0Exp', + vc_version='11.0', + sdk_version='6.1', + hkeys=[r'Microsoft\VCExpress\11.0\Setup\VS\ProductDir'], + common_tools_var='VS110COMNTOOLS', + executable_path=r'Common7\IDE\VCExpress.exe', + batch_file_path=r'Common7\Tools\vsvars32.bat', + default_dirname='Microsoft Visual Studio 11', + supported_arch=['x86'], + ), + # Visual Studio 2010 # The batch file we look for is in the VC directory, # so the devenv.com executable is up in ..\..\Common7\IDE. diff --git a/scons/scons-local-2.1.0/SCons/Tool/Perforce.py b/scons/scons-local-2.2.0/SCons/Tool/Perforce.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/Perforce.py rename to scons/scons-local-2.2.0/SCons/Tool/Perforce.py index 40192d055..ade9e88a7 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/Perforce.py +++ b/scons/scons-local-2.2.0/SCons/Tool/Perforce.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/Perforce.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/Perforce.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os diff --git a/scons/scons-local-2.1.0/SCons/Tool/PharLapCommon.py b/scons/scons-local-2.2.0/SCons/Tool/PharLapCommon.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Tool/PharLapCommon.py rename to scons/scons-local-2.2.0/SCons/Tool/PharLapCommon.py index 6f534000b..0f54a2ba9 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/PharLapCommon.py +++ b/scons/scons-local-2.2.0/SCons/Tool/PharLapCommon.py @@ -7,7 +7,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ Phar Lap ETS tool chain. Right now, this is linkloc and # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/PharLapCommon.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/RCS.py b/scons/scons-local-2.2.0/SCons/Tool/RCS.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/RCS.py rename to scons/scons-local-2.2.0/SCons/Tool/RCS.py index b6ff0b5b7..cc33a4eea 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/RCS.py +++ b/scons/scons-local-2.2.0/SCons/Tool/RCS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/RCS.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/RCS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/SCCS.py b/scons/scons-local-2.2.0/SCons/Tool/SCCS.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/SCCS.py rename to scons/scons-local-2.2.0/SCons/Tool/SCCS.py index 666eb3c53..5e35a8758 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/SCCS.py +++ b/scons/scons-local-2.2.0/SCons/Tool/SCCS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/SCCS.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/SCCS.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/Subversion.py b/scons/scons-local-2.2.0/SCons/Tool/Subversion.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/Subversion.py rename to scons/scons-local-2.2.0/SCons/Tool/Subversion.py index 37377ed1c..212850fe3 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/Subversion.py +++ b/scons/scons-local-2.2.0/SCons/Tool/Subversion.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/Subversion.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/Subversion.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/__init__.py b/scons/scons-local-2.2.0/SCons/Tool/__init__.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Tool/__init__.py rename to scons/scons-local-2.2.0/SCons/Tool/__init__.py index ba90b064a..5bee64dd9 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Tool/__init__.py @@ -14,7 +14,7 @@ tool definition. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -35,7 +35,7 @@ tool definition. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import imp import sys diff --git a/scons/scons-local-2.1.0/SCons/Tool/aixc++.py b/scons/scons-local-2.2.0/SCons/Tool/aixc++.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/aixc++.py rename to scons/scons-local-2.2.0/SCons/Tool/aixc++.py index 93f8e9e65..fecfe766f 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/aixc++.py +++ b/scons/scons-local-2.2.0/SCons/Tool/aixc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixc++.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/aixc++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/aixcc.py b/scons/scons-local-2.2.0/SCons/Tool/aixcc.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/aixcc.py rename to scons/scons-local-2.2.0/SCons/Tool/aixcc.py index 230bfb3bc..d611fdcf0 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/aixcc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/aixcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixcc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/aixcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/aixf77.py b/scons/scons-local-2.2.0/SCons/Tool/aixf77.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/aixf77.py rename to scons/scons-local-2.2.0/SCons/Tool/aixf77.py index 2348851fb..c3e062e00 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/aixf77.py +++ b/scons/scons-local-2.2.0/SCons/Tool/aixf77.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixf77.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/aixf77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/aixlink.py b/scons/scons-local-2.2.0/SCons/Tool/aixlink.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/aixlink.py rename to scons/scons-local-2.2.0/SCons/Tool/aixlink.py index 473c6b853..3a064bd2c 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/aixlink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/aixlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/aixlink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/aixlink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/applelink.py b/scons/scons-local-2.2.0/SCons/Tool/applelink.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/applelink.py rename to scons/scons-local-2.2.0/SCons/Tool/applelink.py index e989b03cc..7b0cc1768 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/applelink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/applelink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/applelink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/applelink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/ar.py b/scons/scons-local-2.2.0/SCons/Tool/ar.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/ar.py rename to scons/scons-local-2.2.0/SCons/Tool/ar.py index dcb2676a4..655e56b60 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/ar.py +++ b/scons/scons-local-2.2.0/SCons/Tool/ar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ar.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/ar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/as.py b/scons/scons-local-2.2.0/SCons/Tool/as.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/as.py rename to scons/scons-local-2.2.0/SCons/Tool/as.py index 1b1187a3f..6275d8136 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/as.py +++ b/scons/scons-local-2.2.0/SCons/Tool/as.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/as.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/as.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/bcc32.py b/scons/scons-local-2.2.0/SCons/Tool/bcc32.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/bcc32.py rename to scons/scons-local-2.2.0/SCons/Tool/bcc32.py index 580aa72f1..c426e79e1 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/bcc32.py +++ b/scons/scons-local-2.2.0/SCons/Tool/bcc32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/bcc32.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/bcc32.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/c++.py b/scons/scons-local-2.2.0/SCons/Tool/c++.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/c++.py rename to scons/scons-local-2.2.0/SCons/Tool/c++.py index 6667d06b6..8cd1dea29 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/c++.py +++ b/scons/scons-local-2.2.0/SCons/Tool/c++.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/c++.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/c++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/cc.py b/scons/scons-local-2.2.0/SCons/Tool/cc.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/cc.py rename to scons/scons-local-2.2.0/SCons/Tool/cc.py index 45014571c..806f25131 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/cc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/cc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/cc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/cc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Tool import SCons.Defaults diff --git a/scons/scons-local-2.1.0/SCons/Tool/cvf.py b/scons/scons-local-2.2.0/SCons/Tool/cvf.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/cvf.py rename to scons/scons-local-2.2.0/SCons/Tool/cvf.py index cb8da4f03..2dcf195e1 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/cvf.py +++ b/scons/scons-local-2.2.0/SCons/Tool/cvf.py @@ -5,7 +5,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Tool-specific initialization for the Compaq Visual Fortran compiler. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/cvf.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/cvf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import fortran diff --git a/scons/scons-local-2.1.0/SCons/Tool/default.py b/scons/scons-local-2.2.0/SCons/Tool/default.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/Tool/default.py rename to scons/scons-local-2.2.0/SCons/Tool/default.py index 552de36ae..292bd0ba3 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/default.py +++ b/scons/scons-local-2.2.0/SCons/Tool/default.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/default.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/default.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/dmd.py b/scons/scons-local-2.2.0/SCons/Tool/dmd.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/dmd.py rename to scons/scons-local-2.2.0/SCons/Tool/dmd.py index fc8319411..839020f0c 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/dmd.py +++ b/scons/scons-local-2.2.0/SCons/Tool/dmd.py @@ -35,7 +35,7 @@ Lib tool variables: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -57,7 +57,7 @@ Lib tool variables: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dmd.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/dmd.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os diff --git a/scons/scons-local-2.1.0/SCons/Tool/dvi.py b/scons/scons-local-2.2.0/SCons/Tool/dvi.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/dvi.py rename to scons/scons-local-2.2.0/SCons/Tool/dvi.py index 204821bd4..803758cfa 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/dvi.py +++ b/scons/scons-local-2.2.0/SCons/Tool/dvi.py @@ -5,7 +5,7 @@ Common DVI Builder definition for various other Tool modules that use it. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Common DVI Builder definition for various other Tool modules that use it. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvi.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/dvi.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Builder import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/dvipdf.py b/scons/scons-local-2.2.0/SCons/Tool/dvipdf.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/dvipdf.py rename to scons/scons-local-2.2.0/SCons/Tool/dvipdf.py index 0347d2c36..b931cf56d 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/dvipdf.py +++ b/scons/scons-local-2.2.0/SCons/Tool/dvipdf.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/dvipdf.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/dvipdf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Defaults diff --git a/scons/scons-local-2.1.0/SCons/Tool/dvips.py b/scons/scons-local-2.2.0/SCons/Tool/dvips.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/dvips.py rename to scons/scons-local-2.2.0/SCons/Tool/dvips.py index 02f8e4992..8b3ba0f54 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/dvips.py +++ b/scons/scons-local-2.2.0/SCons/Tool/dvips.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/dvips.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/dvips.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/f03.py b/scons/scons-local-2.2.0/SCons/Tool/f03.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/f03.py rename to scons/scons-local-2.2.0/SCons/Tool/f03.py index 896c03bd5..cc8f9d29d 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/f03.py +++ b/scons/scons-local-2.2.0/SCons/Tool/f03.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f03.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/f03.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/f77.py b/scons/scons-local-2.2.0/SCons/Tool/f77.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/f77.py rename to scons/scons-local-2.2.0/SCons/Tool/f77.py index db538d87e..cba5b0b21 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/f77.py +++ b/scons/scons-local-2.2.0/SCons/Tool/f77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f77.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/f77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/scons/scons-local-2.1.0/SCons/Tool/f90.py b/scons/scons-local-2.2.0/SCons/Tool/f90.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/f90.py rename to scons/scons-local-2.2.0/SCons/Tool/f90.py index bb7e3811a..1df001405 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/f90.py +++ b/scons/scons-local-2.2.0/SCons/Tool/f90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f90.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/f90.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/scons/scons-local-2.1.0/SCons/Tool/f95.py b/scons/scons-local-2.2.0/SCons/Tool/f95.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/f95.py rename to scons/scons-local-2.2.0/SCons/Tool/f95.py index 06fcc784c..b32530905 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/f95.py +++ b/scons/scons-local-2.2.0/SCons/Tool/f95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/f95.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/f95.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/filesystem.py b/scons/scons-local-2.2.0/SCons/Tool/filesystem.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/filesystem.py rename to scons/scons-local-2.2.0/SCons/Tool/filesystem.py index a91aeb173..2ac49548f 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/filesystem.py +++ b/scons/scons-local-2.2.0/SCons/Tool/filesystem.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/filesystem.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/filesystem.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons from SCons.Tool.install import copyFunc diff --git a/scons/scons-local-2.1.0/SCons/Tool/fortran.py b/scons/scons-local-2.2.0/SCons/Tool/fortran.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/fortran.py rename to scons/scons-local-2.2.0/SCons/Tool/fortran.py index b955e7cdc..3da748a94 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/fortran.py +++ b/scons/scons-local-2.2.0/SCons/Tool/fortran.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/fortran.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/fortran.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import re diff --git a/scons/scons-local-2.1.0/SCons/Tool/g++.py b/scons/scons-local-2.2.0/SCons/Tool/g++.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/g++.py rename to scons/scons-local-2.2.0/SCons/Tool/g++.py index c2ded0f1a..484344c3c 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/g++.py +++ b/scons/scons-local-2.2.0/SCons/Tool/g++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/g++.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/g++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import re diff --git a/scons/scons-local-2.1.0/SCons/Tool/g77.py b/scons/scons-local-2.2.0/SCons/Tool/g77.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/g77.py rename to scons/scons-local-2.2.0/SCons/Tool/g77.py index 9ff3df6d9..97c2ef184 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/g77.py +++ b/scons/scons-local-2.2.0/SCons/Tool/g77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/g77.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/g77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env diff --git a/scons/scons-local-2.1.0/SCons/Tool/gas.py b/scons/scons-local-2.2.0/SCons/Tool/gas.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/gas.py rename to scons/scons-local-2.2.0/SCons/Tool/gas.py index 0a5ed9fd9..89aa2e344 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/gas.py +++ b/scons/scons-local-2.2.0/SCons/Tool/gas.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gas.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/gas.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" as_module = __import__('as', globals(), locals(), []) diff --git a/scons/scons-local-2.1.0/SCons/Tool/gcc.py b/scons/scons-local-2.2.0/SCons/Tool/gcc.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/gcc.py rename to scons/scons-local-2.2.0/SCons/Tool/gcc.py index d8d18bc75..814e1dec2 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/gcc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/gcc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gcc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/gcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import cc import os diff --git a/scons/scons-local-2.2.0/SCons/Tool/gettext.py b/scons/scons-local-2.2.0/SCons/Tool/gettext.py new file mode 100644 index 000000000..9f2c70715 --- /dev/null +++ b/scons/scons-local-2.2.0/SCons/Tool/gettext.py @@ -0,0 +1,45 @@ +"""gettext tool +""" + + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/gettext.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +############################################################################# +def generate(env,**kw): + import SCons.Tool + from SCons.Tool.GettextCommon \ + import _translate, tool_list + for t in tool_list(env['PLATFORM'], env): + env.Tool(t) + env.AddMethod(_translate, 'Translate') +############################################################################# + +############################################################################# +def exists(env): + from SCons.Tool.GettextCommon \ + import _xgettext_exists, _msginit_exists, \ + _msgmerge_exists, _msgfmt_exists + return _xgettext_exists(env) and _msginit_exists(env) \ + and _msgmerge_exists(env) and _msgfmt_exists(env) +############################################################################# diff --git a/scons/scons-local-2.1.0/SCons/Tool/gfortran.py b/scons/scons-local-2.2.0/SCons/Tool/gfortran.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/gfortran.py rename to scons/scons-local-2.2.0/SCons/Tool/gfortran.py index 143af4ce0..2f9bddc64 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/gfortran.py +++ b/scons/scons-local-2.2.0/SCons/Tool/gfortran.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gfortran.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/gfortran.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/gnulink.py b/scons/scons-local-2.2.0/SCons/Tool/gnulink.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/gnulink.py rename to scons/scons-local-2.2.0/SCons/Tool/gnulink.py index a80611ec1..ee9f584e9 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/gnulink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/gnulink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gnulink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/gnulink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/gs.py b/scons/scons-local-2.2.0/SCons/Tool/gs.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/gs.py rename to scons/scons-local-2.2.0/SCons/Tool/gs.py index fbcb7821b..12e71d282 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/gs.py +++ b/scons/scons-local-2.2.0/SCons/Tool/gs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/gs.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/gs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Platform diff --git a/scons/scons-local-2.1.0/SCons/Tool/hpc++.py b/scons/scons-local-2.2.0/SCons/Tool/hpc++.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/hpc++.py rename to scons/scons-local-2.2.0/SCons/Tool/hpc++.py index d2bb579a4..5f75e1807 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/hpc++.py +++ b/scons/scons-local-2.2.0/SCons/Tool/hpc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/hpc++.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/hpc++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/hpcc.py b/scons/scons-local-2.2.0/SCons/Tool/hpcc.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/hpcc.py rename to scons/scons-local-2.2.0/SCons/Tool/hpcc.py index 38ae2f276..29586f623 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/hpcc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/hpcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/hpcc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/hpcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/hplink.py b/scons/scons-local-2.2.0/SCons/Tool/hplink.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/hplink.py rename to scons/scons-local-2.2.0/SCons/Tool/hplink.py index 5ebe94ded..d979545e6 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/hplink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/hplink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/hplink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/hplink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/icc.py b/scons/scons-local-2.2.0/SCons/Tool/icc.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/icc.py rename to scons/scons-local-2.2.0/SCons/Tool/icc.py index 10111ec2e..1f7f02847 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/icc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/icc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/icc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/icc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import cc diff --git a/scons/scons-local-2.1.0/SCons/Tool/icl.py b/scons/scons-local-2.2.0/SCons/Tool/icl.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/icl.py rename to scons/scons-local-2.2.0/SCons/Tool/icl.py index 1ef7d3af4..e3ee4ea5d 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/icl.py +++ b/scons/scons-local-2.2.0/SCons/Tool/icl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/icl.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/icl.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Tool.intelc diff --git a/scons/scons-local-2.1.0/SCons/Tool/ifl.py b/scons/scons-local-2.2.0/SCons/Tool/ifl.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/ifl.py rename to scons/scons-local-2.2.0/SCons/Tool/ifl.py index dac5670c5..6ad250abb 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/ifl.py +++ b/scons/scons-local-2.2.0/SCons/Tool/ifl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ifl.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/ifl.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/scons/scons-local-2.1.0/SCons/Tool/ifort.py b/scons/scons-local-2.2.0/SCons/Tool/ifort.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/ifort.py rename to scons/scons-local-2.2.0/SCons/Tool/ifort.py index c6768e901..fde2e864f 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/ifort.py +++ b/scons/scons-local-2.2.0/SCons/Tool/ifort.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ifort.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/ifort.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/scons/scons-local-2.1.0/SCons/Tool/ilink.py b/scons/scons-local-2.2.0/SCons/Tool/ilink.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/ilink.py rename to scons/scons-local-2.2.0/SCons/Tool/ilink.py index 73d76224e..4f37906b9 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/ilink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/ilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ilink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/ilink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/ilink32.py b/scons/scons-local-2.2.0/SCons/Tool/ilink32.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/ilink32.py rename to scons/scons-local-2.2.0/SCons/Tool/ilink32.py index ebdf43582..399501b6b 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/ilink32.py +++ b/scons/scons-local-2.2.0/SCons/Tool/ilink32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ilink32.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/ilink32.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Tool import SCons.Tool.bcc32 diff --git a/scons/scons-local-2.1.0/SCons/Tool/install.py b/scons/scons-local-2.2.0/SCons/Tool/install.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/install.py rename to scons/scons-local-2.2.0/SCons/Tool/install.py index 58e2dc77a..8b0673b06 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/install.py +++ b/scons/scons-local-2.2.0/SCons/Tool/install.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/install.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/install.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import shutil diff --git a/scons/scons-local-2.1.0/SCons/Tool/intelc.py b/scons/scons-local-2.2.0/SCons/Tool/intelc.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Tool/intelc.py rename to scons/scons-local-2.2.0/SCons/Tool/intelc.py index 552fadac5..92529afdc 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/intelc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/intelc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. from __future__ import division -__revision__ = "src/engine/SCons/Tool/intelc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/intelc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import math, sys, os.path, glob, string, re diff --git a/scons/scons-local-2.1.0/SCons/Tool/ipkg.py b/scons/scons-local-2.2.0/SCons/Tool/ipkg.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/ipkg.py rename to scons/scons-local-2.2.0/SCons/Tool/ipkg.py index 2ad08ab80..bc56dcd38 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/ipkg.py +++ b/scons/scons-local-2.2.0/SCons/Tool/ipkg.py @@ -11,7 +11,7 @@ packages fake_root. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -33,7 +33,7 @@ packages fake_root. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/ipkg.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/ipkg.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os diff --git a/scons/scons-local-2.1.0/SCons/Tool/jar.py b/scons/scons-local-2.2.0/SCons/Tool/jar.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/jar.py rename to scons/scons-local-2.2.0/SCons/Tool/jar.py index 6ebd76226..321006c8f 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/jar.py +++ b/scons/scons-local-2.2.0/SCons/Tool/jar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/jar.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/jar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Subst import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/javac.py b/scons/scons-local-2.2.0/SCons/Tool/javac.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/javac.py rename to scons/scons-local-2.2.0/SCons/Tool/javac.py index 5a43b25a7..b682cbf0f 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/javac.py +++ b/scons/scons-local-2.2.0/SCons/Tool/javac.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/javac.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/javac.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path @@ -150,13 +150,15 @@ class pathopt(object): if path and not SCons.Util.is_List(path): path = [path] if self.default: - path = path + [ env[self.default] ] + default = env[self.default] + if default: + if not SCons.Util.is_List(default): + default = [default] + path = path + default if path: - return [self.opt, os.pathsep.join(path)] - #return self.opt + " " + os.pathsep.join(path) + return [self.opt, os.pathsep.join(map(str, path))] else: return [] - #return "" def Java(env, target, source, *args, **kw): """ diff --git a/scons/scons-local-2.1.0/SCons/Tool/javah.py b/scons/scons-local-2.2.0/SCons/Tool/javah.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/javah.py rename to scons/scons-local-2.2.0/SCons/Tool/javah.py index ccdfb3c69..be5145d48 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/javah.py +++ b/scons/scons-local-2.2.0/SCons/Tool/javah.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/javah.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/javah.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/latex.py b/scons/scons-local-2.2.0/SCons/Tool/latex.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/latex.py rename to scons/scons-local-2.2.0/SCons/Tool/latex.py index b746ad129..427c37324 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/latex.py +++ b/scons/scons-local-2.2.0/SCons/Tool/latex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/latex.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/latex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Defaults diff --git a/scons/scons-local-2.1.0/SCons/Tool/lex.py b/scons/scons-local-2.2.0/SCons/Tool/lex.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/lex.py rename to scons/scons-local-2.2.0/SCons/Tool/lex.py index 25f7c3b6c..76e899248 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/lex.py +++ b/scons/scons-local-2.2.0/SCons/Tool/lex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/lex.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/lex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/link.py b/scons/scons-local-2.2.0/SCons/Tool/link.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/link.py rename to scons/scons-local-2.2.0/SCons/Tool/link.py index 067099a61..13a671d76 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/link.py +++ b/scons/scons-local-2.2.0/SCons/Tool/link.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/link.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/link.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/linkloc.py b/scons/scons-local-2.2.0/SCons/Tool/linkloc.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/linkloc.py rename to scons/scons-local-2.2.0/SCons/Tool/linkloc.py index d520100e4..50a1a5159 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/linkloc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/linkloc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/linkloc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/linkloc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import re diff --git a/scons/scons-local-2.1.0/SCons/Tool/m4.py b/scons/scons-local-2.2.0/SCons/Tool/m4.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/m4.py rename to scons/scons-local-2.2.0/SCons/Tool/m4.py index 8d997a4a9..9bd4ef7c8 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/m4.py +++ b/scons/scons-local-2.2.0/SCons/Tool/m4.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/m4.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/m4.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/masm.py b/scons/scons-local-2.2.0/SCons/Tool/masm.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/masm.py rename to scons/scons-local-2.2.0/SCons/Tool/masm.py index bbed9bbf6..f41f700a2 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/masm.py +++ b/scons/scons-local-2.2.0/SCons/Tool/masm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/masm.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/masm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/midl.py b/scons/scons-local-2.2.0/SCons/Tool/midl.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/midl.py rename to scons/scons-local-2.2.0/SCons/Tool/midl.py index 5381df3f9..2cdcd5ae1 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/midl.py +++ b/scons/scons-local-2.2.0/SCons/Tool/midl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/midl.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/midl.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/mingw.py b/scons/scons-local-2.2.0/SCons/Tool/mingw.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/mingw.py rename to scons/scons-local-2.2.0/SCons/Tool/mingw.py index 1df68bc4c..1c9c0829f 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/mingw.py +++ b/scons/scons-local-2.2.0/SCons/Tool/mingw.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mingw.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/mingw.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path @@ -100,12 +100,12 @@ def shlib_emitter(target, source, env): target.append(env.fs.File(targetStrings)) # Append a def file target if there isn't already a def file target - # or a def file source. There is no option to disable def file - # target emitting, because I can't figure out why someone would ever - # want to turn it off. + # or a def file source or the user has explicitly asked for the target + # to be emitted. def_source = env.FindIxes(source, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX') def_target = env.FindIxes(target, 'WINDOWSDEFPREFIX', 'WINDOWSDEFSUFFIX') - if not def_source and not def_target: + skip_def_insert = env.subst("$WINDOWS_INSERT_DEF") in ['', '0', 0] + if not def_source and not def_target and not skip_def_insert: # Create list of target libraries and def files as strings targetStrings=env.ReplaceIxes(dll, 'SHLIBPREFIX', 'SHLIBSUFFIX', diff --git a/scons/scons-local-2.2.0/SCons/Tool/msgfmt.py b/scons/scons-local-2.2.0/SCons/Tool/msgfmt.py new file mode 100644 index 000000000..4fcd8fcc4 --- /dev/null +++ b/scons/scons-local-2.2.0/SCons/Tool/msgfmt.py @@ -0,0 +1,102 @@ +""" msgfmt tool """ + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/msgfmt.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +from SCons.Builder import BuilderBase +############################################################################# +class _MOFileBuilder(BuilderBase): + """ The builder class for `MO` files. + + The reason for this builder to exists and its purpose is quite simillar + as for `_POFileBuilder`. This time, we extend list of sources, not targets, + and call `BuilderBase._execute()` only once (as we assume single-target + here). + """ + + def _execute(self, env, target, source, *args, **kw): + # Here we add support for 'LINGUAS_FILE' keyword. Emitter is not suitable + # in this case, as it is called too late (after multiple sources + # are handled single_source builder. + import SCons.Util + from SCons.Tool.GettextCommon import _read_linguas_from_files + linguas_files = None + if env.has_key('LINGUAS_FILE') and env['LINGUAS_FILE'] is not None: + linguas_files = env['LINGUAS_FILE'] + # This should prevent from endless recursion. + env['LINGUAS_FILE'] = None + # We read only languages. Suffixes shall be added automatically. + linguas = _read_linguas_from_files(env, linguas_files) + if SCons.Util.is_List(source): + source.extend(linguas) + elif source is not None: + source = [source] + linguas + else: + source = linguas + result = BuilderBase._execute(self,env,target,source,*args, **kw) + if linguas_files is not None: + env['LINGUAS_FILE'] = linguas_files + return result +############################################################################# + +############################################################################# +def _create_mo_file_builder(env, **kw): + """ Create builder object for `MOFiles` builder """ + import SCons.Action + # FIXME: What factory use for source? Ours or their? + kw['action'] = SCons.Action.Action('$MSGFMTCOM','$MSGFMTCOMSTR') + kw['suffix'] = '$MOSUFFIX' + kw['src_suffix'] = '$POSUFFIX' + kw['src_builder'] = '_POUpdateBuilder' + kw['single_source'] = True + return _MOFileBuilder(**kw) +############################################################################# + +############################################################################# +def generate(env,**kw): + """ Generate `msgfmt` tool """ + import SCons.Util + from SCons.Tool.GettextCommon import _detect_msgfmt + env['MSGFMT'] = _detect_msgfmt(env) + env.SetDefault( + MSGFMTFLAGS = [ SCons.Util.CLVar('-c') ], + MSGFMTCOM = '$MSGFMT $MSGFMTFLAGS -o $TARGET $SOURCE', + MSGFMTCOMSTR = '', + MOSUFFIX = ['.mo'], + POSUFFIX = ['.po'] + ) + env.Append( BUILDERS = { 'MOFiles' : _create_mo_file_builder(env) } ) +############################################################################# + +############################################################################# +def exists(env): + """ Check if the tool exists """ + from SCons.Tool.GettextCommon import _msgfmt_exists + return _msgfmt_exists(env) +############################################################################# + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/scons/scons-local-2.2.0/SCons/Tool/msginit.py b/scons/scons-local-2.2.0/SCons/Tool/msginit.py new file mode 100644 index 000000000..210fbca58 --- /dev/null +++ b/scons/scons-local-2.2.0/SCons/Tool/msginit.py @@ -0,0 +1,114 @@ +""" msginit tool + +Tool specific initialization of msginit tool. +""" + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/msginit.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +import SCons.Warnings +import SCons.Builder +import re + +############################################################################# +def _optional_no_translator_flag(env): + """ Return '--no-translator' flag if we run *msginit(1)* in non-interactive + mode.""" + import SCons.Util + if env.has_key('POAUTOINIT'): + autoinit = env['POAUTOINIT'] + else: + autoinit = False + if autoinit: + return [SCons.Util.CLVar('--no-translator')] + else: + return [SCons.Util.CLVar('')] +############################################################################# + +############################################################################# +def _POInitBuilder(env, **kw): + """ Create builder object for `POInit` builder. """ + import SCons.Action + from SCons.Tool.GettextCommon import _init_po_files, _POFileBuilder + action = SCons.Action.Action(_init_po_files, None) + return _POFileBuilder(env, action=action, target_alias='$POCREATE_ALIAS') +############################################################################# + +############################################################################# +from SCons.Environment import _null +############################################################################# +def _POInitBuilderWrapper(env, target=None, source=_null, **kw): + """ Wrapper for _POFileBuilder. We use it to make user's life easier. + + This wrapper checks for `$POTDOMAIN` construction variable (or override in + `**kw`) and treats it appropriatelly. + """ + if source is _null: + if 'POTDOMAIN' in kw: + domain = kw['POTDOMAIN'] + elif env.has_key('POTDOMAIN'): + domain = env['POTDOMAIN'] + else: + domain = 'messages' + source = [ domain ] # NOTE: Suffix shall be appended automatically + return env._POInitBuilder(target, source, **kw) +############################################################################# + +############################################################################# +def generate(env,**kw): + """ Generate the `msginit` tool """ + import SCons.Util + from SCons.Tool.GettextCommon import _detect_msginit + env['MSGINIT'] = _detect_msginit(env) + msginitcom = '$MSGINIT ${_MSGNoTranslator(__env__)} -l ${_MSGINITLOCALE}' \ + + ' $MSGINITFLAGS -i $SOURCE -o $TARGET' + # NOTE: We set POTSUFFIX here, in case the 'xgettext' is not loaded + # (sometimes we really don't need it) + env.SetDefault( + POSUFFIX = ['.po'], + POTSUFFIX = ['.pot'], + _MSGINITLOCALE = '${TARGET.filebase}', + _MSGNoTranslator = _optional_no_translator_flag, + MSGINITCOM = msginitcom, + MSGINITCOMSTR = '', + MSGINITFLAGS = [ ], + POAUTOINIT = False, + POCREATE_ALIAS = 'po-create' + ) + env.Append( BUILDERS = { '_POInitBuilder' : _POInitBuilder(env) } ) + env.AddMethod(_POInitBuilderWrapper, 'POInit') + env.AlwaysBuild(env.Alias('$POCREATE_ALIAS')) +############################################################################# + +############################################################################# +def exists(env): + """ Check if the tool exists """ + from SCons.Tool.GettextCommon import _msginit_exists + return _msginit_exists(env) +############################################################################# + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/scons/scons-local-2.2.0/SCons/Tool/msgmerge.py b/scons/scons-local-2.2.0/SCons/Tool/msgmerge.py new file mode 100644 index 000000000..2bc89f4d5 --- /dev/null +++ b/scons/scons-local-2.2.0/SCons/Tool/msgmerge.py @@ -0,0 +1,98 @@ +""" msgmerget tool + +Tool specific initialization for `msgmerge` tool. +""" + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/msgmerge.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +############################################################################# +def _update_or_init_po_files(target, source, env): + """ Action function for `POUpdate` builder """ + import SCons.Action + from SCons.Tool.GettextCommon import _init_po_files + for tgt in target: + if tgt.rexists(): + action = SCons.Action.Action('$MSGMERGECOM', '$MSGMERGECOMSTR') + else: + action = _init_po_files + status = action([tgt], source, env) + if status : return status + return 0 +############################################################################# + +############################################################################# +def _POUpdateBuilder(env, **kw): + """ Create an object of `POUpdate` builder """ + import SCons.Action + from SCons.Tool.GettextCommon import _POFileBuilder + action = SCons.Action.Action(_update_or_init_po_files, None) + return _POFileBuilder(env, action=action, target_alias='$POUPDATE_ALIAS') +############################################################################# + +############################################################################# +from SCons.Environment import _null +############################################################################# +def _POUpdateBuilderWrapper(env, target=None, source=_null, **kw): + """ Wrapper for `POUpdate` builder - make user's life easier """ + if source is _null: + if 'POTDOMAIN' in kw: + domain = kw['POTDOMAIN'] + elif env.has_key('POTDOMAIN') and env['POTDOMAIN']: + domain = env['POTDOMAIN'] + else: + domain = 'messages' + source = [ domain ] # NOTE: Suffix shall be appended automatically + return env._POUpdateBuilder(target, source, **kw) +############################################################################# + +############################################################################# +def generate(env,**kw): + """ Generate the `xgettext` tool """ + from SCons.Tool.GettextCommon import _detect_msgmerge + env['MSGMERGE'] = _detect_msgmerge(env) + env.SetDefault( + POTSUFFIX = ['.pot'], + POSUFFIX = ['.po'], + MSGMERGECOM = '$MSGMERGE $MSGMERGEFLAGS --update $TARGET $SOURCE', + MSGMERGECOMSTR = '', + MSGMERGEFLAGS = [ ], + POUPDATE_ALIAS = 'po-update' + ) + env.Append(BUILDERS = { '_POUpdateBuilder':_POUpdateBuilder(env) }) + env.AddMethod(_POUpdateBuilderWrapper, 'POUpdate') + env.AlwaysBuild(env.Alias('$POUPDATE_ALIAS')) +############################################################################# + +############################################################################# +def exists(env): + """ Check if the tool exists """ + from SCons.Tool.GettextCommon import _msgmerge_exists + return _msgmerge_exists(env) +############################################################################# + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/scons/scons-local-2.1.0/SCons/Tool/mslib.py b/scons/scons-local-2.2.0/SCons/Tool/mslib.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/mslib.py rename to scons/scons-local-2.2.0/SCons/Tool/mslib.py index cbd1cd7c3..82ea50323 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/mslib.py +++ b/scons/scons-local-2.2.0/SCons/Tool/mslib.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mslib.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/mslib.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/mslink.py b/scons/scons-local-2.2.0/SCons/Tool/mslink.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/mslink.py rename to scons/scons-local-2.2.0/SCons/Tool/mslink.py index ac533c8dc..1f53295da 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/mslink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/mslink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mslink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/mslink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path @@ -159,6 +159,7 @@ def prog_emitter(target, source, env): SCons.Tool.msvc.validate_vars(env) extratargets = [] + extrasources = [] exe = env.FindIxes(target, "PROGPREFIX", "PROGSUFFIX") if not exe: @@ -178,7 +179,15 @@ def prog_emitter(target, source, env): extratargets.append(pdb) target[0].attributes.pdb = pdb - return (target+extratargets,source) + if version_num >= 11.0 and env.get('PCH', 0): + # MSVC 11 and above need the PCH object file to be added to the link line, + # otherwise you get link error LNK2011. + pchobj = SCons.Util.splitext(str(env['PCH']))[0] + '.obj' + # print "prog_emitter, version %s, appending pchobj %s"%(version_num, pchobj) + if pchobj not in extrasources: + extrasources.append(pchobj) + + return (target+extratargets,source+extrasources) def RegServerFunc(target, source, env): if 'register' in env and env['register']: @@ -228,11 +237,11 @@ embedManifestExeCheckAction = SCons.Action.Action(embedManifestExeCheck, None) regServerAction = SCons.Action.Action("$REGSVRCOM", "$REGSVRCOMSTR") regServerCheck = SCons.Action.Action(RegServerFunc, None) -shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}') +shlibLinkAction = SCons.Action.Action('${TEMPFILE("$SHLINK $SHLINKFLAGS $_SHLINK_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_SHLINK_SOURCES")}', '$SHLINKCOMSTR') compositeShLinkAction = shlibLinkAction + regServerCheck + embedManifestDllCheckAction -ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}') +ldmodLinkAction = SCons.Action.Action('${TEMPFILE("$LDMODULE $LDMODULEFLAGS $_LDMODULE_TARGETS $_LIBDIRFLAGS $_LIBFLAGS $_PDB $_LDMODULE_SOURCES")}', '$LDMODULECOMSTR') compositeLdmodAction = ldmodLinkAction + regServerCheck + embedManifestDllCheckAction -exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}') +exeLinkAction = SCons.Action.Action('${TEMPFILE("$LINK $LINKFLAGS /OUT:$TARGET.windows $_LIBDIRFLAGS $_LIBFLAGS $_PDB $SOURCES.windows")}', '$LINKCOMSTR') compositeLinkAction = exeLinkAction + embedManifestExeCheckAction def generate(env): diff --git a/scons/scons-local-2.1.0/SCons/Tool/mssdk.py b/scons/scons-local-2.2.0/SCons/Tool/mssdk.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/mssdk.py rename to scons/scons-local-2.2.0/SCons/Tool/mssdk.py index 500b79200..f871c7d5a 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/mssdk.py +++ b/scons/scons-local-2.2.0/SCons/Tool/mssdk.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mssdk.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/mssdk.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" """engine.SCons.Tool.mssdk diff --git a/scons/scons-local-2.1.0/SCons/Tool/msvc.py b/scons/scons-local-2.2.0/SCons/Tool/msvc.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/msvc.py rename to scons/scons-local-2.2.0/SCons/Tool/msvc.py index e8e20a656..eb479a35b 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/msvc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/msvc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/msvc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/msvc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import re diff --git a/scons/scons-local-2.1.0/SCons/Tool/msvs.py b/scons/scons-local-2.2.0/SCons/Tool/msvs.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/msvs.py rename to scons/scons-local-2.2.0/SCons/Tool/msvs.py index c9b797044..c0443d96d 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/msvs.py +++ b/scons/scons-local-2.2.0/SCons/Tool/msvs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/msvs.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/msvs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.compat @@ -786,19 +786,15 @@ class _GenerateV7DSP(_DSPGenerator): # First remove any common prefix commonprefix = None - if len(sources) > 1: - s = list(map(os.path.normpath, sources)) - # take the dirname because the prefix may include parts - # of the filenames (e.g. if you have 'dir\abcd' and - # 'dir\acde' then the cp will be 'dir\a' ) - cp = os.path.dirname( os.path.commonprefix(s) ) - if cp and s[0][len(cp)] == os.sep: - # +1 because the filename starts after the separator - sources = [s[len(cp)+1:] for s in sources] - commonprefix = cp - elif len(sources) == 1: - commonprefix = os.path.dirname( sources[0] ) - sources[0] = os.path.basename( sources[0] ) + s = list(map(os.path.normpath, sources)) + # take the dirname because the prefix may include parts + # of the filenames (e.g. if you have 'dir\abcd' and + # 'dir\acde' then the cp will be 'dir\a' ) + cp = os.path.dirname( os.path.commonprefix(s) ) + if cp and s[0][len(cp)] == os.sep: + # +1 because the filename starts after the separator + sources = [s[len(cp)+1:] for s in sources] + commonprefix = cp hierarchy = makeHierarchy(sources) self.printSources(hierarchy, commonprefix=commonprefix) @@ -1116,19 +1112,15 @@ class _GenerateV10DSP(_DSPGenerator): # First remove any common prefix sources = self.sources[kind] commonprefix = None - if len(sources) > 1: - s = list(map(os.path.normpath, sources)) - # take the dirname because the prefix may include parts - # of the filenames (e.g. if you have 'dir\abcd' and - # 'dir\acde' then the cp will be 'dir\a' ) - cp = os.path.dirname( os.path.commonprefix(s) ) - if cp and s[0][len(cp)] == os.sep: - # +1 because the filename starts after the separator - sources = [s[len(cp)+1:] for s in sources] - commonprefix = cp - elif len(sources) == 1: - commonprefix = os.path.dirname( sources[0] ) - sources[0] = os.path.basename( sources[0] ) + s = list(map(os.path.normpath, sources)) + # take the dirname because the prefix may include parts + # of the filenames (e.g. if you have 'dir\abcd' and + # 'dir\acde' then the cp will be 'dir\a' ) + cp = os.path.dirname( os.path.commonprefix(s) ) + if cp and s[0][len(cp)] == os.sep: + # +1 because the filename starts after the separator + sources = [s[len(cp)+1:] for s in sources] + commonprefix = cp hierarchy = makeHierarchy(sources) self.printFilters(hierarchy, kind) @@ -1143,19 +1135,15 @@ class _GenerateV10DSP(_DSPGenerator): # First remove any common prefix sources = self.sources[kind] commonprefix = None - if len(sources) > 1: - s = list(map(os.path.normpath, sources)) - # take the dirname because the prefix may include parts - # of the filenames (e.g. if you have 'dir\abcd' and - # 'dir\acde' then the cp will be 'dir\a' ) - cp = os.path.dirname( os.path.commonprefix(s) ) - if cp and s[0][len(cp)] == os.sep: - # +1 because the filename starts after the separator - sources = [s[len(cp)+1:] for s in sources] - commonprefix = cp - elif len(sources) == 1: - commonprefix = os.path.dirname( sources[0] ) - sources[0] = os.path.basename( sources[0] ) + s = list(map(os.path.normpath, sources)) + # take the dirname because the prefix may include parts + # of the filenames (e.g. if you have 'dir\abcd' and + # 'dir\acde' then the cp will be 'dir\a' ) + cp = os.path.dirname( os.path.commonprefix(s) ) + if cp and s[0][len(cp)] == os.sep: + # +1 because the filename starts after the separator + sources = [s[len(cp)+1:] for s in sources] + commonprefix = cp hierarchy = makeHierarchy(sources) self.printSources(hierarchy, kind, commonprefix, kind) @@ -1217,7 +1205,9 @@ class _GenerateV7DSW(_DSWGenerator): self.version = self.env['MSVS_VERSION'] self.version_num, self.suite = msvs_parse_version(self.version) self.versionstr = '7.00' - if self.version_num >= 10.0: + if self.version_num >= 11.0: + self.versionstr = '12.0' + elif self.version_num >= 10.0: self.versionstr = '11.00' elif self.version_num >= 9.0: self.versionstr = '10.00' @@ -1320,13 +1310,16 @@ class _GenerateV7DSW(_DSWGenerator): def PrintSolution(self): """Writes a solution file""" - self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr ) - if self.version_num >= 10.0: + self.file.write('Microsoft Visual Studio Solution File, Format Version %s\n' % self.versionstr) + if self.versionstr >= 11.0: + self.file.write('# Visual Studio 11\n') + elif self.version_num >= 10.0: self.file.write('# Visual Studio 2010\n') elif self.version_num >= 9.0: self.file.write('# Visual Studio 2008\n') elif self.version_num >= 8.0: self.file.write('# Visual Studio 2005\n') + for dspinfo in self.dspfiles_info: name = dspinfo['NAME'] base, suffix = SCons.Util.splitext(name) diff --git a/scons/scons-local-2.1.0/SCons/Tool/mwcc.py b/scons/scons-local-2.2.0/SCons/Tool/mwcc.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Tool/mwcc.py rename to scons/scons-local-2.2.0/SCons/Tool/mwcc.py index 849aa7450..689c2739a 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/mwcc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/mwcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mwcc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/mwcc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/mwld.py b/scons/scons-local-2.2.0/SCons/Tool/mwld.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/mwld.py rename to scons/scons-local-2.2.0/SCons/Tool/mwld.py index a8cf2a62e..30149c37e 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/mwld.py +++ b/scons/scons-local-2.2.0/SCons/Tool/mwld.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/mwld.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/mwld.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/nasm.py b/scons/scons-local-2.2.0/SCons/Tool/nasm.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/nasm.py rename to scons/scons-local-2.2.0/SCons/Tool/nasm.py index 564151822..e76b51ab1 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/nasm.py +++ b/scons/scons-local-2.2.0/SCons/Tool/nasm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/nasm.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/nasm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/__init__.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/__init__.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/__init__.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/__init__.py index 9d1978b8d..f2b953d67 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/__init__.py @@ -4,7 +4,7 @@ SCons Packaging Tool. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -25,7 +25,7 @@ SCons Packaging Tool. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Environment from SCons.Variables import * diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/ipk.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/ipk.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/ipk.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/ipk.py index 2aaa722f7..251de8a33 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/ipk.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/ipk.py @@ -2,7 +2,7 @@ """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,7 +24,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/ipk.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Builder import SCons.Node.FS diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/msi.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/msi.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/msi.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/msi.py index ccb359627..dc593b338 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/msi.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/msi.py @@ -4,7 +4,7 @@ The msi packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -25,7 +25,7 @@ The msi packager. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/packaging/msi.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/msi.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import SCons diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/rpm.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/rpm.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/rpm.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/rpm.py index 4baa0169d..1c83b6bba 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/rpm.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/rpm.py @@ -4,7 +4,7 @@ The rpm packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -25,7 +25,7 @@ The rpm packager. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/rpm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/src_tarbz2.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py similarity index 90% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/src_tarbz2.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py index af7e9cef9..41c37ac4b 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/src_tarbz2.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ The tarbz2 SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/src_targz.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py similarity index 90% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/src_targz.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py index 202afa209..dbf1c2bbe 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/src_targz.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ The targz SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/src_zip.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py similarity index 90% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/src_zip.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py index 4efef3d7b..e12c3667b 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/src_zip.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ The zip SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/tarbz2.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/tarbz2.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py index 3a3cbcbf6..73964eb83 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/tarbz2.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py @@ -4,7 +4,7 @@ The tarbz2 SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ The tarbz2 SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/targz.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/targz.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/targz.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/targz.py index 9a742dfb1..1019bdbf5 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/targz.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/targz.py @@ -4,7 +4,7 @@ The targz SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ The targz SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/targz.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/targz.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.1.0/SCons/Tool/packaging/zip.py b/scons/scons-local-2.2.0/SCons/Tool/packaging/zip.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/Tool/packaging/zip.py rename to scons/scons-local-2.2.0/SCons/Tool/packaging/zip.py index 9749a6c24..a96278749 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/packaging/zip.py +++ b/scons/scons-local-2.2.0/SCons/Tool/packaging/zip.py @@ -4,7 +4,7 @@ The zip SRC packager. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ The zip SRC packager. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/packaging/zip.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/packaging/zip.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.1.0/SCons/Tool/pdf.py b/scons/scons-local-2.2.0/SCons/Tool/pdf.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/pdf.py rename to scons/scons-local-2.2.0/SCons/Tool/pdf.py index fb30cb8ad..beae6dd2a 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/pdf.py +++ b/scons/scons-local-2.2.0/SCons/Tool/pdf.py @@ -6,7 +6,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -28,7 +28,7 @@ Add an explicit action to run epstopdf to convert .eps files to .pdf # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdf.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/pdf.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Builder import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/pdflatex.py b/scons/scons-local-2.2.0/SCons/Tool/pdflatex.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/pdflatex.py rename to scons/scons-local-2.2.0/SCons/Tool/pdflatex.py index 40a120b23..9d2a449ec 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/pdflatex.py +++ b/scons/scons-local-2.2.0/SCons/Tool/pdflatex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdflatex.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/pdflatex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/pdftex.py b/scons/scons-local-2.2.0/SCons/Tool/pdftex.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/pdftex.py rename to scons/scons-local-2.2.0/SCons/Tool/pdftex.py index 8b72502e5..b5898c17f 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/pdftex.py +++ b/scons/scons-local-2.2.0/SCons/Tool/pdftex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/pdftex.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/pdftex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import SCons.Action diff --git a/scons/scons-local-2.1.0/SCons/Tool/qt.py b/scons/scons-local-2.2.0/SCons/Tool/qt.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Tool/qt.py rename to scons/scons-local-2.2.0/SCons/Tool/qt.py index d0ff10846..d40337d44 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/qt.py +++ b/scons/scons-local-2.2.0/SCons/Tool/qt.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/qt.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/qt.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import re diff --git a/scons/scons-local-2.1.0/SCons/Tool/rmic.py b/scons/scons-local-2.2.0/SCons/Tool/rmic.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/rmic.py rename to scons/scons-local-2.2.0/SCons/Tool/rmic.py index 84266a740..0b32f06bd 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/rmic.py +++ b/scons/scons-local-2.2.0/SCons/Tool/rmic.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rmic.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/rmic.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/rpcgen.py b/scons/scons-local-2.2.0/SCons/Tool/rpcgen.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/rpcgen.py rename to scons/scons-local-2.2.0/SCons/Tool/rpcgen.py index 76f98f252..c1542dc55 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/rpcgen.py +++ b/scons/scons-local-2.2.0/SCons/Tool/rpcgen.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rpcgen.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/rpcgen.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" from SCons.Builder import Builder import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/rpm.py b/scons/scons-local-2.2.0/SCons/Tool/rpm.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/rpm.py rename to scons/scons-local-2.2.0/SCons/Tool/rpm.py index f6ae365bd..3a4d6a928 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/rpm.py +++ b/scons/scons-local-2.2.0/SCons/Tool/rpm.py @@ -11,7 +11,7 @@ tar.gz consisting of the source file and a specfile. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -33,7 +33,7 @@ tar.gz consisting of the source file and a specfile. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/rpm.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/rpm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import re diff --git a/scons/scons-local-2.1.0/SCons/Tool/sgiar.py b/scons/scons-local-2.2.0/SCons/Tool/sgiar.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/sgiar.py rename to scons/scons-local-2.2.0/SCons/Tool/sgiar.py index 3dcbdaf84..42d07a2ed 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sgiar.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sgiar.py @@ -11,7 +11,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -33,7 +33,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgiar.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sgiar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/sgic++.py b/scons/scons-local-2.2.0/SCons/Tool/sgic++.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/sgic++.py rename to scons/scons-local-2.2.0/SCons/Tool/sgic++.py index e67974d3d..5358c4b66 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sgic++.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sgic++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgic++.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sgic++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/sgicc.py b/scons/scons-local-2.2.0/SCons/Tool/sgicc.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/sgicc.py rename to scons/scons-local-2.2.0/SCons/Tool/sgicc.py index 3f8af8972..c69d4fc9e 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sgicc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sgicc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgicc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sgicc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import cc diff --git a/scons/scons-local-2.1.0/SCons/Tool/sgilink.py b/scons/scons-local-2.2.0/SCons/Tool/sgilink.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/sgilink.py rename to scons/scons-local-2.2.0/SCons/Tool/sgilink.py index cb6658f01..f65144697 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sgilink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sgilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sgilink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sgilink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/sunar.py b/scons/scons-local-2.2.0/SCons/Tool/sunar.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/sunar.py rename to scons/scons-local-2.2.0/SCons/Tool/sunar.py index 32641e096..6e5f235f7 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sunar.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sunar.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunar.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sunar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.1.0/SCons/Tool/sunc++.py b/scons/scons-local-2.2.0/SCons/Tool/sunc++.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Tool/sunc++.py rename to scons/scons-local-2.2.0/SCons/Tool/sunc++.py index de404da3c..6effe32f8 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sunc++.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sunc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunc++.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sunc++.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons diff --git a/scons/scons-local-2.1.0/SCons/Tool/suncc.py b/scons/scons-local-2.2.0/SCons/Tool/suncc.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/suncc.py rename to scons/scons-local-2.2.0/SCons/Tool/suncc.py index b937dc443..6b1461f85 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/suncc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/suncc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/suncc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/suncc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/sunf77.py b/scons/scons-local-2.2.0/SCons/Tool/sunf77.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/sunf77.py rename to scons/scons-local-2.2.0/SCons/Tool/sunf77.py index 4f22d5646..1536c7126 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sunf77.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sunf77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf77.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sunf77.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/sunf90.py b/scons/scons-local-2.2.0/SCons/Tool/sunf90.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/sunf90.py rename to scons/scons-local-2.2.0/SCons/Tool/sunf90.py index f0800853d..65417f153 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sunf90.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sunf90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf90.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sunf90.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/sunf95.py b/scons/scons-local-2.2.0/SCons/Tool/sunf95.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/sunf95.py rename to scons/scons-local-2.2.0/SCons/Tool/sunf95.py index 3e4351ed0..c5300ad3b 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sunf95.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sunf95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunf95.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sunf95.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Util diff --git a/scons/scons-local-2.1.0/SCons/Tool/sunlink.py b/scons/scons-local-2.2.0/SCons/Tool/sunlink.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/Tool/sunlink.py rename to scons/scons-local-2.2.0/SCons/Tool/sunlink.py index 3952baaab..b747c8f2e 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/sunlink.py +++ b/scons/scons-local-2.2.0/SCons/Tool/sunlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/sunlink.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/sunlink.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/swig.py b/scons/scons-local-2.2.0/SCons/Tool/swig.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Tool/swig.py rename to scons/scons-local-2.2.0/SCons/Tool/swig.py index c773cd5ba..9f2a3800d 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/swig.py +++ b/scons/scons-local-2.2.0/SCons/Tool/swig.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/swig.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/swig.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import re diff --git a/scons/scons-local-2.1.0/SCons/Tool/tar.py b/scons/scons-local-2.2.0/SCons/Tool/tar.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Tool/tar.py rename to scons/scons-local-2.2.0/SCons/Tool/tar.py index 774312cdf..7cb9836b4 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/tar.py +++ b/scons/scons-local-2.2.0/SCons/Tool/tar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tar.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/tar.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.1.0/SCons/Tool/tex.py b/scons/scons-local-2.2.0/SCons/Tool/tex.py similarity index 89% rename from scons/scons-local-2.1.0/SCons/Tool/tex.py rename to scons/scons-local-2.2.0/SCons/Tool/tex.py index 79da6be93..ce394e4f5 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/tex.py +++ b/scons/scons-local-2.2.0/SCons/Tool/tex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tex.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/tex.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import re @@ -55,14 +55,18 @@ must_rerun_latex = True check_suffixes = ['.toc', '.lof', '.lot', '.out', '.nav', '.snm'] # these are files that require bibtex or makeindex to be run when they change -all_suffixes = check_suffixes + ['.bbl', '.idx', '.nlo', '.glo', '.acn'] +all_suffixes = check_suffixes + ['.bbl', '.idx', '.nlo', '.glo', '.acn', '.bcf'] # # regular expressions used to search for Latex features # or outputs that require rerunning latex # # search for all .aux files opened by latex (recorded in the .fls file) -openout_aux_re = re.compile(r"INPUT *(.*\.aux)") +openout_aux_re = re.compile(r"OUTPUT *(.*\.aux)") + +# search for all .bcf files opened by latex (recorded in the .fls file) +# for use by biber +openout_bcf_re = re.compile(r"OUTPUT *(.*\.bcf)") #printindex_re = re.compile(r"^[^%]*\\printindex", re.MULTILINE) #printnomenclature_re = re.compile(r"^[^%]*\\printnomenclature", re.MULTILINE) @@ -86,6 +90,8 @@ tableofcontents_re = re.compile(r"^[^%\n]*\\tableofcontents", re.MULTILINE) makeindex_re = re.compile(r"^[^%\n]*\\makeindex", re.MULTILINE) bibliography_re = re.compile(r"^[^%\n]*\\bibliography", re.MULTILINE) bibunit_re = re.compile(r"^[^%\n]*\\begin\{bibunit\}", re.MULTILINE) +multibib_re = re.compile(r"^[^%\n]*\\newcites\{([^\}]*)\}", re.MULTILINE) +addbibresource_re = re.compile(r"^[^%\n]*\\(addbibresource|addglobalbib|addsectionbib)", re.MULTILINE) listoffigures_re = re.compile(r"^[^%\n]*\\listoffigures", re.MULTILINE) listoftables_re = re.compile(r"^[^%\n]*\\listoftables", re.MULTILINE) hyperref_re = re.compile(r"^[^%\n]*\\usepackage.*\{hyperref\}", re.MULTILINE) @@ -236,6 +242,9 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None must_rerun_latex = True + # .aux files already processed by BibTex + already_bibtexed = [] + # # routine to update MD5 hash and compare # @@ -291,27 +300,61 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None dups[x] = 1 auxfiles = list(dups.keys()) + bcffiles = [] + if os.path.isfile(flsfilename): + flsContent = open(flsfilename, "rb").read() + bcffiles = openout_bcf_re.findall(flsContent) + # remove duplicates + dups = {} + for x in bcffiles: + dups[x] = 1 + bcffiles = list(dups.keys()) + if Verbose: print "auxfiles ",auxfiles + print "bcffiles ",bcffiles # Now decide if bibtex will need to be run. # The information that bibtex reads from the .aux file is # pass-independent. If we find (below) that the .bbl file is unchanged, # then the last latex saw a correct bibliography. - # Therefore only do this on the first pass - if count == 1: - for auxfilename in auxfiles: + # Therefore only do this once + # Go through all .aux files and remember the files already done. + for auxfilename in auxfiles: + if auxfilename not in already_bibtexed: + already_bibtexed.append(auxfilename) target_aux = os.path.join(targetdir, auxfilename) if os.path.isfile(target_aux): content = open(target_aux, "rb").read() if content.find("bibdata") != -1: if Verbose: - print "Need to run bibtex" + print "Need to run bibtex on ",auxfilename bibfile = env.fs.File(SCons.Util.splitext(target_aux)[0]) result = BibTeXAction(bibfile, bibfile, env) if result != 0: check_file_error_message(env['BIBTEX'], 'blg') - must_rerun_latex = must_rerun_latex or check_MD5(suffix_nodes['.bbl'],'.bbl') + must_rerun_latex = True + + # Now decide if biber will need to be run. + # The information that bibtex reads from the .bcf file is + # pass-independent. If we find (below) that the .bbl file is unchanged, + # then the last latex saw a correct bibliography. + # Therefore only do this once + # Go through all .bcf files and remember the files already done. + for bcffilename in bcffiles: + if bcffilename not in already_bibtexed: + already_bibtexed.append(bcffilename) + target_bcf = os.path.join(targetdir, bcffilename) + if os.path.isfile(target_bcf): + content = open(target_bcf, "rb").read() + if content.find("bibdata") != -1: + if Verbose: + print "Need to run bibtex on ",bcffilename + bibfile = env.fs.File(SCons.Util.splitext(target_bcf)[0]) + result = BibTeXAction(bibfile, bibfile, env) + if result != 0: + check_file_error_message(env['BIBTEX'], 'blg') + must_rerun_latex = True # Now decide if latex will need to be run again due to index. if check_MD5(suffix_nodes['.idx'],'.idx') or (count == 1 and run_makeindex): @@ -553,6 +596,8 @@ def ScanFiles(theFile, target, paths, file_tests, file_tests_search, env, graphi for i in range(len(file_tests_search)): if file_tests[i][0] is None: file_tests[i][0] = file_tests_search[i].search(content) + if Verbose and file_tests[i][0]: + print " found match for ",file_tests[i][-1][-1] incResult = includeOnly_re.search(content) if incResult: @@ -621,6 +666,8 @@ def tex_emitter_core(target, source, env, graphics_extensions): makeindex_re, bibliography_re, bibunit_re, + multibib_re, + addbibresource_re, tableofcontents_re, listoffigures_re, listoftables_re, @@ -636,6 +683,8 @@ def tex_emitter_core(target, source, env, graphics_extensions): ['.idx', '.ind', '.ilg','makeindex'], ['.bbl', '.blg','bibliography'], ['.bbl', '.blg','bibunit'], + ['.bbl', '.blg','multibib'], + ['.bbl', '.blg','.bcf','addbibresource'], ['.toc','contents'], ['.lof','figures'], ['.lot','tables'], @@ -678,6 +727,8 @@ def tex_emitter_core(target, source, env, graphics_extensions): for (theSearch,suffix_list) in file_tests: # add side effects if feature is present.If file is to be generated,add all side effects + if Verbose and theSearch: + print "check side effects for ",suffix_list[-1] if (theSearch != None) or (not source[0].exists() ): file_list = [targetbase,] # for bibunit we need a list of files @@ -686,20 +737,31 @@ def tex_emitter_core(target, source, env, graphics_extensions): file_list = glob.glob(file_basename) # remove the suffix '.aux' for i in range(len(file_list)): - file_list[i] = SCons.Util.splitext(file_list[i])[0] + file_list.append(SCons.Util.splitext(file_list[i])[0]) + # for multibib we need a list of files + if suffix_list[-1] == 'multibib': + for multibibmatch in multibib_re.finditer(content): + if Verbose: + print "multibib match ",multibibmatch.group(1) + if multibibmatch != None: + baselist = multibibmatch.group(1).split(',') + if Verbose: + print "multibib list ", baselist + for i in range(len(baselist)): + file_list.append(os.path.join(targetdir, baselist[i])) # now define the side effects for file_name in file_list: for suffix in suffix_list[:-1]: env.SideEffect(file_name + suffix,target[0]) if Verbose: - print "side effect :",file_name + suffix + print "side effect tst :",file_name + suffix, " target is ",str(target[0]) env.Clean(target[0],file_name + suffix) for aFile in aux_files: aFile_base = SCons.Util.splitext(aFile)[0] env.SideEffect(aFile_base + '.aux',target[0]) if Verbose: - print "side effect :",aFile_base + '.aux' + print "side effect aux :",aFile_base + '.aux' env.Clean(target[0],aFile_base + '.aux') # read fls file to get all other files that latex creates and will read on the next pass # remove files from list that we explicitly dealt with above @@ -712,7 +774,7 @@ def tex_emitter_core(target, source, env, graphics_extensions): out_files.remove(filename) env.SideEffect(out_files,target[0]) if Verbose: - print "side effect :",out_files + print "side effect fls :",out_files env.Clean(target[0],out_files) return (target, source) @@ -826,7 +888,7 @@ def generate_common(env): env['LATEX'] = 'latex' env['LATEXFLAGS'] = SCons.Util.CLVar('-interaction=nonstopmode -recorder') env['LATEXCOM'] = CDCOM + '${TARGET.dir} && $LATEX $LATEXFLAGS ${SOURCE.file}' - env['LATEXRETRIES'] = 3 + env['LATEXRETRIES'] = 4 env['PDFLATEX'] = 'pdflatex' env['PDFLATEXFLAGS'] = SCons.Util.CLVar('-interaction=nonstopmode -recorder') diff --git a/scons/scons-local-2.1.0/SCons/Tool/textfile.py b/scons/scons-local-2.2.0/SCons/Tool/textfile.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Tool/textfile.py rename to scons/scons-local-2.2.0/SCons/Tool/textfile.py index b849e71b7..44fd99941 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/textfile.py +++ b/scons/scons-local-2.2.0/SCons/Tool/textfile.py @@ -1,6 +1,6 @@ # -*- python -*- # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -44,7 +44,7 @@ Textfile/Substfile builder for SCons. is unpredictible whether the expansion will occur. """ -__revision__ = "src/engine/SCons/Tool/textfile.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/textfile.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons diff --git a/scons/scons-local-2.1.0/SCons/Tool/tlib.py b/scons/scons-local-2.2.0/SCons/Tool/tlib.py similarity index 92% rename from scons/scons-local-2.1.0/SCons/Tool/tlib.py rename to scons/scons-local-2.2.0/SCons/Tool/tlib.py index 918d3cdf7..5a24a0cf2 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/tlib.py +++ b/scons/scons-local-2.2.0/SCons/Tool/tlib.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ XXX # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/tlib.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/tlib.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Tool import SCons.Tool.bcc32 diff --git a/scons/scons-local-2.1.0/SCons/Tool/wix.py b/scons/scons-local-2.2.0/SCons/Tool/wix.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/wix.py rename to scons/scons-local-2.2.0/SCons/Tool/wix.py index 208e96d7a..eb88ce383 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/wix.py +++ b/scons/scons-local-2.2.0/SCons/Tool/wix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/wix.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/wix.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import SCons.Builder import SCons.Action diff --git a/scons/scons-local-2.2.0/SCons/Tool/xgettext.py b/scons/scons-local-2.2.0/SCons/Tool/xgettext.py new file mode 100644 index 000000000..9a5167c88 --- /dev/null +++ b/scons/scons-local-2.2.0/SCons/Tool/xgettext.py @@ -0,0 +1,333 @@ +""" xgettext tool + +Tool specific initialization of `xgettext` tool. +""" + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# +# Permission is hereby granted, free of charge, to any person obtaining +# a copy of this software and associated documentation files (the +# "Software"), to deal in the Software without restriction, including +# without limitation the rights to use, copy, modify, merge, publish, +# distribute, sublicense, and/or sell copies of the Software, and to +# permit persons to whom the Software is furnished to do so, subject to +# the following conditions: +# +# The above copyright notice and this permission notice shall be included +# in all copies or substantial portions of the Software. +# +# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE +# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE +# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION +# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION +# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +__revision__ = "src/engine/SCons/Tool/xgettext.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" + +############################################################################# +class _CmdRunner(object): + """ Callabe object, which runs shell command storing its stdout and stderr to + variables. It also provides `strfunction()` method, which shall be used by + scons Action objects to print command string. """ + + def __init__( self, command, commandstr = None): + self.out = None + self.err = None + self.status = None + self.command = command + self.commandstr = commandstr + + def __call__(self, target, source, env): + import SCons.Action + import subprocess + import os + import sys + kw = { + 'stdin' : 'devnull', + 'stdout' : subprocess.PIPE, + 'stderr' : subprocess.PIPE, + 'universal_newlines' : True, + 'shell' : True + } + command = env.subst(self.command, target = target, source = source) + proc = SCons.Action._subproc(env, command, **kw) + self.out, self.err = proc.communicate() + self.status = proc.wait() + if self.err: sys.stderr.write(unicode(self.err)) + return self.status + + def strfunction(self, target, source, env): + import os + comstr = self.commandstr + if env.subst(comstr, target = target, source = source) == "": + comstr = self.command + s = env.subst(comstr, target = target, source = source) + return s +############################################################################# + +############################################################################# +def _update_pot_file(target, source, env): + """ Action function for `POTUpdate` builder """ + import re + import os + import SCons.Action + nop = lambda target, source, env : 0 + + # Save scons cwd and os cwd (NOTE: they may be different. After the job, we + # revert ech one to its original state). + save_cwd = env.fs.getcwd() + save_os_cwd = os.getcwd() + chdir = target[0].dir + chdir_str = repr(chdir.get_abspath()) + # Print chdir message (employ SCons.Action.Action for that. It knows better + # than me how to to this correctly). + env.Execute(SCons.Action.Action(nop, "Entering " + chdir_str)) + # Go to target's directory and do our job + env.fs.chdir(chdir, 1) # Go into target's directory + try: + cmd = _CmdRunner('$XGETTEXTCOM', '$XGETTEXTCOMSTR') + action = SCons.Action.Action(cmd, strfunction=cmd.strfunction) + status = action([ target[0] ], source, env) + except: + # Something went wrong. + env.Execute(SCons.Action.Action(nop, "Leaving " + chdir_str)) + # Revert working dirs to previous state and re-throw exception. + env.fs.chdir(save_cwd, 0) + os.chdir(save_os_cwd) + raise + # Print chdir message. + env.Execute(SCons.Action.Action(nop, "Leaving " + chdir_str)) + # Revert working dirs to previous state. + env.fs.chdir(save_cwd, 0) + os.chdir(save_os_cwd) + # If the command was not successfull, return error code. + if status: return status + + new_content = cmd.out + + if not new_content: + # When xgettext finds no internationalized messages, no *.pot is created + # (because we don't want to bother translators with empty POT files). + needs_update = False + explain = "no internationalized messages encountered" + else: + if target[0].exists(): + # If the file already exists, it's left unaltered unless its messages + # are outdated (w.r.t. to these recovered by xgettext from sources). + old_content = target[0].get_text_contents() + re_cdate = re.compile(r'^"POT-Creation-Date: .*"$[\r\n]?', re.M) + old_content_nocdate = re.sub(re_cdate,"",old_content) + new_content_nocdate = re.sub(re_cdate,"",new_content) + if(old_content_nocdate == new_content_nocdate): + # Messages are up-to-date + needs_update = False + explain = "messages in file found to be up-to-date" + else: + # Messages are outdated + needs_update = True + explain = "messages in file were outdated" + else: + # No POT file found, create new one + needs_update = True + explain = "new file" + if needs_update: + # Print message employing SCons.Action.Action for that. + msg = "Writting " + repr(str(target[0])) + " (" + explain + ")" + env.Execute(SCons.Action.Action(nop, msg)) + f = open(str(target[0]),"w") + f.write(new_content) + f.close() + return 0 + else: + # Print message employing SCons.Action.Action for that. + msg = "Not writting " + repr(str(target[0])) + " (" + explain + ")" + env.Execute(SCons.Action.Action(nop, msg)) + return 0 +############################################################################# + +############################################################################# +from SCons.Builder import BuilderBase +############################################################################# +class _POTBuilder(BuilderBase): + def _execute(self, env, target, source, *args): + if not target: + if env.has_key('POTDOMAIN') and env['POTDOMAIN']: + domain = env['POTDOMAIN'] + else: + domain = 'messages' + target = [ domain ] + return BuilderBase._execute(self, env, target, source, *args) +############################################################################# + +############################################################################# +def _scan_xgettext_from_files(target, source, env, files = None, path = None): + """ Parses `POTFILES.in`-like file and returns list of extracted file names. + """ + import re + import SCons.Util + import SCons.Node.FS + + if files is None: + return 0 + if not SCons.Util.is_List(files): + files = [ files ] + + if path is None: + if env.has_key('XGETTEXTPATH'): + path = env['XGETTEXTPATH'] + else: + path = [] + if not SCons.Util.is_List(path): + path = [ path ] + + path = SCons.Util.flatten(path) + + dirs = () + for p in path: + if not isinstance(p, SCons.Node.FS.Base): + if SCons.Util.is_String(p): + p = env.subst(p, source = source, target = target) + p = env.arg2nodes(p, env.fs.Dir) + dirs += tuple(p) + # cwd is the default search path (when no path is defined by user) + if not dirs: + dirs = (env.fs.getcwd(),) + + # Parse 'POTFILE.in' files. + re_comment = re.compile(r'^#[^\n\r]*$\r?\n?', re.M) + re_emptyln = re.compile(r'^[ \t\r]*$\r?\n?', re.M) + re_trailws = re.compile(r'[ \t\r]+$') + for f in files: + # Find files in search path $XGETTEXTPATH + if isinstance(f, SCons.Node.FS.Base) and f.rexists(): + contents = f.get_text_contents() + contents = re_comment.sub("", contents) + contents = re_emptyln.sub("", contents) + contents = re_trailws.sub("", contents) + depnames = contents.splitlines() + for depname in depnames: + depfile = SCons.Node.FS.find_file(depname, dirs) + if not depfile: + depfile = env.arg2nodes(depname, dirs[0].File) + env.Depends(target, depfile) + return 0 +############################################################################# + +############################################################################# +def _pot_update_emitter(target, source, env): + """ Emitter function for `POTUpdate` builder """ + from SCons.Tool.GettextCommon import _POTargetFactory + import SCons.Util + import SCons.Node.FS + + if env.has_key('XGETTEXTFROM'): + xfrom = env['XGETTEXTFROM'] + else: + return target, source + if not SCons.Util.is_List(xfrom): + xfrom = [ xfrom ] + + xfrom = SCons.Util.flatten(xfrom) + + # Prepare list of 'POTFILE.in' files. + files = [] + for xf in xfrom: + if not isinstance(xf, SCons.Node.FS.Base): + if SCons.Util.is_String(xf): + # Interpolate variables in strings + xf = env.subst(xf, source = source, target = target) + xf = env.arg2nodes(xf) + files.extend(xf) + if files: + env.Depends(target, files) + _scan_xgettext_from_files(target, source, env, files) + return target, source +############################################################################# + +############################################################################# +from SCons.Environment import _null +############################################################################# +def _POTUpdateBuilderWrapper(env, target=None, source=_null, **kw): + return env._POTUpdateBuilder(target, source, **kw) +############################################################################# + +############################################################################# +def _POTUpdateBuilder(env, **kw): + """ Creates `POTUpdate` builder object """ + import SCons.Action + from SCons.Tool.GettextCommon import _POTargetFactory + kw['action'] = SCons.Action.Action(_update_pot_file, None) + kw['suffix'] = '$POTSUFFIX' + kw['target_factory'] = _POTargetFactory(env, alias='$POTUPDATE_ALIAS').File + kw['emitter'] = _pot_update_emitter + return _POTBuilder(**kw) +############################################################################# + +############################################################################# +def generate(env,**kw): + """ Generate `xgettext` tool """ + import SCons.Util + from SCons.Tool.GettextCommon import RPaths, _detect_xgettext + + env['XGETTEXT'] = _detect_xgettext(env) + # NOTE: sources="$SOURCES" would work as well. However, we use following + # construction to convert absolute paths provided by scons onto paths + # relative to current working dir. Note, that scons expands $SOURCE(S) to + # absolute paths for sources $SOURCE(s) outside of current subtree (e.g. in + # "../"). With source=$SOURCE these absolute paths would be written to the + # resultant *.pot file (and its derived *.po files) as references to lines in + # source code (e.g. referring lines in *.c files). Such references would be + # correct (e.g. in poedit) only on machine on which *.pot was generated and + # would be of no use on other hosts (having a copy of source code located + # in different place in filesystem). + sources = '$( ${_concat( "", SOURCES, "", __env__, XgettextRPaths, TARGET' \ + + ', SOURCES)} $)' + + # NOTE: the output from $XGETTEXTCOM command must go to stdout, not to a file. + # This is required by the POTUpdate builder's action. + xgettextcom = '$XGETTEXT $XGETTEXTFLAGS $_XGETTEXTPATHFLAGS' \ + + ' $_XGETTEXTFROMFLAGS -o - ' + sources + + xgettextpathflags = '$( ${_concat( XGETTEXTPATHPREFIX, XGETTEXTPATH' \ + + ', XGETTEXTPATHSUFFIX, __env__, RDirs, TARGET, SOURCES)} $)' + xgettextfromflags = '$( ${_concat( XGETTEXTFROMPREFIX, XGETTEXTFROM' \ + + ', XGETTEXTFROMSUFFIX, __env__, target=TARGET, source=SOURCES)} $)' + + env.SetDefault( + _XGETTEXTDOMAIN = '${TARGET.filebase}', + XGETTEXTFLAGS = [ ], + XGETTEXTCOM = xgettextcom, + XGETTEXTCOMSTR = '', + XGETTEXTPATH = [ ], + XGETTEXTPATHPREFIX = '-D', + XGETTEXTPATHSUFFIX = '', + XGETTEXTFROM = None, + XGETTEXTFROMPREFIX = '-f', + XGETTEXTFROMSUFFIX = '', + _XGETTEXTPATHFLAGS = xgettextpathflags, + _XGETTEXTFROMFLAGS = xgettextfromflags, + POTSUFFIX = ['.pot'], + POTUPDATE_ALIAS = 'pot-update', + XgettextRPaths = RPaths(env) + ) + env.Append( BUILDERS = { + '_POTUpdateBuilder' : _POTUpdateBuilder(env) + } ) + env.AddMethod(_POTUpdateBuilderWrapper, 'POTUpdate') + env.AlwaysBuild(env.Alias('$POTUPDATE_ALIAS')) +############################################################################# + +############################################################################# +def exists(env): + """ Check, whether the tool exists """ + from SCons.Tool.GettextCommon import _xgettext_exists + return _xgettext_exists(env) +############################################################################# + +# Local Variables: +# tab-width:4 +# indent-tabs-mode:nil +# End: +# vim: set expandtab tabstop=4 shiftwidth=4: diff --git a/scons/scons-local-2.1.0/SCons/Tool/yacc.py b/scons/scons-local-2.2.0/SCons/Tool/yacc.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Tool/yacc.py rename to scons/scons-local-2.2.0/SCons/Tool/yacc.py index 60e1a8327..580fe76ff 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/yacc.py +++ b/scons/scons-local-2.2.0/SCons/Tool/yacc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/yacc.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/yacc.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Tool/zip.py b/scons/scons-local-2.2.0/SCons/Tool/zip.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Tool/zip.py rename to scons/scons-local-2.2.0/SCons/Tool/zip.py index fe2f4bedb..77515ad35 100644 --- a/scons/scons-local-2.1.0/SCons/Tool/zip.py +++ b/scons/scons-local-2.2.0/SCons/Tool/zip.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/zip.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Tool/zip.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path diff --git a/scons/scons-local-2.1.0/SCons/Util.py b/scons/scons-local-2.2.0/SCons/Util.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/Util.py rename to scons/scons-local-2.2.0/SCons/Util.py index cedd78cb0..c1f87a2e7 100644 --- a/scons/scons-local-2.1.0/SCons/Util.py +++ b/scons/scons-local-2.2.0/SCons/Util.py @@ -3,7 +3,7 @@ Various utility functions go here. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -24,7 +24,7 @@ Various utility functions go here. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Util.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Util.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import sys @@ -430,15 +430,15 @@ def to_String_for_signature(obj, to_String_for_subst=to_String_for_subst, # references to anything else it finds. # # A special case is any object that has a __semi_deepcopy__() method, -# which we invoke to create the copy, which is used by the BuilderDict -# class because of its extra initialization argument. +# which we invoke to create the copy. Currently only used by +# BuilderDict to actually prevent the copy operation (as invalid on that object) # # The dispatch table approach used here is a direct rip-off from the # normal Python copy module. _semi_deepcopy_dispatch = d = {} -def _semi_deepcopy_dict(x): +def semi_deepcopy_dict(x, exclude = [] ): copy = {} for key, val in x.items(): # The regular Python copy.deepcopy() also deepcopies the key, @@ -447,9 +447,10 @@ def _semi_deepcopy_dict(x): # copy[semi_deepcopy(key)] = semi_deepcopy(val) # # Doesn't seem like we need to, but we'll comment it just in case. - copy[key] = semi_deepcopy(val) + if key not in exclude: + copy[key] = semi_deepcopy(val) return copy -d[dict] = _semi_deepcopy_dict +d[dict] = semi_deepcopy_dict def _semi_deepcopy_list(x): return list(map(semi_deepcopy, x)) @@ -467,14 +468,13 @@ def semi_deepcopy(x): if hasattr(x, '__semi_deepcopy__') and callable(x.__semi_deepcopy__): return x.__semi_deepcopy__() elif isinstance(x, UserDict): - return x.__class__(_semi_deepcopy_dict(x)) + return x.__class__(semi_deepcopy_dict(x)) elif isinstance(x, UserList): return x.__class__(_semi_deepcopy_list(x)) return x - class Proxy(object): """A simple generic Proxy class, forwarding all calls to subject. So, for the benefit of the python newbie, what does diff --git a/scons/scons-local-2.1.0/SCons/Variables/BoolVariable.py b/scons/scons-local-2.2.0/SCons/Variables/BoolVariable.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/Variables/BoolVariable.py rename to scons/scons-local-2.2.0/SCons/Variables/BoolVariable.py index dc2bf4015..492f95e32 100644 --- a/scons/scons-local-2.1.0/SCons/Variables/BoolVariable.py +++ b/scons/scons-local-2.2.0/SCons/Variables/BoolVariable.py @@ -12,7 +12,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -34,7 +34,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/BoolVariable.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Variables/BoolVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __all__ = ['BoolVariable',] diff --git a/scons/scons-local-2.1.0/SCons/Variables/EnumVariable.py b/scons/scons-local-2.2.0/SCons/Variables/EnumVariable.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Variables/EnumVariable.py rename to scons/scons-local-2.2.0/SCons/Variables/EnumVariable.py index 60a3c5d9f..e12c133ce 100644 --- a/scons/scons-local-2.1.0/SCons/Variables/EnumVariable.py +++ b/scons/scons-local-2.2.0/SCons/Variables/EnumVariable.py @@ -15,7 +15,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -37,7 +37,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/EnumVariable.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Variables/EnumVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __all__ = ['EnumVariable',] diff --git a/scons/scons-local-2.1.0/SCons/Variables/ListVariable.py b/scons/scons-local-2.2.0/SCons/Variables/ListVariable.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/Variables/ListVariable.py rename to scons/scons-local-2.2.0/SCons/Variables/ListVariable.py index eb3ad8a77..0763b29c4 100644 --- a/scons/scons-local-2.1.0/SCons/Variables/ListVariable.py +++ b/scons/scons-local-2.2.0/SCons/Variables/ListVariable.py @@ -25,7 +25,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -46,7 +46,7 @@ Usage example: # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Variables/ListVariable.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Variables/ListVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" # Know Bug: This should behave like a Set-Type, but does not really, # since elements can occur twice. diff --git a/scons/scons-local-2.1.0/SCons/Variables/PackageVariable.py b/scons/scons-local-2.2.0/SCons/Variables/PackageVariable.py similarity index 95% rename from scons/scons-local-2.1.0/SCons/Variables/PackageVariable.py rename to scons/scons-local-2.2.0/SCons/Variables/PackageVariable.py index ffa5db579..dfac082e4 100644 --- a/scons/scons-local-2.1.0/SCons/Variables/PackageVariable.py +++ b/scons/scons-local-2.2.0/SCons/Variables/PackageVariable.py @@ -28,7 +28,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -50,7 +50,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/PackageVariable.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Variables/PackageVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __all__ = ['PackageVariable',] diff --git a/scons/scons-local-2.1.0/SCons/Variables/PathVariable.py b/scons/scons-local-2.2.0/SCons/Variables/PathVariable.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Variables/PathVariable.py rename to scons/scons-local-2.2.0/SCons/Variables/PathVariable.py index 1076a8d69..77ef83eda 100644 --- a/scons/scons-local-2.1.0/SCons/Variables/PathVariable.py +++ b/scons/scons-local-2.2.0/SCons/Variables/PathVariable.py @@ -46,7 +46,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -68,7 +68,7 @@ Usage example: # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Variables/PathVariable.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Variables/PathVariable.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __all__ = ['PathVariable',] diff --git a/scons/scons-local-2.1.0/SCons/Variables/__init__.py b/scons/scons-local-2.2.0/SCons/Variables/__init__.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/Variables/__init__.py rename to scons/scons-local-2.2.0/SCons/Variables/__init__.py index 3c5ca5308..88df0218b 100644 --- a/scons/scons-local-2.1.0/SCons/Variables/__init__.py +++ b/scons/scons-local-2.2.0/SCons/Variables/__init__.py @@ -5,7 +5,7 @@ customizable variables to an SCons build. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -26,7 +26,7 @@ customizable variables to an SCons build. # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/engine/SCons/Variables/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Variables/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os.path import sys diff --git a/scons/scons-local-2.1.0/SCons/Warnings.py b/scons/scons-local-2.2.0/SCons/Warnings.py similarity index 97% rename from scons/scons-local-2.1.0/SCons/Warnings.py rename to scons/scons-local-2.2.0/SCons/Warnings.py index f20e65e71..42e396f88 100644 --- a/scons/scons-local-2.1.0/SCons/Warnings.py +++ b/scons/scons-local-2.2.0/SCons/Warnings.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ This file implements the warnings framework for SCons. """ -__revision__ = "src/engine/SCons/Warnings.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/Warnings.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import sys diff --git a/scons/scons-local-2.1.0/SCons/__init__.py b/scons/scons-local-2.2.0/SCons/__init__.py similarity index 81% rename from scons/scons-local-2.1.0/SCons/__init__.py rename to scons/scons-local-2.2.0/SCons/__init__.py index 950b314c4..d4b619f71 100644 --- a/scons/scons-local-2.1.0/SCons/__init__.py +++ b/scons/scons-local-2.2.0/SCons/__init__.py @@ -5,7 +5,7 @@ The main package for the SCons software construction utility. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,17 +27,17 @@ The main package for the SCons software construction utility. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" -__version__ = "2.1.0" +__version__ = "2.2.0" -__build__ = "r5357[MODIFIED]" +__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]" -__buildsys__ = "ubuntu" +__buildsys__ = "oberbrunner-dev" -__date__ = "2011/09/09 21:31:03" +__date__ = "2012/08/05 15:38:28" -__developer__ = "bdeegan" +__developer__ = "garyo" # make sure compatibility is always in place import SCons.compat diff --git a/scons/scons-local-2.1.0/SCons/compat/__init__.py b/scons/scons-local-2.2.0/SCons/compat/__init__.py similarity index 98% rename from scons/scons-local-2.1.0/SCons/compat/__init__.py rename to scons/scons-local-2.2.0/SCons/compat/__init__.py index 39edff203..7dc6a68d5 100644 --- a/scons/scons-local-2.1.0/SCons/compat/__init__.py +++ b/scons/scons-local-2.2.0/SCons/compat/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -60,7 +60,7 @@ function defined below loads the module as the "real" name (without the rest of our code will find our pre-loaded compatibility module. """ -__revision__ = "src/engine/SCons/compat/__init__.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/compat/__init__.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import os import sys diff --git a/scons/scons-local-2.1.0/SCons/compat/_scons_builtins.py b/scons/scons-local-2.2.0/SCons/compat/_scons_builtins.py similarity index 96% rename from scons/scons-local-2.1.0/SCons/compat/_scons_builtins.py rename to scons/scons-local-2.2.0/SCons/compat/_scons_builtins.py index 63dde0185..32f4e7536 100644 --- a/scons/scons-local-2.1.0/SCons/compat/_scons_builtins.py +++ b/scons/scons-local-2.2.0/SCons/compat/_scons_builtins.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -52,7 +52,7 @@ the FUNCTIONS or DATA output, that means those names are already built in to this version of Python and we don't need to add them from this module. """ -__revision__ = "src/engine/SCons/compat/_scons_builtins.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/compat/_scons_builtins.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import builtins diff --git a/scons/scons-local-2.1.0/SCons/compat/_scons_collections.py b/scons/scons-local-2.2.0/SCons/compat/_scons_collections.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/compat/_scons_collections.py rename to scons/scons-local-2.2.0/SCons/compat/_scons_collections.py index 8975b44df..4687642dd 100644 --- a/scons/scons-local-2.1.0/SCons/compat/_scons_collections.py +++ b/scons/scons-local-2.2.0/SCons/compat/_scons_collections.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ used by SCons, in an interface that looks enough like collections for our purposes. """ -__revision__ = "src/engine/SCons/compat/_scons_collections.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/compat/_scons_collections.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" # Use exec to hide old names from fixers. exec("""if True: diff --git a/scons/scons-local-2.1.0/SCons/compat/_scons_dbm.py b/scons/scons-local-2.2.0/SCons/compat/_scons_dbm.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/compat/_scons_dbm.py rename to scons/scons-local-2.2.0/SCons/compat/_scons_dbm.py index e8f7e4b41..0506ac804 100644 --- a/scons/scons-local-2.1.0/SCons/compat/_scons_dbm.py +++ b/scons/scons-local-2.2.0/SCons/compat/_scons_dbm.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -30,7 +30,7 @@ that the whichdb.whichdb() implementstation in the various 2.X versions of Python won't blow up even if dbm wasn't compiled in. """ -__revision__ = "src/engine/SCons/compat/_scons_dbm.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/compat/_scons_dbm.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" class error(Exception): pass diff --git a/scons/scons-local-2.1.0/SCons/compat/_scons_hashlib.py b/scons/scons-local-2.2.0/SCons/compat/_scons_hashlib.py similarity index 93% rename from scons/scons-local-2.1.0/SCons/compat/_scons_hashlib.py rename to scons/scons-local-2.2.0/SCons/compat/_scons_hashlib.py index 991e29ae4..52cf3ba60 100644 --- a/scons/scons-local-2.1.0/SCons/compat/_scons_hashlib.py +++ b/scons/scons-local-2.2.0/SCons/compat/_scons_hashlib.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -31,7 +31,7 @@ purposes, anyway). In fact, this module will raise an ImportError if the underlying md5 module isn't available. """ -__revision__ = "src/engine/SCons/compat/_scons_hashlib.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/compat/_scons_hashlib.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import md5 from string import hexdigits diff --git a/scons/scons-local-2.1.0/SCons/compat/_scons_io.py b/scons/scons-local-2.2.0/SCons/compat/_scons_io.py similarity index 91% rename from scons/scons-local-2.1.0/SCons/compat/_scons_io.py rename to scons/scons-local-2.2.0/SCons/compat/_scons_io.py index 9b04e98c0..df4d44497 100644 --- a/scons/scons-local-2.1.0/SCons/compat/_scons_io.py +++ b/scons/scons-local-2.2.0/SCons/compat/_scons_io.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -29,7 +29,7 @@ functionality. It only wraps the portions of io functionality used by SCons, in an interface that looks enough like io for our purposes. """ -__revision__ = "src/engine/SCons/compat/_scons_io.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/compat/_scons_io.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" # Use the "imp" module to protect the imports below from fixers. import imp diff --git a/scons/scons-local-2.1.0/SCons/compat/_scons_sets.py b/scons/scons-local-2.2.0/SCons/compat/_scons_sets.py similarity index 100% rename from scons/scons-local-2.1.0/SCons/compat/_scons_sets.py rename to scons/scons-local-2.2.0/SCons/compat/_scons_sets.py diff --git a/scons/scons-local-2.1.0/SCons/compat/_scons_subprocess.py b/scons/scons-local-2.2.0/SCons/compat/_scons_subprocess.py similarity index 100% rename from scons/scons-local-2.1.0/SCons/compat/_scons_subprocess.py rename to scons/scons-local-2.2.0/SCons/compat/_scons_subprocess.py diff --git a/scons/scons-local-2.1.0/SCons/cpp.py b/scons/scons-local-2.2.0/SCons/cpp.py similarity index 99% rename from scons/scons-local-2.1.0/SCons/cpp.py rename to scons/scons-local-2.2.0/SCons/cpp.py index 3015b5314..74fff7c70 100644 --- a/scons/scons-local-2.1.0/SCons/cpp.py +++ b/scons/scons-local-2.2.0/SCons/cpp.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -21,7 +21,7 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/cpp.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/cpp.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" __doc__ = """ SCons C Pre-Processor module diff --git a/scons/scons-local-2.1.0/SCons/dblite.py b/scons/scons-local-2.2.0/SCons/dblite.py similarity index 100% rename from scons/scons-local-2.1.0/SCons/dblite.py rename to scons/scons-local-2.2.0/SCons/dblite.py diff --git a/scons/scons-local-2.1.0/SCons/exitfuncs.py b/scons/scons-local-2.2.0/SCons/exitfuncs.py similarity index 94% rename from scons/scons-local-2.1.0/SCons/exitfuncs.py rename to scons/scons-local-2.2.0/SCons/exitfuncs.py index 7dd2bfe29..4e604e193 100644 --- a/scons/scons-local-2.1.0/SCons/exitfuncs.py +++ b/scons/scons-local-2.2.0/SCons/exitfuncs.py @@ -5,7 +5,7 @@ Register functions which are executed when SCons exits for any reason. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -27,7 +27,7 @@ Register functions which are executed when SCons exits for any reason. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/exitfuncs.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/engine/SCons/exitfuncs.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" diff --git a/scons/scons-local-2.1.0/scons-2.1.0.egg-info b/scons/scons-local-2.2.0/scons-2.2.0.egg-info similarity index 96% rename from scons/scons-local-2.1.0/scons-2.1.0.egg-info rename to scons/scons-local-2.2.0/scons-2.2.0.egg-info index 5f658bcbf..b8f8d5e88 100644 --- a/scons/scons-local-2.1.0/scons-2.1.0.egg-info +++ b/scons/scons-local-2.2.0/scons-2.2.0.egg-info @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: scons -Version: 2.1.0 +Version: 2.2.0 Summary: Open Source next-generation build tool. Home-page: http://www.scons.org/ Author: Steven Knight diff --git a/scons/scons-time.py b/scons/scons-time.py index ace2d850c..1d774cb22 100755 --- a/scons/scons-time.py +++ b/scons/scons-time.py @@ -9,7 +9,7 @@ # # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -32,7 +32,7 @@ from __future__ import division from __future__ import nested_scopes -__revision__ = "src/script/scons-time.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/script/scons-time.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" import getopt import glob diff --git a/scons/scons.py b/scons/scons.py index 0e5b8ecf9..24686385c 100755 --- a/scons/scons.py +++ b/scons/scons.py @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -23,17 +23,17 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/script/scons.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/script/scons.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" -__version__ = "2.1.0" +__version__ = "2.2.0" -__build__ = "r5357[MODIFIED]" +__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]" -__buildsys__ = "ubuntu" +__buildsys__ = "oberbrunner-dev" -__date__ = "2011/09/09 21:31:03" +__date__ = "2012/08/05 15:38:28" -__developer__ = "bdeegan" +__developer__ = "garyo" import os import sys diff --git a/scons/sconsign.py b/scons/sconsign.py index 4debf043c..6e8df4e94 100755 --- a/scons/sconsign.py +++ b/scons/sconsign.py @@ -2,7 +2,7 @@ # # SCons - a Software Constructor # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation # # Permission is hereby granted, free of charge, to any person obtaining # a copy of this software and associated documentation files (the @@ -23,17 +23,17 @@ # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -__revision__ = "src/script/sconsign.py 5357 2011/09/09 21:31:03 bdeegan" +__revision__ = "src/script/sconsign.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" -__version__ = "2.1.0" +__version__ = "2.2.0" -__build__ = "r5357[MODIFIED]" +__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]" -__buildsys__ = "ubuntu" +__buildsys__ = "oberbrunner-dev" -__date__ = "2011/09/09 21:31:03" +__date__ = "2012/08/05 15:38:28" -__developer__ = "bdeegan" +__developer__ = "garyo" import os import sys From ecb72d6cbc560bfea12c9114aff4d20fb5445a24 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 16 Aug 2012 10:00:05 -0700 Subject: [PATCH 40/75] scons: don't run parseconfig if uninstalling --- bindings/python/build.py | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/bindings/python/build.py b/bindings/python/build.py index 646b2eeaf..254d5d590 100644 --- a/bindings/python/build.py +++ b/bindings/python/build.py @@ -143,8 +143,14 @@ try: os.chmod('mapnik/paths.py',0666) except: pass -# install the core mapnik python files, including '__init__.py' +# install the shared object beside the module directory +sources = glob.glob('*.cpp') + +py_env = env.Clone() +py_env.Append(CPPPATH = env['PYTHON_INCLUDES']) + if 'install' in COMMAND_LINE_TARGETS: + # install the core mapnik python files, including '__init__.py' init_files = glob.glob('mapnik/*.py') if 'mapnik/paths.py' in init_files: init_files.remove('mapnik/paths.py') @@ -154,8 +160,7 @@ if 'install' in COMMAND_LINE_TARGETS: init_mapnik2 = env.Install(target_path_deprecated, 'mapnik2/__init__.py') env.Alias(target='install', source=init_mapnik2) -# fix perms and install the custom generated 'paths.py' -if 'install' in COMMAND_LINE_TARGETS: + # fix perms and install the custom generated 'paths.py' targetp = os.path.join(target_path,'paths.py') env.Alias("install", targetp) # use env.Command rather than env.Install @@ -166,22 +171,16 @@ if 'install' in COMMAND_LINE_TARGETS: Chmod("$TARGET", 0644), ]) +if 'uninstall' not in COMMAND_LINE_TARGETS: + if env['HAS_CAIRO']: + py_env.Append(CPPPATH = env['CAIROMM_CPPPATHS']) + py_env.Append(CXXFLAGS = '-DHAVE_CAIRO') + if env['PLATFORM'] == 'Darwin': + py_env.Append(LIBS=env['CAIROMM_LINKFLAGS']) -# install the shared object beside the module directory -sources = glob.glob('*.cpp') - -py_env = env.Clone() -py_env.Append(CPPPATH = env['PYTHON_INCLUDES']) - -if env['HAS_CAIRO']: - py_env.Append(CPPPATH = env['CAIROMM_CPPPATHS']) - py_env.Append(CXXFLAGS = '-DHAVE_CAIRO') - if env['PLATFORM'] == 'Darwin': - py_env.Append(LIBS=env['CAIROMM_LINKFLAGS']) - -if env['HAS_PYCAIRO']: - py_env.ParseConfig('pkg-config --cflags pycairo') - py_env.Append(CXXFLAGS = '-DHAVE_PYCAIRO') + if env['HAS_PYCAIRO']: + py_env.ParseConfig('pkg-config --cflags pycairo') + py_env.Append(CXXFLAGS = '-DHAVE_PYCAIRO') libraries.append('boost_thread%s' % env['BOOST_APPEND']) _mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LIBS=libraries, LDMODULEPREFIX='', LDMODULESUFFIX='.so',LINKFLAGS=linkflags) @@ -193,7 +192,7 @@ if env['PLATFORM'] == 'SunOS' and env['PYTHON_IS_64BIT']: cxx_module_path = os.path.join(target_path,'64') else: cxx_module_path = target_path - + if 'uninstall' not in COMMAND_LINE_TARGETS: pymapniklib = env.Install(cxx_module_path,_mapnik) py_env.Alias(target='install',source=pymapniklib) From 53685f3f9920eebb1efdc520582ae8c97d8f9778 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 16 Aug 2012 10:05:34 -0700 Subject: [PATCH 41/75] scons: create working uninstall target for fonts --- SConstruct | 1 - fonts/build.py | 6 +++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SConstruct b/SConstruct index e5db708b4..032a15943 100644 --- a/SConstruct +++ b/SConstruct @@ -1696,7 +1696,6 @@ if not HELP_REQUESTED: create_uninstall_target(env, env['MAPNIK_LIB_DIR_DEST'], False) create_uninstall_target(env, env['MAPNIK_INPUT_PLUGINS_DEST'] , False) - create_uninstall_target(env, env['MAPNIK_INPUT_PLUGINS_DEST'] , False) # before installing plugins, wipe out any previously # installed plugins that we are no longer building diff --git a/fonts/build.py b/fonts/build.py index 99acaaae1..e90529301 100644 --- a/fonts/build.py +++ b/fonts/build.py @@ -28,5 +28,9 @@ includes = glob.glob('*/*/*.ttf') # grab single unifont ttf (available at http://unifoundry.com/unifont.html) includes.extend(glob.glob('unifont*.ttf')) +target_path = env['MAPNIK_FONTS_DEST'] + if 'uninstall' not in COMMAND_LINE_TARGETS and not env['SYSTEM_FONTS']: - env.Alias(target='install', source=env.Install(env['MAPNIK_FONTS_DEST'], includes)) + env.Alias(target='install', source=env.Install(target_path, includes)) + +env['create_uninstall_target'](env, target_path) \ No newline at end of file From a2d6c55478e748929761c2853c6c214f61963a86 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 16 Aug 2012 10:26:39 -0700 Subject: [PATCH 42/75] tests: assume script running "paths_relative_to_script" is in the root mapnik dir not the tests dir --- tests/data/good_maps/paths_relative_to_script.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/good_maps/paths_relative_to_script.xml b/tests/data/good_maps/paths_relative_to_script.xml index b096f3fc4..0a40bf292 100644 --- a/tests/data/good_maps/paths_relative_to_script.xml +++ b/tests/data/good_maps/paths_relative_to_script.xml @@ -2,7 +2,7 @@ - ../data/shp/poly.shp + tests/data/shp/poly.shp shape From d850ee8b76ff44a5dd70fc545e04726c7487d1de Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 16 Aug 2012 12:27:58 -0700 Subject: [PATCH 43/75] correct various old trac links to point to github - closes #1396 --- CHANGELOG.md | 4 +-- INSTALL.md | 35 ++++++------------- SConstruct | 22 ++++++------ bindings/python/build.py | 4 +-- plugins/input/occi/occi_featureset.cpp | 2 -- src/box2d.cpp | 2 +- src/image_scaling.cpp | 2 +- tests/data/good_maps/datasource.xml | 2 +- tests/data/good_maps/filesource.xml | 2 +- .../point_symbolizer_on_polygon_map.xml | 4 +-- tests/data/good_maps/polygon_symbolizer.xml | 2 +- tests/data/good_maps/sqlite_attachdb.xml | 2 +- utils/upgrade_map_xml/upgrade_map_xml.py | 2 +- 13 files changed, 34 insertions(+), 51 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a61da5f6..63bcea19b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -135,7 +135,7 @@ Released September 26, 2011 - Add support for png quantization using fixed palettes (#843) -- Add AlsoFilter functionality - http://trac.mapnik.org/wiki/AlsoFilter +- Add AlsoFilter functionality - https://github.com/mapnik/mapnik/wiki/AlsoFilter - SQLite Plugin: optimize i/o using shared cache and no mutexes (#797) @@ -224,7 +224,7 @@ Released Oct 18, 2011 (Packaged from bc5cabeb6a) -- Added forward compatibility for Mapnik 2.0 XML syntax (https://trac.mapnik.org/wiki/Mapnik2/Changes) +- Added forward compatibility for Mapnik 2.0 XML syntax (https://github.com/mapnik/mapnik/wiki/Mapnik2/Changes) - Build fixes to ensure boost_threads are not used unless THREADING=multi build option is used diff --git a/INSTALL.md b/INSTALL.md index d525be56a..c9e46de45 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -15,9 +15,9 @@ If you need to uninstall do: For more details see the 'Building' Section below. -Platform specific install guides at http://trac.mapnik.org/wiki/MapnikInstallation +Platform specific install guides at https://github.com/mapnik/mapnik/wiki/Mapnik-Installation -For troubleshooting help see http://trac.mapnik.org/wiki/InstallationTroubleshooting +For troubleshooting help see https://github.com/mapnik/mapnik/wiki/InstallationTroubleshooting ## Depends @@ -26,7 +26,7 @@ Mapnik is cross platform and runs on Linux, Mac OSX, Solaris, *BSD, and Windows. The build system should work for all posix/unix systems but for windows see: - http://trac.mapnik.org/wiki/BuildingOnWindows + https://github.com/mapnik/mapnik/wiki/BuildingOnWindows Build dependencies are: @@ -74,7 +74,7 @@ Optional dependencies: Instructions for installing many of these dependencies on various platforms can be found at the Mapnik Community Wiki -(http://trac.mapnik.org/wiki/MapnikInstallation). +(https://github.com/mapnik/mapnik/wiki/Mapnik-Installation). @@ -124,7 +124,7 @@ If you want to see configure options do: For more details on all the options see: - http://trac.mapnik.org/wiki/UsingScons + https://github.com/mapnik/mapnik/wiki/UsingScons ## Testing Installation @@ -155,11 +155,11 @@ For further tests see the `tests` folder within the Mapnik source code. ### Users -Visit http://trac.mapnik.org/wiki/LearningMapnik for basic tutorials on making maps with Mapnik using the Python bindings. +Visit https://github.com/mapnik/mapnik/wiki/LearningMapnik for basic tutorials on making maps with Mapnik using the Python bindings. ### Developers -Visit http://trac.mapnik.org/#DevelopersCorner for resources for getting involved with Mapnik development. +Read docs/contributing.markdown for resources for getting involved with Mapnik development. ## Mapnik Community @@ -168,22 +168,7 @@ Visit http://trac.mapnik.org/#DevelopersCorner for resources for getting involve Mapnik has an active community of talented users and developers making amazing maps. -If you are looking for further help on installation or usage and you can't -find what you are looking for from searching the users list archives -(http://lists.berlios.de/pipermail/mapnik-users/) or the trac wiki -(http://trac.mapnik.org/), feel free to join the Mapnik community and -introduce yourself. +Please feel free to subscribe to the community list and post on both +usage and development topics: http://mapnik.org/contact/ -You can get involved by: - - * Subscribing to the mapnik-users list: - - http://lists.berlios.de/mailman/listinfo/mapnik-users - - * Subscribing to the mapnik-developers list: - - http://lists.berlios.de/mailman/listinfo/mapnik-devel - - * Joining the #mapnik channel on irc://irc.freenode.net/mapnik - - * Signing up as a user or contributor at http://www.ohloh.net/p/mapnik/ +You can also get involved by joining the #mapnik channel on irc://irc.freenode.net/mapnik diff --git a/SConstruct b/SConstruct index e5db708b4..177354f8a 100644 --- a/SConstruct +++ b/SConstruct @@ -54,17 +54,17 @@ DEFAULT_LINK_PRIORITY = ['internal','other','frameworks','user','system'] pretty_dep_names = { - 'ociei':'Oracle database library | configure with OCCI_LIBS & OCCI_INCLUDES | more info: http://trac.mapnik.org/wiki/OCCI', - 'gdal':'GDAL C++ library | configured using gdal-config program | try setting GDAL_CONFIG SCons option | more info: http://trac.mapnik.org/wiki/GDAL', - 'ogr':'OGR-enabled GDAL C++ Library | configured using gdal-config program | try setting GDAL_CONFIG SCons option | more info: http://trac.mapnik.org/wiki/OGR', - 'geos_c':'GEOS Simple Geometry Specification C Library | configured with GEOS_LIB & GEOS_INCLUDE | more info: http://trac.mapnik.org/wiki/GEOS', + 'ociei':'Oracle database library | configure with OCCI_LIBS & OCCI_INCLUDES | more info: https://github.com/mapnik/mapnik/wiki//OCCI', + 'gdal':'GDAL C++ library | configured using gdal-config program | try setting GDAL_CONFIG SCons option | more info: https://github.com/mapnik/mapnik/wiki/GDAL', + 'ogr':'OGR-enabled GDAL C++ Library | configured using gdal-config program | try setting GDAL_CONFIG SCons option | more info: https://github.com/mapnik/mapnik/wiki//OGR', + 'geos_c':'GEOS Simple Geometry Specification C Library | configured with GEOS_LIB & GEOS_INCLUDE | more info: https://github.com/mapnik/mapnik/wiki//GEOS', 'cairo':'Cairo C library | configured using pkg-config | try setting PKG_CONFIG_PATH SCons option', 'cairomm':'Cairomm C++ bindings to Cairo library | configured using pkg-config | try setting PKG_CONFIG_PATH SCons option', 'cairomm-version':'Cairomm version is too old (so cairo renderer will not be built), you need at least %s' % CAIROMM_MIN_VERSION, 'pycairo':'Python bindings to Cairo library | configured using pkg-config | try setting PKG_CONFIG_PATH SCons option', 'proj':'Proj.4 C Projections library | configure with PROJ_LIBS & PROJ_INCLUDES | more info: http://trac.osgeo.org/proj/', - 'pg':'Postgres C Library requiered for PostGIS plugin | configure with pg_config program | more info: http://trac.mapnik.org/wiki/PostGIS', - 'sqlite3':'SQLite3 C Library | configure with SQLITE_LIBS & SQLITE_INCLUDES | more info: http://trac.mapnik.org/wiki/SQLite', + 'pg':'Postgres C Library requiered for PostGIS plugin | configure with pg_config program | more info: https://github.com/mapnik/mapnik/wiki//PostGIS', + 'sqlite3':'SQLite3 C Library | configure with SQLITE_LIBS & SQLITE_INCLUDES | more info: https://github.com/mapnik/mapnik/wiki//SQLite', 'jpeg':'JPEG C library | configure with JPEG_LIBS & JPEG_INCLUDES', 'tiff':'TIFF C library | configure with TIFF_LIBS & TIFF_INCLUDES', 'png':'PNG C library | configure with PNG_LIBS & PNG_INCLUDES', @@ -78,8 +78,8 @@ pretty_dep_names = { 'gdal-config':'gdal-config program | try setting GDAL_CONFIG SCons option', 'geos-config':'geos-config program | try setting GEOS_CONFIG SCons option', 'freetype-config':'freetype-config program | try setting FREETYPE_CONFIG SCons option', - 'osm':'more info: http://trac.mapnik.org/wiki/OsmPlugin', - 'curl':'libcurl is required for the "osm" plugin - more info: http://trac.mapnik.org/wiki/OsmPlugin', + 'osm':'more info: https://github.com/mapnik/mapnik/wiki//OsmPlugin', + 'curl':'libcurl is required for the "osm" plugin - more info: https://github.com/mapnik/mapnik/wiki//OsmPlugin', 'boost_regex_icu':'libboost_regex built with optional ICU unicode support is needed for unicode regex support in mapnik.', 'sqlite_rtree':'The SQLite plugin requires libsqlite3 built with RTREE support (-DSQLITE_ENABLE_RTREE=1)', 'pgsql2sqlite_rtree':'The pgsql2sqlite program requires libsqlite3 built with RTREE support (-DSQLITE_ENABLE_RTREE=1)' @@ -138,7 +138,7 @@ def call(cmd, silent=False): if not stderr: return stdin.strip() elif not silent: - color_print(1,'Problem encounted with SCons scripts, please post bug report to: http://trac.mapnik.org\nError was: %s' % stderr) + color_print(1,'Problem encounted with SCons scripts, please post bug report to: https://github.com/mapnik/mapnik/issues \nError was: %s' % stderr) def strip_first(string,find,replace=''): if string.startswith(find): @@ -244,7 +244,7 @@ def pretty_dep(dep): if pretty: return '%s (%s)' % (dep,pretty) elif 'boost' in dep: - return '%s (%s)' % (dep,'more info see: http://trac.mapnik.org/wiki/MapnikInstallation & http://www.boost.org') + return '%s (%s)' % (dep,'more info see: https://github.com/mapnik/mapnik/wiki//MapnikInstallation & http://www.boost.org') return dep @@ -1416,7 +1416,7 @@ if not preconfigured: color_print(4," $ sudo python scons/scons.py install") color_print(4,"\nTo view available path variables:\n $ python scons/scons.py --help or -h") color_print(4,'\nTo view overall SCons help options:\n $ python scons/scons.py --help-options or -H\n') - color_print(4,'More info: http://trac.mapnik.org/wiki/MapnikInstallation') + color_print(4,'More info: https://github.com/mapnik/mapnik/wiki//MapnikInstallation') if not HELP_REQUESTED: Exit(1) else: diff --git a/bindings/python/build.py b/bindings/python/build.py index 646b2eeaf..75b546cb8 100644 --- a/bindings/python/build.py +++ b/bindings/python/build.py @@ -65,7 +65,7 @@ if env['PLATFORM'] == 'Darwin': # 3) the below will directly link _mapnik.so to a python version # 4) _mapnik.so must link to the same python lib as boost_python.dylib otherwise # python will Abort with a Version Mismatch error. - # See http://trac.mapnik.org/ticket/453 for the seeds of a better approach + # See https://github.com/mapnik/mapnik/issues/453 for the seeds of a better approach # for now we offer control over method of direct linking... # The default below is to link against the python dylib in the form of #/path/to/Python.framework/Python instead of -lpython @@ -86,7 +86,7 @@ if env['PLATFORM'] == 'Darwin': # /System/Library/Frameworks/Python.framework/Python/Versions/ # or # /Library/Frameworks/Python.framework/Python/Versions/ - # See: http://trac.mapnik.org/ticket/380 + # See: https://github.com/mapnik/mapnik/issues/380 link_prefix = env['PYTHON_SYS_PREFIX'] if '.framework' in link_prefix: python_link_flag = '-F%s -framework Python -Z' % os.path.dirname(link_prefix.split('.')[0]) diff --git a/plugins/input/occi/occi_featureset.cpp b/plugins/input/occi/occi_featureset.cpp index 8717f6e73..b8dcb7c4d 100644 --- a/plugins/input/occi/occi_featureset.cpp +++ b/plugins/input/occi/occi_featureset.cpp @@ -287,8 +287,6 @@ void occi_featureset::convert_geometry(SDOGeometry* geom, feature_ptr feature) { const bool is_single_geom = false; const bool is_point_type = true; - - // FIXME :http://trac.mapnik.org/ticket/458 convert_ordinates(feature, mapnik::Point, elem_info, diff --git a/src/box2d.cpp b/src/box2d.cpp index faa2ef4c9..170c2aa51 100644 --- a/src/box2d.cpp +++ b/src/box2d.cpp @@ -59,7 +59,7 @@ box2d::box2d(const box2d &rhs) maxx_(rhs.maxx_), maxy_(rhs.maxy_) {} // copy rather than init so dfl ctor (0,0,-1,-1) is not modified -// http://trac.mapnik.org/ticket/749 +// https://github.com/mapnik/mapnik/issues/749 /*{ init(rhs.minx_,rhs.miny_,rhs.maxx_,rhs.maxy_); }*/ diff --git a/src/image_scaling.cpp b/src/image_scaling.cpp index 2e5961751..32b2d6e5c 100644 --- a/src/image_scaling.cpp +++ b/src/image_scaling.cpp @@ -89,7 +89,7 @@ boost::optional scaling_method_to_string(scaling_method_e scaling_m return mode; } -// this has been replaced by agg impl - see https://trac.mapnik.org/ticket/656 +// this has been replaced by agg impl - see https://github.com/mapnik/mapnik/issues/656 template void scale_image_bilinear_old (Image & target,Image const& source, double x_off_f, double y_off_f) { diff --git a/tests/data/good_maps/datasource.xml b/tests/data/good_maps/datasource.xml index 64a90bbb3..87c705734 100644 --- a/tests/data/good_maps/datasource.xml +++ b/tests/data/good_maps/datasource.xml @@ -1,4 +1,4 @@ - + Date: Thu, 16 Aug 2012 19:29:07 -0700 Subject: [PATCH 64/75] fix test --- tests/data/good_maps/raster-alpha.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/data/good_maps/raster-alpha.xml b/tests/data/good_maps/raster-alpha.xml index 46fa472e9..ab643c7aa 100644 --- a/tests/data/good_maps/raster-alpha.xml +++ b/tests/data/good_maps/raster-alpha.xml @@ -4,7 +4,7 @@ Date: Fri, 17 Aug 2012 11:25:21 +0100 Subject: [PATCH 65/75] + json: split feature_grammar into geometry and feature grammars --- include/mapnik/json/feature_grammar.hpp | 78 +---------- include/mapnik/json/geometry_grammar.hpp | 132 +++++++++++++++++++ src/build.py | 1 + src/json/feature_grammar.cpp | 84 +----------- src/json/geometry_grammar.cpp | 161 +++++++++++++++++++++++ 5 files changed, 297 insertions(+), 159 deletions(-) create mode 100644 include/mapnik/json/geometry_grammar.hpp create mode 100644 src/json/geometry_grammar.cpp diff --git a/include/mapnik/json/feature_grammar.hpp b/include/mapnik/json/feature_grammar.hpp index d8fe1bab3..13c11e836 100644 --- a/include/mapnik/json/feature_grammar.hpp +++ b/include/mapnik/json/feature_grammar.hpp @@ -24,7 +24,7 @@ #define MAPNIK_FEATURE_GRAMMAR_HPP // mapnik -#include +#include #include // spirit::qi @@ -100,53 +100,6 @@ struct extract_geometry } }; -struct push_vertex -{ - template - struct result - { - typedef void type; - }; - - template - void operator() (T0 c, T1 path, T2 x, T3 y) const - { - BOOST_ASSERT( path!=0 ); - path->push_vertex(x,y,c); - } -}; - -struct close_path -{ - template - struct result - { - typedef void type; - }; - - template - void operator() (T path) const - { - BOOST_ASSERT( path!=0 ); - path->close(); - } -}; - -struct cleanup -{ - template - struct result - { - typedef void type; - }; - - template - void operator() (T0 & path) const - { - if (path) delete path, path=0; - } -}; - template struct feature_grammar : qi::grammar feature; // START qi::rule feature_type; - // Nabialek trick ////////////////////////////////////// - //typedef typename qi::rule dispatch_rule; - //qi::rule, void(FeatureType&),space_type> geometry; - //qi::symbols geometry_dispatch; - //////////////////////////////////////////////////////// - - qi::rule, void(FeatureType&),space_type> geometry; - qi::symbols geometry_dispatch; - - qi::rule point; - qi::rule,void(geometry_type*),space_type> points; - qi::rule coordinates; - // - qi::rule, - void(boost::ptr_vector& ),space_type> point_coordinates; - qi::rule, - void(boost::ptr_vector& ),space_type> linestring_coordinates; - qi::rule, - void(boost::ptr_vector& ),space_type> polygon_coordinates; - - qi::rule& ),space_type> multipoint_coordinates; - qi::rule& ),space_type> multilinestring_coordinates; - qi::rule& ),space_type> multipolygon_coordinates; - qi::rule geometry_collection; - qi::rule properties; qi::rule, void(FeatureType &),space_type> attributes; qi::rule(), space_type> attribute_value; phoenix::function put_property_; phoenix::function extract_geometry_; - boost::phoenix::function push_vertex_; - boost::phoenix::function close_path_; - boost::phoenix::function cleanup_; + geometry_grammar geometry_grammar_; }; }} diff --git a/include/mapnik/json/geometry_grammar.hpp b/include/mapnik/json/geometry_grammar.hpp new file mode 100644 index 000000000..6792725d0 --- /dev/null +++ b/include/mapnik/json/geometry_grammar.hpp @@ -0,0 +1,132 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2012 Artem Pavlenko + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#ifndef MAPNIK_GEOMETRY_GRAMMAR_HPP +#define MAPNIK_GEOMETRY_GRAMMAR_HPP + +// mapnik +#include + +// spirit::qi +#include +#include +#include +#include +#include + +// stl +#include + +namespace mapnik { namespace json { + +namespace qi = boost::spirit::qi; +namespace phoenix = boost::phoenix; +namespace fusion = boost::fusion; +namespace standard_wide = boost::spirit::standard_wide; +using standard_wide::space_type; + +struct push_vertex +{ + template + struct result + { + typedef void type; + }; + + template + void operator() (T0 c, T1 path, T2 x, T3 y) const + { + BOOST_ASSERT( path!=0 ); + path->push_vertex(x,y,c); + } +}; + +struct close_path +{ + template + struct result + { + typedef void type; + }; + + template + void operator() (T path) const + { + BOOST_ASSERT( path!=0 ); + path->close(); + } +}; + +struct cleanup +{ + template + struct result + { + typedef void type; + }; + + template + void operator() (T0 & path) const + { + if (path) delete path, path=0; + } +}; + +template +struct geometry_grammar : + qi::grammar, void(boost::ptr_vector& ) + , space_type> +{ + geometry_grammar(); + qi::rule, void(boost::ptr_vector& ),space_type> geometry; + qi::symbols geometry_dispatch; + + qi::rule point; + qi::rule,void(geometry_type*),space_type> points; + qi::rule&,int),space_type> coordinates; + // + qi::rule, + void(boost::ptr_vector& ),space_type> point_coordinates; + qi::rule, + void(boost::ptr_vector& ),space_type> linestring_coordinates; + qi::rule, + void(boost::ptr_vector& ),space_type> polygon_coordinates; + + qi::rule& ),space_type> multipoint_coordinates; + qi::rule& ),space_type> multilinestring_coordinates; + qi::rule& ),space_type> multipolygon_coordinates; + qi::rule& ),space_type> geometry_collection; + + // Nabialek trick ////////////////////////////////////// + //typedef typename qi::rule dispatch_rule; + //qi::rule, void(FeatureType&),space_type> geometry; + //qi::symbols geometry_dispatch; + //////////////////////////////////////////////////////// + + boost::phoenix::function push_vertex_; + boost::phoenix::function close_path_; + boost::phoenix::function cleanup_; +}; + +}} + +#endif // MAPNIK_GEOMETRY_GRAMMAR_HPP diff --git a/src/build.py b/src/build.py index e7ad66085..2dd6e82cb 100644 --- a/src/build.py +++ b/src/build.py @@ -166,6 +166,7 @@ source = Split( svg_points_parser.cpp svg_transform_parser.cpp warp.cpp + json/geometry_grammar.cpp json/feature_grammar.cpp json/feature_collection_parser.cpp json/geojson_generator.cpp diff --git a/src/json/feature_grammar.cpp b/src/json/feature_grammar.cpp index 6027d0e85..b09a8ba70 100644 --- a/src/json/feature_grammar.cpp +++ b/src/json/feature_grammar.cpp @@ -121,7 +121,7 @@ feature_grammar::feature_grammar(mapnik::transcoder const& ; feature = lit('{') - >> (feature_type | (lit("\"geometry\"") > lit(':') > geometry(_r1)) | properties(_r1) | key_value) % lit(',') + >> (feature_type | (lit("\"geometry\"") > lit(':') > geometry_grammar_(extract_geometry_(_r1))) | properties(_r1) | key_value) % lit(',') >> lit('}') ; @@ -134,89 +134,7 @@ feature_grammar::feature_grammar(mapnik::transcoder const& attribute_value %= number | string_ ; - // Nabialek trick - FIXME: how to bind argument to dispatch rule? - // geometry = lit("\"geometry\"") - // >> lit(':') >> lit('{') - // >> lit("\"type\"") >> lit(':') >> geometry_dispatch[_a = _1] - // >> lit(',') >> lit("\"coordinates\"") >> lit(':') - // >> qi::lazy(*_a) - // >> lit('}') - // ; - // geometry_dispatch.add - // ("\"Point\"",&point_coordinates) - // ("\"LineString\"",&linestring_coordinates) - // ("\"Polygon\"",&polygon_coordinates) - // ; - ////////////////////////////////////////////////////////////////// - geometry = (lit('{')[_a = 0 ] - >> lit("\"type\"") >> lit(':') >> geometry_dispatch[_a = _1] // <---- should be Nabialek trick! - >> lit(',') - >> (lit("\"coordinates\"") > lit(':') > coordinates(_r1,_a) - | - lit("\"geometries\"") > lit(':') - >> lit('[') >> geometry_collection(_r1) >> lit(']')) - >> lit('}')) - | lit("null") - ; - - geometry_dispatch.add - ("\"Point\"",1) - ("\"LineString\"",2) - ("\"Polygon\"",3) - ("\"MultiPoint\"",4) - ("\"MultiLineString\"",5) - ("\"MultiPolygon\"",6) - ("\"GeometryCollection\"",7) - // - ; - - coordinates = (eps(_r2 == 1) > point_coordinates(extract_geometry_(_r1))) - | (eps(_r2 == 2) > linestring_coordinates(extract_geometry_(_r1))) - | (eps(_r2 == 3) > polygon_coordinates(extract_geometry_(_r1))) - | (eps(_r2 == 4) > multipoint_coordinates(extract_geometry_(_r1))) - | (eps(_r2 == 5) > multilinestring_coordinates(extract_geometry_(_r1))) - | (eps(_r2 == 6) > multipolygon_coordinates(extract_geometry_(_r1))) - ; - - point_coordinates = eps[ _a = new_(Point) ] - > ( point(SEG_MOVETO,_a) [push_back(_r1,_a)] | eps[cleanup_(_a)][_pass = false] ) - ; - - linestring_coordinates = eps[ _a = new_(LineString)] - > -(points(_a) [push_back(_r1,_a)] - | eps[cleanup_(_a)][_pass = false]) - ; - - polygon_coordinates = eps[ _a = new_(Polygon) ] - > ((lit('[') - > -(points(_a)[close_path_(_a)] % lit(',')) - > lit(']')) [push_back(_r1,_a)] - | eps[cleanup_(_a)][_pass = false]) - ; - - multipoint_coordinates = lit('[') - > -(point_coordinates(_r1) % lit(',')) - > lit(']') - ; - - multilinestring_coordinates = lit('[') - > -(linestring_coordinates(_r1) % lit(',')) - > lit(']') - ; - - multipolygon_coordinates = lit('[') - > -(polygon_coordinates(_r1) % lit(',')) - > lit(']') - ; - - geometry_collection = *geometry(_r1) >> *(lit(',') >> geometry(_r1)) - ; - - // point - point = lit('[') > -((double_ > lit(',') > double_)[push_vertex_(_r1,_r2,_1,_2)]) > lit(']'); - // points - points = lit('[')[_a = SEG_MOVETO] > -(point (_a,_r1) % lit(',')[_a = SEG_LINETO]) > lit(']'); on_error ( feature diff --git a/src/json/geometry_grammar.cpp b/src/json/geometry_grammar.cpp new file mode 100644 index 000000000..e965c3a53 --- /dev/null +++ b/src/json/geometry_grammar.cpp @@ -0,0 +1,161 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2012 Artem Pavlenko + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#include +#if BOOST_VERSION >= 104700 + +// mapnik +#include + +// boost +#include + +namespace mapnik { namespace json { + +template +geometry_grammar::geometry_grammar() + : geometry_grammar::base_type(geometry,"geometry") +{ + + using qi::lit; + using qi::int_; + using qi::double_; + using qi::_val; + using qi::_1; + using qi::_2; + using qi::_3; + using qi::_4; + using qi::_a; + using qi::_b; + using qi::_r1; + using qi::_r2; + using qi::eps; + using qi::_pass; + using qi::fail; + using qi::on_error; + using phoenix::new_; + using phoenix::push_back; + using phoenix::construct; + // Nabialek trick - FIXME: how to bind argument to dispatch rule? + // geometry = lit("\"geometry\"") + // >> lit(':') >> lit('{') + // >> lit("\"type\"") >> lit(':') >> geometry_dispatch[_a = _1] + // >> lit(',') >> lit("\"coordinates\"") >> lit(':') + // >> qi::lazy(*_a) + // >> lit('}') + // ; + // geometry_dispatch.add + // ("\"Point\"",&point_coordinates) + // ("\"LineString\"",&linestring_coordinates) + // ("\"Polygon\"",&polygon_coordinates) + // ; + ////////////////////////////////////////////////////////////////// + + geometry = (lit('{')[_a = 0 ] + >> lit("\"type\"") >> lit(':') >> geometry_dispatch[_a = _1] // <---- should be Nabialek trick! + >> lit(',') + >> (lit("\"coordinates\"") > lit(':') > coordinates(_r1,_a) + | + lit("\"geometries\"") > lit(':') + >> lit('[') >> geometry_collection(_r1) >> lit(']')) + >> lit('}')) + | lit("null") + ; + + geometry_dispatch.add + ("\"Point\"",1) + ("\"LineString\"",2) + ("\"Polygon\"",3) + ("\"MultiPoint\"",4) + ("\"MultiLineString\"",5) + ("\"MultiPolygon\"",6) + ("\"GeometryCollection\"",7) + // + ; + + coordinates = (eps(_r2 == 1) > point_coordinates(_r1)) + | (eps(_r2 == 2) > linestring_coordinates(_r1)) + | (eps(_r2 == 3) > polygon_coordinates(_r1)) + | (eps(_r2 == 4) > multipoint_coordinates(_r1)) + | (eps(_r2 == 5) > multilinestring_coordinates(_r1)) + | (eps(_r2 == 6) > multipolygon_coordinates(_r1)) + ; + + point_coordinates = eps[ _a = new_(Point) ] + > ( point(SEG_MOVETO,_a) [push_back(_r1,_a)] | eps[cleanup_(_a)][_pass = false] ) + ; + + linestring_coordinates = eps[ _a = new_(LineString)] + > -(points(_a) [push_back(_r1,_a)] + | eps[cleanup_(_a)][_pass = false]) + ; + + polygon_coordinates = eps[ _a = new_(Polygon) ] + > ((lit('[') + > -(points(_a)[close_path_(_a)] % lit(',')) + > lit(']')) [push_back(_r1,_a)] + | eps[cleanup_(_a)][_pass = false]) + ; + + multipoint_coordinates = lit('[') + > -(point_coordinates(_r1) % lit(',')) + > lit(']') + ; + + multilinestring_coordinates = lit('[') + > -(linestring_coordinates(_r1) % lit(',')) + > lit(']') + ; + + multipolygon_coordinates = lit('[') + > -(polygon_coordinates(_r1) % lit(',')) + > lit(']') + ; + + geometry_collection = *geometry(_r1) >> *(lit(',') >> geometry(_r1)) + ; + + // point + point = lit('[') > -((double_ > lit(',') > double_)[push_vertex_(_r1,_r2,_1,_2)]) > lit(']'); + // points + points = lit('[')[_a = SEG_MOVETO] > -(point (_a,_r1) % lit(',')[_a = SEG_LINETO]) > lit(']'); + + // error handler + on_error + ( + geometry + , std::clog + << phoenix::val("Error! Expecting ") + << _4 // what failed? + << phoenix::val(" here: \"") + << construct(_3, _2) // iterators to error-pos, end + << phoenix::val("\"") + << std::endl + ); +} + +template struct mapnik::json::geometry_grammar; +template struct mapnik::json::geometry_grammar > >; + +}} + +#endif From 9810557cdcf0f47a1b6bfb727d09b13054831923 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 17 Aug 2012 12:47:41 +0100 Subject: [PATCH 66/75] + geojson geometry parser implementation --- include/mapnik/json/geometry_parser.hpp | 56 ++++++++++++++++++ src/build.py | 1 + src/json/geometry_parser.cpp | 78 +++++++++++++++++++++++++ 3 files changed, 135 insertions(+) create mode 100644 include/mapnik/json/geometry_parser.hpp create mode 100644 src/json/geometry_parser.cpp diff --git a/include/mapnik/json/geometry_parser.hpp b/include/mapnik/json/geometry_parser.hpp new file mode 100644 index 000000000..0ce71f562 --- /dev/null +++ b/include/mapnik/json/geometry_parser.hpp @@ -0,0 +1,56 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2012 Artem Pavlenko + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#ifndef MAPNIK_JSON_GEOMETRY_PARSER_HPP +#define MAPNIK_JSON_GEOMETRY_PARSER_HPP + +// mapnik +#include +#include + +// boost +#include +#include +// stl +//#include + +namespace mapnik { namespace json { + +template struct geometry_grammar; + +MAPNIK_DECL bool from_geojson(std::string const& json, boost::ptr_vector & paths); + +template +class geometry_parser : private boost::noncopyable +{ + typedef Iterator iterator_type; +public: + geometry_parser(); + ~geometry_parser(); + bool parse(iterator_type first, iterator_type last, boost::ptr_vector&); +private: + boost::scoped_ptr > grammar_; +}; + +}} + +#endif //MAPNIK_FEATURE_COLLECTION_PARSER_HPP diff --git a/src/build.py b/src/build.py index 2dd6e82cb..650fddbf0 100644 --- a/src/build.py +++ b/src/build.py @@ -167,6 +167,7 @@ source = Split( svg_transform_parser.cpp warp.cpp json/geometry_grammar.cpp + json/geometry_parser.cpp json/feature_grammar.cpp json/feature_collection_parser.cpp json/geojson_generator.cpp diff --git a/src/json/geometry_parser.cpp b/src/json/geometry_parser.cpp new file mode 100644 index 000000000..53c48ff73 --- /dev/null +++ b/src/json/geometry_parser.cpp @@ -0,0 +1,78 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2012 Artem Pavlenko + * + * This library 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 library 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 library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +// mapnik +#include +#include + +// boost +#include +#include +#include +#include + +namespace mapnik { namespace json { + +#if BOOST_VERSION >= 104700 + +template +geometry_parser::geometry_parser() + : grammar_(new geometry_grammar()) {} + +template +geometry_parser::~geometry_parser() {} +#endif + +template +bool geometry_parser::parse(iterator_type first, iterator_type last, boost::ptr_vector& path) +{ +#if BOOST_VERSION >= 104700 + using namespace boost::spirit; + return qi::phrase_parse(first, last, (*grammar_)(boost::phoenix::ref(path)), standard_wide::space); +#else + std::ostringstream s; + s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; + throw std::runtime_error("mapnik::geometry_parser::parse() requires at least boost 1.47 while your build was compiled against boost " + s.str()); + return false; +#endif +} + + +bool from_geojson(std::string const& json, boost::ptr_vector & paths) +{ +#if BOOST_VERSION >= 104700 + geometry_parser parser; + std::string::const_iterator start = json.begin(); + std::string::const_iterator end = json.end(); + return parser.parse(start, end ,paths); +#else + std::ostringstream s; + s << BOOST_VERSION/100000 << "." << BOOST_VERSION/100 % 1000 << "." << BOOST_VERSION % 100; + throw std::runtime_error("mapnik::json::from_geojson() requires at least boost 1.47 while your build was compiled against boost " + s.str()); + return false; +#endif +} + +template class geometry_parser ; +template class geometry_parser > >; + +}} From 258ea94d8df8446e167b66dc7e9123c91817d0e7 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 17 Aug 2012 12:48:41 +0100 Subject: [PATCH 67/75] + add_geojson and from_geojson methods + add_wkb,from_wkb throw RuntimeError + cleanups --- bindings/python/mapnik_geometry.cpp | 34 +++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/bindings/python/mapnik_geometry.cpp b/bindings/python/mapnik_geometry.cpp index 9369af058..7357c4b59 100644 --- a/bindings/python/mapnik_geometry.cpp +++ b/bindings/python/mapnik_geometry.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -56,27 +57,43 @@ geometry_type const& getitem_impl(path_type & p, int key) void add_wkt_impl(path_type& p, std::string const& wkt) { - bool result = mapnik::from_wkt(wkt , p); - if (!result) throw std::runtime_error("Failed to parse WKT"); + if (!mapnik::from_wkt(wkt , p)) + throw std::runtime_error("Failed to parse WKT"); } -bool add_wkb_impl(path_type& p, std::string const& wkb) +void add_wkb_impl(path_type& p, std::string const& wkb) { - return mapnik::geometry_utils::from_wkb(p, wkb.c_str(), wkb.size()); + if (!mapnik::geometry_utils::from_wkb(p, wkb.c_str(), wkb.size())) + throw std::runtime_error("Failed to parse WKB"); +} + +void add_geojson_impl(path_type& p, std::string const& json) +{ + if (!mapnik::json::from_geojson(json, p)) + throw std::runtime_error("Failed to parse geojson geometry"); } boost::shared_ptr from_wkt_impl(std::string const& wkt) { boost::shared_ptr paths = boost::make_shared(); - bool result = mapnik::from_wkt(wkt, *paths); - if (!result) throw std::runtime_error("Failed to parse WKT"); + if (!mapnik::from_wkt(wkt, *paths)) + throw std::runtime_error("Failed to parse WKT"); return paths; } boost::shared_ptr from_wkb_impl(std::string const& wkb) { boost::shared_ptr paths = boost::make_shared(); - mapnik::geometry_utils::from_wkb(*paths, wkb.c_str(), wkb.size()); + if (!mapnik::geometry_utils::from_wkb(*paths, wkb.c_str(), wkb.size())) + throw std::runtime_error("Failed to parse WKB"); + return paths; +} + +boost::shared_ptr from_geojson_impl(std::string const& json) +{ + boost::shared_ptr paths = boost::make_shared(); + if (! mapnik::json::from_geojson(json, *paths)) + throw std::runtime_error("Failed to parse geojson geometry"); return paths; } @@ -220,13 +237,16 @@ void export_geometry() .def("__len__", &path_type::size) .def("add_wkt",add_wkt_impl) .def("add_wkb",add_wkb_impl) + .def("add_geojson",add_geojson_impl) .def("to_wkt",&to_wkt2) .def("to_wkb",&to_wkb2) .def("from_wkt",from_wkt_impl) .def("from_wkb",from_wkb_impl) + .def("from_geojson",from_geojson_impl) .def("to_geojson",to_geojson) .staticmethod("from_wkt") .staticmethod("from_wkb") + .staticmethod("from_geojson") ; } From 45515e2b2de66f3a5d263851deb1215d608faaf5 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 17 Aug 2012 12:49:55 +0100 Subject: [PATCH 68/75] + it's a TIN (triangulated irregular network) not TIM :D + fixup wkb parsing test --- tests/python_tests/geometry_io_test.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/tests/python_tests/geometry_io_test.py b/tests/python_tests/geometry_io_test.py index d93b72605..c9a1f6bda 100644 --- a/tests/python_tests/geometry_io_test.py +++ b/tests/python_tests/geometry_io_test.py @@ -44,7 +44,7 @@ wkbs = [ [ 0, "MultiSurface EMPTY", '010C00000000000000'], [ 0, "PolyhedralSurface EMPTY", '010F00000000000000'], - [ 0, "TIM EMPTY", '011000000000000000'], + [ 0, "TIN EMPTY", '011000000000000000'], [ 0, "GEOMETRYCOLLECTION EMPTY", '010700000000000000'], [ 2, "GEOMETRYCOLLECTION(MULTILINESTRING((10 10,20 20,10 40),(40 40,30 30,40 20,30 10)),LINESTRING EMPTY)", '010700000002000000010500000002000000010200000003000000000000000000244000000000000024400000000000003440000000000000344000000000000024400000000000004440010200000004000000000000000000444000000000000044400000000000003e400000000000003e40000000000000444000000000000034400000000000003e400000000000002440010200000000000000' ], @@ -61,14 +61,15 @@ wkbs = [ ] def test_wkb_parsing(): + path = mapnik.Path() + count = 0 for wkb in wkbs: - path = mapnik.Path() - success = path.add_wkb(unhexlify(wkb[2])) - if wkb[0] > 0: - eq_(success,True) - else: - eq_(success,False) - eq_(wkb[0],len(path)) + count += wkb[0] + try : + path.add_wkb(unhexlify(wkb[2])) + except RuntimeError: + pass + eq_(count,len(path)) def compare_wkb_from_wkt(wkt,num=None): From b24c2efddc94f08684aa21ad894ac2fb301d7614 Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 17 Aug 2012 13:07:32 +0100 Subject: [PATCH 69/75] + add geojson geometry parsing test --- tests/python_tests/geometry_io_test.py | 27 ++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/tests/python_tests/geometry_io_test.py b/tests/python_tests/geometry_io_test.py index c9a1f6bda..f69c7061e 100644 --- a/tests/python_tests/geometry_io_test.py +++ b/tests/python_tests/geometry_io_test.py @@ -60,6 +60,22 @@ wkbs = [ [ 0, "0000", '0104' ], ] +geojson = [ +[1,'{"type":"Point","coordinates":[30.0,10.0]}'], +[1,'{"type":"Point","coordinates":[30.0,10.0]}'], +[1,'{"type":"Point","coordinates":[30.1,10.1]}'], +[1,'{"type":"LineString","coordinates":[[30.0,10.0],[10.0,30.0],[40.0,40.0]]}'], +[1,'{"type":"Polygon","coordinates":[[[30.0,10.0],[10.0,20.0],[20.0,40.0],[40.0,40.0],[30.0,10.0]]]}'], +[1,'{"type":"Polygon","coordinates":[[[35.0,10.0],[10.0,20.0],[15.0,40.0],[45.0,45.0],[35.0,10.0]],[[20.0,30.0],[35.0,35.0],[30.0,20.0],[20.0,30.0]]]}'], +[4,'{"type":"MultiPoint","coordinates":[[10.0,40.0],[40.0,30.0],[20.0,20.0],[30.0,10.0]]}'], +[2,'{"type":"MultiLineString","coordinates":[[[10.0,10.0],[20.0,20.0],[10.0,40.0]],[[40.0,40.0],[30.0,30.0],[40.0,20.0],[30.0,10.0]]]}'], +[2,'{"type":"MultiPolygon","coordinates":[[[[30.0,20.0],[10.0,40.0],[45.0,40.0],[30.0,20.0]]],[[[15.0,5.0],[40.0,10.0],[10.0,20.0],[5.0,10.0],[15.0,5.0]]]]}'], +[2,'{"type":"MultiPolygon","coordinates":[[[[40.0,40.0],[20.0,45.0],[45.0,30.0],[40.0,40.0]]],[[[20.0,35.0],[45.0,20.0],[30.0,5.0],[10.0,10.0],[10.0,30.0],[20.0,35.0]],[[30.0,20.0],[20.0,25.0],[20.0,15.0],[30.0,20.0]]]]}'], +[3,'{"type":"GeometryCollection","geometries":[{"type":"Polygon","coordinates":[[[1.0,1.0],[2.0,1.0],[2.0,2.0],[1.0,2.0],[1.0,1.0]]]},{"type":"Point","coordinates":[2.0,3.0]},{"type":"LineString","coordinates":[[2.0,3.0],[3.0,4.0]]}]}'], +[1,'{"type":"Polygon","coordinates":[[[-178.32319,71.518365],[-178.321586,71.518439],[-178.259635,71.510688],[-178.304862,71.513129],[-178.32319,71.518365]],[[-178.32319,71.518365],[-178.341544,71.517524],[-178.32244,71.505439],[-178.215323,71.478034],[-178.193473,71.47663],[-178.147757,71.485175],[-178.124442,71.481879],[-178.005729,71.448615],[-178.017203,71.441413],[-178.054191,71.428778],[-178.047049,71.425727],[-178.033439,71.417792],[-178.026236,71.415107],[-178.030082,71.413459],[-178.039908,71.40766],[-177.970878,71.39643],[-177.779837,71.333197],[-177.718375,71.305243],[-177.706412,71.3039],[-177.68212,71.304877],[-177.670279,71.301825],[-177.655387,71.293158],[-177.587577,71.285956],[-177.548575,71.294867],[-177.531119,71.296332],[-177.51409,71.293402],[-177.498649,71.284735],[-177.506217,71.268622],[-177.486991,71.258734],[-177.459708,71.249884],[-177.443412,71.237006],[-177.445914,71.222663],[-177.457755,71.209357],[-177.507804,71.173774],[-177.581168,71.147589],[-177.637626,71.117011],[-177.684134,71.110968],[-177.751883,71.092963],[-177.819266,71.084662],[-177.877677,71.052558],[-177.930472,71.041449],[-178.206595,71.038398],[-178.310111,71.013617],[-178.875907,70.981024],[-178.980277,70.95069],[-179.342093,70.908026],[-179.336234,70.911078],[-179.322257,70.921698],[-179.364493,70.930243],[-179.457511,70.915534],[-179.501212,70.919684],[-179.666007,70.965461],[-179.853385,70.979438],[-179.888785,70.993598],[-179.907523,70.996772],[-179.999989,70.992011],[-179.999989,71.024848],[-179.999989,71.058661],[-179.999989,71.126166],[-179.999989,71.187018],[-179.999989,71.224189],[-179.999989,71.27497],[-179.999989,71.312079],[-179.999989,71.356024],[-179.999989,71.410041],[-179.999989,71.487799],[-179.999989,71.536689],[-179.862845,71.538642],[-179.912223,71.555854],[-179.900748,71.558478],[-179.798819,71.569098],[-179.757438,71.583197],[-179.735953,71.586432],[-179.715445,71.583258],[-179.697501,71.577338],[-179.678702,71.573676],[-179.610831,71.585211],[-179.372062,71.569098],[-179.326774,71.555487],[-179.306815,71.557563],[-179.287162,71.562934],[-179.24285,71.569098],[-179.204642,71.583197],[-179.074576,71.600043],[-178.395438,71.539008],[-178.32319,71.518365]]]}'], +[2,'{"type":"MultiPolygon","coordinates":[[[[-178.32319,71.518365],[-178.321586,71.518439],[-178.259635,71.510688],[-178.304862,71.513129],[-178.32319,71.518365]]],[[[-178.32319,71.518365],[-178.341544,71.517524],[-178.32244,71.505439],[-178.215323,71.478034],[-178.193473,71.47663],[-178.147757,71.485175],[-178.124442,71.481879],[-178.005729,71.448615],[-178.017203,71.441413],[-178.054191,71.428778],[-178.047049,71.425727],[-178.033439,71.417792],[-178.026236,71.415107],[-178.030082,71.413459],[-178.039908,71.40766],[-177.970878,71.39643],[-177.779837,71.333197],[-177.718375,71.305243],[-177.706412,71.3039],[-177.68212,71.304877],[-177.670279,71.301825],[-177.655387,71.293158],[-177.587577,71.285956],[-177.548575,71.294867],[-177.531119,71.296332],[-177.51409,71.293402],[-177.498649,71.284735],[-177.506217,71.268622],[-177.486991,71.258734],[-177.459708,71.249884],[-177.443412,71.237006],[-177.445914,71.222663],[-177.457755,71.209357],[-177.507804,71.173774],[-177.581168,71.147589],[-177.637626,71.117011],[-177.684134,71.110968],[-177.751883,71.092963],[-177.819266,71.084662],[-177.877677,71.052558],[-177.930472,71.041449],[-178.206595,71.038398],[-178.310111,71.013617],[-178.875907,70.981024],[-178.980277,70.95069],[-179.342093,70.908026],[-179.336234,70.911078],[-179.322257,70.921698],[-179.364493,70.930243],[-179.457511,70.915534],[-179.501212,70.919684],[-179.666007,70.965461],[-179.853385,70.979438],[-179.888785,70.993598],[-179.907523,70.996772],[-179.999989,70.992011],[-179.999989,71.024848],[-179.999989,71.058661],[-179.999989,71.126166],[-179.999989,71.187018],[-179.999989,71.224189],[-179.999989,71.27497],[-179.999989,71.312079],[-179.999989,71.356024],[-179.999989,71.410041],[-179.999989,71.487799],[-179.999989,71.536689],[-179.862845,71.538642],[-179.912223,71.555854],[-179.900748,71.558478],[-179.798819,71.569098],[-179.757438,71.583197],[-179.735953,71.586432],[-179.715445,71.583258],[-179.697501,71.577338],[-179.678702,71.573676],[-179.610831,71.585211],[-179.372062,71.569098],[-179.326774,71.555487],[-179.306815,71.557563],[-179.287162,71.562934],[-179.24285,71.569098],[-179.204642,71.583197],[-179.074576,71.600043],[-178.395438,71.539008],[-178.32319,71.518365]]]]}']] + + def test_wkb_parsing(): path = mapnik.Path() count = 0 @@ -71,6 +87,17 @@ def test_wkb_parsing(): pass eq_(count,len(path)) +def test_geojson_parsing(): + path = mapnik.Path() + count = 0 + for json in geojson: + count += json[0] + try : + path.add_geojson(json[1]) + except RuntimeError: + pass + eq_(count,len(path)) + def compare_wkb_from_wkt(wkt,num=None): # create a Path from geometry(s) From f24641e80247eeb457a8d4df01c2870236167dcd Mon Sep 17 00:00:00 2001 From: artemp Date: Fri, 17 Aug 2012 16:53:43 +0100 Subject: [PATCH 70/75] + add envelope() method to mapnik.Path --- bindings/python/mapnik_geometry.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/bindings/python/mapnik_geometry.cpp b/bindings/python/mapnik_geometry.cpp index 7357c4b59..85dd99dee 100644 --- a/bindings/python/mapnik_geometry.cpp +++ b/bindings/python/mapnik_geometry.cpp @@ -97,6 +97,25 @@ boost::shared_ptr from_geojson_impl(std::string const& json) return paths; } +mapnik::box2d envelope_impl(path_type & p) +{ + mapnik::box2d b; + bool first = true; + BOOST_FOREACH(mapnik::geometry_type const& geom, p) + { + if (first) + { + b = geom.envelope(); + first=false; + } + else + { + b.expand_to_include(geom.envelope()); + } + } + return b; +} + } inline std::string boost_version() @@ -235,6 +254,7 @@ void export_geometry() class_, boost::noncopyable>("Path") .def("__getitem__", getitem_impl,return_value_policy()) .def("__len__", &path_type::size) + .def("envelope",envelope_impl) .def("add_wkt",add_wkt_impl) .def("add_wkb",add_wkb_impl) .def("add_geojson",add_geojson_impl) From aee29b27ed954e063b505d86acfbfce3ad9ac11a Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Aug 2012 08:57:49 -0700 Subject: [PATCH 71/75] only build geojson plugin if >= boost 1.47 is available to avoid potential compiler errors with missing boost/geometry headers if people try to force older boost versions --- plugins/input/geojson/build.py | 53 +++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/plugins/input/geojson/build.py b/plugins/input/geojson/build.py index 8bda87f45..f463862a1 100644 --- a/plugins/input/geojson/build.py +++ b/plugins/input/geojson/build.py @@ -19,33 +19,40 @@ # -Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +can_build = False -plugin_env = plugin_base.Clone() +if env.get('BOOST_LIB_VERSION_FROM_HEADER'): + boost_version_from_header = int(env['BOOST_LIB_VERSION_FROM_HEADER'].split('_')[1]) + if boost_version_from_header >= 47: + can_build = True -geojson_src = Split( - """ - geojson_datasource.cpp - geojson_featureset.cpp - """ - ) +if not can_build: + print 'WARNING: skipping building the optional geojson datasource plugin which requires boost >= 1.47' +else: + Import ('plugin_base') + prefix = env['PREFIX'] + plugin_env = plugin_base.Clone() + geojson_src = Split( + """ + geojson_datasource.cpp + geojson_featureset.cpp + """ + ) + libraries = [] + # Link Library to Dependencies + libraries.append('mapnik') + libraries.append(env['ICU_LIB_NAME']) + libraries.append('boost_system%s' % env['BOOST_APPEND']) + if env['THREADING'] == 'multi': + libraries.append('boost_thread%s' % env['BOOST_APPEND']) -libraries = [] -# Link Library to Dependencies -libraries.append('mapnik') -libraries.append(env['ICU_LIB_NAME']) -libraries.append('boost_system%s' % env['BOOST_APPEND']) -if env['THREADING'] == 'multi': - libraries.append('boost_thread%s' % env['BOOST_APPEND']) + input_plugin = plugin_env.SharedLibrary('../geojson', source=geojson_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) -input_plugin = plugin_env.SharedLibrary('../geojson', source=geojson_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) + # if the plugin links to libmapnik ensure it is built first + Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) - -if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], input_plugin) - env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], input_plugin) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) From 6c254999aee68b999a1d64338bfcc3381edf9e55 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Aug 2012 09:32:55 -0700 Subject: [PATCH 72/75] rundemo.cpp - no need to link to boost_program_options - closes #1406 --- demo/c++/build.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/demo/c++/build.py b/demo/c++/build.py index 9738347f9..ceb31448c 100644 --- a/demo/c++/build.py +++ b/demo/c++/build.py @@ -40,8 +40,7 @@ if env['HAS_CAIRO']: demo_env.Append(CXXFLAGS = '-DHAVE_CAIRO') libraries = copy(env['LIBMAPNIK_LIBS']) -boost_program_options = 'boost_program_options%s' % env['BOOST_APPEND'] -libraries.extend([boost_program_options,'mapnik']) +libraries.append('mapnik') rundemo = demo_env.Program('rundemo', source, LIBS=libraries, LINKFLAGS=env["CUSTOM_LDFLAGS"]) From 333ab9a37e9176df9efa4b47ecb6d8edb82b666a Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Aug 2012 09:37:08 -0700 Subject: [PATCH 73/75] only build pgsql2sqlite if boost_program_options is available --- SConstruct | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/SConstruct b/SConstruct index 66f89e0cd..2d5b057e1 100644 --- a/SConstruct +++ b/SConstruct @@ -1705,20 +1705,21 @@ if not HELP_REQUESTED: if env['DEMO']: SConscript('demo/c++/build.py') - # Build the pgsql2psqlite app if requested - if env['PGSQL2SQLITE']: - SConscript('utils/pgsql2sqlite/build.py') - # Build shapeindex and remove its dependency from the LIBS if 'boost_program_options%s' % env['BOOST_APPEND'] in env['LIBS']: SConscript('utils/shapeindex/build.py') + # Build the pgsql2psqlite app if requested + if env['PGSQL2SQLITE']: + SConscript('utils/pgsql2sqlite/build.py') + + SConscript('utils/svg2png/build.py') + # devtools not ready for public #SConscript('utils/ogrindex/build.py') - SConscript('utils/svg2png/build.py') env['LIBS'].remove('boost_program_options%s' % env['BOOST_APPEND']) else : - color_print(1,"WARNING: Cannot find boost_program_options. 'shapeindex' won't be available") + color_print(1,"WARNING: Cannot find boost_program_options. 'shapeindex' and other command line programs will not be available") # Build the Python bindings if 'python' in env['BINDINGS']: From 39b057e9e4c5c4c03e9ccb8c3dc17a220693e0d2 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Aug 2012 09:47:35 -0700 Subject: [PATCH 74/75] Add a demo makefile target --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 2fc853f9a..58b999acc 100755 --- a/Makefile +++ b/Makefile @@ -30,6 +30,10 @@ test: @echo "*** Running python tests..." @python tests/run_tests.py -q +demo: + @echo "*** Running rundemo.cpp…" + cd demo/c++; ./rundemo `mapnik-config --prefix`/lib/mapnik + pep8: # https://gist.github.com/1903033 # gsed on osx @@ -46,4 +50,4 @@ render: nik2img.py $${FILE} /tmp/$$(basename $${FILE}).png; \ done -.PHONY: clean reset uninstall test install +.PHONY: clean reset uninstall test install demo From 1454e3ea972764b95b3034f4848ccdab2a755f99 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 17 Aug 2012 09:47:47 -0700 Subject: [PATCH 75/75] nicer error message if python-nose is not installed --- tests/run_tests.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tests/run_tests.py b/tests/run_tests.py index 479a2830a..24db67b47 100755 --- a/tests/run_tests.py +++ b/tests/run_tests.py @@ -1,5 +1,13 @@ #!/usr/bin/env python +import sys + +try: + import nose +except ImportError: + sys.stderr.write("Unable to run python tests: the third party 'nose' module is required\nTo install 'nose' do:\n\tsudo pip install nose (or on debian systems: apt-get install python-nose\n") + sys.exit(1) + from python_tests.utilities import TodoPlugin from nose.plugins.doctests import Doctest