diff --git a/CHANGELOG.md b/CHANGELOG.md index b54510ea5..a2becf50a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,12 +6,104 @@ Developers: Please commit along with changes. For a complete change history, see the git log. -## Future +## 2.2.0 -- Added new mapnik-config options: `git-describe`, `defines`, `includes`, `dep-includes`, and `cxxflags` (#1443) +Released --- + +(Packaged from ---) + +Summary: The 2.2.0 release is the fastest running and most stable release in the history of Mapnik. The code line represents development in the master branch since the release of 2.1.0 in Aug 2012 and therefore includes nearly a year of bugfixes and low level optimizations. Shapefile and PostGIS datasources have benefited from numerous stability fixes, 64 bit integer support has been added to support OSM data, and many rendering fixes have landed for high quality output when using a rendering `scale_factor`. Many critical code paths have been optimized extensively include raster rendering, xml map loading, string to number conversion, vector reprojection when using `epsg:4326` and `epsg:3857`, `hextree` encoding, halo rendering, and rendering when using a custom `gamma`. Mapnik 2.2 also compiles faster than previous releases in the 2.x series and drops several unneeded and hard to install dependencies. + +- Removed 3 depedencies without loosing any functionality: `ltdl`, `cairomm` and `libsigc++` (#1804,#806,#1681) + +- Added 64 bit integer support in expressions, feature ids, and the grid_renderer (#1661,#1662,#1662) + +- Added the ability to disable the need for various dependencies: `proj4`, `libpng`, `libtiff`, `libjpeg` + +- Added faster reprojection support between `epsg:3857` and `epsg:4326` (#1705,#1703,#1579) + +- Fixed concurrency problem when using cursors in postgis plugin (#1823,#1588) + +- Fixed postgres connection pool leaks when using `persist_connection=false` (#1764) + +- Fixed postgres connection key to respect highest value of `max_size` and `initial_size` for any layer in map (#1599) + +- Fixed potential crash in wkb parsing when postgis returns null geometry (#1843) + +- Fixed blurry rendering of image and SVG icons (#1316) + +- Improved logging system (https://github.com/mapnik/mapnik/wiki/Logging) + +- Added support for reading images from in memory streams (#1805) + +- Optimized halo rendering. When halo radius is < 1 new method will be used automatically (#1781) - Added `text-halo-rasterizer` property. Set to `fast` for lower quality but faster - halo rendering (#1298) + halo rendering (#1298) which matched new default method when radius is < 1. + +- Added support in `shape`, `sqlite`, `geojson`, and `csv` plugin for handling non-latin characters in the paths to file-based resources (#1177) + +- Fixed rendering of markers when their size is greater than the specified `spacing` value (#1487) + +- Fixed handling of alpha premultiplication in image scaling (#1489) + +- Optimized rendering when a style with no symbolizers is encountered (#1517) + +- Optimized string handling and type conversion by removing `boost::to_lower`, `boost::trim`, and `boost::lexical_cast` usage (#1687,#1687,#1633) + +- Optimized alpha preserving `hextree` method for quantization of png images (#1629) + +- Faster rendering of rasters by reducing memory allocation of temporary buffers (#1516) + +- Fixed some raster reprojection artifacts (#1501) + +- Fixed raster alignment when width != height and raster is being scaled (#1748,#1622) + +- Added support for caching rasters for re-use during rendering when styling more than once per layer (#1543) + +- Improved compile speeds of the code - in some cases by up to 2x and removed need for freetype dependency when building code against mapnik (#1688, #1756) + +- Removed internal rule cache on `mapnik::Map` c++ object (#1723) + +- Improved the scaled rendering of various map features when using `scale_factor` > 1 (#1280,#1100,#1273,#1792,#1291,#1344,#1279,#1624,#1767,#1766) + +- Added C++ api for overriding scale_denominator to enable rendering at fixed scale (#1582) + +- Added Layer `buffer-size` that can be used to override Map `buffer-size` to avoid + over-fetching of data that does not need to be buffered as much as other layers. + Map level `buffer-size` will be default if layers do not set the option. Renamed a + previously undocumented parameter by the same name that impacted clipping extent and + was not needed (clipping padding should likely be a symbolizer level option) (#1566) + +- Fixed potential file descriptor leaks in image readers when invalid images were encountered (#1783) + +- Fixed alpha handling in the `blur` and `invert` image filters (#1541) + +- Fixed error reporting in the python plugin (#1422) + +- Added the ability to run tests without installing with `make test-local` + +- Reduced library binary size by adding support for `-fvisibility-inlines-hidden` and `-fvisibility=hidden` (#1826,#1832) + +- Added `mapnik::map_request` class, a special object to allow passing mutable map objects to renderer (#1737) + +- Added the ability to use `boost::hash` on `mapnik::value` types (#1729) + +- Removed obsolete `geos` plugin (functionality replaced by `csv` plugin) and unmaintained `kismet` plugin (#1809,#1833) + +- Added new `mapnik-config` flags: `--all-flags`, `--defines`, `--git-describe`, `--includes`, `--dep-includes`, `--cxxflags`, `--cxx` (#1443) + +- Added support for unicode strings as arguments in python bindings (#163) + +- Added DebugSymbolizer which is able to render the otherwise invisible collision boxes (#1366) + +- Optimized rendering by reducing overhead of using `gamma` property (#1174) + +- Fixed rendering artifacts when using `polygon-gamma` or `line-gamma` equal to 0 (#761,#1763) + +- Fixed and optimized the display of excessive precision of some float data in labels (#430,#1697) + +- Removed the `bind` option for datasources (#1654) - Added ability to access style list from map by (name,obj) in python (#1725) @@ -21,19 +113,11 @@ For a complete change history, see the git log. - Added support for `background-image` in cairo_renderer (#1724) -- Added Layer `buffer-size` that can be used to override Map `buffer-size` to avoid - over-fetching of data that does not need to be buffered as much as other layers. - Map level `buffer-size` will be default if layers do not set the option. Renamed a - previously undocumented parameter by the same name that impacted clipping extent and - was not needed (clipping padding should likely be a symbolizer level option) (#1566) - - Fixed building symbolizer rendering to be fully sensitive to alpha (8b66128c892 / bc8ea1c5a7a) -- Added 64 bit integer support in the grid_renderer (#1662) - - `[attr]` now returns false if attr is an empty string (#1665) -- Added 64 bit integer support in expressions and feature ids (#1661,#1662) +- `[attr]!=null` now returns true if attr is not null (#1642) - Added support for DBF `Logical` type: #1614 @@ -50,9 +134,7 @@ For a complete change history, see the git log. - Added support for setting zlib `Z_FIXED` strategy with format string: `png:z=fixed` -- Fixed handling of transparency level option in Octree-based PNG encoding (#1556) - -- Faster rendering of rasters by reducing memory allocation of temporary buffers (#1516) +- Fixed handling of transparency level option in `octree` png encoding (#1556) - Added ability to pass a pre-created collision detector to the cairo renderer (#1444) @@ -68,6 +150,24 @@ For a complete change history, see the git log. now the combined layer extents will be again respected: they will be clipped to the maximum-extent if possible and only when back-projecting fails for all layers will the maximum-extent be used as a fallback (#1473) +- Compile time flag called `PLUGIN_LINKING` to allow input datasource plugins to be statically linked with the mapnik library (#249) + +- Fixed `dasharray` rendering in cairo backend (#1740) + +- Fixed handling of `opacity` in svg rendering (#1744) + +- Fixed uneven rendering of markers along lines (#1693) + +- Fixed handling of extra bytes in some shapefile fields (#1605) + +- Fixed handling (finally) of null shapes and partially corrupt shapefiles (#1630,#1621) + +- Added ability to re-use `mapnik::image_32` and `mapnik::grid` by exposing a `clear` method (#1571) + +- Added support for writing RGB (no A) png images by using the format string of `png:t=0` (#1559) + +- Added experimental support for geometry simplification at symbolizer level (#1385) + ## Mapnik 2.1.0 Released Aug 23, 2012 @@ -215,7 +315,7 @@ Released April 10, 2012 - Workaround for boost interprocess compile error with recent gcc versions (#950,#1001,#1082) -- Fix possible memory corruption when using hextree mode for png color reduction (#1087) +- Fix possible memory corruption when using `hextree` mode for png color reduction (#1087) - Fixed bug in shield line placement when dx/dy are used to shift the label relative to the placement point (Matt Amos) (#908) @@ -395,14 +495,14 @@ Released March 23, 2010 - PNG: fixed png256 for large images and some improvements to reduce color corruptions ([#522](https://github.com/mapnik/mapnik/issues/522)) -- PNG: Added new quantization method for indexed png format using hextree with full support for alpha +- PNG: Added new quantization method for indexed png format using `hextree` with full support for alpha channel. Also new method has some optimizations for color gradients common when using elevation based - rasters. By default old method using octree is used. (r1680, r1683, [#477](https://github.com/mapnik/mapnik/issues/477)) + rasters. By default old method using `octree` is used. (r1680, r1683, [#477](https://github.com/mapnik/mapnik/issues/477)) - PNG: Added initial support for passing options to png writter like number of colors, transparency support, quantization method and possibly other in future using type parameter. For example "png8:c=128:t=1:m=h" limits palette to 128 colors, uses only binary transparency (0 - none, - 1 - binary, 2 - full), and new method of quantization using hextree (h - hextree, o - octree). + 1 - binary, 2 - full), and new method of quantization using `hextree` (h - `hextree`, o - `octree`). Existing type "png256" can be also written using "png8:c=256:m=o:t=2" (r1680, r1683, [#477](https://github.com/mapnik/mapnik/issues/477)) diff --git a/INSTALL.md b/INSTALL.md index fd5300cbf..156f9b3dc 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -65,7 +65,7 @@ Note: Python3k is supported, see: https://github.com/mapnik/mapnik/wiki/Python3k Optional dependencies: - * Cairo - Graphics library for output formats like PDF, PS, and SVG + * Cairo >= 1.6.0 - Graphics library for output formats like PDF, PS, and SVG - pkg-config - Required for building with cairo support - pycairo - Python bindings for cairo * libpq - PostgreSQL libraries (For PostGIS plugin support) diff --git a/SConstruct b/SConstruct index 5cba24449..2a52d5c87 100644 --- a/SConstruct +++ b/SConstruct @@ -22,6 +22,7 @@ import sys import re import platform from glob import glob +from copy import copy from subprocess import Popen, PIPE from SCons.SConf import SetCacheMode import pickle @@ -78,6 +79,7 @@ pretty_dep_names = { 'pkg-config':'pkg-config tool | more info: http://pkg-config.freedesktop.org', 'pg_config':'pg_config program | try setting PG_CONFIG SCons option', 'xml2-config':'xml2-config program | try setting XML2_CONFIG SCons option', + 'libxml2':'libxml2 library | try setting XML2_CONFIG SCons option to point to location of xml2-config program', 'gdal-config':'gdal-config program | try setting GDAL_CONFIG SCons option', 'freetype-config':'freetype-config program | try setting FREETYPE_CONFIG SCons option', 'osm':'more info: https://github.com/mapnik/mapnik/wiki//OsmPlugin', @@ -100,14 +102,14 @@ PLUGINS = { # plugins with external dependencies 'rasterlite': {'default':False,'path':'RASTERLITE','inc':['sqlite3.h','rasterlite.h'],'lib':'rasterlite','lang':'C'}, # todo: osm plugin does also depend on libxml2 (but there is a separate check for that) - 'osm': {'default':True,'path':None,'inc':'curl/curl.h','lib':'curl','lang':'C'}, + 'osm': {'default':False,'path':None,'inc':'curl/curl.h','lib':'curl','lang':'C'}, # plugins without external dependencies requiring CheckLibWithHeader... 'shape': {'default':True,'path':None,'inc':None,'lib':None,'lang':'C++'}, 'csv': {'default':True,'path':None,'inc':None,'lib':None,'lang':'C++'}, 'raster': {'default':True,'path':None,'inc':None,'lib':None,'lang':'C++'}, 'geojson': {'default':True,'path':None,'inc':None,'lib':None,'lang':'C++'}, - 'python': {'default':True,'path':None,'inc':None,'lib':None,'lang':'C++'}, + 'python': {'default':False,'path':None,'inc':None,'lib':None,'lang':'C++'}, } @@ -171,6 +173,10 @@ def shortest_name(libs): name = lib return name +def rm_path(item,set,_env): + for i in _env[set]: + if item in i: + _env[set].remove(i) def sort_paths(items,priority): """Sort paths such that compiling and linking will globally prefer custom or local libs @@ -308,8 +314,8 @@ opts.AddVariables( ('XML2_CONFIG', 'The path to the xml2-config executable.', 'xml2-config'), PathVariable('ICU_INCLUDES', 'Search path for ICU include files', '/usr/include', PathVariable.PathAccept), PathVariable('ICU_LIBS','Search path for ICU include files','/usr/' + LIBDIR_SCHEMA_DEFAULT, PathVariable.PathAccept), - ('ICU_LIB_NAME', 'The library name for icu (such as icuuc, sicuuc, or icucore)', 'icuuc', -PathVariable.PathAccept), + ('ICU_LIB_NAME', 'The library name for icu (such as icuuc, sicuuc, or icucore)', 'icuuc', PathVariable.PathAccept), + BoolVariable('PNG', 'Build Mapnik with PNG read and write support', 'True'), PathVariable('PNG_INCLUDES', 'Search path for libpng include files', '/usr/include', PathVariable.PathAccept), PathVariable('PNG_LIBS','Search path for libpng library files','/usr/' + LIBDIR_SCHEMA_DEFAULT, PathVariable.PathAccept), @@ -352,6 +358,9 @@ PathVariable.PathAccept), BoolVariable('ENABLE_STATS', 'Enable global statistics during map processing', 'False'), ('DEFAULT_LOG_SEVERITY', 'The default severity of the logger (eg. ' + ', '.join(severities) + ')', 'error'), + # Plugin linking + EnumVariable('PLUGIN_LINKING', "Set plugin linking with libmapnik", 'shared', ['shared','static']), + # Other variables BoolVariable('SHAPE_MEMORY_MAPPED_FILE', 'Utilize memory-mapped files in Shapefile Plugin (higher memory usage, better performance)', 'True'), ('SYSTEM_FONTS','Provide location for python bindings to register fonts (if provided then the bundled DejaVu fonts are not installed)',''), @@ -434,7 +443,7 @@ pickle_store = [# Scons internal variables 'LIBMAPNIK_DEFINES', 'LIBMAPNIK_CXXFLAGS', 'CAIRO_LIBPATHS', - 'CAIRO_LINKFLAGS', + 'CAIRO_ALL_LIBS', 'CAIRO_CPPPATHS', 'SVG_RENDERER', 'SQLITE_LINKFLAGS', @@ -729,25 +738,23 @@ def FindBoost(context, prefixes, thread_flag): msg = str() if BOOST_LIB_DIR: - msg += '\n *libs found: %s' % BOOST_LIB_DIR + msg += '\nFound boost libs: %s' % BOOST_LIB_DIR env['BOOST_LIBS'] = BOOST_LIB_DIR else: env['BOOST_LIBS'] = '/usr/' + env['LIBDIR_SCHEMA'] - msg += '\n *using default boost lib dir: %s' % env['BOOST_LIBS'] + msg += '\nUsing default boost lib dir: %s' % env['BOOST_LIBS'] if BOOST_INCLUDE_DIR: - msg += '\n *headers found: %s' % BOOST_INCLUDE_DIR + msg += '\nFound boost headers: %s' % BOOST_INCLUDE_DIR env['BOOST_INCLUDES'] = BOOST_INCLUDE_DIR else: env['BOOST_INCLUDES'] = '/usr/include' - msg += '\n *using default boost include dir: %s' % env['BOOST_INCLUDES'] + msg += '\nUsing default boost include dir: %s' % env['BOOST_INCLUDES'] if not env['BOOST_TOOLKIT'] and not env['BOOST_ABI'] and not env['BOOST_VERSION']: if BOOST_APPEND: - msg += '\n *lib naming extension found: %s' % BOOST_APPEND + msg += '\nFound boost lib name extension: %s' % BOOST_APPEND env['BOOST_APPEND'] = BOOST_APPEND - else: - msg += '\n *no lib naming extension found' else: # Creating BOOST_APPEND according to the Boost library naming order, # which goes ---. See: @@ -762,7 +769,7 @@ def FindBoost(context, prefixes, thread_flag): # Boost libraries. if len(append_params) > 1: env['BOOST_APPEND'] = '-'.join(append_params) - msg += '\n *using boost lib naming: %s' % env['BOOST_APPEND'] + msg += '\nFound boost lib name extension: %s' % env['BOOST_APPEND'] env.AppendUnique(CPPPATH = os.path.realpath(env['BOOST_INCLUDES'])) env.AppendUnique(LIBPATH = os.path.realpath(env['BOOST_LIBS'])) @@ -799,6 +806,32 @@ int main() context.Result(ret) return ret +def CheckCairoHasFreetype(context, silent=False): + if not silent: + context.Message('Checking for cairo freetype font support ... ') + context.env.AppendUnique(CPPPATH=copy(env['CAIRO_CPPPATHS'])) + + ret = context.TryRun(""" + +#include + +int main() +{ + #ifdef CAIRO_HAS_FT_FONT + return 0; + #else + return 1; + #endif +} + +""", '.cpp')[0] + if silent: + context.did_show_result=1 + context.Result(ret) + for item in env['CAIRO_CPPPATHS']: + rm_path(item,'CPPPATH',context.env) + return ret + def GetBoostLibVersion(context): ret = context.TryRun(""" @@ -946,6 +979,7 @@ conf_tests = { 'prioritize_paths' : prioritize_paths, 'CheckPKGVersion' : CheckPKGVersion, 'FindBoost' : FindBoost, 'CheckBoost' : CheckBoost, + 'CheckCairoHasFreetype' : CheckCairoHasFreetype, 'GetBoostLibVersion' : GetBoostLibVersion, 'GetMapnikLibVersion' : GetMapnikLibVersion, 'parse_config' : parse_config, @@ -1007,11 +1041,12 @@ if not preconfigured: env['SKIPPED_DEPS'] = [] env['HAS_CAIRO'] = False env['CAIRO_LIBPATHS'] = [] - env['CAIRO_LINKFLAGS'] = [] + env['CAIRO_ALL_LIBS'] = [] env['CAIRO_CPPPATHS'] = [] env['HAS_PYCAIRO'] = False env['HAS_LIBXML2'] = False env['LIBMAPNIK_LIBS'] = [] + env['LIBMAPNIK_LINKFLAGS'] = [] env['LIBMAPNIK_CPPATHS'] = [] env['LIBMAPNIK_DEFINES'] = [] env['LIBMAPNIK_CXXFLAGS'] = [] @@ -1137,6 +1172,8 @@ if not preconfigured: # https://github.com/mapnik/mapnik/issues/913 if conf.parse_config('XML2_CONFIG',checks='--cflags'): env['HAS_LIBXML2'] = True + else: + env['MISSING_DEPS'].append('libxml2') LIBSHEADERS = [ ['z', 'zlib.h', True,'C'], @@ -1185,7 +1222,7 @@ if not preconfigured: # if requested, sort LIBPATH and CPPPATH before running CheckLibWithHeader tests if env['PRIORITIZE_LINKING']: - conf.prioritize_paths(silent=False) + conf.prioritize_paths(silent=True) if not env['HOST']: for libname, headers, required, lang in LIBSHEADERS: @@ -1234,7 +1271,7 @@ if not preconfigured: # if requested, sort LIBPATH and CPPPATH before running CheckLibWithHeader tests if env['PRIORITIZE_LINKING']: - conf.prioritize_paths() + conf.prioritize_paths(silent=True) if not env['HOST']: # if the user is not setting custom boost configuration @@ -1369,9 +1406,9 @@ if not preconfigured: #os.path.join(c_inc,'include/libpng'), ] ) - env["CAIRO_LINKFLAGS"] = ['cairo'] + env["CAIRO_ALL_LIBS"] = ['cairo'] if env['RUNTIME_LINK'] == 'static': - env["CAIRO_LINKFLAGS"].extend( + env["CAIRO_ALL_LIBS"].extend( ['pixman-1','expat','fontconfig','iconv'] ) # todo - run actual checkLib? @@ -1394,7 +1431,7 @@ if not preconfigured: cairo_env.ParseConfig(cmd) for lib in cairo_env['LIBS']: if not lib in env['LIBS']: - env["CAIRO_LINKFLAGS"].append(lib) + env["CAIRO_ALL_LIBS"].append(lib) for lpath in cairo_env['LIBPATH']: if not lpath in env['LIBPATH']: env["CAIRO_LIBPATHS"].append(lpath) @@ -1411,6 +1448,11 @@ if not preconfigured: else: color_print(4,'Not building with cairo support, pass CAIRO=True to enable') + if not env['HOST'] and env['HAS_CAIRO']: + if not conf.CheckCairoHasFreetype(): + env['SKIPPED_DEPS'].append('cairo') + env['HAS_CAIRO'] = False + if 'python' in env['BINDINGS'] or 'python' in env['REQUESTED_PLUGINS']: if not os.access(env['PYTHON'], os.X_OK): color_print(1,"Cannot run python interpreter at '%s', make sure that you have the permissions to execute it." % env['PYTHON']) @@ -1608,7 +1650,9 @@ if not preconfigured: if env['DEBUG']: env.Append(CXXFLAGS = common_cxx_flags + '-O0 -fno-inline') else: - env.Append(CXXFLAGS = common_cxx_flags + '-O%s -fvisibility-inlines-hidden -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts' % (env['OPTIMIZATION'])) + # TODO - add back -fvisibility-inlines-hidden + # https://github.com/mapnik/mapnik/issues/1863 + env.Append(CXXFLAGS = common_cxx_flags + '-O%s -fno-strict-aliasing -finline-functions -Wno-inline -Wno-parentheses -Wno-char-subscripts' % (env['OPTIMIZATION'])) if env['DEBUG_UNDEFINED']: env.Append(CXXFLAGS = '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv -fwrapv') @@ -1638,7 +1682,7 @@ if not preconfigured: # if requested, sort LIBPATH and CPPPATH one last time before saving... if env['PRIORITIZE_LINKING']: - conf.prioritize_paths() + conf.prioritize_paths(silent=True) # finish config stage and pickle results env = conf.Finish() @@ -1696,15 +1740,11 @@ if not HELP_REQUESTED: p = env['PATH_REMOVE'] if p in env['ENV']['PATH']: env['ENV']['PATH'].replace(p,'') - def rm_path(set): - for i in env[set]: - if p in i: - env[set].remove(i) - rm_path('LIBPATH') - rm_path('CPPPATH') - rm_path('CXXFLAGS') - rm_path('CAIRO_LIBPATHS') - rm_path('CAIRO_CPPPATHS') + rm_path(p,'LIBPATH',env) + rm_path(p,'CPPPATH',env) + rm_path(p,'CXXFLAGS',env) + rm_path(p,'CAIRO_LIBPATHS',env) + rm_path(p,'CAIRO_CPPPATHS',env) if env['PATH_REPLACE']: searches,replace = env['PATH_REPLACE'].split(':') @@ -1727,8 +1767,6 @@ if not HELP_REQUESTED: Export('env') plugin_base = env.Clone() - if not env['DEBUG']: - plugin_base.Append(CXXFLAGS='-fvisibility=hidden') Export('plugin_base') @@ -1758,36 +1796,46 @@ if not HELP_REQUESTED: # Build the requested and able-to-be-compiled input plug-ins GDAL_BUILT = False OGR_BUILT = False - for plugin in env['REQUESTED_PLUGINS']: - details = env['PLUGINS'][plugin] - if details['lib'] in env['LIBS']: - SConscript('plugins/input/%s/build.py' % plugin) - if plugin == 'ogr': OGR_BUILT = True - if plugin == 'gdal': GDAL_BUILT = True - if plugin == 'ogr' or plugin == 'gdal': - if GDAL_BUILT and OGR_BUILT: - env['LIBS'].remove(details['lib']) - else: - env['LIBS'].remove(details['lib']) - elif not details['lib']: - # build internal shape and raster plugins - SConscript('plugins/input/%s/build.py' % plugin) - else: - color_print(1,"Notice: dependencies not met for plugin '%s', not building..." % plugin) - # also clear out locally built target + for plugin in env['PLUGINS']: + if env['PLUGIN_LINKING'] == 'static' or plugin not in env['REQUESTED_PLUGINS']: if os.path.exists('plugins/input/%s.input' % plugin): os.unlink('plugins/input/%s.input' % plugin) + if plugin in env['REQUESTED_PLUGINS']: + details = env['PLUGINS'][plugin] + if details['lib'] in env['LIBS']: + if env['PLUGIN_LINKING'] == 'shared': + SConscript('plugins/input/%s/build.py' % plugin) + if plugin == 'ogr': OGR_BUILT = True + if plugin == 'gdal': GDAL_BUILT = True + if plugin == 'ogr' or plugin == 'gdal': + if GDAL_BUILT and OGR_BUILT: + env['LIBS'].remove(details['lib']) + else: + env['LIBS'].remove(details['lib']) + elif not details['lib']: + if env['PLUGIN_LINKING'] == 'shared': + # build internal datasource input plugins + SConscript('plugins/input/%s/build.py' % plugin) + else: + color_print(1,"Notice: dependencies not met for plugin '%s', not building..." % plugin) + if os.path.exists('plugins/input/%s.input' % plugin): + os.unlink('plugins/input/%s.input' % plugin) create_uninstall_target(env, env['MAPNIK_LIB_DIR_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 if 'install' in COMMAND_LINE_TARGETS: + # if statically linking plugins still make sure + # to create the dynamic plugins directory + if env['PLUGIN_LINKING'] == 'static': + if not os.path.exists(env['MAPNIK_INPUT_PLUGINS_DEST']): + os.makedirs(env['MAPNIK_INPUT_PLUGINS_DEST']) + # before installing plugins, wipe out any previously + # installed plugins that we are no longer building for plugin in PLUGINS.keys(): - if plugin not in env['REQUESTED_PLUGINS']: - plugin_path = os.path.join(env['MAPNIK_INPUT_PLUGINS_DEST'],'%s.input' % plugin) - if os.path.exists(plugin_path): + plugin_path = os.path.join(env['MAPNIK_INPUT_PLUGINS_DEST'],'%s.input' % plugin) + if os.path.exists(plugin_path): + if plugin not in env['REQUESTED_PLUGINS'] or env['PLUGIN_LINKING'] == 'static': color_print(3,"Notice: removing out of date plugin: '%s'" % plugin_path) os.unlink(plugin_path) @@ -1827,11 +1875,10 @@ if not HELP_REQUESTED: SConscript('fonts/build.py') # build C++ tests - if env['CPP_TESTS']: - SConscript('tests/cpp_tests/build.py') + SConscript('tests/cpp_tests/build.py') - if env['SVG_RENDERER']: - SConscript('tests/cpp_tests/svg_renderer_tests/build.py') + if env['CPP_TESTS'] and env['SVG_RENDERER']: + SConscript('tests/cpp_tests/svg_renderer_tests/build.py') if env['BENCHMARK']: SConscript('benchmark/build.py') @@ -1845,11 +1892,14 @@ if not HELP_REQUESTED: # if requested, build the sample input plugins if env['SAMPLE_INPUT_PLUGINS']: SConscript('plugins/input/templates/helloworld/build.py') - elif 'install' in COMMAND_LINE_TARGETS: - plugin_path = os.path.join(env['MAPNIK_INPUT_PLUGINS_DEST'],'hello.input') - if os.path.exists(plugin_path): - color_print(3,"Notice: removing out of date plugin: '%s'" % plugin_path) - os.unlink(plugin_path) + else: + if 'install' in COMMAND_LINE_TARGETS: + plugin_path = os.path.join(env['MAPNIK_INPUT_PLUGINS_DEST'],'hello.input') + if os.path.exists(plugin_path): + color_print(3,"Notice: removing out of date plugin: '%s'" % plugin_path) + os.unlink(plugin_path) + if os.path.exists('plugins/input/templates/hello.input'): + os.unlink('plugins/input/templates/hello.input') # update linux project files if env['PLATFORM'] == 'Linux': diff --git a/bindings/python/build.py b/bindings/python/build.py index 40bc6c254..2ba242c26 100644 --- a/bindings/python/build.py +++ b/bindings/python/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2006 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -43,19 +43,22 @@ prefix = env['PREFIX'] target_path = os.path.normpath(env['PYTHON_INSTALL_LOCATION'] + os.path.sep + 'mapnik') target_path_deprecated = os.path.normpath(env['PYTHON_INSTALL_LOCATION'] + os.path.sep + 'mapnik2') -libraries = ['mapnik',env['BOOST_PYTHON_LIB']] +py_env = env.Clone() +py_env.Append(CPPPATH = env['PYTHON_INCLUDES']) + +py_env['LIBS'] = ['mapnik',env['BOOST_PYTHON_LIB']] # TODO - do solaris/fedora need direct linking too? if env['PLATFORM'] == 'Darwin': if not env['PYTHON_DYNAMIC_LOOKUP']: if env['PNG']: - libraries.append('png') + py_env.AppendUnique(LIBS = 'png') if env['JPEG']: - libraries.append('jpeg') - libraries.append(env['ICU_LIB_NAME']) - libraries.append('boost_regex%s' % env['BOOST_APPEND']) + py_env.AppendUnique(LIBS = 'jpeg') + py_env.AppendUnique(LIBS = env['ICU_LIB_NAME']) + py_env.AppendUnique(LIBS = 'boost_regex%s' % env['BOOST_APPEND']) if env['THREADING'] == 'multi': - libraries.append('boost_thread%s' % env['BOOST_APPEND']) + py_env.AppendUnique(LIBS = 'boost_thread%s' % env['BOOST_APPEND']) ##### Python linking on OS X is tricky ### # Confounding problems are: @@ -115,6 +118,9 @@ if env['CUSTOM_LDFLAGS']: else: linkflags = python_link_flag +if env['LINKING'] == 'static': + py_env.AppendUnique(LIBS=env['LIBMAPNIK_LIBS']) + paths = ''' """Configuration paths of Mapnik fonts and input plugins (auto-generated by SCons).""" @@ -147,9 +153,6 @@ except: pass # 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') @@ -177,14 +180,14 @@ if 'uninstall' not in COMMAND_LINE_TARGETS: py_env.Append(CPPPATH = env['CAIRO_CPPPATHS']) py_env.Append(CPPDEFINES = '-DHAVE_CAIRO') if env['PLATFORM'] == 'Darwin': - py_env.Append(LIBS=env['CAIRO_LINKFLAGS']) + py_env.Append(LIBS=env['CAIRO_ALL_LIBS']) if env['HAS_PYCAIRO']: py_env.ParseConfig('pkg-config --cflags pycairo') py_env.Append(CPPDEFINES = '-DHAVE_PYCAIRO') -libraries.append('boost_thread%s' % env['BOOST_APPEND']) -_mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LIBS=libraries, LDMODULEPREFIX='', LDMODULESUFFIX='.so',LINKFLAGS=linkflags) +py_env.AppendUnique(LIBS = 'boost_thread%s' % env['BOOST_APPEND']) +_mapnik = py_env.LoadableModule('mapnik/_mapnik', sources, LDMODULEPREFIX='', LDMODULESUFFIX='.so',LINKFLAGS=linkflags) Depends(_mapnik, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME'])) diff --git a/bindings/python/mapnik/__init__.py b/bindings/python/mapnik/__init__.py index acb7dfe0b..4c4a1dd89 100644 --- a/bindings/python/mapnik/__init__.py +++ b/bindings/python/mapnik/__init__.py @@ -558,24 +558,6 @@ def Osm(**keywords): keywords['type'] = 'osm' return CreateDatasource(keywords) -def Geos(**keywords): - """Create a GEOS Vector Datasource. - - Required keyword arguments: - wkt -- inline WKT text of the geometry - - Optional keyword arguments: - extent -- manually specified data extent (comma delimited string, default None) - - >>> from mapnik import Geos, Layer - >>> datasource = Geos(wkt='MULTIPOINT(100 100, 50 50, 0 0)') - >>> lyr = Layer('GEOS Layer from WKT string') - >>> lyr.datasource = datasource - - """ - keywords['type'] = 'geos' - return CreateDatasource(keywords) - def Python(**keywords): """Create a Python Datasource. diff --git a/bindings/python/mapnik_datasource.cpp b/bindings/python/mapnik_datasource.cpp index 95c495aec..07383b372 100644 --- a/bindings/python/mapnik_datasource.cpp +++ b/bindings/python/mapnik_datasource.cpp @@ -48,14 +48,26 @@ namespace { //user-friendly wrapper that uses Python dictionary using namespace boost::python; -boost::shared_ptr create_datasource(const dict& d) +boost::shared_ptr create_datasource(dict const& d) { mapnik::parameters params; boost::python::list keys=d.keys(); - for (int i=0; i(keys[i]); object obj = d[key]; + if (PyUnicode_Check(obj.ptr())) + { + PyObject* temp = PyUnicode_AsUTF8String(obj.ptr()); + if (temp) + { + char* c_str = PyString_AsString(temp); + params[key] = std::string(c_str); + Py_DecRef(temp); + } + continue; + } + extract ex0(obj); extract ex1(obj); extract ex2(obj); diff --git a/bindings/python/mapnik_debug_symbolizer.cpp b/bindings/python/mapnik_debug_symbolizer.cpp new file mode 100644 index 000000000..6b255967f --- /dev/null +++ b/bindings/python/mapnik_debug_symbolizer.cpp @@ -0,0 +1,42 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2013 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 +#include "mapnik_enumeration.hpp" +#include + +void export_debug_symbolizer() +{ + using namespace boost::python; + + mapnik::enumeration_("debug_symbolizer_mode") + .value("COLLISION",mapnik::DEBUG_SYM_MODE_COLLISION) + .value("VERTEX",mapnik::DEBUG_SYM_MODE_VERTEX) + ; + + class_("DebugSymbolizer", + init<>("Default debug Symbolizer")) + .add_property("mode", + &mapnik::debug_symbolizer::get_mode, + &mapnik::debug_symbolizer::set_mode) + ; +} diff --git a/bindings/python/mapnik_expression.cpp b/bindings/python/mapnik_expression.cpp index d3bd8b1dd..caf4d2525 100644 --- a/bindings/python/mapnik_expression.cpp +++ b/bindings/python/mapnik_expression.cpp @@ -34,8 +34,6 @@ #include #include - -using mapnik::Feature; using mapnik::expression_ptr; using mapnik::parse_expression; using mapnik::to_expression_string; @@ -53,15 +51,15 @@ std::string expression_to_string_(mapnik::expr_node const& expr) return mapnik::to_expression_string(expr); } -mapnik::value expression_evaluate_(mapnik::expr_node const& expr, mapnik::Feature const& f) +mapnik::value expression_evaluate_(mapnik::expr_node const& expr, mapnik::feature_impl const& f) { // will be auto-converted to proper python type by `mapnik_value_to_python` - return boost::apply_visitor(mapnik::evaluate(f),expr); + return boost::apply_visitor(mapnik::evaluate(f),expr); } -bool expression_evaluate_to_bool_(mapnik::expr_node const& expr, mapnik::Feature const& f) +bool expression_evaluate_to_bool_(mapnik::expr_node const& expr, mapnik::feature_impl const& f) { - return boost::apply_visitor(mapnik::evaluate(f),expr).to_bool(); + return boost::apply_visitor(mapnik::evaluate(f),expr).to_bool(); } // path expression @@ -75,7 +73,7 @@ std::string path_to_string_(mapnik::path_expression const& expr) return mapnik::path_processor_type::to_string(expr); } -std::string path_evaluate_(mapnik::path_expression const& expr, mapnik::Feature const& f) +std::string path_evaluate_(mapnik::path_expression const& expr, mapnik::feature_impl const& f) { return mapnik::path_processor_type::evaluate(expr, f); } diff --git a/bindings/python/mapnik_feature.cpp b/bindings/python/mapnik_feature.cpp index 0c7e6745e..8f4e4494f 100644 --- a/bindings/python/mapnik_feature.cpp +++ b/bindings/python/mapnik_feature.cpp @@ -41,28 +41,27 @@ namespace { -using mapnik::Feature; using mapnik::geometry_utils; using mapnik::from_wkt; using mapnik::context_type; using mapnik::context_ptr; using mapnik::feature_kv_iterator; -mapnik::geometry_type const& (mapnik::Feature::*get_geometry_by_const_ref)(unsigned) const = &mapnik::Feature::get_geometry; -boost::ptr_vector const& (mapnik::Feature::*get_paths_by_const_ref)() const = &mapnik::Feature::paths; +mapnik::geometry_type const& (mapnik::feature_impl::*get_geometry_by_const_ref)(unsigned) const = &mapnik::feature_impl::get_geometry; +boost::ptr_vector const& (mapnik::feature_impl::*get_paths_by_const_ref)() const = &mapnik::feature_impl::paths; -void feature_add_geometries_from_wkb(Feature &feature, std::string wkb) +void feature_add_geometries_from_wkb(mapnik::feature_impl &feature, std::string wkb) { geometry_utils::from_wkb(feature.paths(), wkb.c_str(), wkb.size()); } -void feature_add_geometries_from_wkt(Feature &feature, std::string wkt) +void feature_add_geometries_from_wkt(mapnik::feature_impl &feature, std::string wkt) { bool result = mapnik::from_wkt(wkt, feature.paths()); if (!result) throw std::runtime_error("Failed to parse WKT"); } -std::string feature_to_geojson(Feature const& feature) +std::string feature_to_geojson(mapnik::feature_impl const& feature) { std::string json; mapnik::json::feature_generator g; @@ -73,22 +72,22 @@ std::string feature_to_geojson(Feature const& feature) return json; } -mapnik::value __getitem__(Feature const& feature, std::string const& name) +mapnik::value __getitem__(mapnik::feature_impl const& feature, std::string const& name) { return feature.get(name); } -mapnik::value __getitem2__(Feature const& feature, std::size_t index) +mapnik::value __getitem2__(mapnik::feature_impl const& feature, std::size_t index) { return feature.get(index); } -void __setitem__(Feature & feature, std::string const& name, mapnik::value const& val) +void __setitem__(mapnik::feature_impl & feature, std::string const& name, mapnik::value const& val) { feature.put_new(name,val); } -boost::python::dict attributes(Feature const& f) +boost::python::dict attributes(mapnik::feature_impl const& f) { boost::python::dict attributes; feature_kv_iterator itr = f.begin(); @@ -191,7 +190,6 @@ struct value_null_from_python void export_feature() { using namespace boost::python; - using mapnik::Feature; // Python to mapnik::value converters // NOTE: order matters here. For example value_null must be listed before @@ -211,25 +209,25 @@ void export_feature() .def("push", &context_type::push) ; - class_, + class_, boost::noncopyable>("Feature",init("Default ctor.")) - .def("id",&Feature::id) - .def("__str__",&Feature::to_string) + .def("id",&mapnik::feature_impl::id) + .def("__str__",&mapnik::feature_impl::to_string) .def("add_geometries_from_wkb", &feature_add_geometries_from_wkb) .def("add_geometries_from_wkt", &feature_add_geometries_from_wkt) - .def("add_geometry", &Feature::add_geometry) - .def("num_geometries",&Feature::num_geometries) + .def("add_geometry", &mapnik::feature_impl::add_geometry) + .def("num_geometries",&mapnik::feature_impl::num_geometries) .def("get_geometry", make_function(get_geometry_by_const_ref,return_value_policy())) .def("geometries",make_function(get_paths_by_const_ref,return_value_policy())) - .def("envelope", &Feature::envelope) - .def("has_key", &Feature::has_key) + .def("envelope", &mapnik::feature_impl::envelope) + .def("has_key", &mapnik::feature_impl::has_key) .add_property("attributes",&attributes) .def("__setitem__",&__setitem__) .def("__contains__",&__getitem__) .def("__getitem__",&__getitem__) .def("__getitem__",&__getitem2__) - .def("__len__", &Feature::size) - .def("context",&Feature::context) + .def("__len__", &mapnik::feature_impl::size) + .def("context",&mapnik::feature_impl::context) .def("to_geojson",&feature_to_geojson) ; } diff --git a/bindings/python/mapnik_featureset.cpp b/bindings/python/mapnik_featureset.cpp index 3148d116e..c1f7eecd4 100644 --- a/bindings/python/mapnik_featureset.cpp +++ b/bindings/python/mapnik_featureset.cpp @@ -65,10 +65,7 @@ inline mapnik::feature_ptr next(mapnik::featureset_ptr const& itr) void export_featureset() { using namespace boost::python; - using mapnik::Feature; - using mapnik::Featureset; - - class_, + class_, boost::noncopyable>("Featureset",no_init) .def("__iter__",pass_through) .def("next",next) diff --git a/bindings/python/mapnik_markers_symbolizer.cpp b/bindings/python/mapnik_markers_symbolizer.cpp index 64f6bc394..200c44959 100644 --- a/bindings/python/mapnik_markers_symbolizer.cpp +++ b/bindings/python/mapnik_markers_symbolizer.cpp @@ -30,6 +30,8 @@ #include #include "mapnik_svg.hpp" #include "mapnik_enumeration.hpp" +#include "python_optional.hpp" + #include // for known_svg_prefix_ using mapnik::markers_symbolizer; @@ -70,16 +72,6 @@ void set_marker_type(mapnik::markers_symbolizer & symbolizer, std::string const& } - -// https://github.com/mapnik/mapnik/issues/1367 -PyObject* get_fill_opacity_impl(markers_symbolizer & sym) -{ - boost::optional fill_opacity = sym.get_fill_opacity(); - if (fill_opacity) - return ::PyFloat_FromDouble(*fill_opacity); - Py_RETURN_NONE; -} - void export_markers_symbolizer() { using namespace boost::python; @@ -119,7 +111,7 @@ void export_markers_symbolizer() &markers_symbolizer::set_opacity, "Set/get the overall opacity") .add_property("fill_opacity", - &get_fill_opacity_impl, + &markers_symbolizer::get_fill_opacity, &markers_symbolizer::set_fill_opacity, "Set/get the fill opacity") .add_property("ignore_placement", diff --git a/bindings/python/mapnik_python.cpp b/bindings/python/mapnik_python.cpp index 4ef560c23..c5da5938c 100644 --- a/bindings/python/mapnik_python.cpp +++ b/bindings/python/mapnik_python.cpp @@ -62,6 +62,7 @@ void export_polygon_pattern_symbolizer(); void export_raster_symbolizer(); void export_text_placement(); void export_shield_symbolizer(); +void export_debug_symbolizer(); void export_font_engine(); void export_projection(); void export_proj_transform(); @@ -84,7 +85,6 @@ void export_logger(); #include #include #include -#include #include #include #include @@ -333,11 +333,6 @@ double scale_denominator(mapnik::Map const &map, bool geographic) } // http://docs.python.org/c-api/exceptions.html#standard-exceptions -void config_error_translator(mapnik::config_error const & ex) -{ - PyErr_SetString(PyExc_RuntimeError, ex.what()); -} - void value_error_translator(mapnik::value_error const & ex) { PyErr_SetString(PyExc_ValueError, ex.what()); @@ -433,7 +428,6 @@ BOOST_PYTHON_MODULE(_mapnik) register_exception_translator(&standard_error_translator); register_exception_translator(&out_of_range_error_translator); - register_exception_translator(&config_error_translator); register_exception_translator(&value_error_translator); register_exception_translator(&runtime_error_translator); register_cairo(); @@ -470,6 +464,7 @@ BOOST_PYTHON_MODULE(_mapnik) export_raster_symbolizer(); export_text_placement(); export_shield_symbolizer(); + export_debug_symbolizer(); export_font_engine(); export_projection(); export_proj_transform(); diff --git a/bindings/python/mapnik_raster_symbolizer.cpp b/bindings/python/mapnik_raster_symbolizer.cpp index 54f66a554..20a04a3f3 100644 --- a/bindings/python/mapnik_raster_symbolizer.cpp +++ b/bindings/python/mapnik_raster_symbolizer.cpp @@ -28,18 +28,7 @@ #include #include -namespace { -// https://github.com/mapnik/mapnik/issues/1367 -PyObject* get_premultiplied_impl(mapnik::raster_symbolizer & sym) -{ - boost::optional premultiplied = sym.premultiplied(); - if (premultiplied) - return ::PyBool_FromLong(*premultiplied); - Py_RETURN_NONE; -} - -} using mapnik::raster_symbolizer; void export_raster_symbolizer() @@ -132,7 +121,7 @@ void export_raster_symbolizer() ">>> r.mesh_size = 32\n" ) .add_property("premultiplied", - &get_premultiplied_impl, + &raster_symbolizer::premultiplied, &raster_symbolizer::set_premultiplied, "Get/Set premultiplied status of the source image.\n" "Can be used to override what the source data reports (when in error)\n" diff --git a/bindings/python/mapnik_rule.cpp b/bindings/python/mapnik_rule.cpp index bad1f2639..80341ca24 100644 --- a/bindings/python/mapnik_rule.cpp +++ b/bindings/python/mapnik_rule.cpp @@ -34,7 +34,6 @@ using mapnik::rule; using mapnik::expr_node; using mapnik::expression_ptr; -using mapnik::Feature; using mapnik::point_symbolizer; using mapnik::line_symbolizer; using mapnik::line_pattern_symbolizer; diff --git a/bindings/python/mapnik_text_placement.cpp b/bindings/python/mapnik_text_placement.cpp index f1dcefae8..05201326a 100644 --- a/bindings/python/mapnik_text_placement.cpp +++ b/bindings/python/mapnik_text_placement.cpp @@ -84,7 +84,7 @@ struct NodeWrap: formatting::node, wrapper } - void apply(char_properties const& p, Feature const& feature, processed_text &output) const + void apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { python_block_auto_unblock b; this->get_override("apply")(ptr(&p), ptr(&feature), ptr(&output)); @@ -122,7 +122,7 @@ struct TextNodeWrap: formatting::text_node, wrapper } - virtual void apply(char_properties const& p, Feature const& feature, processed_text &output) const + virtual void apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { if(override o = this->get_override("apply")) { @@ -135,7 +135,7 @@ struct TextNodeWrap: formatting::text_node, wrapper } } - void default_apply(char_properties const& p, Feature const& feature, processed_text &output) const + void default_apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { formatting::text_node::apply(p, feature, output); } @@ -143,7 +143,7 @@ struct TextNodeWrap: formatting::text_node, wrapper struct FormatNodeWrap: formatting::format_node, wrapper { - virtual void apply(char_properties const& p, Feature const& feature, processed_text &output) const + virtual void apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { if(override o = this->get_override("apply")) { @@ -156,7 +156,7 @@ struct FormatNodeWrap: formatting::format_node, wrapper } } - void default_apply(char_properties const& p, Feature const& feature, processed_text &output) const + void default_apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { formatting::format_node::apply(p, feature, output); } @@ -164,7 +164,7 @@ struct FormatNodeWrap: formatting::format_node, wrapper struct ExprFormatWrap: formatting::expression_format, wrapper { - virtual void apply(char_properties const& p, Feature const& feature, processed_text &output) const + virtual void apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { if(override o = this->get_override("apply")) { @@ -177,7 +177,7 @@ struct ExprFormatWrap: formatting::expression_format, wrapper http://wiki.python.org/moin/boost.python/HowTo#A.22Raw.22_function */ - virtual void apply(char_properties const& p, Feature const& feature, processed_text &output) const + virtual void apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { if(override o = this->get_override("apply")) { @@ -214,7 +214,7 @@ struct ListNodeWrap: formatting::list_node, wrapper } } - void default_apply(char_properties const& p, Feature const& feature, processed_text &output) const + void default_apply(char_properties const& p, feature_impl const& feature, processed_text &output) const { formatting::list_node::apply(p, feature, output); } diff --git a/bindings/python/python_optional.hpp b/bindings/python/python_optional.hpp index 0d785b0f3..9bc38d119 100644 --- a/bindings/python/python_optional.hpp +++ b/bindings/python/python_optional.hpp @@ -22,7 +22,8 @@ #include #include -#include + +#include // boost::optional to/from converter from John Wiegley @@ -46,7 +47,7 @@ struct register_python_conversion }; template -struct python_optional : public boost::noncopyable +struct python_optional : public mapnik::noncopyable { struct optional_to_python { @@ -74,7 +75,7 @@ struct python_optional : public boost::noncopyable rvalue_from_python_stage1(source, converters); return rvalue_from_python_stage2(source, data, converters); } - return NULL; + return 0; } static void construct(PyObject * source, @@ -94,17 +95,116 @@ struct python_optional : public boost::noncopyable } }; - explicit python_optional() { + explicit python_optional() + { register_python_conversion, optional_to_python, optional_from_python>(); } }; -/** This class works around a bug in boost python. +// to/from boost::optional +template <> +struct python_optional : public mapnik::noncopyable +{ + struct optional_to_python + { + static PyObject * convert(const boost::optional& value) + { + return (value ? PyFloat_FromDouble(*value) : + boost::python::detail::none()); + } + }; - See http://osdir.com/ml/python.c++/2003-11/msg00158.html -*/ -template + struct optional_from_python + { + static void * convertible(PyObject * source) + { + using namespace boost::python::converter; + + if (source == Py_None || PyFloat_Check(source)) + return source; + return 0; + } + + static void construct(PyObject * source, + boost::python::converter::rvalue_from_python_stage1_data * data) + { + using namespace boost::python::converter; + void * const storage = ((rvalue_from_python_storage > *) + data)->storage.bytes; + if (source == Py_None) // == None + new (storage) boost::optional(); // A Boost uninitialized value + else + new (storage) boost::optional(PyFloat_AsDouble(source)); + data->convertible = storage; + } + }; + + explicit python_optional() + { + register_python_conversion, + optional_to_python, optional_from_python>(); + } +}; + +// to/from boost::optional +template <> +struct python_optional : public mapnik::noncopyable +{ + struct optional_to_python + { + static PyObject * convert(const boost::optional& value) + { + if (value) + { + if (*value) Py_RETURN_TRUE; + else Py_RETURN_FALSE; + } + else return boost::python::detail::none(); + } + }; + struct optional_from_python + { + static void * convertible(PyObject * source) + { + using namespace boost::python::converter; + + if (source == Py_None || PyBool_Check(source)) + return source; + return 0; + } + + static void construct(PyObject * source, + boost::python::converter::rvalue_from_python_stage1_data * data) + { + using namespace boost::python::converter; + void * const storage = ((rvalue_from_python_storage > *) + data)->storage.bytes; + if (source == Py_None) // == None + new (storage) boost::optional(); // A Boost uninitialized value + else + { + new (storage) boost::optional(source == Py_True ? true : false); + } + data->convertible = storage; + } + }; + + explicit python_optional() + { + register_python_conversion, + optional_to_python, optional_from_python>(); + } +}; + + +// This class works around a feature in boost python. +// See http://osdir.com/ml/python.c++/2003-11/msg00158.html + +template class class_with_converter : public boost::python::class_ { public: diff --git a/demo/c++/Makefile b/demo/c++/Makefile index d30b71b40..dbd425380 100644 --- a/demo/c++/Makefile +++ b/demo/c++/Makefile @@ -1,4 +1,4 @@ -CXXFLAGS = $(shell mapnik-config --cflags) +CXXFLAGS = $(shell mapnik-config --includes --defines --cxxflags --dep-includes) LDFLAGS = $(shell mapnik-config --libs --dep-libs --ldflags) OBJ = rundemo.o @@ -13,8 +13,15 @@ $(BIN) : $(OBJ) .c.o : $(CXX) -c $(CXXFLAGS) $< +gyp: + rm -rf ./build + gyp rundemo.gyp --depth=. -f make --generator-output=./build/ + make -C ./build + build/out/Release/rundemo `mapnik-config --prefix` + .PHONY : clean clean: rm -f $(OBJ) rm -f $(BIN) + rm -f ./build \ No newline at end of file diff --git a/demo/c++/README.md b/demo/c++/README.md new file mode 100644 index 000000000..daa4198c1 --- /dev/null +++ b/demo/c++/README.md @@ -0,0 +1,81 @@ +## rundemo.cpp + +This directory contains a simple c++ program demonstrating the Mapnik C++ API. It mimics the python 'rundemo.py' example with a couple exceptions. + +If building on unix you can have this program automatically build by configuring Mapnik like: + + ./configure DEMO=True + +However, this example code also should be able to be built standalone. + +The following notes describe how to do that on various operating systems. + +## Depends + + - Mapnik library development headers + - `mapnik-config` on unix and `mapnik-config.bat` on windows + +### Unix + +On OS X and Linux you also need `make`. + +### Windows + +On windows, additional dependencies to build are: + + - MSVS 2010 with C++ compiler + - Python 2.x + - gyp: https://code.google.com/p/gyp | https://github.com/springmeyer/hello-gyp + +`mapnik-config.bat` should come with your Mapnik installation. + +First confirm it is on your path: + + mapnik-config # should give usage + +To install gyp, which is pure python do: + + svn checkout http://gyp.googlecode.com/svn/trunk/ gyp + cd gyp + python setup.py install + +If you do not have svn installed you can grab gyp from: + + https://github.com/TooTallNate/node-gyp/archive/master.zip + # unzip and extract the 'gyp' subfolder then do + cd gyp + python setup.py install + +## Building the demo + +### Unix + +Simply type: + + make + +Then to run do: + + ./rundemo `mapnik-config --prefix` + +On OS X you can also create an xcode project: + + gyp rundemo.gyp --depth=. -f xcode --generator-output=./build/ + xcodebuild -project ./build/rundemo.xcodeproj + ./build/out/Release/rundemo `mapnik-config --prefix` + + +### Windows + +First you need to build the visual studio solution with gyp: + + C:\Python27\python.exe c:\Python27\Scripts\gyp rundemo.gyp --depth=. -f msvs -G msvs_version=2010 + +Then you can compile with `msbuild`: + + msbuild rundemo.sln /p:Configuration="Release" /p:Platform=Win32 + +Then run it! + + for /f %i in ('mapnik-config --prefix') do set MAPNIK_PREFIX=%i + Release\rundemo.exe %MAPNIK_PREFIX% diff --git a/demo/c++/common.gypi b/demo/c++/common.gypi new file mode 100644 index 000000000..2dd800c78 --- /dev/null +++ b/demo/c++/common.gypi @@ -0,0 +1,42 @@ +{ + 'variables': { + 'conditions': [ + ['OS == "mac"', { + 'target_arch%': 'x64' + }, { + 'target_arch%': 'ia32' + }] + ] + }, + 'target_defaults': { + 'default_configuration': 'Release', + 'defines': [ ], + 'conditions': [ + ['OS == "mac"', { + 'defines': [ 'DARWIN' ] + }, { + 'defines': [ 'LINUX' ] + }], + ['OS == "mac" and target_arch == "x64"', { + 'xcode_settings': { + 'ARCHS': [ 'x86_64' ] + }, + }] + ], + 'configurations': { + 'Debug': { + 'cflags': [ '-g', '-O0' ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-g', '-O0' ] + } + }, + 'Release': { + 'cflags': [ '-O3' ], + 'defines': [ 'NDEBUG' ], + 'xcode_settings': { + 'OTHER_CFLAGS': [ '-O3' ] + } + } + } + } +} \ No newline at end of file diff --git a/demo/c++/readme.txt b/demo/c++/readme.txt deleted file mode 100644 index c9d546bc5..000000000 --- a/demo/c++/readme.txt +++ /dev/null @@ -1,20 +0,0 @@ -This directory contains a simple c++ program demonstrating the Mapnik C++ API. It mimics the python 'rundemo.py' example with a couple exceptions. - -To build it re-configure SCons with DEMO=True then rebuild:: - - $ python scons/scons.py configure DEMO=True - $ python scons/scons.py - - -The sample program will be compiled (but not installed). - - -To run:: - - $ cd demo/c++ - $ ./rundemo /usr/local/lib/mapnik - -For more detailed comments have a look in demo/python/rundemo.py - -Have fun! -Artem. diff --git a/demo/c++/rundemo.gyp b/demo/c++/rundemo.gyp new file mode 100644 index 000000000..e54ae121c --- /dev/null +++ b/demo/c++/rundemo.gyp @@ -0,0 +1,48 @@ +{ + 'includes': [ 'common.gypi' ], + 'default_configuration': 'Release', + 'targets': [ + { + 'target_name': 'rundemo', + 'type': 'executable', + 'sources': [ + 'rundemo.cpp', + ], + 'conditions': [ + [ 'OS=="mac"', { + 'libraries': [ + '-lmapnik', + '-undefined dynamic_lookup' + ], + 'xcode_settings': { + 'OTHER_CPLUSPLUSFLAGS':[ + ' - - charplacement - charplacement - - 1 - 1.00000 - 2.00000 - 1.00000 - 5.00000 - - - NAME - NAME - String - 0 - - - CLASS - CLASS - String - 0 - - - diff --git a/demo/data/test/raw/charplacement.gml b/demo/data/test/raw/charplacement.gml deleted file mode 100644 index 8de776840..000000000 --- a/demo/data/test/raw/charplacement.gml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - 00 - 13-13 - - - - - - 2,-1 1,-3 2,-5 - Road Name - TRIANGLE - - - 3,-1 4,-3 3,-5 - Road Name - TRIANGLE - - - - - 1,-12 13,-12 - - Road Name - STRAIGHT - - - - 1,-13 2,-13 5,-13 10,-13 13,-13 - - Road Name - STRAIGHT - - - - 6,-1 5,-3 5,-5 - Road Name - BEND - - - 7,-1 8,-3 8,-5 - Road Name - BEND - - - 5,-6 5,-8 6,-10 - Road Name - BEND - - - 8,-6 8,-8 7,-10 - Road Name - BEND - - - - 10.055915,-1.00031738281 10.6649858,-1.077712483 11.274056,-1.26950068 11.77921,-1.55298308 12.191993,-1.92815928 12.51529,-2.369132 12.746218,-2.8329032 12.884774,-3.2968745 12.930959,-3.875339 - Road Name - CURVE - - - 10.0555,-8.875339 10.6645708,-8.7979439 11.273641,-8.6061557 11.778795,-8.3226733 12.191578,-7.9474971 12.514875,-7.5065244 12.745803,-7.0427532 12.884359,-6.5787819 12.930544,-6.0003174 - Road Name - CURVE - - - - -9.055915,-2.00031738281 9.6649858,-2.077712483 10.274056,-2.26950068 10.77921,-2.55298308 11.191993,-2.92815928 11.51529,-3.369132 11.746218,-3.8329032 11.884774,-4.2968745 11.930959,-4.875339 -11.930544,-5.0003174 11.884359,-5.5787819 11.745803,-6.0427532 11.514875,-6.5065244 11.191578,-6.9474971 10.778795,-7.3226733 10.273641,-7.6061557 9.6645708,-7.7979439 9.0555,-7.875339 - - Road Name - CURVE - - - - -9.0435048,-10.5550195 9.480786,-10.2191668 9.963148,-10.0731439 10.540222,-10.2495527 10.968444,-10.525815 11.419238,-10.8336443 12.01882,-10.9565825 12.559787,-10.7996079 12.956495,-10.4089966 - - Road Name - SQUIGGLE - - - - - 1,-9 1.4,-10 1.8,-9 2.2,-10 2.6,-9 3.0,-10 3.4,-9 3.8,-10 4.2,-9 4.6,-10 - - Long ZigZag Road Name - ZIGZAG - - - - diff --git a/demo/data/test/raw/charplacement.xsd b/demo/data/test/raw/charplacement.xsd deleted file mode 100644 index 345905d06..000000000 --- a/demo/data/test/raw/charplacement.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/data/test/raw/displacement.gfs b/demo/data/test/raw/displacement.gfs deleted file mode 100644 index 3034d7109..000000000 --- a/demo/data/test/raw/displacement.gfs +++ /dev/null @@ -1,25 +0,0 @@ - - - displacement - displacement - - 1 - 1.00000 - 2.00000 - 1.00000 - 5.00000 - - - NAME - NAME - String - 0 - - - CLASS - CLASS - String - 0 - - - diff --git a/demo/data/test/raw/displacement.gml b/demo/data/test/raw/displacement.gml deleted file mode 100644 index 9b3a007ce..000000000 --- a/demo/data/test/raw/displacement.gml +++ /dev/null @@ -1,173 +0,0 @@ - - - - - 00 - 13-13 - - - - - - 1,-3 1,-2 - Road - CLOCKWISE - - - 1,-2 2,-1 - Road - CLOCKWISE - - - 2,-1 3,-1 - Road - CLOCKWISE - - - 3,-1 4,-2 - Road - CLOCKWISE - - - 4,-2 4,-3 - Road - CLOCKWISE - - - 4,-3 3,-4 - Road - CLOCKWISE - - - 3,-4 2,-4 - Road - CLOCKWISE - - - 2,-4 1,-3 - Road - CLOCKWISE - - - - 5,-3 6,-4 - Road - ANTICLOCKWISE - - - 6,-4 7,-4 - Road - ANTICLOCKWISE - - - 7,-4 8,-3 - Road - ANTICLOCKWISE - - - 8,-3 8,-2 - Road - ANTICLOCKWISE - - - 8,-2 7,-1 - Road - ANTICLOCKWISE - - - 7,-1 6,-1 - Road - ANTICLOCKWISE - - - 6,-1 5,-2 - Road - ANTICLOCKWISE - - - 5,-2 5,-3 - Road - ANTICLOCKWISE - - - - - 1,-6.5 2,-5.5 3,-5 4,-5 5,-5.5 6,-6.5 - - Long Road Name To Go Around The Whole Curve! - CURVE - - - - - 1,-7 2,-8 3,-8.5 4,-8.5 5,-8 6,-7 - - Long Road Name To Go Around The Whole Curve! - CURVE - - - - - 3,-8.5 2,-9.5 1.5,-10.5 1.5,-11.5 2,-12.5 3,-13.5 - - Long Road Name To Go Around The Whole Curve! - VERTCURVE - - - - 4,-8.5 5,-9.5 5.5,-10.5 5.5,-11.5 5,-12.5 4,-13.5 - - Long Road Name To Go Around The Whole Curve! - VERTCURVE - - - - - 9.2,-4 9,-3 10,-3 10.2,-4 - - Road Name - PARALLELOGRAM - - - - 9,-2 9.2,-1 10.2,-1 10,-2 - - Road Name - PARALLELOGRAM - - - - - 11,-1 11,-2 12,-2 - - Road Name - CORNER - - - - 11,-4 12,-4 12,-3 - - Road Name - CORNER - - - - 12.5,-1 13.5,-1 13.5,-2 - - Road Name - CORNER - - - - 12.5,-4 12.5,-3 13.5,-3 - - Road Name - CORNER - - - - diff --git a/demo/data/test/raw/displacement.xsd b/demo/data/test/raw/displacement.xsd deleted file mode 100644 index 66f9b90f0..000000000 --- a/demo/data/test/raw/displacement.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/data/test/raw/overlap.gfs b/demo/data/test/raw/overlap.gfs deleted file mode 100644 index 67e8c818e..000000000 --- a/demo/data/test/raw/overlap.gfs +++ /dev/null @@ -1,25 +0,0 @@ - - - overlap - overlap - - 1 - 1.00000 - 2.00000 - 1.00000 - 5.00000 - - - NAME - NAME - String - 0 - - - CLASS - CLASS - String - 0 - - - diff --git a/demo/data/test/raw/overlap.gml b/demo/data/test/raw/overlap.gml deleted file mode 100644 index 5fe0e85df..000000000 --- a/demo/data/test/raw/overlap.gml +++ /dev/null @@ -1,127 +0,0 @@ - - - - - 00 - 13-13 - - - - - - 1,-1 1,-10 - Road Name - NETWORK - - - 1,-3 7,-3 - Road Name - NETWORK - - - 7,-3 7,-7 - Road Name - NETWORK - - - 3,-2 3,-8 - Road Name - NETWORK - - - 7,-7 1,-7 - Road Name - NETWORK - - - 5,-2 5,-8 - Road Name - NETWORK - - - - 8,-3 12,-3 - Road Name - CROSS - - - 10,-1 10,-5 - Road Name - CROSS - - - - - 10,-9 13,-9 13,-11 11,-11 11,-8 - - Road Name - SELFOVERLAP - - - - 4,-9 4,-13 - Road Name - NETWORK2 - - - 8,-9 8,-13 - Road Name - NETWORK2 - - - 1,-11 9,-11 - Road Name - NETWORK2 - - - 2,-9 2,-13 - Road Name - NETWORK2 - - - 6,-9 6,-13 - Road Name - NETWORK2 - - - - - 8.8,-6 8.8,-8 - Long Road Name - BENDOVER - - - 8,-6 8,-7 10,-7 10,-8 - Long Road Name - BENDUNDER - - - - 12.2,-6 12.2,-8 - Long Road Name - BENDOVER - - - 11,-6 11,-7 13,-7 13,-8 - Long Road Name - BENDUNDER - - - - 12.2,-3.5 12.2,-5.5 - Long Road Name - BENDOVER - - - 11,-4.5 13,-4.5 - Long Road Name - BENDUNDER - - - - - diff --git a/demo/data/test/raw/overlap.xsd b/demo/data/test/raw/overlap.xsd deleted file mode 100644 index 1a7cf35a2..000000000 --- a/demo/data/test/raw/overlap.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/data/test/raw/textspacing.gfs b/demo/data/test/raw/textspacing.gfs deleted file mode 100644 index c589181eb..000000000 --- a/demo/data/test/raw/textspacing.gfs +++ /dev/null @@ -1,25 +0,0 @@ - - - textspacing - textspacing - - 1 - 1.00000 - 2.00000 - 1.00000 - 5.00000 - - - NAME - NAME - String - 0 - - - CLASS - CLASS - String - 0 - - - diff --git a/demo/data/test/raw/textspacing.gml b/demo/data/test/raw/textspacing.gml deleted file mode 100644 index 62fff2415..000000000 --- a/demo/data/test/raw/textspacing.gml +++ /dev/null @@ -1,117 +0,0 @@ - - - - - 00 - 13-13 - - - - - - 2,-1 1,-3 2,-5 - Road Name - TRIANGLE - - - 3,-1 4,-3 3,-5 - Road Name - TRIANGLE - - - - 1,-7 2,-7 - Road Name - STRAIGHT - - - 1,-8 3,-8 - Road Name - STRAIGHT - - - 1,-9 4,-9 - Road Name - STRAIGHT - - - 1,-10 5,-10 - Road Name - STRAIGHT - - - - 1,-11 7,-11 - Road Name - STRAIGHT - - - - 1,-12 13,-12 - - Road Name - STRAIGHT - - - - 1,-13 2,-13 5,-13 10,-13 13,-13 - - Road Name - STRAIGHT - - - - 6,-1 5,-3 5,-5 - Road Name - BEND - - - 7,-1 8,-3 8,-5 - Road Name - BEND - - - 5,-6 5,-8 6,-10 - Road Name - BEND - - - 8,-6 8,-8 7,-10 - Road Name - BEND - - - - 10.055915,-1.00031738281 10.6649858,-1.077712483 11.274056,-1.26950068 11.77921,-1.55298308 12.191993,-1.92815928 12.51529,-2.369132 12.746218,-2.8329032 12.884774,-3.2968745 12.930959,-3.875339 - Road Name - CURVE - - - 10.0555,-8.875339 10.6645708,-8.7979439 11.273641,-8.6061557 11.778795,-8.3226733 12.191578,-7.9474971 12.514875,-7.5065244 12.745803,-7.0427532 12.884359,-6.5787819 12.930544,-6.0003174 - Road Name - CURVE - - - - -9.055915,-2.00031738281 9.6649858,-2.077712483 10.274056,-2.26950068 10.77921,-2.55298308 11.191993,-2.92815928 11.51529,-3.369132 11.746218,-3.8329032 11.884774,-4.2968745 11.930959,-4.875339 -11.930544,-5.0003174 11.884359,-5.5787819 11.745803,-6.0427532 11.514875,-6.5065244 11.191578,-6.9474971 10.778795,-7.3226733 10.273641,-7.6061557 9.6645708,-7.7979439 9.0555,-7.875339 - - Road Name - CURVE - - - - -9.0435048,-10.5550195 9.480786,-10.2191668 9.963148,-10.0731439 10.540222,-10.2495527 10.968444,-10.525815 11.419238,-10.8336443 12.01882,-10.9565825 12.559787,-10.7996079 12.956495,-10.4089966 - - Road Name - SQUIGGLE - - - - diff --git a/demo/data/test/raw/textspacing.xsd b/demo/data/test/raw/textspacing.xsd deleted file mode 100644 index 2e6a4d755..000000000 --- a/demo/data/test/raw/textspacing.xsd +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/demo/data/test/readme.txt b/demo/data/test/readme.txt deleted file mode 100644 index c1dc62efd..000000000 --- a/demo/data/test/readme.txt +++ /dev/null @@ -1,3 +0,0 @@ -These files are for testing various rendering parts of mapnik, they have been created by hand. -The raw files are in the raw/ folder (they were created with inkscape to assist!) -Run the regenerate.sh script to regenerate the shape files from the gml files, this requires ogr2ogr to run. diff --git a/demo/data/test/regenerate.sh b/demo/data/test/regenerate.sh deleted file mode 100755 index de1b5babe..000000000 --- a/demo/data/test/regenerate.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh -rm -f textspacing.shp textspacing.shx textspacing.dbf -ogr2ogr -f "ESRI Shapefile" textspacing raw/textspacing.gml -mv textspacing/* ./ -rmdir textspacing - -rm -f overlap.shp overlap.shx overlap.dbf -ogr2ogr -f "ESRI Shapefile" overlap raw/overlap.gml -mv overlap/* ./ -rmdir overlap - -rm -f displacement.shp displacement.shx displacement.dbf -ogr2ogr -f "ESRI Shapefile" displacement raw/displacement.gml -mv displacement/* ./ -rmdir displacement - -rm -f charplacement.shp charplacement.shx charplacement.dbf -ogr2ogr -f "ESRI Shapefile" charplacement raw/charplacement.gml -mv charplacement/* ./ -rmdir charplacement diff --git a/demo/viewer/main.cpp b/demo/viewer/main.cpp index 73af0c95c..6d83c46a9 100644 --- a/demo/viewer/main.cpp +++ b/demo/viewer/main.cpp @@ -19,7 +19,7 @@ // qt -#include +#include #include #include #include diff --git a/demo/viewer/mainwindow.cpp b/demo/viewer/mainwindow.cpp index 996138678..e87e7a0d4 100644 --- a/demo/viewer/mainwindow.cpp +++ b/demo/viewer/mainwindow.cpp @@ -32,7 +32,10 @@ #include #include #include - +#include +#include +#include +#include // mapnik #ifndef Q_MOC_RUN // QT moc chokes on BOOST_JOIN diff --git a/demo/viewer/mainwindow.hpp b/demo/viewer/mainwindow.hpp index 99936da73..f5f01863f 100644 --- a/demo/viewer/mainwindow.hpp +++ b/demo/viewer/mainwindow.hpp @@ -22,7 +22,6 @@ #define MAINWINDOW_HPP #include -#include #include #include #include @@ -78,7 +77,6 @@ private: LayerTab *layerTab_; StyleTab * styleTab_; MapWidget * mapWidget_; - QPrinter printer; //actions QList exportAsActs; QActionGroup *toolsGroup; diff --git a/demo/viewer/mapwidget.cpp b/demo/viewer/mapwidget.cpp index 0b8753e44..93be08351 100644 --- a/demo/viewer/mapwidget.cpp +++ b/demo/viewer/mapwidget.cpp @@ -26,7 +26,6 @@ #include #include -#include #include #include #include @@ -528,42 +527,7 @@ void render_agg(mapnik::Map const& map, double scaling_factor, QPixmap & pix) void render_grid(mapnik::Map const& map, double scaling_factor, QPixmap & pix) { - unsigned width=map.width(); - unsigned height=map.height(); - - mapnik::grid buf(width,height,"F_CODE", 1); - mapnik::grid_renderer ren(map,buf,scaling_factor); - - try - { - ren.apply(); - mapnik::value_integer * imdata = static_cast(buf.raw_data()); - - // Not sure how to display long long values ?? - //QImage image(width,height,QImage::Format_RGB32); - //for (unsigned i = 0 ; i < height ; ++i) - //{ - // for (unsigned j = 0 ; j < width ; ++j) - // { - // image.setPixel(j,i,qRgb((uint8_t)(imdata[i*width+j]>>8), - // (uint8_t)(imdata[i*width+j+1]>>8), - // (uint8_t)(imdata[i*width+j+2]>>8))); - // } - //} - //pix = QPixmap::fromImage(image); - } - catch (mapnik::config_error & ex) - { - std::cerr << ex.what() << std::endl; - } - catch (const std::exception & ex) - { - std::cerr << "exception: " << ex.what() << std::endl; - } - catch (...) - { - std::cerr << "Unknown exception caught!\n"; - } + std::cerr << "Not supported" << std::endl; } diff --git a/demo/viewer/viewer.pro b/demo/viewer/viewer.pro index adf2a46be..a19bc9c95 100644 --- a/demo/viewer/viewer.pro +++ b/demo/viewer/viewer.pro @@ -2,8 +2,10 @@ # Mapnik viewer - Copyright (C) 2007 Artem Pavlenko ###################################################################### TEMPLATE = app +QT += core gui widgets QMAKE_CXX = clang++ QMAKE_CXXFLAGS += $$system(mapnik-config --cxxflags) +QMAKE_CXXFLAGS += $$system(mapnik-config --includes --dep-includes) QMAKE_LFLAGS += $$system(mapnik-config --libs) QMAKE_LFLAGS += $$system(mapnik-config --ldflags --dep-libs) QMAKE_LFLAGS += -lboost_timer diff --git a/deps/agg/include/agg_vpgen_clip_polygon.h b/deps/agg/include/agg_vpgen_clip_polygon.h index ded754e21..4972a390b 100644 --- a/deps/agg/include/agg_vpgen_clip_polygon.h +++ b/deps/agg/include/agg_vpgen_clip_polygon.h @@ -18,6 +18,9 @@ #include "agg_basics.h" +// https://github.com/mapnik/mapnik/issues/1860 +#include + namespace agg { @@ -25,7 +28,8 @@ namespace agg // // See Implementation agg_vpgen_clip_polygon.cpp // - class vpgen_clip_polygon + + class MAPNIK_DECL vpgen_clip_polygon { public: vpgen_clip_polygon() : diff --git a/deps/clipper/include/clipper.hpp b/deps/clipper/include/clipper.hpp index 78f6b1ca0..4683ef38d 100755 --- a/deps/clipper/include/clipper.hpp +++ b/deps/clipper/include/clipper.hpp @@ -105,7 +105,7 @@ private: enum JoinType { jtSquare, jtRound, jtMiter }; bool Orientation(const Polygon &poly); -double Area(const Polygon &poly); +MAPNIK_DECL double Area(const Polygon &poly); void OffsetPolygons(const Polygons &in_polys, Polygons &out_polys, double delta, JoinType jointype = jtSquare, double limit = 0, bool autoFix = true); diff --git a/include/mapnik/cairo_context.hpp b/include/mapnik/cairo_context.hpp index db4e8b1e3..16a55e617 100644 --- a/include/mapnik/cairo_context.hpp +++ b/include/mapnik/cairo_context.hpp @@ -41,7 +41,6 @@ // cairo #include -#include // stl #include diff --git a/include/mapnik/datasource.hpp b/include/mapnik/datasource.hpp index 2967cb5bb..b2edb91d4 100644 --- a/include/mapnik/datasource.hpp +++ b/include/mapnik/datasource.hpp @@ -134,19 +134,23 @@ public: typedef boost::shared_ptr datasource_ptr; -#define DATASOURCE_PLUGIN(classname) \ - extern "C" MAPNIK_EXP const char * datasource_name() \ - { \ - return classname::name(); \ - } \ - extern "C" MAPNIK_EXP datasource* create(parameters const& params) \ - { \ - return new classname(params); \ - } \ - extern "C" MAPNIK_EXP void destroy(datasource *ds) \ - { \ - delete ds; \ - } +#ifdef MAPNIK_STATIC_PLUGINS + #define DATASOURCE_PLUGIN(classname) +#else + #define DATASOURCE_PLUGIN(classname) \ + extern "C" MAPNIK_EXP const char * datasource_name() \ + { \ + return classname::name(); \ + } \ + extern "C" MAPNIK_EXP datasource* create(parameters const& params) \ + { \ + return new classname(params); \ + } \ + extern "C" MAPNIK_EXP void destroy(datasource *ds) \ + { \ + delete ds; \ + } +#endif } diff --git a/include/mapnik/debug_symbolizer.hpp b/include/mapnik/debug_symbolizer.hpp index 91ea152d2..225b97c54 100644 --- a/include/mapnik/debug_symbolizer.hpp +++ b/include/mapnik/debug_symbolizer.hpp @@ -25,14 +25,30 @@ #include #include +#include namespace mapnik { +enum debug_symbolizer_mode_enum { + DEBUG_SYM_MODE_COLLISION, + DEBUG_SYM_MODE_VERTEX, + debug_symbolizer_mode_enum_MAX +}; + +DEFINE_ENUM( debug_symbolizer_mode_e, debug_symbolizer_mode_enum ); + struct MAPNIK_DECL debug_symbolizer : public symbolizer_base { - debug_symbolizer() : symbolizer_base() {} + debug_symbolizer(); + debug_symbolizer(debug_symbolizer const& rhs); + debug_symbolizer_mode_e get_mode() const; + void set_mode(debug_symbolizer_mode_e mode); + +private: + debug_symbolizer_mode_e mode_; + }; } diff --git a/include/mapnik/feature.hpp b/include/mapnik/feature.hpp index 109dadab9..ce9a3dc79 100644 --- a/include/mapnik/feature.hpp +++ b/include/mapnik/feature.hpp @@ -306,9 +306,10 @@ inline std::ostream& operator<< (std::ostream & out,feature_impl const& f) return out; } +// TODO - remove at Mapnik 3.x typedef feature_impl Feature; -typedef boost::shared_ptr feature_ptr; +typedef boost::shared_ptr feature_ptr; } diff --git a/include/mapnik/feature_factory.hpp b/include/mapnik/feature_factory.hpp index 9a6574932..7896ef04b 100644 --- a/include/mapnik/feature_factory.hpp +++ b/include/mapnik/feature_factory.hpp @@ -35,11 +35,11 @@ namespace mapnik { struct feature_factory { - static boost::shared_ptr create (context_ptr const& ctx, mapnik::value_integer fid) + static boost::shared_ptr create (context_ptr const& ctx, mapnik::value_integer fid) { - //return boost::allocate_shared(boost::pool_allocator(),fid); - //return boost::allocate_shared(boost::fast_pool_allocator(),fid); - return boost::make_shared(ctx,fid); + //return boost::allocate_shared(boost::pool_allocator(),fid); + //return boost::allocate_shared(boost::fast_pool_allocator(),fid); + return boost::make_shared(ctx,fid); } }; } diff --git a/include/mapnik/feature_style_processor_impl.hpp b/include/mapnik/feature_style_processor_impl.hpp index eade195b3..bd7653ae2 100644 --- a/include/mapnik/feature_style_processor_impl.hpp +++ b/include/mapnik/feature_style_processor_impl.hpp @@ -606,7 +606,7 @@ void feature_style_processor::render_style( BOOST_FOREACH(rule const* r, rc.get_if_rules() ) { expression_ptr const& expr=r->get_filter(); - value_type result = boost::apply_visitor(evaluate(*feature),*expr); + value_type result = boost::apply_visitor(evaluate(*feature),*expr); if (result.to_bool()) { #if defined(RENDERING_STATS) diff --git a/include/mapnik/filter_factory.hpp b/include/mapnik/filter_factory.hpp index 1150ece5d..68d729a6c 100644 --- a/include/mapnik/filter_factory.hpp +++ b/include/mapnik/filter_factory.hpp @@ -1,2 +1,8 @@ +// TODO - remove this file at mapnik 3.x +#ifdef _MSC_VER +#pragma NOTE("filter_factory.hpp" is now called "expression.hpp") +#else #warning "filter_factory.hpp" is now called "expression.hpp" +#endif + #include diff --git a/include/mapnik/geom_util.hpp b/include/mapnik/geom_util.hpp index 36f030174..350c797ab 100644 --- a/include/mapnik/geom_util.hpp +++ b/include/mapnik/geom_util.hpp @@ -200,10 +200,10 @@ inline bool point_on_path(double x,double y,Iter start,Iter end, double tol) struct filter_in_box { box2d box_; - explicit filter_in_box(const box2d& box) + explicit filter_in_box(box2d const& box) : box_(box) {} - bool pass(const box2d& extent) const + bool pass(box2d const& extent) const { return extent.intersects(box_); } @@ -211,23 +211,16 @@ struct filter_in_box struct filter_at_point { - coord2d pt_; - double tol_; - explicit filter_at_point(const coord2d& pt, double tol=0) - : pt_(pt), - tol_(tol) {} - bool pass(const box2d& extent) const + box2d box_; + explicit filter_at_point(coord2d const& pt, double tol=0) + : box_(pt,pt) { - if (tol_ == 0) - { - return extent.contains(pt_); - } - else - { - box2d extent2 = extent; - extent2.pad(tol_); - return extent2.contains(pt_); - } + box_.pad(tol); + } + + bool pass(box2d const& extent) const + { + return extent.intersects(box_); } }; diff --git a/include/mapnik/hit_test_filter.hpp b/include/mapnik/hit_test_filter.hpp index 792c8c12e..b9c1f6a6b 100644 --- a/include/mapnik/hit_test_filter.hpp +++ b/include/mapnik/hit_test_filter.hpp @@ -38,7 +38,7 @@ public: y_(y), tol_(tol) {} - bool pass(Feature & feature) + bool pass(feature_impl & feature) { BOOST_FOREACH(geometry_type & geom, feature.paths()) { diff --git a/include/mapnik/marker.hpp b/include/mapnik/marker.hpp index d9c1fe970..568f56550 100644 --- a/include/mapnik/marker.hpp +++ b/include/mapnik/marker.hpp @@ -100,17 +100,25 @@ public: inline double width() const { if (is_bitmap()) + { return (*bitmap_data_)->width(); + } else if (is_vector()) - return (*vector_data_)->width(); + { + return (*vector_data_)->bounding_box().width(); + } return 0; } inline double height() const { if (is_bitmap()) + { return (*bitmap_data_)->height(); + } else if (is_vector()) - return (*vector_data_)->height(); + { + return (*vector_data_)->bounding_box().height(); + } return 0; } diff --git a/include/mapnik/palette.hpp b/include/mapnik/palette.hpp index 3598a2b08..972cf56e3 100644 --- a/include/mapnik/palette.hpp +++ b/include/mapnik/palette.hpp @@ -34,7 +34,6 @@ #include typedef google::dense_hash_map rgba_hash_table; #else - #warning compiling without dense_hash_map #include typedef boost::unordered_map rgba_hash_table; #endif diff --git a/include/mapnik/raster_colorizer.hpp b/include/mapnik/raster_colorizer.hpp index 806af3602..76c09fd94 100644 --- a/include/mapnik/raster_colorizer.hpp +++ b/include/mapnik/raster_colorizer.hpp @@ -40,7 +40,6 @@ // mapnik #include #include -#include #include // boost @@ -52,6 +51,10 @@ namespace mapnik { +class feature_impl; +class raster; + + //! \brief Enumerates the modes of interpolation enum colorizer_mode_enum { @@ -197,7 +200,7 @@ public: //! //! \param[in, out] raster A raster stored in float32 single channel format, which gets colorized in place. //! \param[in] f The feature used to find 'NODATA' information if available - void colorize(raster_ptr const& raster, Feature const& f) const; + void colorize(boost::shared_ptr const& raster, feature_impl const& f) const; //! \brief Perform the translation of input to output diff --git a/include/mapnik/symbolizer_helpers.hpp b/include/mapnik/symbolizer_helpers.hpp index c6bc585c2..4da83c360 100644 --- a/include/mapnik/symbolizer_helpers.hpp +++ b/include/mapnik/symbolizer_helpers.hpp @@ -57,7 +57,7 @@ class text_symbolizer_helper { public: text_symbolizer_helper(text_symbolizer const& sym, - Feature const& feature, + feature_impl const& feature, proj_transform const& prj_trans, unsigned width, unsigned height, @@ -104,7 +104,7 @@ protected: //Input text_symbolizer const& sym_; - Feature const& feature_; + feature_impl const& feature_; proj_transform const& prj_trans_; CoordTransform const& t_; FaceManagerT & font_manager_; @@ -142,7 +142,7 @@ class shield_symbolizer_helper: public text_symbolizer_helper~T(); } }; +#ifdef __GNUC__ template class CreatePolicy=CreateStatic> class MAPNIK_EXP singleton + template class CreatePolicy=CreateStatic> class MAPNIK_DECL singleton { -#ifdef __SUNPRO_CC - /* Sun's C++ compiler will issue the following errors if CreatePolicy is used: - Error: A class template name was expected instead of mapnik::CreatePolicy - Error: A "friend" declaration must specify a class or function. - */ - friend class CreatePolicy; #else - friend class CreatePolicy; + template class CreatePolicy=CreateStatic> class singleton + { #endif - static T* pInstance_; - static bool destroyed_; - singleton(const singleton &rhs); - singleton& operator=(const singleton&); - static void onDeadReference() - { - throw std::runtime_error("dead reference!"); - } - - static void DestroySingleton() - { - CreatePolicy::destroy(pInstance_); - pInstance_ = 0; - destroyed_ = true; - } - -protected: -#ifdef MAPNIK_THREADSAFE - static mutex mutex_; +#ifdef __SUNPRO_CC +/* Sun's C++ compiler will issue the following errors if CreatePolicy is used: + Error: A class template name was expected instead of mapnik::CreatePolicy + Error: A "friend" declaration must specify a class or function. +*/ + friend class CreatePolicy; +#else + friend class CreatePolicy; #endif - singleton() {} -public: - static T& instance() - { - if (! pInstance_) + static T* pInstance_; + static bool destroyed_; + singleton(const singleton &rhs); + singleton& operator=(const singleton&); + + static void onDeadReference() { + throw std::runtime_error("dead reference!"); + } + + static void DestroySingleton() + { + CreatePolicy::destroy(pInstance_); + pInstance_ = 0; + destroyed_ = true; + } + + protected: #ifdef MAPNIK_THREADSAFE - mutex::scoped_lock lock(mutex_); + static mutex mutex_; #endif + singleton() {} + public: + static T& instance() + { if (! pInstance_) { - if (destroyed_) +#ifdef MAPNIK_THREADSAFE + mutex::scoped_lock lock(mutex_); +#endif + if (! pInstance_) { - destroyed_ = false; - onDeadReference(); - } - else - { - pInstance_ = CreatePolicy::create(); + if (destroyed_) + { + destroyed_ = false; + onDeadReference(); + } + else + { + pInstance_ = CreatePolicy::create(); - // register destruction - std::atexit(&DestroySingleton); + // register destruction + std::atexit(&DestroySingleton); + } } } + return *pInstance_; } - return *pInstance_; - } -}; + }; #ifdef MAPNIK_THREADSAFE -template class CreatePolicy> mutex singleton::mutex_; + template class CreatePolicy> mutex singleton::mutex_; #endif -template class CreatePolicy> T* singleton::pInstance_=0; -template class CreatePolicy> bool singleton::destroyed_=false; + template class CreatePolicy> T* singleton::pInstance_=0; + template class CreatePolicy> bool singleton::destroyed_=false; + + +#ifdef _WINDOWS + +// UTF8 <--> UTF16 conversion routines + +MAPNIK_DECL std::string utf16_to_utf8(std::wstring const& wstr); +MAPNIK_DECL std::wstring utf8_to_utf16(std::string const& str); + +#endif // _WINDOWS } diff --git a/plugins/input/csv/build.py b/plugins/input/csv/build.py index ae41bf6d1..d3dfdea12 100644 --- a/plugins/input/csv/build.py +++ b/plugins/input/csv/build.py @@ -1,37 +1,62 @@ -#!/usr/bin/env python +# +# This file is part of Mapnik (c++ mapping toolkit) +# +# Copyright (C) 2013 Artem Pavlenko +# +# Mapnik 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 +# +# -import os Import ('plugin_base') Import ('env') PLUGIN_NAME = 'csv' -install_dest = env['MAPNIK_INPUT_PLUGINS_DEST'] plugin_env = plugin_base.Clone() plugin_sources = Split( """ %(PLUGIN_NAME)s_datasource.cpp """ % locals() - ) +) +# Link Library to Dependencies libraries = [] -libraries.append('mapnik') libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append(env['ICU_LIB_NAME']) - -TARGET = plugin_env.SharedLibrary( - '../%s' % PLUGIN_NAME, - SHLIBPREFIX='', - SHLIBSUFFIX='.input', - source=plugin_sources, - LIBS=libraries, - LINKFLAGS=env.get('CUSTOM_LDFLAGS') - ) -# if the plugin links to libmapnik ensure it is built first -Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(install_dest, TARGET) - env.Alias('install', install_dest) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env.get('CUSTOM_LDFLAGS')) + + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/csv/csv_datasource.cpp b/plugins/input/csv/csv_datasource.cpp index b98fdb188..e1478cd36 100644 --- a/plugins/input/csv/csv_datasource.cpp +++ b/plugins/input/csv/csv_datasource.cpp @@ -30,6 +30,7 @@ // mapnik #include +#include #include #include #include @@ -119,9 +120,15 @@ csv_datasource::csv_datasource(parameters const& params) } else { +#if defined (_WINDOWS) + std::ifstream in(mapnik::utf8_to_utf16(filename_),std::ios_base::in | std::ios_base::binary); +#else std::ifstream in(filename_.c_str(),std::ios_base::in | std::ios_base::binary); +#endif if (!in.is_open()) + { throw mapnik::datasource_exception("CSV Plugin: could not open: '" + filename_ + "'"); + } parse_csv(in,escape_, separator_, quote_); in.close(); } @@ -859,7 +866,7 @@ void csv_datasource::parse_csv(T & stream, } } } - if (!feature_count > 0) + if (feature_count < 1) { MAPNIK_LOG_ERROR(csv) << "CSV Plugin: could not parse any lines of data"; } diff --git a/plugins/input/gdal/build.py b/plugins/input/gdal/build.py index 501ff089f..2f2f535e2 100644 --- a/plugins/input/gdal/build.py +++ b/plugins/input/gdal/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,35 +22,47 @@ Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'gdal' plugin_env = plugin_base.Clone() -gdal_src = Split( +plugin_sources = Split( """ - gdal_datasource.cpp - gdal_featureset.cpp - """ - ) - -# clear out and rebuild libs -plugin_env['LIBS'] = [env['PLUGINS']['gdal']['lib']] + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + """ % locals() +) # Link Library to Dependencies -plugin_env['LIBS'].append('mapnik') -plugin_env['LIBS'].append('boost_system%s' % env['BOOST_APPEND']) -plugin_env['LIBS'].append(env['ICU_LIB_NAME']) +libraries = [env['PLUGINS']['gdal']['lib']] +libraries.append('boost_system%s' % env['BOOST_APPEND']) +libraries.append(env['ICU_LIB_NAME']) if env['RUNTIME_LINK'] == 'static': cmd = 'gdal-config --dep-libs' plugin_env.ParseConfig(cmd) - plugin_env['LIBS'].append('proj') + libraries.append('proj') -input_plugin = plugin_env.SharedLibrary('../gdal', source=gdal_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LINKFLAGS=env['CUSTOM_LDFLAGS']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) -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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/geojson/build.py b/plugins/input/geojson/build.py index f463862a1..73aeb125f 100644 --- a/plugins/input/geojson/build.py +++ b/plugins/input/geojson/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2012 Artem Pavlenko +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,7 +17,7 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # - +# Import ('env') @@ -32,27 +32,45 @@ 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_NAME = 'geojson' + plugin_env = plugin_base.Clone() - geojson_src = Split( + + plugin_sources = Split( """ - geojson_datasource.cpp - geojson_featureset.cpp - """ - ) - libraries = [] + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + """ % locals() + ) + # Link Library to Dependencies - libraries.append('mapnik') + libraries = [] 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']) + if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') - # if the plugin links to libmapnik ensure it is built first - Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) - 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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + + plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, + } + + Return('plugin_obj') diff --git a/plugins/input/geojson/geojson_datasource.cpp b/plugins/input/geojson/geojson_datasource.cpp index 153597cda..1ae885a8d 100644 --- a/plugins/input/geojson/geojson_datasource.cpp +++ b/plugins/input/geojson/geojson_datasource.cpp @@ -39,6 +39,7 @@ // mapnik #include +#include #include #include #include @@ -106,7 +107,11 @@ geojson_datasource::geojson_datasource(parameters const& params) typedef std::istreambuf_iterator base_iterator_type; - std::ifstream is(file_.c_str()); +#if defined (_WINDOWS) + std::ifstream is(mapnik::utf8_to_utf16(file_),std::ios_base::in | std::ios_base::binary); +#else + std::ifstream is(file_.c_str(),std::ios_base::in | std::ios_base::binary); +#endif boost::spirit::multi_pass begin = boost::spirit::make_default_multi_pass(base_iterator_type(is)); @@ -204,9 +209,17 @@ mapnik::featureset_ptr geojson_datasource::features(mapnik::query const& q) cons return mapnik::featureset_ptr(); } -// FIXME mapnik::featureset_ptr geojson_datasource::features_at_point(mapnik::coord2d const& pt, double tol) const { - throw mapnik::datasource_exception("GeoJSON Plugin: features_at_point is not supported yet"); - return mapnik::featureset_ptr(); + mapnik::box2d query_bbox(pt, pt); + query_bbox.pad(tol); + mapnik::query q(query_bbox); + std::vector const& desc = desc_.get_descriptors(); + std::vector::const_iterator itr = desc.begin(); + std::vector::const_iterator end = desc.end(); + for ( ;itr!=end;++itr) + { + q.add_property_name(itr->get_name()); + } + return features(q); } diff --git a/plugins/input/occi/build.py b/plugins/input/occi/build.py index 050cbce9b..946d32dbb 100644 --- a/plugins/input/occi/build.py +++ b/plugins/input/occi/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,35 +17,49 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'occi' plugin_env = plugin_base.Clone() -occi_src = Split( +plugin_sources = Split( """ - occi_types.cpp - occi_datasource.cpp - occi_featureset.cpp + %(PLUGIN_NAME)s_types.cpp + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp spatial_classesm.cpp spatial_classeso.cpp - """ - ) + """ % locals() +) libraries = [ 'occi', 'ociei' ] -libraries.append('mapnik') libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append(env['ICU_LIB_NAME']) -input_plugin = plugin_env.SharedLibrary('../occi', source=occi_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) -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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/ogr/build.py b/plugins/input/ogr/build.py index 26512b856..881d20006 100644 --- a/plugins/input/ogr/build.py +++ b/plugins/input/ogr/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,50 +17,67 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# - +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'ogr' plugin_env = plugin_base.Clone() -ogr_src = Split( +plugin_sources = Split( """ - ogr_converter.cpp - ogr_datasource.cpp - ogr_featureset.cpp - ogr_index_featureset.cpp - """ - ) - -plugin_env['LIBS'] = [env['PLUGINS']['ogr']['lib']] + %(PLUGIN_NAME)s_converter.cpp + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + %(PLUGIN_NAME)s_index_featureset.cpp + """ % locals() +) # Link Library to Dependencies -plugin_env['LIBS'].append('mapnik') -plugin_env['LIBS'].append(env['ICU_LIB_NAME']) -plugin_env['LIBS'].append('boost_system%s' % env['BOOST_APPEND']) -plugin_env['LIBS'].append('boost_filesystem%s' % env['BOOST_APPEND']) +libraries = [env['PLUGINS']['ogr']['lib']] +libraries.append(env['ICU_LIB_NAME']) +libraries.append('boost_system%s' % env['BOOST_APPEND']) +libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) + +cxxflags = [] if env['RUNTIME_LINK'] == 'static': cmd = 'gdal-config --dep-libs' plugin_env.ParseConfig(cmd) - plugin_env['LIBS'].append('proj') + libraries.append('proj') 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 < 46: # avoid ubuntu issue with boost interprocess: # https://github.com/mapnik/mapnik/issues/1082 - plugin_env.Append(CXXFLAGS = '-fpermissive') + cxxflags.Append('-fpermissive') -input_plugin = plugin_env.SharedLibrary('../ogr', source=ogr_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LINKFLAGS=env['CUSTOM_LDFLAGS']) +plugin_env.Append(CXXFLAGS=cxxflags) -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], input_plugin) - env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) + + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'CXXFLAGS': cxxflags, + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/ogr/ogr_datasource.cpp b/plugins/input/ogr/ogr_datasource.cpp index b629d1e3d..2e2f61758 100644 --- a/plugins/input/ogr/ogr_datasource.cpp +++ b/plugins/input/ogr/ogr_datasource.cpp @@ -82,7 +82,7 @@ void ogr_datasource::init(mapnik::parameters const& params) // initialize ogr formats OGRRegisterAll(); - + boost::optional file = params.get("file"); boost::optional string = params.get("string"); if (! file && ! string) @@ -525,7 +525,7 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol) if (indexed_) { - filter_at_point filter(pt); + filter_at_point filter(pt, tol); return featureset_ptr(new ogr_index_featureset (ctx, *layer, @@ -535,13 +535,11 @@ featureset_ptr ogr_datasource::features_at_point(coord2d const& pt, double tol) } else { - OGRPoint point; - point.setX (pt.x); - point.setY (pt.y); - + mapnik::box2d bbox(pt, pt); + bbox.pad(tol); return featureset_ptr(new ogr_featureset (ctx, *layer, - point, + bbox, desc_.get_encoding())); } } diff --git a/plugins/input/ogr/ogr_index_featureset.cpp b/plugins/input/ogr/ogr_index_featureset.cpp index cf95c5899..1f6c62939 100644 --- a/plugins/input/ogr/ogr_index_featureset.cpp +++ b/plugins/input/ogr/ogr_index_featureset.cpp @@ -59,7 +59,8 @@ ogr_index_featureset::ogr_index_featureset(mapnik::context_ptr const & layerdef_(layer.GetLayerDefn()), filter_(filter), tr_(new transcoder(encoding)), - fidcolumn_(layer_.GetFIDColumn()) + fidcolumn_(layer_.GetFIDColumn()), + feature_envelope_() { boost::optional memory = mapnik::mapped_memory_cache::instance().find(index_file, true); @@ -104,6 +105,9 @@ feature_ptr ogr_index_featureset::next() OGRGeometry* geom=poFeature->GetGeometryRef(); if (geom && !geom->IsEmpty()) { + geom->getEnvelope(&feature_envelope_); + if (!filter_.pass(mapnik::box2d(feature_envelope_.MinX,feature_envelope_.MinY, + feature_envelope_.MaxX,feature_envelope_.MaxY))) continue; ogr_converter::convert_geometry (geom, feature); } else diff --git a/plugins/input/ogr/ogr_index_featureset.hpp b/plugins/input/ogr/ogr_index_featureset.hpp index 5e4c6cbc5..9972935e4 100644 --- a/plugins/input/ogr/ogr_index_featureset.hpp +++ b/plugins/input/ogr/ogr_index_featureset.hpp @@ -50,6 +50,7 @@ private: std::vector::iterator itr_; boost::scoped_ptr tr_; const char* fidcolumn_; + OGREnvelope feature_envelope_; }; #endif // OGR_INDEX_FEATURESET_HPP diff --git a/plugins/input/osm/build.py b/plugins/input/osm/build.py index 4cff88aea..f48a930d4 100644 --- a/plugins/input/osm/build.py +++ b/plugins/input/osm/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,38 +17,53 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'osm' plugin_env = plugin_base.Clone() -osm_src = Split( +plugin_sources = Split( """ + %(PLUGIN_NAME)s.cpp + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp osmparser.cpp - osm.cpp - osm_datasource.cpp - osm_featureset.cpp dataset_deliverer.cpp basiccurl.cpp - """ - ) + """ % locals() +) +# Link Library to Dependencies libraries = [ 'xml2' ] libraries.append('curl') -libraries.append('mapnik') libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) -input_plugin = plugin_env.SharedLibrary('../osm', source=osm_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) -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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/postgis/build.py b/plugins/input/postgis/build.py index 271de7caf..2d31a3dc6 100644 --- a/plugins/input/postgis/build.py +++ b/plugins/input/postgis/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2006 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,44 +17,57 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'postgis' plugin_env = plugin_base.Clone() -postgis_src = Split( +plugin_sources = Split( """ - postgis_datasource.cpp - postgis_featureset.cpp - """ - ) - -# clear out and rebuild libs -plugin_env['LIBS'] = ['pq'] + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + """ % locals() +) # Link Library to Dependencies -plugin_env['LIBS'].append('mapnik') -plugin_env['LIBS'].append('boost_system%s' % env['BOOST_APPEND']) -plugin_env['LIBS'].append(env['ICU_LIB_NAME']) +libraries = ['pq'] +libraries.append('boost_system%s' % env['BOOST_APPEND']) +libraries.append(env['ICU_LIB_NAME']) + if env['THREADING'] == 'multi': - plugin_env['LIBS'].append('boost_thread%s' % env['BOOST_APPEND']) + libraries.append('boost_thread%s' % env['BOOST_APPEND']) if env['RUNTIME_LINK'] == 'static': #cmd = 'pg_config --libs' #plugin_env.ParseConfig(cmd) # pg_config does not seem to report correct deps of libpq # so resort to hardcoding for now - plugin_env['LIBS'].extend(['ldap','pam','ssl','crypto','krb5']) + libraries.extend(['ldap', 'pam', 'ssl', 'crypto', 'krb5']) -input_plugin = plugin_env.SharedLibrary('../postgis', source=postgis_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LINKFLAGS=env['CUSTOM_LDFLAGS']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) -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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/python/build.py b/plugins/input/python/build.py index 78636adfc..bf5313eb4 100644 --- a/plugins/input/python/build.py +++ b/plugins/input/python/build.py @@ -1,13 +1,29 @@ -#!/usr/bin/env python +# +# This file is part of Mapnik (c++ mapping toolkit) +# +# Copyright (C) 2013 Artem Pavlenko +# +# Mapnik 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 +# +# import os - -PLUGIN_NAME = 'python' - Import ('plugin_base') Import ('env') -install_dest = env['MAPNIK_INPUT_PLUGINS_DEST'] +PLUGIN_NAME = 'python' plugin_env = plugin_base.Clone() @@ -17,26 +33,32 @@ plugin_sources = Split( %(PLUGIN_NAME)s_featureset.cpp %(PLUGIN_NAME)s_utils.cpp """ % locals() - ) +) -boost_system = 'boost_system%s' % env['BOOST_APPEND'] -libraries = ['mapnik',env['BOOST_PYTHON_LIB'],boost_system,env['ICU_LIB_NAME']] +# Link Library to Dependencies +libraries = [] +libraries.append('boost_system%s' % env['BOOST_APPEND']) +libraries.append(env['BOOST_PYTHON_LIB']) +libraries.append(env['ICU_LIB_NAME']) +python_cpppath = env['PYTHON_INCLUDES'] +allcpp_paths = env['CPPPATH'] +allcpp_paths.extend(python_cpppath) # NOTE: explicit linking to libpython is uneeded on most linux version if the # python plugin is used by a app in python using mapnik's python bindings # we explicitly link to libpython here so that this plugin # can be used from a pure C++ calling application or a different binding language if env['PLATFORM'] == 'Darwin' and env['FRAMEWORK_PYTHON']: - if env['FRAMEWORK_SEARCH_PATH']: - python_link_flag = '-F%s -framework Python -Z' % env['FRAMEWORK_SEARCH_PATH'] + if env['FRAMEWORK_SEARCH_PATH']: + python_link_flag = '-F%s -framework Python -Z' % env['FRAMEWORK_SEARCH_PATH'] + else: + 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]) + elif '/System' in link_prefix: + python_link_flag = '-F/System/Library/Frameworks/ -framework Python -Z' else: - 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]) - elif '/System' in link_prefix: - python_link_flag = '-F/System/Library/Frameworks/ -framework Python -Z' - else: - python_link_flag = '-F/ -framework Python' + python_link_flag = '-F/ -framework Python' else: # on linux the linkflags end up to early in the compile flags to work correctly python_link_flag = '-L%s' % env['PYTHON_SYS_PREFIX'] + os.path.sep + env['LIBDIR_SCHEMA'] @@ -48,33 +70,31 @@ if env['CUSTOM_LDFLAGS']: else: linkflags = python_link_flag -plugin_env.Append(CPPPATH = env['PYTHON_INCLUDES']) - -TARGET = plugin_env.SharedLibrary( - # the name of the target to build, eg 'sqlite.input' - '../%s' % PLUGIN_NAME, - # prefix - normally none used - SHLIBPREFIX='', - # extension, mapnik expects '.input' - SHLIBSUFFIX='.input', - # list of source files to compile - source=plugin_sources, - # libraries to link to - LIBS=libraries, - # any custom linkflags, eg. LDFLAGS - # in this case CUSTOM_LDFLAGS comes - # from Mapnik's main SConstruct file - # and can be removed here if you do - # not need it - LINKFLAGS=linkflags - ) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + CPPPATH=allcpp_paths, + LIBS=libraries, + LINKFLAGS=linkflags) -# if the plugin links to libmapnik ensure it is built first -Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) -# if 'uninstall' is not passed on the command line -# then we actually create the install targets that -# scons will install if 'install' is passed as an arg -if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(install_dest, TARGET) - env.Alias('install', install_dest) + # if 'uninstall' is not passed on the command line + # then we actually create the install targets that + # scons will install if 'install' is passed as an arg + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, + 'CPPPATH': python_cpppath, + 'LINKFLAGS': linkflags.replace('-Z','').split(' '), +} + +Return('plugin_obj') diff --git a/plugins/input/raster/build.py b/plugins/input/raster/build.py index 2a3c7dd41..b16028f68 100644 --- a/plugins/input/raster/build.py +++ b/plugins/input/raster/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2006 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,35 +17,49 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'raster' plugin_env = plugin_base.Clone() -raster_src = Split( +plugin_sources = Split( """ - raster_datasource.cpp - raster_featureset.cpp - raster_info.cpp - """ - ) + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + %(PLUGIN_NAME)s_info.cpp + """ % locals() +) -libraries = [] # Link Library to Dependencies -libraries.append('mapnik') +libraries = [] libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) -input_plugin = plugin_env.SharedLibrary('../raster', source=raster_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) -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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/raster/raster_datasource.cpp b/plugins/input/raster/raster_datasource.cpp index 25541857d..01dda1592 100644 --- a/plugins/input/raster/raster_datasource.cpp +++ b/plugins/input/raster/raster_datasource.cpp @@ -191,7 +191,7 @@ featureset_ptr raster_datasource::features(query const& q) const return boost::make_shared >(policy, extent_, q); } - else if (width * height > (tile_size_ * tile_size_ << 2)) + else if (width * height > static_cast(tile_size_ * tile_size_ << 2)) { MAPNIK_LOG_DEBUG(raster) << "raster_datasource: Tiled policy"; diff --git a/plugins/input/rasterlite/build.py b/plugins/input/rasterlite/build.py index cee50da27..b3e6a834b 100644 --- a/plugins/input/rasterlite/build.py +++ b/plugins/input/rasterlite/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,35 +17,48 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'rasterlite' plugin_env = plugin_base.Clone() -rasterlite_src = Split( +plugin_sources = Split( """ - rasterlite_datasource.cpp - rasterlite_featureset.cpp - """ - ) - -libraries = [env['PLUGINS']['rasterlite']['lib']] + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + """ % locals() +) # Link Library to Dependencies -libraries.append('mapnik') +libraries = [env['PLUGINS']['rasterlite']['lib']] libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) -input_plugin = plugin_env.SharedLibrary('../rasterlite', source=rasterlite_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) -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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/plugins/input/shape/build.py b/plugins/input/shape/build.py index 5dd9995ac..d837b7fc8 100644 --- a/plugins/input/shape/build.py +++ b/plugins/input/shape/build.py @@ -1,7 +1,7 @@ - +# # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2006 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,50 +17,70 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# - +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'shape' plugin_env = plugin_base.Clone() -shape_src = Split( +plugin_sources = Split( """ - dbfile.cpp - shape_datasource.cpp - shape_featureset.cpp - shape_index_featureset.cpp - shape_io.cpp - shape_utils.cpp - """ - ) - -libraries = [] + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + %(PLUGIN_NAME)s_index_featureset.cpp + %(PLUGIN_NAME)s_io.cpp + %(PLUGIN_NAME)s_utils.cpp + dbfile.cpp + """ % locals() +) # Link Library to Dependencies -libraries.append('mapnik') +libraries = [] libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) +cppdefines = [] +cxxflags = [] + if env['SHAPE_MEMORY_MAPPED_FILE']: - plugin_env.Append(CPPDEFINES = '-DSHAPE_MEMORY_MAPPED_FILE') + cppdefines.append('-DSHAPE_MEMORY_MAPPED_FILE') 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 < 46: # avoid ubuntu issue with boost interprocess: # https://github.com/mapnik/mapnik/issues/1082 - plugin_env.Append(CXXFLAGS = '-fpermissive') + cxxflags.append('-fpermissive') -input_plugin = plugin_env.SharedLibrary('../shape', SHLIBSUFFIX='.input', source=shape_src, SHLIBPREFIX='', LIBS = libraries, LINKFLAGS=env['CUSTOM_LDFLAGS']) +plugin_env.Append(CXXFLAGS=cxxflags) +plugin_env.Append(CPPDEFINES=cppdefines) -# if the plugin links to libmapnik ensure it is built first -Depends(input_plugin, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') -if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], input_plugin) - env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + TARGET = plugin_env.SharedLibrary('../shape', + SHLIBSUFFIX='.input', + SHLIBPREFIX='', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=env['CUSTOM_LDFLAGS']) + + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, + 'CXXFLAGS': cxxflags, + 'CPPDEFINES': cppdefines, +} + +Return('plugin_obj') diff --git a/plugins/input/shape/dbfile.cpp b/plugins/input/shape/dbfile.cpp index 7902eb4ab..b6014da2e 100644 --- a/plugins/input/shape/dbfile.cpp +++ b/plugins/input/shape/dbfile.cpp @@ -50,6 +50,8 @@ dbf_file::dbf_file(std::string const& file_name) record_length_(0), #ifdef SHAPE_MEMORY_MAPPED_FILE file_(), +#elif defined(_WINDOWS) + file_(mapnik::utf8_to_utf16(file_name), std::ios::in | std::ios::binary), #else file_(file_name.c_str() ,std::ios::in | std::ios::binary), #endif diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp index a98121ec8..391d9cb8b 100644 --- a/plugins/input/shape/shape_datasource.cpp +++ b/plugins/input/shape/shape_datasource.cpp @@ -2,7 +2,7 @@ * * This file is part of Mapnik (c++ mapping toolkit) * - * Copyright (C) 2011 Artem Pavlenko + * Copyright (C) 2013 Artem Pavlenko * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -34,6 +34,7 @@ // mapnik #include #include +#include #include #include #include @@ -76,18 +77,28 @@ shape_datasource::shape_datasource(const parameters ¶ms) shape_name_ = *file; boost::algorithm::ireplace_last(shape_name_,".shp",""); - +#ifdef _WINDOWS + if (!boost::filesystem::exists(mapnik::utf8_to_utf16(shape_name_) + L".shp")) +#else if (!boost::filesystem::exists(shape_name_ + ".shp")) +#endif { throw datasource_exception("Shape Plugin: shapefile '" + shape_name_ + ".shp' does not exist"); } - +#ifdef _WINDOWS + if (boost::filesystem::is_directory(mapnik::utf8_to_utf16(shape_name_) + L".shp")) +#else if (boost::filesystem::is_directory(shape_name_ + ".shp")) +#endif { throw datasource_exception("Shape Plugin: shapefile '" + shape_name_ + ".shp' appears to be a directory not a file"); } +#ifdef _WINDOWS + if (!boost::filesystem::exists(mapnik::utf8_to_utf16(shape_name_) + L".dbf")) +#else if (!boost::filesystem::exists(shape_name_ + ".dbf")) +#endif { throw datasource_exception("Shape Plugin: shapefile '" + shape_name_ + ".dbf' does not exist"); } diff --git a/plugins/input/shape/shapefile.hpp b/plugins/input/shape/shapefile.hpp index c082b09d4..6e5631824 100644 --- a/plugins/input/shape/shapefile.hpp +++ b/plugins/input/shape/shapefile.hpp @@ -29,6 +29,7 @@ // mapnik #include +#include #include #include #include @@ -149,6 +150,8 @@ public: shape_file(std::string const& file_name) : #ifdef SHAPE_MEMORY_MAPPED_FILE file_() +#elif defined (_WINDOWS) + file_(mapnik::utf8_to_utf16(file_name), std::ios::in | std::ios::binary) #else file_(file_name.c_str(), std::ios::in | std::ios::binary) #endif diff --git a/plugins/input/sqlite/build.py b/plugins/input/sqlite/build.py index 458a885ad..db029e6ab 100644 --- a/plugins/input/sqlite/build.py +++ b/plugins/input/sqlite/build.py @@ -1,7 +1,7 @@ # # This file is part of Mapnik (c++ mapping toolkit) # -# Copyright (C) 2007 Artem Pavlenko, Jean-Francois Doyon +# Copyright (C) 2013 Artem Pavlenko # # Mapnik is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -17,39 +17,54 @@ # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA # -# +# Import ('plugin_base') Import ('env') -prefix = env['PREFIX'] +PLUGIN_NAME = 'sqlite' plugin_env = plugin_base.Clone() -sqlite_src = Split( +plugin_sources = Split( """ - sqlite_datasource.cpp - sqlite_featureset.cpp - """ - ) - -libraries = [ 'sqlite3' ] + %(PLUGIN_NAME)s_datasource.cpp + %(PLUGIN_NAME)s_featureset.cpp + """ % locals() +) # Link Library to Dependencies -libraries.append('mapnik') +libraries = [ 'sqlite3' ] libraries.append(env['ICU_LIB_NAME']) libraries.append('boost_system%s' % env['BOOST_APPEND']) libraries.append('boost_filesystem%s' % env['BOOST_APPEND']) -linkflags = env['CUSTOM_LDFLAGS'] +linkflags = [] if env['SQLITE_LINKFLAGS']: linkflags.append(env['SQLITE_LINKFLAGS']) -input_plugin = plugin_env.SharedLibrary('../sqlite', source=sqlite_src, SHLIBPREFIX='', SHLIBSUFFIX='.input', LIBS=libraries, LINKFLAGS=linkflags) +if env['PLUGIN_LINKING'] == 'shared': + libraries.append('mapnik') + linkflags.append(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'])) + TARGET = plugin_env.SharedLibrary('../%s' % PLUGIN_NAME, + SHLIBPREFIX='', + SHLIBSUFFIX='.input', + source=plugin_sources, + LIBS=libraries, + LINKFLAGS=(' ').join(linkflags)) -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 the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(env['MAPNIK_INPUT_PLUGINS_DEST'], TARGET) + env.Alias('install', env['MAPNIK_INPUT_PLUGINS_DEST']) + +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, + 'LINKFLAGS': linkflags, +} + +Return('plugin_obj') diff --git a/plugins/input/sqlite/sqlite_connection.hpp b/plugins/input/sqlite/sqlite_connection.hpp index 7518f816b..54908434b 100644 --- a/plugins/input/sqlite/sqlite_connection.hpp +++ b/plugins/input/sqlite/sqlite_connection.hpp @@ -62,7 +62,6 @@ public: #endif const int rc = sqlite3_open_v2 (file_.c_str(), &db_, mode, 0); #else -#warning "Mapnik's sqlite plugin is compiling against a version of sqlite older than 3.5.x which may make rendering slow..." const int rc = sqlite3_open (file_.c_str(), &db_); #endif if (rc != SQLITE_OK) @@ -83,7 +82,6 @@ public: #if SQLITE_VERSION_NUMBER >= 3005000 const int rc = sqlite3_open_v2 (file_.c_str(), &db_, flags, 0); #else -#warning "Mapnik's sqlite plugin is compiling against a version of sqlite older than 3.5.x which may make rendering slow..." const int rc = sqlite3_open (file_.c_str(), &db_); #endif if (rc != SQLITE_OK) diff --git a/plugins/input/sqlite/sqlite_datasource.cpp b/plugins/input/sqlite/sqlite_datasource.cpp index cc84dd3d7..d5b5e9426 100644 --- a/plugins/input/sqlite/sqlite_datasource.cpp +++ b/plugins/input/sqlite/sqlite_datasource.cpp @@ -90,7 +90,11 @@ sqlite_datasource::sqlite_datasource(parameters const& params) else dataset_name_ = *file; +#ifdef _WINDOWS + if ((dataset_name_.compare(":memory:") != 0) && (!boost::filesystem::exists(mapnik::utf8_to_utf16(dataset_name_)))) +#else if ((dataset_name_.compare(":memory:") != 0) && (!boost::filesystem::exists(dataset_name_))) +#endif { throw datasource_exception("Sqlite Plugin: " + dataset_name_ + " does not exist"); } @@ -280,7 +284,11 @@ sqlite_datasource::sqlite_datasource(parameters const& params) mapnik::progress_timer __stats2__(std::clog, "sqlite_datasource::init(use_spatial_index)"); #endif +#ifdef _WINDOWS + if (boost::filesystem::exists(mapnik::utf8_to_utf16(index_db))) +#else if (boost::filesystem::exists(index_db)) +#endif { dataset_->execute("attach database '" + index_db + "' as " + index_table_); } @@ -318,7 +326,11 @@ sqlite_datasource::sqlite_datasource(parameters const& params) { //extent_initialized_ = true; has_spatial_index_ = true; +#ifdef _WINDOWS + if (boost::filesystem::exists(mapnik::utf8_to_utf16(index_db))) +#else if (boost::filesystem::exists(index_db)) +#endif { dataset_->execute("attach database '" + index_db + "' as " + index_table_); } @@ -436,12 +448,20 @@ void sqlite_datasource::parse_attachdb(std::string const& attachdb) const // Normalize the filename and make it relative to dataset_name_ if (filename.compare(":memory:") != 0) { +#ifdef _WINDOWS + boost::filesystem::path child_path(mapnik::utf8_to_utf16(filename)); +#else boost::filesystem::path child_path(filename); +#endif // It is a relative path. Fix it. if (! child_path.has_root_directory() && ! child_path.has_root_name()) { +#ifdef _WINDOWS + boost::filesystem::path absolute_path(mapnik::utf8_to_utf16(dataset_name_)); +#else boost::filesystem::path absolute_path(dataset_name_); +#endif // support symlinks if (boost::filesystem::is_symlink(absolute_path)) @@ -619,9 +639,8 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to if (dataset_) { - // TODO - need tolerance - mapnik::box2d const e(pt.x, pt.y, pt.x, pt.y); - + mapnik::box2d e(pt.x, pt.y, pt.x, pt.y); + e.pad(tol); std::ostringstream s; mapnik::context_ptr ctx = boost::make_shared(); diff --git a/plugins/input/sqlite/sqlite_utils.hpp b/plugins/input/sqlite/sqlite_utils.hpp index 90f0446a1..5dfae3a4f 100644 --- a/plugins/input/sqlite/sqlite_utils.hpp +++ b/plugins/input/sqlite/sqlite_utils.hpp @@ -30,6 +30,7 @@ // mapnik #include +#include #include #include #include @@ -235,7 +236,11 @@ public: int flags; #endif +#ifdef _WINDOWS + bool existed = boost::filesystem::exists(mapnik::utf8_to_utf16(index_db)); +#else bool existed = boost::filesystem::exists(index_db); +#endif boost::shared_ptr ds = boost::make_shared(index_db,flags); bool one_success = false; @@ -328,8 +333,12 @@ public: { try { +#ifdef _WINDOWS + boost::filesystem::remove(mapnik::utf8_to_utf16(index_db)); +#else boost::filesystem::remove(index_db); - } +#endif + } catch (...) {}; } throw mapnik::datasource_exception(ex.what()); @@ -344,7 +353,11 @@ public: { try { +#ifdef _WINDOWS + boost::filesystem::remove(mapnik::utf8_to_utf16(index_db)); +#else boost::filesystem::remove(index_db); +#endif } catch (...) {}; } @@ -413,7 +426,13 @@ public: int flags; #endif - bool existed = boost::filesystem::exists(index_db); +#ifdef _WINDOWS + bool existed = boost::filesystem::exists(mapnik::utf8_to_utf16(index_db)); +#else + bool existed = boost::filesystem::exists(index_db);; +#endif + + boost::shared_ptr ds = boost::make_shared(index_db,flags); bool one_success = false; @@ -460,7 +479,11 @@ public: { try { +#ifdef _WINDOWS + boost::filesystem::remove(mapnik::utf8_to_utf16(index_db)); +#else boost::filesystem::remove(index_db); +#endif } catch (...) {}; } @@ -476,7 +499,11 @@ public: { try { +#ifdef _WINDOWS + boost::filesystem::remove(mapnik::utf8_to_utf16(index_db)); +#else boost::filesystem::remove(index_db); +#endif } catch (...) {}; } diff --git a/plugins/input/templates/helloworld/build.py b/plugins/input/templates/helloworld/build.py index 5a974dd4b..d90efa26e 100644 --- a/plugins/input/templates/helloworld/build.py +++ b/plugins/input/templates/helloworld/build.py @@ -11,21 +11,17 @@ import os -# Give this plugin a name -# here this happens to be the same as the directory -PLUGIN_NAME = 'hello' - # Here we pull from the SCons environment exported from the main instance Import ('plugin_base') Import ('env') +# Give this plugin a name +# here this happens to be the same as the directory +PLUGIN_NAME = 'hello' + # the below install details are also pulled from the # main SConstruct file where configuration happens -# plugins can go anywhere, and be registered in custom locations by Mapnik -# but the standard location is '/usr/local/lib/mapnik/input' -install_dest = env['MAPNIK_INPUT_PLUGINS_DEST'] - # clone the environment here # so that if we modify the env it in this file # those changes to not pollute other builds later on... @@ -35,7 +31,7 @@ plugin_env = plugin_base.Clone() plugin_sources = Split( """ %(PLUGIN_NAME)s_datasource.cpp - %(PLUGIN_NAME)s_featureset.cpp + %(PLUGIN_NAME)s_featureset.cpp """ % locals() ) @@ -43,37 +39,54 @@ plugin_sources = Split( # directly link to libraries = [ '' ] # eg 'libfoo' -libraries.append('mapnik') libraries.append('boost_system%s' % env['BOOST_APPEND']) # link libicuuc, but ICU_LIB_NAME is used custom builds of icu can # have different library names like osx which offers /usr/lib/libicucore.dylib libraries.append(env['ICU_LIB_NAME']) - -TARGET = plugin_env.SharedLibrary( - # the name of the target to build, eg 'sqlite.input' - '../%s' % PLUGIN_NAME, - # prefix - normally none used - SHLIBPREFIX='', - # extension, mapnik expects '.input' - SHLIBSUFFIX='.input', - # list of source files to compile - source=plugin_sources, - # libraries to link to - LIBS=libraries, - # any custom linkflags, eg. LDFLAGS - # in this case CUSTOM_LDFLAGS comes - # from Mapnik's main SConstruct file - # and can be removed here if you do - # not need it - LINKFLAGS=env.get('CUSTOM_LDFLAGS') - ) -# if the plugin links to libmapnik ensure it is built first -Depends(TARGET, env.subst('../../../../src/%s' % env['MAPNIK_LIB_NAME'])) +# this is valid if we are building an external plugin as shared library +if env['PLUGIN_LINKING'] == 'shared': + # plugins can go anywhere, and be registered in custom locations by Mapnik + # but the standard location is '/usr/local/lib/mapnik/input' + install_dest = env['MAPNIK_INPUT_PLUGINS_DEST'] -# if 'uninstall' is not passed on the command line -# then we actually create the install targets that -# scons will install if 'install' is passed as an arg -if 'uninstall' not in COMMAND_LINE_TARGETS: - env.Install(install_dest, TARGET) - env.Alias('install', install_dest) + # only link mapnik if we are build an external shared object + libraries.append('mapnik') + + TARGET = plugin_env.SharedLibrary( + # the name of the target to build, eg 'sqlite.input' + '../%s' % PLUGIN_NAME, + # prefix - normally none used + SHLIBPREFIX='', + # extension, mapnik expects '.input' + SHLIBSUFFIX='.input', + # list of source files to compile + source=plugin_sources, + # libraries to link to + LIBS=libraries, + # any custom linkflags, eg. LDFLAGS + # in this case CUSTOM_LDFLAGS comes + # from Mapnik's main SConstruct file + # and can be removed here if you do + # not need it + LINKFLAGS=env.get('CUSTOM_LDFLAGS') + ) + + # if the plugin links to libmapnik ensure it is built first + Depends(TARGET, env.subst('../../../../src/%s' % env['MAPNIK_LIB_NAME'])) + + # if 'uninstall' is not passed on the command line + # then we actually create the install targets that + # scons will install if 'install' is passed as an arg + if 'uninstall' not in COMMAND_LINE_TARGETS: + env.Install(install_dest, TARGET) + env.Alias('install', install_dest) + +# Return the plugin building options to scons +# This is used when statically linking the plugin with mapnik) +plugin_obj = { + 'LIBS': libraries, + 'SOURCES': plugin_sources, +} + +Return('plugin_obj') diff --git a/run_tests b/run_tests index 329c8e70d..8e7121b5d 100755 --- a/run_tests +++ b/run_tests @@ -8,10 +8,12 @@ failures=$((failures+$?)) echo "*** Running C++ tests..." for FILE in tests/cpp_tests/*-bin; do - ${FILE}; + ${FILE} -q; failures=$((failures+$?)) done +echo + echo "*** Running python tests..." python tests/run_tests.py -q failures=$((failures+$?)) diff --git a/scons/scons-LICENSE b/scons/scons-LICENSE index 4df86d1d4..d47d178b8 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, 2012 The SCons Foundation +Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 f1d59d4b4..dc2d7dba7 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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation SCons - a software construction tool @@ -202,3 +202,4 @@ With plenty of help from the SCons Development team: Anthony Roach Terrel Shumway + diff --git a/scons/scons-local-2.2.0/SCons/Action.py b/scons/scons-local-2.3.0/SCons/Action.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Action.py rename to scons/scons-local-2.3.0/SCons/Action.py index a648c6937..0021df6e7 100644 --- a/scons/scons-local-2.2.0/SCons/Action.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Action.py 2013/03/03 09:48:35 garyo" import SCons.compat diff --git a/scons/scons-local-2.2.0/SCons/Builder.py b/scons/scons-local-2.3.0/SCons/Builder.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Builder.py rename to scons/scons-local-2.3.0/SCons/Builder.py index 5a8aff1aa..2c9958f85 100644 --- a/scons/scons-local-2.2.0/SCons/Builder.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Builder.py 2013/03/03 09:48:35 garyo" import collections diff --git a/scons/scons-local-2.2.0/SCons/CacheDir.py b/scons/scons-local-2.3.0/SCons/CacheDir.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/CacheDir.py rename to scons/scons-local-2.3.0/SCons/CacheDir.py index ec7e9eebf..aef03b4b4 100644 --- a/scons/scons-local-2.2.0/SCons/CacheDir.py +++ b/scons/scons-local-2.3.0/SCons/CacheDir.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/CacheDir.py 2013/03/03 09:48:35 garyo" __doc__ = """ CacheDir support diff --git a/scons/scons-local-2.2.0/SCons/Conftest.py b/scons/scons-local-2.3.0/SCons/Conftest.py similarity index 100% rename from scons/scons-local-2.2.0/SCons/Conftest.py rename to scons/scons-local-2.3.0/SCons/Conftest.py diff --git a/scons/scons-local-2.2.0/SCons/Debug.py b/scons/scons-local-2.3.0/SCons/Debug.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Debug.py rename to scons/scons-local-2.3.0/SCons/Debug.py index 5f1b87c13..41b0ab6ee 100644 --- a/scons/scons-local-2.2.0/SCons/Debug.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Debug.py 2013/03/03 09:48:35 garyo" import os import sys diff --git a/scons/scons-local-2.2.0/SCons/Defaults.py b/scons/scons-local-2.3.0/SCons/Defaults.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Defaults.py rename to scons/scons-local-2.3.0/SCons/Defaults.py index 96760cedc..219190a9e 100644 --- a/scons/scons-local-2.2.0/SCons/Defaults.py +++ b/scons/scons-local-2.3.0/SCons/Defaults.py @@ -10,7 +10,7 @@ from distutils.msvccompiler. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Defaults.py 2013/03/03 09:48:35 garyo" import os diff --git a/scons/scons-local-2.2.0/SCons/Environment.py b/scons/scons-local-2.3.0/SCons/Environment.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Environment.py rename to scons/scons-local-2.3.0/SCons/Environment.py index addf782a3..833f3ccb9 100644 --- a/scons/scons-local-2.2.0/SCons/Environment.py +++ b/scons/scons-local-2.3.0/SCons/Environment.py @@ -10,7 +10,7 @@ Environment """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Environment.py 2013/03/03 09:48:35 garyo" import copy @@ -2247,6 +2247,7 @@ class Base(SubstitutionEnvironment): install._UNIQUE_INSTALLED_FILES = SCons.Util.uniquer_hashables(install._INSTALLED_FILES) return install._UNIQUE_INSTALLED_FILES + class OverrideEnvironment(Base): """A proxy that overrides variables in a wrapped construction environment by returning values from an overrides dictionary in diff --git a/scons/scons-local-2.2.0/SCons/Errors.py b/scons/scons-local-2.3.0/SCons/Errors.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Errors.py rename to scons/scons-local-2.3.0/SCons/Errors.py index 8541c68ab..41dac1957 100644 --- a/scons/scons-local-2.2.0/SCons/Errors.py +++ b/scons/scons-local-2.3.0/SCons/Errors.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Errors.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Executor.py b/scons/scons-local-2.3.0/SCons/Executor.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Executor.py rename to scons/scons-local-2.3.0/SCons/Executor.py index 9ea6e631d..0bea6fb69 100644 --- a/scons/scons-local-2.2.0/SCons/Executor.py +++ b/scons/scons-local-2.3.0/SCons/Executor.py @@ -6,7 +6,7 @@ Nodes. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Executor.py 2013/03/03 09:48:35 garyo" import collections diff --git a/scons/scons-local-2.2.0/SCons/Job.py b/scons/scons-local-2.3.0/SCons/Job.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Job.py rename to scons/scons-local-2.3.0/SCons/Job.py index 342f55e98..4e51b993a 100644 --- a/scons/scons-local-2.2.0/SCons/Job.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Job.py 2013/03/03 09:48:35 garyo" import SCons.compat diff --git a/scons/scons-local-2.2.0/SCons/Memoize.py b/scons/scons-local-2.3.0/SCons/Memoize.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Memoize.py rename to scons/scons-local-2.3.0/SCons/Memoize.py index 9850a841f..af84745e1 100644 --- a/scons/scons-local-2.2.0/SCons/Memoize.py +++ b/scons/scons-local-2.3.0/SCons/Memoize.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Memoize.py 2013/03/03 09:48:35 garyo" __doc__ = """Memoizer diff --git a/scons/scons-local-2.2.0/SCons/Node/Alias.py b/scons/scons-local-2.3.0/SCons/Node/Alias.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Node/Alias.py rename to scons/scons-local-2.3.0/SCons/Node/Alias.py index fbef1fdd1..02fe12120 100644 --- a/scons/scons-local-2.2.0/SCons/Node/Alias.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Node/Alias.py 2013/03/03 09:48:35 garyo" import collections diff --git a/scons/scons-local-2.2.0/SCons/Node/FS.py b/scons/scons-local-2.3.0/SCons/Node/FS.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Node/FS.py rename to scons/scons-local-2.3.0/SCons/Node/FS.py index 3f3cf2870..a21561f2e 100644 --- a/scons/scons-local-2.2.0/SCons/Node/FS.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Node/FS.py 2013/03/03 09:48:35 garyo" import fnmatch import os diff --git a/scons/scons-local-2.2.0/SCons/Node/Python.py b/scons/scons-local-2.3.0/SCons/Node/Python.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Node/Python.py rename to scons/scons-local-2.3.0/SCons/Node/Python.py index 5c302e6f7..153e32d0b 100644 --- a/scons/scons-local-2.2.0/SCons/Node/Python.py +++ b/scons/scons-local-2.3.0/SCons/Node/Python.py @@ -5,7 +5,7 @@ Python nodes. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Node/Python.py 2013/03/03 09:48:35 garyo" import SCons.Node diff --git a/scons/scons-local-2.2.0/SCons/Node/__init__.py b/scons/scons-local-2.3.0/SCons/Node/__init__.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Node/__init__.py rename to scons/scons-local-2.3.0/SCons/Node/__init__.py index 126d83c09..ece4a5a44 100644 --- a/scons/scons-local-2.2.0/SCons/Node/__init__.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Node/__init__.py 2013/03/03 09:48:35 garyo" import collections import copy diff --git a/scons/scons-local-2.2.0/SCons/Options/BoolOption.py b/scons/scons-local-2.3.0/SCons/Options/BoolOption.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Options/BoolOption.py rename to scons/scons-local-2.3.0/SCons/Options/BoolOption.py index be2de6ce7..f1569a552 100644 --- a/scons/scons-local-2.2.0/SCons/Options/BoolOption.py +++ b/scons/scons-local-2.3.0/SCons/Options/BoolOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Options/BoolOption.py 2013/03/03 09:48:35 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.2.0/SCons/Options/EnumOption.py b/scons/scons-local-2.3.0/SCons/Options/EnumOption.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Options/EnumOption.py rename to scons/scons-local-2.3.0/SCons/Options/EnumOption.py index b7aa8530e..9207e718a 100644 --- a/scons/scons-local-2.2.0/SCons/Options/EnumOption.py +++ b/scons/scons-local-2.3.0/SCons/Options/EnumOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Options/EnumOption.py 2013/03/03 09:48:35 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.2.0/SCons/Options/ListOption.py b/scons/scons-local-2.3.0/SCons/Options/ListOption.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Options/ListOption.py rename to scons/scons-local-2.3.0/SCons/Options/ListOption.py index ba4c4a98a..cbf0bd98c 100644 --- a/scons/scons-local-2.2.0/SCons/Options/ListOption.py +++ b/scons/scons-local-2.3.0/SCons/Options/ListOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Options/ListOption.py 2013/03/03 09:48:35 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.2.0/SCons/Options/PackageOption.py b/scons/scons-local-2.3.0/SCons/Options/PackageOption.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Options/PackageOption.py rename to scons/scons-local-2.3.0/SCons/Options/PackageOption.py index d65564077..2b27931d5 100644 --- a/scons/scons-local-2.2.0/SCons/Options/PackageOption.py +++ b/scons/scons-local-2.3.0/SCons/Options/PackageOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Options/PackageOption.py 2013/03/03 09:48:35 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.2.0/SCons/Options/PathOption.py b/scons/scons-local-2.3.0/SCons/Options/PathOption.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Options/PathOption.py rename to scons/scons-local-2.3.0/SCons/Options/PathOption.py index e7de97f89..56475adb2 100644 --- a/scons/scons-local-2.2.0/SCons/Options/PathOption.py +++ b/scons/scons-local-2.3.0/SCons/Options/PathOption.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Options/PathOption.py 2013/03/03 09:48:35 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.2.0/SCons/Options/__init__.py b/scons/scons-local-2.3.0/SCons/Options/__init__.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Options/__init__.py rename to scons/scons-local-2.3.0/SCons/Options/__init__.py index 62edfa900..0004b8f8f 100644 --- a/scons/scons-local-2.2.0/SCons/Options/__init__.py +++ b/scons/scons-local-2.3.0/SCons/Options/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Options/__init__.py 2013/03/03 09:48:35 garyo" __doc__ = """Place-holder for the old SCons.Options module hierarchy diff --git a/scons/scons-local-2.2.0/SCons/PathList.py b/scons/scons-local-2.3.0/SCons/PathList.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/PathList.py rename to scons/scons-local-2.3.0/SCons/PathList.py index 9a4145331..1129d1ed1 100644 --- a/scons/scons-local-2.2.0/SCons/PathList.py +++ b/scons/scons-local-2.3.0/SCons/PathList.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/PathList.py 2013/03/03 09:48:35 garyo" __doc__ = """SCons.PathList @@ -131,12 +131,14 @@ class _PathList(object): value = env.subst(value, target=target, source=source, conv=node_conv) if SCons.Util.is_Sequence(value): - result.extend(value) - continue - + result.extend(SCons.Util.flatten(value)) + elif value: + result.append(value) elif type == TYPE_OBJECT: value = node_conv(value) - if value: + if value: + result.append(value) + elif value: result.append(value) return tuple(result) diff --git a/scons/scons-local-2.2.0/SCons/Platform/__init__.py b/scons/scons-local-2.3.0/SCons/Platform/__init__.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Platform/__init__.py rename to scons/scons-local-2.3.0/SCons/Platform/__init__.py index 2cab3c865..5a1d43741 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/__init__.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/__init__.py 2013/03/03 09:48:35 garyo" import SCons.compat diff --git a/scons/scons-local-2.2.0/SCons/Platform/aix.py b/scons/scons-local-2.3.0/SCons/Platform/aix.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Platform/aix.py rename to scons/scons-local-2.3.0/SCons/Platform/aix.py index df3ee4044..70dce56be 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/aix.py +++ b/scons/scons-local-2.3.0/SCons/Platform/aix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/aix.py 2013/03/03 09:48:35 garyo" import os diff --git a/scons/scons-local-2.2.0/SCons/Platform/cygwin.py b/scons/scons-local-2.3.0/SCons/Platform/cygwin.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Platform/cygwin.py rename to scons/scons-local-2.3.0/SCons/Platform/cygwin.py index 31d822b96..92efdf638 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/cygwin.py +++ b/scons/scons-local-2.3.0/SCons/Platform/cygwin.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/cygwin.py 2013/03/03 09:48:35 garyo" import posix from SCons.Platform import TempFileMunge diff --git a/scons/scons-local-2.2.0/SCons/Platform/darwin.py b/scons/scons-local-2.3.0/SCons/Platform/darwin.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Platform/darwin.py rename to scons/scons-local-2.3.0/SCons/Platform/darwin.py index 907ec45d1..f1ba6be93 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/darwin.py +++ b/scons/scons-local-2.3.0/SCons/Platform/darwin.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/darwin.py 2013/03/03 09:48:35 garyo" import posix import os diff --git a/scons/scons-local-2.2.0/SCons/Platform/hpux.py b/scons/scons-local-2.3.0/SCons/Platform/hpux.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/Platform/hpux.py rename to scons/scons-local-2.3.0/SCons/Platform/hpux.py index 2312439a8..232baf43a 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/hpux.py +++ b/scons/scons-local-2.3.0/SCons/Platform/hpux.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/hpux.py 2013/03/03 09:48:35 garyo" import posix diff --git a/scons/scons-local-2.2.0/SCons/Platform/irix.py b/scons/scons-local-2.3.0/SCons/Platform/irix.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/Platform/irix.py rename to scons/scons-local-2.3.0/SCons/Platform/irix.py index f0b089a86..f4bc6f8ce 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/irix.py +++ b/scons/scons-local-2.3.0/SCons/Platform/irix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/irix.py 2013/03/03 09:48:35 garyo" import posix diff --git a/scons/scons-local-2.2.0/SCons/Platform/os2.py b/scons/scons-local-2.3.0/SCons/Platform/os2.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Platform/os2.py rename to scons/scons-local-2.3.0/SCons/Platform/os2.py index 0576abdd6..1409711e9 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/os2.py +++ b/scons/scons-local-2.3.0/SCons/Platform/os2.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/os2.py 2013/03/03 09:48:35 garyo" import win32 def generate(env): diff --git a/scons/scons-local-2.2.0/SCons/Platform/posix.py b/scons/scons-local-2.3.0/SCons/Platform/posix.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Platform/posix.py rename to scons/scons-local-2.3.0/SCons/Platform/posix.py index cff1f93a4..38b2a8def 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/posix.py +++ b/scons/scons-local-2.3.0/SCons/Platform/posix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/posix.py 2013/03/03 09:48:35 garyo" import errno import os diff --git a/scons/scons-local-2.2.0/SCons/Platform/sunos.py b/scons/scons-local-2.3.0/SCons/Platform/sunos.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Platform/sunos.py rename to scons/scons-local-2.3.0/SCons/Platform/sunos.py index 7ae60f840..23e876c52 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/sunos.py +++ b/scons/scons-local-2.3.0/SCons/Platform/sunos.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/sunos.py 2013/03/03 09:48:35 garyo" import posix diff --git a/scons/scons-local-2.2.0/SCons/Platform/win32.py b/scons/scons-local-2.3.0/SCons/Platform/win32.py similarity index 89% rename from scons/scons-local-2.2.0/SCons/Platform/win32.py rename to scons/scons-local-2.3.0/SCons/Platform/win32.py index 2d6d970d3..3def1f834 100644 --- a/scons/scons-local-2.2.0/SCons/Platform/win32.py +++ b/scons/scons-local-2.3.0/SCons/Platform/win32.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Platform/win32.py 2013/03/03 09:48:35 garyo" import os import os.path @@ -81,8 +81,39 @@ else: builtins.file = _scons_file builtins.open = _scons_open - - +try: + import threading + spawn_lock = threading.Lock() + + # This locked version of spawnve works around a Windows + # MSVCRT bug, because its spawnve is not thread-safe. + # Without this, python can randomly crash while using -jN. + # See the python bug at http://bugs.python.org/issue6476 + # and SCons issue at + # http://scons.tigris.org/issues/show_bug.cgi?id=2449 + def spawnve(mode, file, args, env): + spawn_lock.acquire() + try: + if mode == os.P_WAIT: + ret = os.spawnve(os.P_NOWAIT, file, args, env) + else: + ret = os.spawnve(mode, file, args, env) + finally: + spawn_lock.release() + if mode == os.P_WAIT: + pid, status = os.waitpid(ret, 0) + ret = status >> 8 + return ret +except ImportError: + # Use the unsafe method of spawnve. + # Please, don't try to optimize this try-except block + # away by assuming that the threading module is always present. + # In the test test/option-j.py we intentionally call SCons with + # a fake threading.py that raises an import exception right away, + # simulating a non-existent package. + def spawnve(mode, file, args, env): + return os.spawnve(mode, file, args, env) + # The upshot of all this is that, if you are using Python 1.5.2, # you had better have cmd or command.com in your PATH when you run # scons. @@ -123,7 +154,7 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr): # actually do the spawn try: args = [sh, '/C', escape(' '.join(args)) ] - ret = os.spawnve(os.P_WAIT, sh, args, env) + ret = spawnve(os.P_WAIT, sh, args, env) except OSError, e: # catch any error try: @@ -151,7 +182,7 @@ def piped_spawn(sh, escape, cmd, args, env, stdout, stderr): def exec_spawn(l, env): try: - result = os.spawnve(os.P_WAIT, l[0], l, env) + result = spawnve(os.P_WAIT, l[0], l, env) except OSError, e: try: result = exitvalmap[e[0]] diff --git a/scons/scons-local-2.2.0/SCons/SConf.py b/scons/scons-local-2.3.0/SCons/SConf.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/SConf.py rename to scons/scons-local-2.3.0/SCons/SConf.py index 5c99db9d3..ae51776b6 100644 --- a/scons/scons-local-2.2.0/SCons/SConf.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/SConf.py 2013/03/03 09:48:35 garyo" import SCons.compat diff --git a/scons/scons-local-2.2.0/SCons/SConsign.py b/scons/scons-local-2.3.0/SCons/SConsign.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/SConsign.py rename to scons/scons-local-2.3.0/SCons/SConsign.py index aa59836b9..a11f4e480 100644 --- a/scons/scons-local-2.2.0/SCons/SConsign.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/SConsign.py 2013/03/03 09:48:35 garyo" import SCons.compat diff --git a/scons/scons-local-2.2.0/SCons/Scanner/C.py b/scons/scons-local-2.3.0/SCons/Scanner/C.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Scanner/C.py rename to scons/scons-local-2.3.0/SCons/Scanner/C.py index 6ba7eeac1..0b664a008 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/C.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/C.py 2013/03/03 09:48:35 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.2.0/SCons/Scanner/D.py b/scons/scons-local-2.3.0/SCons/Scanner/D.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Scanner/D.py rename to scons/scons-local-2.3.0/SCons/Scanner/D.py index 20ab5f0ac..18b530f3a 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/D.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/D.py 2013/03/03 09:48:35 garyo" import re diff --git a/scons/scons-local-2.2.0/SCons/Scanner/Dir.py b/scons/scons-local-2.3.0/SCons/Scanner/Dir.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Scanner/Dir.py rename to scons/scons-local-2.3.0/SCons/Scanner/Dir.py index 7c199bcf3..f508a6fe0 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/Dir.py +++ b/scons/scons-local-2.3.0/SCons/Scanner/Dir.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/Dir.py 2013/03/03 09:48:35 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.2.0/SCons/Scanner/Fortran.py b/scons/scons-local-2.3.0/SCons/Scanner/Fortran.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Scanner/Fortran.py rename to scons/scons-local-2.3.0/SCons/Scanner/Fortran.py index 4bb49cd78..390e95172 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/Fortran.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/Fortran.py 2013/03/03 09:48:35 garyo" import re diff --git a/scons/scons-local-2.2.0/SCons/Scanner/IDL.py b/scons/scons-local-2.3.0/SCons/Scanner/IDL.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Scanner/IDL.py rename to scons/scons-local-2.3.0/SCons/Scanner/IDL.py index d43e0139d..13a0226b9 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/IDL.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/IDL.py 2013/03/03 09:48:35 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.2.0/SCons/Scanner/LaTeX.py b/scons/scons-local-2.3.0/SCons/Scanner/LaTeX.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Scanner/LaTeX.py rename to scons/scons-local-2.3.0/SCons/Scanner/LaTeX.py index 4152fa2ae..c61688bc3 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/LaTeX.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/LaTeX.py 2013/03/03 09:48:35 garyo" import os.path import re diff --git a/scons/scons-local-2.2.0/SCons/Scanner/Prog.py b/scons/scons-local-2.3.0/SCons/Scanner/Prog.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Scanner/Prog.py rename to scons/scons-local-2.3.0/SCons/Scanner/Prog.py index fbdf8581e..d7e19d36d 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/Prog.py +++ b/scons/scons-local-2.3.0/SCons/Scanner/Prog.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/Prog.py 2013/03/03 09:48:35 garyo" import SCons.Node import SCons.Node.FS diff --git a/scons/scons-local-2.2.0/SCons/Scanner/RC.py b/scons/scons-local-2.3.0/SCons/Scanner/RC.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Scanner/RC.py rename to scons/scons-local-2.3.0/SCons/Scanner/RC.py index 871fdf9a0..3fa3e6757 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/RC.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/RC.py 2013/03/03 09:48:35 garyo" import SCons.Node.FS import SCons.Scanner diff --git a/scons/scons-local-2.2.0/SCons/Scanner/__init__.py b/scons/scons-local-2.3.0/SCons/Scanner/__init__.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Scanner/__init__.py rename to scons/scons-local-2.3.0/SCons/Scanner/__init__.py index 9675e8dd5..b7b3197a4 100644 --- a/scons/scons-local-2.2.0/SCons/Scanner/__init__.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Scanner/__init__.py 2013/03/03 09:48:35 garyo" import re diff --git a/scons/scons-local-2.2.0/SCons/Script/Interactive.py b/scons/scons-local-2.3.0/SCons/Script/Interactive.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Script/Interactive.py rename to scons/scons-local-2.3.0/SCons/Script/Interactive.py index e0822a7e3..b9a2e1e7c 100644 --- a/scons/scons-local-2.2.0/SCons/Script/Interactive.py +++ b/scons/scons-local-2.3.0/SCons/Script/Interactive.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Script/Interactive.py 2013/03/03 09:48:35 garyo" __doc__ = """ SCons interactive mode diff --git a/scons/scons-local-2.2.0/SCons/Script/Main.py b/scons/scons-local-2.3.0/SCons/Script/Main.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Script/Main.py rename to scons/scons-local-2.3.0/SCons/Script/Main.py index 12d1bc256..3f1b407aa 100644 --- a/scons/scons-local-2.2.0/SCons/Script/Main.py +++ b/scons/scons-local-2.3.0/SCons/Script/Main.py @@ -11,9 +11,9 @@ it goes here. """ unsupported_python_version = (2, 3, 0) -deprecated_python_version = (2, 4, 0) +deprecated_python_version = (2, 7, 0) -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Script/Main.py 2013/03/03 09:48:35 garyo" import SCons.compat @@ -187,7 +187,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): finish_time = time.time() last_command_end = finish_time cumulative_command_time = cumulative_command_time+finish_time-start_time - sys.stdout.write("Command execution time: %f seconds\n"%(finish_time-start_time)) + sys.stdout.write("Command execution time: %s: %f seconds\n"%(str(self.node), finish_time-start_time)) def do_failed(self, status=2): _BuildFailures.append(self.exception[1]) @@ -203,7 +203,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): SCons.Taskmaster.OutOfDateTask.fail_stop(self) exit_status = status this_build_status = status - + def executed(self): t = self.targets[0] if self.top and not t.has_builder() and not t.side_effect: @@ -248,7 +248,7 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): except ValueError: t, e = exc_info tb = None - + # Deprecated string exceptions will have their string stored # in the first entry of the tuple. if e is None: @@ -266,9 +266,9 @@ class BuildTask(SCons.Taskmaster.OutOfDateTask): errfmt = "scons: *** [%s] %s\n" sys.stderr.write(errfmt % (nodename, buildError)) - if (buildError.exc_info[2] and buildError.exc_info[1] and + if (buildError.exc_info[2] and buildError.exc_info[1] and not isinstance( - buildError.exc_info[1], + buildError.exc_info[1], (EnvironmentError, SCons.Errors.StopError, SCons.Errors.UserError))): type, value, trace = buildError.exc_info @@ -546,7 +546,7 @@ def find_deepest_user_frame(tb): Input is a "pre-processed" stack trace in the form returned by traceback.extract_tb() or traceback.extract_stack() """ - + tb.reverse() # find the deepest traceback frame that is not part @@ -559,7 +559,7 @@ def find_deepest_user_frame(tb): def _scons_user_error(e): """Handle user errors. Print out a message and a description of the - error, along with the line number and routine where it occured. + error, along with the line number and routine where it occured. The file and line number will be the deepest stack frame that is not part of SCons itself. """ @@ -677,7 +677,7 @@ def _load_site_scons_dir(topdir, site_dir_name=None): else: site_dir_name = "site_scons" err_if_not_found = False - + site_dir = os.path.join(topdir, site_dir_name) if not os.path.exists(site_dir): if err_if_not_found: @@ -934,7 +934,7 @@ def _main(parser): _load_site_scons_dir(d.path, options.site_dir) elif not options.no_site_dir: _load_all_site_scons_dirs(d.path) - + if options.include_dir: sys.path = options.include_dir + sys.path @@ -1009,10 +1009,11 @@ def _main(parser): # warning about deprecated Python versions--delayed until here # in case they disabled the warning in the SConscript files. if python_version_deprecated(): - msg = "Support for pre-2.4 Python (%s) is deprecated.\n" + \ + msg = "Support for pre-%s Python version (%s) is deprecated.\n" + \ " If this will cause hardship, contact dev@scons.tigris.org." + deprecated_version_string = ".".join(map(str, deprecated_python_version)) SCons.Warnings.warn(SCons.Warnings.PythonVersionWarning, - msg % python_version_string()) + msg % (deprecated_version_string, python_version_string())) if not options.help: SCons.SConf.CreateConfigHBuilder(SCons.Defaults.DefaultEnvironment()) @@ -1133,7 +1134,7 @@ def _build_targets(fs, options, targets, target_top): # x doesn't have a cwd, so it's either not a target, # or not a file, so go ahead and keep it as a default # target and let the engine sort it out: - return 1 + return 1 d = list(filter(check_dir, SCons.Script.DEFAULT_TARGETS)) SCons.Script.DEFAULT_TARGETS[:] = d target_top = None @@ -1327,10 +1328,10 @@ def main(): except (ImportError, AttributeError): # On Windows there is no scons.py, so there is no # __main__.__version__, hence there is no script version. - pass + 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, 2012 The SCons Foundation") + parts.append("Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 The SCons Foundation") version = ''.join(parts) import SConsOptions @@ -1338,7 +1339,7 @@ def main(): values = SConsOptions.SConsValues(parser.get_default_values()) OptionsParser = parser - + try: _exec_main(parser, values) except SystemExit, s: diff --git a/scons/scons-local-2.2.0/SCons/Script/SConsOptions.py b/scons/scons-local-2.3.0/SCons/Script/SConsOptions.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Script/SConsOptions.py rename to scons/scons-local-2.3.0/SCons/Script/SConsOptions.py index 1d574f8cb..6a6bae3e7 100644 --- a/scons/scons-local-2.2.0/SCons/Script/SConsOptions.py +++ b/scons/scons-local-2.3.0/SCons/Script/SConsOptions.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Script/SConsOptions.py 2013/03/03 09:48:35 garyo" import optparse import re @@ -268,8 +268,9 @@ class SConsOptionParser(optparse.OptionParser): preserve_unknown_options = False def error(self, msg): + # overriden OptionValueError exception handler self.print_usage(sys.stderr) - sys.stderr.write("SCons error: %s\n" % msg) + sys.stderr.write("SCons Error: %s\n" % msg) sys.exit(2) def _process_long_opt(self, rargs, values): @@ -568,11 +569,15 @@ def Parser(version): action="store_true", help="Print build actions for files from CacheDir.") + def opt_invalid(group, value, options): + errmsg = "`%s' is not a valid %s option type, try:\n" % (value, group) + return errmsg + " %s" % ", ".join(options) + config_options = ["auto", "force" ,"cache"] def opt_config(option, opt, value, parser, c_options=config_options): if not value in c_options: - raise OptionValueError("Warning: %s is not a valid config type" % value) + raise OptionValueError(opt_invalid('config', value, c_options)) setattr(parser.values, option.dest, value) opt_config_help = "Controls Configure subsystem: %s." \ % ", ".join(config_options) @@ -599,24 +604,25 @@ def Parser(version): debug_options = ["count", "duplicate", "explain", "findlibs", "includes", "memoizer", "memory", "objects", "pdb", "prepare", "presub", "stacktrace", - "time"] + list(deprecated_debug_options.keys()) + "time"] def opt_debug(option, opt, value, parser, debug_options=debug_options, deprecated_debug_options=deprecated_debug_options): if value in debug_options: parser.values.debug.append(value) - if value in deprecated_debug_options.keys(): - try: - parser.values.delayed_warnings - except AttributeError: - parser.values.delayed_warnings = [] - msg = deprecated_debug_options[value] - w = "The --debug=%s option is deprecated%s." % (value, msg) - t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w) - parser.values.delayed_warnings.append(t) + elif value in deprecated_debug_options.keys(): + parser.values.debug.append(value) + try: + parser.values.delayed_warnings + except AttributeError: + parser.values.delayed_warnings = [] + msg = deprecated_debug_options[value] + w = "The --debug=%s option is deprecated%s." % (value, msg) + t = (SCons.Warnings.DeprecatedDebugOptionsWarning, w) + parser.values.delayed_warnings.append(t) else: - raise OptionValueError("Warning: %s is not a valid debug type" % value) + raise OptionValueError(opt_invalid('debug', value, debug_options)) opt_debug_help = "Print various types of debugging information: %s." \ % ", ".join(debug_options) op.add_option('--debug', @@ -630,7 +636,7 @@ def Parser(version): try: diskcheck_value = diskcheck_convert(value) except ValueError, e: - raise OptionValueError("Warning: `%s' is not a valid diskcheck type" % e) + raise OptionValueError("`%s' is not a valid diskcheck type" % e) setattr(parser.values, option.dest, diskcheck_value) op.add_option('--diskcheck', @@ -642,7 +648,8 @@ def Parser(version): def opt_duplicate(option, opt, value, parser): if not value in SCons.Node.FS.Valid_Duplicates: - raise OptionValueError("`%s' is not a valid duplication style." % value) + raise OptionValueError(opt_invalid('duplication', value, + SCons.Node.FS.Valid_Duplicates)) setattr(parser.values, option.dest, value) # Set the duplicate style right away so it can affect linking # of SConscript files. @@ -807,7 +814,7 @@ def Parser(version): elif o == 'status': tp.status = True else: - raise OptionValueError("Warning: %s is not a valid --tree option" % o) + raise OptionValueError(opt_invalid('--tree', o, tree_options)) parser.values.tree_printers.append(tp) opt_tree_help = "Print a dependency tree in various formats: %s." \ diff --git a/scons/scons-local-2.2.0/SCons/Script/SConscript.py b/scons/scons-local-2.3.0/SCons/Script/SConscript.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Script/SConscript.py rename to scons/scons-local-2.3.0/SCons/Script/SConscript.py index 18a9e310a..59039eaf9 100644 --- a/scons/scons-local-2.2.0/SCons/Script/SConscript.py +++ b/scons/scons-local-2.3.0/SCons/Script/SConscript.py @@ -6,7 +6,7 @@ files. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Script/SConscript.py 2013/03/03 09:48:35 garyo" import SCons import SCons.Action @@ -473,13 +473,8 @@ class SConsEnvironment(SCons.Environment.Base): def EnsurePythonVersion(self, major, minor): """Exit abnormally if the Python version is not late enough.""" - try: - v_major, v_minor, v_micro, release, serial = sys.version_info - python_ver = (v_major, v_minor) - except AttributeError: - python_ver = self._get_major_minor_revision(sys.version)[:2] - if python_ver < (major, minor): - v = sys.version.split(" ", 1)[0] + if sys.version_info < (major, minor): + v = sys.version.split()[0] print "Python %d.%d or greater required, but you have Python %s" %(major,minor,v) sys.exit(2) diff --git a/scons/scons-local-2.2.0/SCons/Script/__init__.py b/scons/scons-local-2.3.0/SCons/Script/__init__.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Script/__init__.py rename to scons/scons-local-2.3.0/SCons/Script/__init__.py index c0a031adb..5b3eac812 100644 --- a/scons/scons-local-2.2.0/SCons/Script/__init__.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Script/__init__.py 2013/03/03 09:48:35 garyo" import time start_time = time.time() diff --git a/scons/scons-local-2.2.0/SCons/Sig.py b/scons/scons-local-2.3.0/SCons/Sig.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Sig.py rename to scons/scons-local-2.3.0/SCons/Sig.py index 41289a0f6..a14a99f42 100644 --- a/scons/scons-local-2.2.0/SCons/Sig.py +++ b/scons/scons-local-2.3.0/SCons/Sig.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Sig.py 2013/03/03 09:48:35 garyo" __doc__ = """Place-holder for the old SCons.Sig module hierarchy diff --git a/scons/scons-local-2.2.0/SCons/Subst.py b/scons/scons-local-2.3.0/SCons/Subst.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Subst.py rename to scons/scons-local-2.3.0/SCons/Subst.py index 8d9d3a43a..94a0df800 100644 --- a/scons/scons-local-2.2.0/SCons/Subst.py +++ b/scons/scons-local-2.3.0/SCons/Subst.py @@ -5,7 +5,7 @@ SCons string substitution. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Subst.py 2013/03/03 09:48:35 garyo" import collections import re diff --git a/scons/scons-local-2.2.0/SCons/Taskmaster.py b/scons/scons-local-2.3.0/SCons/Taskmaster.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Taskmaster.py rename to scons/scons-local-2.3.0/SCons/Taskmaster.py index cd95fb081..461023a01 100644 --- a/scons/scons-local-2.2.0/SCons/Taskmaster.py +++ b/scons/scons-local-2.3.0/SCons/Taskmaster.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Taskmaster.py 2013/03/03 09:48:35 garyo" from itertools import chain import operator diff --git a/scons/scons-local-2.2.0/SCons/Tool/386asm.py b/scons/scons-local-2.3.0/SCons/Tool/386asm.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/386asm.py rename to scons/scons-local-2.3.0/SCons/Tool/386asm.py index bf32a0b7d..2b26c0f95 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/386asm.py +++ b/scons/scons-local-2.3.0/SCons/Tool/386asm.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/386asm.py 2013/03/03 09:48:35 garyo" from SCons.Tool.PharLapCommon import addPharLapPaths import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/BitKeeper.py b/scons/scons-local-2.3.0/SCons/Tool/BitKeeper.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/BitKeeper.py rename to scons/scons-local-2.3.0/SCons/Tool/BitKeeper.py index 60445db1e..288ef909f 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/BitKeeper.py +++ b/scons/scons-local-2.3.0/SCons/Tool/BitKeeper.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/BitKeeper.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/CVS.py b/scons/scons-local-2.3.0/SCons/Tool/CVS.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/CVS.py rename to scons/scons-local-2.3.0/SCons/Tool/CVS.py index 87a6f1a32..3e60643ee 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/CVS.py +++ b/scons/scons-local-2.3.0/SCons/Tool/CVS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/CVS.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/FortranCommon.py b/scons/scons-local-2.3.0/SCons/Tool/FortranCommon.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/FortranCommon.py rename to scons/scons-local-2.3.0/SCons/Tool/FortranCommon.py index 2efcfa27b..7b470a2a1 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/FortranCommon.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/FortranCommon.py 2013/03/03 09:48:35 garyo" import re import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/GettextCommon.py b/scons/scons-local-2.3.0/SCons/Tool/GettextCommon.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/GettextCommon.py rename to scons/scons-local-2.3.0/SCons/Tool/GettextCommon.py index b2d848c44..2b1b9254c 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/GettextCommon.py +++ b/scons/scons-local-2.3.0/SCons/Tool/GettextCommon.py @@ -3,7 +3,7 @@ Used by several tools of `gettext` toolset. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 @@ Used by several tools of `gettext` toolset. # 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" +__revision__ = "src/engine/SCons/Tool/GettextCommon.py 2013/03/03 09:48:35 garyo" import SCons.Warnings import re @@ -225,8 +225,9 @@ class _POFileBuilder(BuilderBase): import SCons.Environment ############################################################################# -def _translate(env, target=[], source=SCons.Environment._null, *args, **kw): +def _translate(env, target=None, source=SCons.Environment._null, *args, **kw): """ Function for `Translate()` pseudo-builder """ + if target is None: target = [] pot = env.POTUpdate(None, source, *args, **kw) po = env.POUpdate(target, pot, *args, **kw) return po diff --git a/scons/scons-local-2.2.0/SCons/Tool/JavaCommon.py b/scons/scons-local-2.3.0/SCons/Tool/JavaCommon.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/JavaCommon.py rename to scons/scons-local-2.3.0/SCons/Tool/JavaCommon.py index dc381053e..ea5e5bd58 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/JavaCommon.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/JavaCommon.py 2013/03/03 09:48:35 garyo" import os import os.path @@ -64,7 +64,7 @@ if java_parsing: interfaces, and anonymous inner classes.""" def __init__(self, version=default_java_version): - if not version in ('1.1', '1.2', '1.3','1.4', '1.5', '1.6', + if not version in ('1.1', '1.2', '1.3','1.4', '1.5', '1.6', '1.7', '5', '6'): msg = "Java version %s not supported" % version raise NotImplementedError(msg) @@ -171,7 +171,7 @@ if java_parsing: if self.version in ('1.1', '1.2', '1.3', '1.4'): clazz = self.listClasses[0] self.listOutputs.append('%s$%d' % (clazz, self.nextAnon)) - elif self.version in ('1.5', '1.6', '5', '6'): + elif self.version in ('1.5', '1.6', '1.7', '5', '6'): self.stackAnonClassBrackets.append(self.brackets) className = [] className.extend(self.listClasses) diff --git a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/__init__.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py rename to scons/scons-local-2.3.0/SCons/Tool/MSCommon/__init__.py index 8dc6c5a61..37226633b 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/__init__.py +++ b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/__init__.py 2013/03/03 09:48:35 garyo" __doc__ = """ Common functions for Microsoft Visual Studio and Visual C/C++. diff --git a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/arch.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py rename to scons/scons-local-2.3.0/SCons/Tool/MSCommon/arch.py index 1b6ac9ef0..e6eb38228 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/arch.py +++ b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/arch.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/arch.py 2013/03/03 09:48:35 garyo" __doc__ = """Module to define supported Windows chip architectures. """ diff --git a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/common.py b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/common.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/MSCommon/common.py rename to scons/scons-local-2.3.0/SCons/Tool/MSCommon/common.py index d10b7636c..e3fda5af1 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/common.py +++ b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/common.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/common.py 2013/03/03 09:48:35 garyo" __doc__ = """ Common helper functions for working with the Microsoft tool chain. @@ -136,6 +136,8 @@ def get_output(vcbat, args = None, env = None): # settings in vs.py. vars = [ 'COMSPEC', + 'VS110COMNTOOLS', + 'VS100COMNTOOLS', 'VS90COMNTOOLS', 'VS80COMNTOOLS', 'VS71COMNTOOLS', diff --git a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/netframework.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py rename to scons/scons-local-2.3.0/SCons/Tool/MSCommon/netframework.py index cc5aaf1bf..e1c12a643 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/netframework.py +++ b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/netframework.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/netframework.py 2013/03/03 09:48:35 garyo" __doc__ = """ """ diff --git a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/sdk.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py rename to scons/scons-local-2.3.0/SCons/Tool/MSCommon/sdk.py index fd22cd7be..1536a22bf 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/sdk.py +++ b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/sdk.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/sdk.py 2013/03/03 09:48:35 garyo" __doc__ = """Module to detect the Platform/Windows SDK diff --git a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/vc.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py rename to scons/scons-local-2.3.0/SCons/Tool/MSCommon/vc.py index 9bbec2170..ec285c83b 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/vc.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/vc.py 2013/03/03 09:48:35 garyo" __doc__ = """Module for Visual C/C++ detection and configuration. """ diff --git a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/vs.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py rename to scons/scons-local-2.3.0/SCons/Tool/MSCommon/vs.py index f5feb2a44..18b31a0be 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/MSCommon/vs.py +++ b/scons/scons-local-2.3.0/SCons/Tool/MSCommon/vs.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/MSCommon/vs.py 2013/03/03 09:48:35 garyo" __doc__ = """Module to detect Visual Studio and/or Visual C/C++ """ diff --git a/scons/scons-local-2.2.0/SCons/Tool/Perforce.py b/scons/scons-local-2.3.0/SCons/Tool/Perforce.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/Perforce.py rename to scons/scons-local-2.3.0/SCons/Tool/Perforce.py index ade9e88a7..3b56fee24 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/Perforce.py +++ b/scons/scons-local-2.3.0/SCons/Tool/Perforce.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/Perforce.py 2013/03/03 09:48:35 garyo" import os diff --git a/scons/scons-local-2.2.0/SCons/Tool/PharLapCommon.py b/scons/scons-local-2.3.0/SCons/Tool/PharLapCommon.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/PharLapCommon.py rename to scons/scons-local-2.3.0/SCons/Tool/PharLapCommon.py index 0f54a2ba9..7602073f2 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/PharLapCommon.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/PharLapCommon.py 2013/03/03 09:48:35 garyo" import os import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/RCS.py b/scons/scons-local-2.3.0/SCons/Tool/RCS.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/RCS.py rename to scons/scons-local-2.3.0/SCons/Tool/RCS.py index cc33a4eea..05505ac8b 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/RCS.py +++ b/scons/scons-local-2.3.0/SCons/Tool/RCS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/RCS.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/SCCS.py b/scons/scons-local-2.3.0/SCons/Tool/SCCS.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/SCCS.py rename to scons/scons-local-2.3.0/SCons/Tool/SCCS.py index 5e35a8758..6f795a5cc 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/SCCS.py +++ b/scons/scons-local-2.3.0/SCons/Tool/SCCS.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/SCCS.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/Subversion.py b/scons/scons-local-2.3.0/SCons/Tool/Subversion.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/Subversion.py rename to scons/scons-local-2.3.0/SCons/Tool/Subversion.py index 212850fe3..41771ad28 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/Subversion.py +++ b/scons/scons-local-2.3.0/SCons/Tool/Subversion.py @@ -8,7 +8,7 @@ selection method. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/Subversion.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/__init__.py b/scons/scons-local-2.3.0/SCons/Tool/__init__.py similarity index 83% rename from scons/scons-local-2.2.0/SCons/Tool/__init__.py rename to scons/scons-local-2.3.0/SCons/Tool/__init__.py index 5bee64dd9..b12095f94 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/__init__.py +++ b/scons/scons-local-2.3.0/SCons/Tool/__init__.py @@ -14,7 +14,7 @@ tool definition. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,10 +35,13 @@ 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/__init__.py 2013/03/03 09:48:35 garyo" import imp import sys +import re +import os +import shutil import SCons.Builder import SCons.Errors @@ -233,6 +236,120 @@ def createStaticLibBuilder(env): return static_lib +def VersionShLibLinkNames(version, libname, env): + """Generate names of symlinks to the versioned shared library""" + Verbose = False + platform = env.subst('$PLATFORM') + shlib_suffix = env.subst('$SHLIBSUFFIX') + shlink_flags = SCons.Util.CLVar(env.subst('$SHLINKFLAGS')) + + linknames = [] + if version.count(".") != 2: + # We need a version string of the form x.y.z to proceed + # Several changes need to be made to support versions like x.y + raise ValueError + + if platform == 'darwin': + # For libfoo.x.y.z.dylib, linknames libfoo.so + suffix_re = re.escape('.' + version + shlib_suffix) + linkname = re.sub(suffix_re, shlib_suffix, libname) + if Verbose: + print "VersionShLibLinkNames: linkname = ",linkname + linknames.append(linkname) + elif platform == 'posix': + # For libfoo.so.x.y.z, linknames libfoo.so libfoo.so.x.y libfoo.so.x + suffix_re = re.escape(shlib_suffix + '.' + version) + # First linkname has no version number + linkname = re.sub(suffix_re, shlib_suffix, libname) + if Verbose: + print "VersionShLibLinkNames: linkname = ",linkname + linknames.append(linkname) + versionparts = version.split('.') + major_name = linkname + "." + versionparts[0] + minor_name = major_name + "." + versionparts[1] + #Only add link for major_name + #for linkname in [major_name, minor_name]: + for linkname in [major_name, ]: + if Verbose: + print "VersionShLibLinkNames: linkname ",linkname, ", target ",libname + linknames.append(linkname) + # note: no Windows case here (win32 or cygwin); + # MSVC doesn't support this type of versioned shared libs. + # (could probably do something for MinGW though) + return linknames + +def VersionedSharedLibrary(target = None, source= None, env=None): + """Build a shared library. If the environment has SHLIBVERSION +defined make a versioned shared library and create the appropriate +symlinks for the platform we are on""" + Verbose = False + try: + version = env.subst('$SHLIBVERSION') + except KeyError: + version = None + + # libname includes the version number if one was given + libname = target[0].name + platform = env.subst('$PLATFORM') + shlib_suffix = env.subst('$SHLIBSUFFIX') + shlink_flags = SCons.Util.CLVar(env.subst('$SHLINKFLAGS')) + if Verbose: + print "VersionShLib: libname = ",libname + print "VersionShLib: platform = ",platform + print "VersionShLib: shlib_suffix = ",shlib_suffix + print "VersionShLib: target = ",str(target[0]) + + if version: + # set the shared library link flags + if platform == 'posix': + suffix_re = re.escape(shlib_suffix + '.' + version) + (major, age, revision) = version.split(".") + # soname will have only the major version number in it + soname = re.sub(suffix_re, shlib_suffix, libname) + '.' + major + shlink_flags += [ '-Wl,-Bsymbolic', '-Wl,-soname=%s' % soname ] + if Verbose: + print " soname ",soname,", shlink_flags ",shlink_flags + elif platform == 'cygwin': + shlink_flags += [ '-Wl,-Bsymbolic', + '-Wl,--out-implib,${TARGET.base}.a' ] + elif platform == 'darwin': + shlink_flags += [ '-current_version', '%s' % version, + '-compatibility_version', '%s' % version, + '-undefined', 'dynamic_lookup' ] + if Verbose: + print "VersionShLib: shlink_flags = ",shlink_flags + envlink = env.Clone() + envlink['SHLINKFLAGS'] = shlink_flags + else: + envlink = env + + result = SCons.Defaults.ShLinkAction(target, source, envlink) + + if version: + # here we need the full pathname so the links end up in the right directory + libname = target[0].path + linknames = VersionShLibLinkNames(version, libname, env) + if Verbose: + print "VerShLib: linknames ",linknames + # Here we just need the file name w/o path as the target of the link + lib_ver = target[0].name + # make symlink of adjacent names in linknames + for count in range(len(linknames)): + linkname = linknames[count] + if count > 0: + os.symlink(os.path.basename(linkname),lastname) + if Verbose: + print "VerShLib: made sym link of %s -> %s" % (lastname,linkname) + lastname = linkname + # finish chain of sym links with link to the actual library + if len(linknames)>0: + os.symlink(lib_ver,lastname) + if Verbose: + print "VerShLib: made sym link of %s -> %s" % (lib_ver,linkname) + return result + +ShLibAction = SCons.Action.Action(VersionedSharedLibrary, None) + def createSharedLibBuilder(env): """This is a utility function that creates the SharedLibrary Builder in an Environment if it is not there already. @@ -245,7 +362,7 @@ def createSharedLibBuilder(env): except KeyError: import SCons.Defaults action_list = [ SCons.Defaults.SharedCheck, - SCons.Defaults.ShLinkAction ] + ShLibAction ] shared_lib = SCons.Builder.Builder(action = action_list, emitter = "$SHLIBEMITTER", prefix = '$SHLIBPREFIX', @@ -527,13 +644,16 @@ class ToolInitializer(object): # the ToolInitializer class. def Initializers(env): - ToolInitializer(env, ['install'], ['_InternalInstall', '_InternalInstallAs']) + ToolInitializer(env, ['install'], ['_InternalInstall', '_InternalInstallAs', '_InternalInstallVersionedLib']) def Install(self, *args, **kw): return self._InternalInstall(*args, **kw) def InstallAs(self, *args, **kw): return self._InternalInstallAs(*args, **kw) + def InstallVersionedLib(self, *args, **kw): + return self._InternalInstallVersionedLib(*args, **kw) env.AddMethod(Install) env.AddMethod(InstallAs) + env.AddMethod(InstallVersionedLib) def FindTool(tools, env): for tool in tools: @@ -679,3 +799,4 @@ def tool_list(platform, env): # indent-tabs-mode:nil # End: # vim: set expandtab tabstop=4 shiftwidth=4: + diff --git a/scons/scons-local-2.2.0/SCons/Tool/aixc++.py b/scons/scons-local-2.3.0/SCons/Tool/aixc++.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/aixc++.py rename to scons/scons-local-2.3.0/SCons/Tool/aixc++.py index fecfe766f..e9cc5c232 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/aixc++.py +++ b/scons/scons-local-2.3.0/SCons/Tool/aixc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/aixc++.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/aixcc.py b/scons/scons-local-2.3.0/SCons/Tool/aixcc.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/aixcc.py rename to scons/scons-local-2.3.0/SCons/Tool/aixcc.py index d611fdcf0..44cb0ab14 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/aixcc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/aixcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/aixcc.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/aixf77.py b/scons/scons-local-2.3.0/SCons/Tool/aixf77.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/aixf77.py rename to scons/scons-local-2.3.0/SCons/Tool/aixf77.py index c3e062e00..19f8594b4 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/aixf77.py +++ b/scons/scons-local-2.3.0/SCons/Tool/aixf77.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/aixf77.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/aixlink.py b/scons/scons-local-2.3.0/SCons/Tool/aixlink.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/aixlink.py rename to scons/scons-local-2.3.0/SCons/Tool/aixlink.py index 3a064bd2c..980568a3a 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/aixlink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/aixlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/aixlink.py 2013/03/03 09:48:35 garyo" import os import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/applelink.py b/scons/scons-local-2.3.0/SCons/Tool/applelink.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/applelink.py rename to scons/scons-local-2.3.0/SCons/Tool/applelink.py index 7b0cc1768..a67fc10cc 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/applelink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/applelink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/applelink.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/ar.py b/scons/scons-local-2.3.0/SCons/Tool/ar.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/ar.py rename to scons/scons-local-2.3.0/SCons/Tool/ar.py index 655e56b60..c11b5437d 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/ar.py +++ b/scons/scons-local-2.3.0/SCons/Tool/ar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/ar.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/as.py b/scons/scons-local-2.3.0/SCons/Tool/as.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/as.py rename to scons/scons-local-2.3.0/SCons/Tool/as.py index 6275d8136..29b0266e7 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/as.py +++ b/scons/scons-local-2.3.0/SCons/Tool/as.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/as.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/bcc32.py b/scons/scons-local-2.3.0/SCons/Tool/bcc32.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/bcc32.py rename to scons/scons-local-2.3.0/SCons/Tool/bcc32.py index c426e79e1..c152353b4 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/bcc32.py +++ b/scons/scons-local-2.3.0/SCons/Tool/bcc32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/bcc32.py 2013/03/03 09:48:35 garyo" import os import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/c++.py b/scons/scons-local-2.3.0/SCons/Tool/c++.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/c++.py rename to scons/scons-local-2.3.0/SCons/Tool/c++.py index 8cd1dea29..18f4afe29 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/c++.py +++ b/scons/scons-local-2.3.0/SCons/Tool/c++.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/c++.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/cc.py b/scons/scons-local-2.3.0/SCons/Tool/cc.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/cc.py rename to scons/scons-local-2.3.0/SCons/Tool/cc.py index 806f25131..00ecc2f25 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/cc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/cc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/cc.py 2013/03/03 09:48:35 garyo" import SCons.Tool import SCons.Defaults diff --git a/scons/scons-local-2.2.0/SCons/Tool/cvf.py b/scons/scons-local-2.3.0/SCons/Tool/cvf.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/cvf.py rename to scons/scons-local-2.3.0/SCons/Tool/cvf.py index 2dcf195e1..2bf10da79 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/cvf.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/cvf.py 2013/03/03 09:48:35 garyo" import fortran diff --git a/scons/scons-local-2.2.0/SCons/Tool/default.py b/scons/scons-local-2.3.0/SCons/Tool/default.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/Tool/default.py rename to scons/scons-local-2.3.0/SCons/Tool/default.py index 292bd0ba3..4faab7ee1 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/default.py +++ b/scons/scons-local-2.3.0/SCons/Tool/default.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/default.py 2013/03/03 09:48:35 garyo" import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/dmd.py b/scons/scons-local-2.3.0/SCons/Tool/dmd.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/dmd.py rename to scons/scons-local-2.3.0/SCons/Tool/dmd.py index 839020f0c..3c73f80ea 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/dmd.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/dmd.py 2013/03/03 09:48:35 garyo" import os diff --git a/scons/scons-local-2.2.0/SCons/Tool/dvi.py b/scons/scons-local-2.3.0/SCons/Tool/dvi.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/dvi.py rename to scons/scons-local-2.3.0/SCons/Tool/dvi.py index 803758cfa..496e6988f 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/dvi.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/dvi.py 2013/03/03 09:48:35 garyo" import SCons.Builder import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/dvipdf.py b/scons/scons-local-2.3.0/SCons/Tool/dvipdf.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/dvipdf.py rename to scons/scons-local-2.3.0/SCons/Tool/dvipdf.py index b931cf56d..5fe8d8892 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/dvipdf.py +++ b/scons/scons-local-2.3.0/SCons/Tool/dvipdf.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/dvipdf.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Defaults diff --git a/scons/scons-local-2.2.0/SCons/Tool/dvips.py b/scons/scons-local-2.3.0/SCons/Tool/dvips.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/dvips.py rename to scons/scons-local-2.3.0/SCons/Tool/dvips.py index 8b3ba0f54..a0f9e6fa8 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/dvips.py +++ b/scons/scons-local-2.3.0/SCons/Tool/dvips.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/dvips.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/f03.py b/scons/scons-local-2.3.0/SCons/Tool/f03.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/f03.py rename to scons/scons-local-2.3.0/SCons/Tool/f03.py index cc8f9d29d..791562541 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/f03.py +++ b/scons/scons-local-2.3.0/SCons/Tool/f03.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/f03.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/f77.py b/scons/scons-local-2.3.0/SCons/Tool/f77.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/f77.py rename to scons/scons-local-2.3.0/SCons/Tool/f77.py index cba5b0b21..7f49892bb 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/f77.py +++ b/scons/scons-local-2.3.0/SCons/Tool/f77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/f77.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/scons/scons-local-2.2.0/SCons/Tool/f90.py b/scons/scons-local-2.3.0/SCons/Tool/f90.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/f90.py rename to scons/scons-local-2.3.0/SCons/Tool/f90.py index 1df001405..bd07ae0a5 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/f90.py +++ b/scons/scons-local-2.3.0/SCons/Tool/f90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/f90.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Scanner.Fortran diff --git a/scons/scons-local-2.2.0/SCons/Tool/f95.py b/scons/scons-local-2.3.0/SCons/Tool/f95.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/f95.py rename to scons/scons-local-2.3.0/SCons/Tool/f95.py index b32530905..5c16d484c 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/f95.py +++ b/scons/scons-local-2.3.0/SCons/Tool/f95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/f95.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/filesystem.py b/scons/scons-local-2.3.0/SCons/Tool/filesystem.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/filesystem.py rename to scons/scons-local-2.3.0/SCons/Tool/filesystem.py index 2ac49548f..431ad4c2b 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/filesystem.py +++ b/scons/scons-local-2.3.0/SCons/Tool/filesystem.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/filesystem.py 2013/03/03 09:48:35 garyo" import SCons from SCons.Tool.install import copyFunc diff --git a/scons/scons-local-2.2.0/SCons/Tool/fortran.py b/scons/scons-local-2.3.0/SCons/Tool/fortran.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/fortran.py rename to scons/scons-local-2.3.0/SCons/Tool/fortran.py index 3da748a94..35fcd5360 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/fortran.py +++ b/scons/scons-local-2.3.0/SCons/Tool/fortran.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/fortran.py 2013/03/03 09:48:35 garyo" import re diff --git a/scons/scons-local-2.2.0/SCons/Tool/g++.py b/scons/scons-local-2.3.0/SCons/Tool/g++.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/g++.py rename to scons/scons-local-2.3.0/SCons/Tool/g++.py index 484344c3c..be7d93536 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/g++.py +++ b/scons/scons-local-2.3.0/SCons/Tool/g++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/g++.py 2013/03/03 09:48:35 garyo" import os.path import re diff --git a/scons/scons-local-2.2.0/SCons/Tool/g77.py b/scons/scons-local-2.3.0/SCons/Tool/g77.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/g77.py rename to scons/scons-local-2.3.0/SCons/Tool/g77.py index 97c2ef184..5e1d1a1e6 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/g77.py +++ b/scons/scons-local-2.3.0/SCons/Tool/g77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/g77.py 2013/03/03 09:48:35 garyo" import SCons.Util from SCons.Tool.FortranCommon import add_all_to_env, add_f77_to_env diff --git a/scons/scons-local-2.2.0/SCons/Tool/gas.py b/scons/scons-local-2.3.0/SCons/Tool/gas.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/gas.py rename to scons/scons-local-2.3.0/SCons/Tool/gas.py index 89aa2e344..143ede936 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/gas.py +++ b/scons/scons-local-2.3.0/SCons/Tool/gas.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/gas.py 2013/03/03 09:48:35 garyo" as_module = __import__('as', globals(), locals(), []) diff --git a/scons/scons-local-2.2.0/SCons/Tool/gcc.py b/scons/scons-local-2.3.0/SCons/Tool/gcc.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/gcc.py rename to scons/scons-local-2.3.0/SCons/Tool/gcc.py index 814e1dec2..5b49ff83f 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/gcc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/gcc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/gcc.py 2013/03/03 09:48:35 garyo" import cc import os diff --git a/scons/scons-local-2.2.0/SCons/Tool/gettext.py b/scons/scons-local-2.3.0/SCons/Tool/gettext.py similarity index 86% rename from scons/scons-local-2.2.0/SCons/Tool/gettext.py rename to scons/scons-local-2.3.0/SCons/Tool/gettext.py index 9f2c70715..b561eda40 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/gettext.py +++ b/scons/scons-local-2.3.0/SCons/Tool/gettext.py @@ -2,7 +2,7 @@ """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,7 +23,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/gettext.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/gettext.py 2013/03/03 09:48:35 garyo" ############################################################################# def generate(env,**kw): @@ -40,6 +40,9 @@ 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) + try: + return _xgettext_exists(env) and _msginit_exists(env) \ + and _msgmerge_exists(env) and _msgfmt_exists(env) + except: + return False ############################################################################# diff --git a/scons/scons-local-2.2.0/SCons/Tool/gfortran.py b/scons/scons-local-2.3.0/SCons/Tool/gfortran.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/gfortran.py rename to scons/scons-local-2.3.0/SCons/Tool/gfortran.py index 2f9bddc64..463f70e78 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/gfortran.py +++ b/scons/scons-local-2.3.0/SCons/Tool/gfortran.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/gfortran.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/gnulink.py b/scons/scons-local-2.3.0/SCons/Tool/gnulink.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/gnulink.py rename to scons/scons-local-2.3.0/SCons/Tool/gnulink.py index ee9f584e9..281a0d082 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/gnulink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/gnulink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/gnulink.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/gs.py b/scons/scons-local-2.3.0/SCons/Tool/gs.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/gs.py rename to scons/scons-local-2.3.0/SCons/Tool/gs.py index 12e71d282..fc53b7e0a 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/gs.py +++ b/scons/scons-local-2.3.0/SCons/Tool/gs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/gs.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Platform diff --git a/scons/scons-local-2.2.0/SCons/Tool/hpc++.py b/scons/scons-local-2.3.0/SCons/Tool/hpc++.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/hpc++.py rename to scons/scons-local-2.3.0/SCons/Tool/hpc++.py index 5f75e1807..94b7fec7a 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/hpc++.py +++ b/scons/scons-local-2.3.0/SCons/Tool/hpc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/hpc++.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/hpcc.py b/scons/scons-local-2.3.0/SCons/Tool/hpcc.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/hpcc.py rename to scons/scons-local-2.3.0/SCons/Tool/hpcc.py index 29586f623..efd523026 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/hpcc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/hpcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/hpcc.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/hplink.py b/scons/scons-local-2.3.0/SCons/Tool/hplink.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/hplink.py rename to scons/scons-local-2.3.0/SCons/Tool/hplink.py index d979545e6..627c9e946 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/hplink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/hplink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/hplink.py 2013/03/03 09:48:35 garyo" import os import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/icc.py b/scons/scons-local-2.3.0/SCons/Tool/icc.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/icc.py rename to scons/scons-local-2.3.0/SCons/Tool/icc.py index 1f7f02847..aa54a0ae2 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/icc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/icc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/icc.py 2013/03/03 09:48:35 garyo" import cc diff --git a/scons/scons-local-2.2.0/SCons/Tool/icl.py b/scons/scons-local-2.3.0/SCons/Tool/icl.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/icl.py rename to scons/scons-local-2.3.0/SCons/Tool/icl.py index e3ee4ea5d..f0a252ba0 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/icl.py +++ b/scons/scons-local-2.3.0/SCons/Tool/icl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/icl.py 2013/03/03 09:48:35 garyo" import SCons.Tool.intelc diff --git a/scons/scons-local-2.2.0/SCons/Tool/ifl.py b/scons/scons-local-2.3.0/SCons/Tool/ifl.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/ifl.py rename to scons/scons-local-2.3.0/SCons/Tool/ifl.py index 6ad250abb..678a0d14a 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/ifl.py +++ b/scons/scons-local-2.3.0/SCons/Tool/ifl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/ifl.py 2013/03/03 09:48:35 garyo" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/scons/scons-local-2.2.0/SCons/Tool/ifort.py b/scons/scons-local-2.3.0/SCons/Tool/ifort.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/ifort.py rename to scons/scons-local-2.3.0/SCons/Tool/ifort.py index fde2e864f..80c170ba5 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/ifort.py +++ b/scons/scons-local-2.3.0/SCons/Tool/ifort.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/ifort.py 2013/03/03 09:48:35 garyo" import SCons.Defaults from SCons.Scanner.Fortran import FortranScan diff --git a/scons/scons-local-2.2.0/SCons/Tool/ilink.py b/scons/scons-local-2.3.0/SCons/Tool/ilink.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/ilink.py rename to scons/scons-local-2.3.0/SCons/Tool/ilink.py index 4f37906b9..7fa9b33b7 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/ilink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/ilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/ilink.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/ilink32.py b/scons/scons-local-2.3.0/SCons/Tool/ilink32.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/ilink32.py rename to scons/scons-local-2.3.0/SCons/Tool/ilink32.py index 399501b6b..8b9cef66e 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/ilink32.py +++ b/scons/scons-local-2.3.0/SCons/Tool/ilink32.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/ilink32.py 2013/03/03 09:48:35 garyo" import SCons.Tool import SCons.Tool.bcc32 diff --git a/scons/scons-local-2.2.0/SCons/Tool/install.py b/scons/scons-local-2.3.0/SCons/Tool/install.py similarity index 56% rename from scons/scons-local-2.2.0/SCons/Tool/install.py rename to scons/scons-local-2.3.0/SCons/Tool/install.py index 8b0673b06..6f67fac27 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/install.py +++ b/scons/scons-local-2.3.0/SCons/Tool/install.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,9 +30,10 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/install.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/install.py 2013/03/03 09:48:35 garyo" import os +import re import shutil import stat @@ -121,6 +122,87 @@ def copyFunc(dest, source, env): return 0 +# +# Functions doing the actual work of the InstallVersionedLib Builder. +# +def copyFuncVersionedLib(dest, source, env): + """Install a versioned library into a destination by copying, + (including copying permission/mode bits) and then creating + required symlinks.""" + + if os.path.isdir(source): + raise SCons.Errors.UserError("cannot install directory `%s' as a version library" % str(source) ) + else: + shutil.copy2(source, dest) + st = os.stat(source) + os.chmod(dest, stat.S_IMODE(st[stat.ST_MODE]) | stat.S_IWRITE) + versionedLibLinks(dest, source, env) + + return 0 + +def versionedLibVersion(dest, env): + """Check if dest is a version shared library name. Return version, libname, & install_dir if it is.""" + Verbose = False + platform = env.subst('$PLATFORM') + if not (platform == 'posix' or platform == 'darwin'): + return (None, None, None) + + libname = os.path.basename(dest) + install_dir = os.path.dirname(dest) + shlib_suffix = env.subst('$SHLIBSUFFIX') + # See if the source name is a versioned shared library, get the version number + result = False + + version_re = re.compile("[0-9]+\\.[0-9]+\\.[0-9a-zA-Z]+") + version_File = None + if platform == 'posix': + # handle unix names + versioned_re = re.compile(re.escape(shlib_suffix + '.') + "[0-9]+\\.[0-9]+\\.[0-9a-zA-Z]+") + result = versioned_re.findall(libname) + if result: + version_File = version_re.findall(versioned_re.findall(libname)[-1])[-1] + elif platform == 'darwin': + # handle OSX names + versioned_re = re.compile("\\.[0-9]+\\.[0-9]+\\.[0-9a-zA-Z]+" + re.escape(shlib_suffix) ) + result = versioned_re.findall(libname) + if result: + version_File = version_re.findall(versioned_re.findall(libname)[-1])[-1] + + if Verbose: + print "install: version_File ", version_File + # result is False if we did not find a versioned shared library name, so return and empty list + if not result: + return (None, libname, install_dir) + + version = None + # get version number from the environment + try: + version = env.subst('$SHLIBVERSION') + except KeyError: + version = None + + if version != version_File: + #raise SCons.Errors.UserError("SHLIBVERSION '%s' does not match the version # '%s' in the filename" % (version, version_File) ) + print "SHLIBVERSION '%s' does not match the version # '%s' in the filename, proceeding based on file name" % (version, version_File) + version = version_File + return (version, libname, install_dir) + +def versionedLibLinks(dest, source, env): + """If we are installing a versioned shared library create the required links.""" + Verbose = False + linknames = [] + version, libname, install_dir = versionedLibVersion(dest, env) + + if version != None: + # libname includes the version number if one was given + linknames = SCons.Tool.VersionShLibLinkNames(version,libname,env) + for linkname in linknames: + if Verbose: + print "make link of %s to %s" %(libname, os.path.join(install_dir, linkname)) + fulllinkname = os.path.join(install_dir, linkname) + os.symlink(libname,fulllinkname) + return + def installFunc(target, source, env): """Install a source file into a target using the function specified as the INSTALL construction variable.""" @@ -137,6 +219,22 @@ def installFunc(target, source, env): return 0 +def installFuncVersionedLib(target, source, env): + """Install a versioned library into a target using the function specified + as the INSTALLVERSIONEDLIB construction variable.""" + try: + install = env['INSTALLVERSIONEDLIB'] + except KeyError: + raise SCons.Errors.UserError('Missing INSTALLVERSIONEDLIB construction variable.') + + assert len(target)==len(source), \ + "Installing source %s into target %s: target and source lists must have same length."%(list(map(str, source)), list(map(str, target))) + for t,s in zip(target,source): + if install(t.get_path(),s.get_path(),env): + return 1 + + return 0 + def stringFunc(target, source, env): installstr = env.get('INSTALLSTR') if installstr: @@ -159,6 +257,31 @@ def add_targets_to_INSTALLED_FILES(target, source, env): """ global _INSTALLED_FILES, _UNIQUE_INSTALLED_FILES _INSTALLED_FILES.extend(target) + + _UNIQUE_INSTALLED_FILES = None + return (target, source) + +def add_versioned_targets_to_INSTALLED_FILES(target, source, env): + """ an emitter that adds all target files to the list stored in the + _INSTALLED_FILES global variable. This way all installed files of one + scons call will be collected. + """ + global _INSTALLED_FILES, _UNIQUE_INSTALLED_FILES + Verbose = False + _INSTALLED_FILES.extend(target) + + # see if we have a versioned shared library, if so generate side effects + version, libname, install_dir = versionedLibVersion(target[0].path, env) + if version != None: + # generate list of link names + linknames = SCons.Tool.VersionShLibLinkNames(version,libname,env) + for linkname in linknames: + if Verbose: + print "make side effect of %s" % os.path.join(install_dir, linkname) + fulllinkname = os.path.join(install_dir, linkname) + env.SideEffect(fulllinkname,target[0]) + env.Clean(target[0],fulllinkname) + _UNIQUE_INSTALLED_FILES = None return (target, source) @@ -181,8 +304,9 @@ class DESTDIR_factory(object): # # The Builder Definition # -install_action = SCons.Action.Action(installFunc, stringFunc) -installas_action = SCons.Action.Action(installFunc, stringFunc) +install_action = SCons.Action.Action(installFunc, stringFunc) +installas_action = SCons.Action.Action(installFunc, stringFunc) +installVerLib_action = SCons.Action.Action(installFuncVersionedLib, stringFunc) BaseInstallBuilder = None @@ -223,6 +347,37 @@ def InstallAsBuilderWrapper(env, target=None, source=None, **kw): result.extend(BaseInstallBuilder(env, tgt, src, **kw)) return result +BaseVersionedInstallBuilder = None + +def InstallVersionedBuilderWrapper(env, target=None, source=None, dir=None, **kw): + if target and dir: + import SCons.Errors + raise SCons.Errors.UserError("Both target and dir defined for Install(), only one may be defined.") + if not dir: + dir=target + + import SCons.Script + install_sandbox = SCons.Script.GetOption('install_sandbox') + if install_sandbox: + target_factory = DESTDIR_factory(env, install_sandbox) + else: + target_factory = env.fs + + try: + dnodes = env.arg2nodes(dir, target_factory.Dir) + except TypeError: + raise SCons.Errors.UserError("Target `%s' of Install() is a file, but should be a directory. Perhaps you have the Install() arguments backwards?" % str(dir)) + sources = env.arg2nodes(source, env.fs.Entry) + tgt = [] + for dnode in dnodes: + for src in sources: + # Prepend './' so the lookup doesn't interpret an initial + # '#' on the file name portion as meaning the Node should + # be relative to the top-level SConstruct directory. + target = env.fs.Entry('.'+os.sep+src.name, dnode) + tgt.extend(BaseVersionedInstallBuilder(env, target, src, **kw)) + return tgt + added = None def generate(env): @@ -253,8 +408,25 @@ def generate(env): emitter = [ add_targets_to_INSTALLED_FILES, ], name = 'InstallBuilder') + global BaseVersionedInstallBuilder + if BaseVersionedInstallBuilder is None: + install_sandbox = GetOption('install_sandbox') + if install_sandbox: + target_factory = DESTDIR_factory(env, install_sandbox) + else: + target_factory = env.fs + + BaseVersionedInstallBuilder = SCons.Builder.Builder( + action = installVerLib_action, + target_factory = target_factory.Entry, + source_factory = env.fs.Entry, + multi = 1, + emitter = [ add_versioned_targets_to_INSTALLED_FILES, ], + name = 'InstallVersionedBuilder') + env['BUILDERS']['_InternalInstall'] = InstallBuilderWrapper env['BUILDERS']['_InternalInstallAs'] = InstallAsBuilderWrapper + env['BUILDERS']['_InternalInstallVersionedLib'] = InstallVersionedBuilderWrapper # We'd like to initialize this doing something like the following, # but there isn't yet support for a ${SOURCE.type} expansion that @@ -273,6 +445,11 @@ def generate(env): except KeyError: env['INSTALL'] = copyFunc + try: + env['INSTALLVERSIONEDLIB'] + except KeyError: + env['INSTALLVERSIONEDLIB'] = copyFuncVersionedLib + def exists(env): return 1 diff --git a/scons/scons-local-2.2.0/SCons/Tool/intelc.py b/scons/scons-local-2.3.0/SCons/Tool/intelc.py similarity index 89% rename from scons/scons-local-2.2.0/SCons/Tool/intelc.py rename to scons/scons-local-2.3.0/SCons/Tool/intelc.py index 92529afdc..5d267ff97 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/intelc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/intelc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/intelc.py 2013/03/03 09:48:35 garyo" import math, sys, os.path, glob, string, re @@ -78,6 +78,7 @@ def linux_ver_normalize(vstr): Always returns an old-style float like 80 or 90 for compatibility with Windows. Shades of Y2K!""" # Check for version number like 9.1.026: return 91.026 + # XXX needs to be updated for 2011+ versions (like 2011.11.344 which is compiler v12.1.5) m = re.match(r'([0-9]+)\.([0-9]+)\.([0-9]+)', vstr) if m: vmaj,vmin,build = m.groups() @@ -221,7 +222,7 @@ def get_all_compiler_versions(): except EnvironmentError: # no more subkeys pass - elif is_linux: + elif is_linux or is_mac: for d in glob.glob('/opt/intel_cc_*'): # Typical dir here is /opt/intel_cc_80. m = re.search(r'cc_(.*)$', d) @@ -238,13 +239,17 @@ def get_all_compiler_versions(): m = re.search(r'([0-9][0-9.]*)$', d) if m: versions.append(m.group(1)) - elif is_mac: - for d in glob.glob('/opt/intel/cc*/*'): - # Typical dir here is /opt/intel/cc/9.0 for IA32, - # /opt/intel/cce/9.0 for EMT64 (AMD64) + for d in glob.glob('/opt/intel/composerxe-*'): + # Typical dir here is /opt/intel/composerxe-2011.4.184 m = re.search(r'([0-9][0-9.]*)$', d) if m: versions.append(m.group(1)) + for d in glob.glob('/opt/intel/composer_xe_*'): + # Typical dir here is /opt/intel/composer_xe_2011_sp1.11.344 + # The _sp1 is useless, the installers are named 2011.9.x, 2011.10.x, 2011.11.x + m = re.search(r'([0-9]{0,4})(?:_sp\d*)?\.([0-9][0-9.]*)$', d) + if m: + versions.append("%s.%s"%(m.group(1), m.group(2))) def keyfunc(str): """Given a dot-separated version string, return a tuple of ints representing it.""" return [int(x) for x in str.split('.')] @@ -293,8 +298,33 @@ def get_intel_compiler_top(version, abi): top = d break return top - top = find_in_2010style_dir(version) or find_in_2008style_dir(version) - print "INTELC: top=",top + def find_in_2011style_dir(version): + # The 2011 (compiler v12) dirs are inconsistent, so just redo the search from + # get_all_compiler_versions and look for a match (search the newest form first) + top=None + for d in glob.glob('/opt/intel/composer_xe_*'): + # Typical dir here is /opt/intel/composer_xe_2011_sp1.11.344 + # The _sp1 is useless, the installers are named 2011.9.x, 2011.10.x, 2011.11.x + m = re.search(r'([0-9]{0,4})(?:_sp\d*)?\.([0-9][0-9.]*)$', d) + if m: + cur_ver = "%s.%s"%(m.group(1), m.group(2)) + if cur_ver == version and \ + (os.path.exists(os.path.join(d, "bin", "ia32", "icc")) or + os.path.exists(os.path.join(d, "bin", "intel64", "icc"))): + top = d + break + if not top: + for d in glob.glob('/opt/intel/composerxe-*'): + # Typical dir here is /opt/intel/composerxe-2011.4.184 + m = re.search(r'([0-9][0-9.]*)$', d) + if m and m.group(1) == verison and \ + (os.path.exists(os.path.join(d, "bin", "ia32", "icc")) or + os.path.exists(os.path.join(d, "bin", "intel64", "icc"))): + top = d + break + return top + top = find_in_2011style_dir(version) or find_in_2010style_dir(version) or find_in_2008style_dir(version) + # print "INTELC: top=",top if not top: raise MissingDirError("Can't find version %s Intel compiler in %s (abi='%s')"%(version,top, abi)) return top diff --git a/scons/scons-local-2.2.0/SCons/Tool/ipkg.py b/scons/scons-local-2.3.0/SCons/Tool/ipkg.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/ipkg.py rename to scons/scons-local-2.3.0/SCons/Tool/ipkg.py index bc56dcd38..2abc0e639 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/ipkg.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/ipkg.py 2013/03/03 09:48:35 garyo" import os diff --git a/scons/scons-local-2.2.0/SCons/Tool/jar.py b/scons/scons-local-2.3.0/SCons/Tool/jar.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/jar.py rename to scons/scons-local-2.3.0/SCons/Tool/jar.py index 321006c8f..ec8afcac9 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/jar.py +++ b/scons/scons-local-2.3.0/SCons/Tool/jar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/jar.py 2013/03/03 09:48:35 garyo" import SCons.Subst import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/javac.py b/scons/scons-local-2.3.0/SCons/Tool/javac.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/javac.py rename to scons/scons-local-2.3.0/SCons/Tool/javac.py index b682cbf0f..a039ace5e 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/javac.py +++ b/scons/scons-local-2.3.0/SCons/Tool/javac.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/javac.py 2013/03/03 09:48:35 garyo" import os import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/javah.py b/scons/scons-local-2.3.0/SCons/Tool/javah.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/javah.py rename to scons/scons-local-2.3.0/SCons/Tool/javah.py index be5145d48..6e8089c6c 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/javah.py +++ b/scons/scons-local-2.3.0/SCons/Tool/javah.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/javah.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/latex.py b/scons/scons-local-2.3.0/SCons/Tool/latex.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/latex.py rename to scons/scons-local-2.3.0/SCons/Tool/latex.py index 427c37324..75033bc13 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/latex.py +++ b/scons/scons-local-2.3.0/SCons/Tool/latex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/latex.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Defaults diff --git a/scons/scons-local-2.2.0/SCons/Tool/lex.py b/scons/scons-local-2.3.0/SCons/Tool/lex.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/lex.py rename to scons/scons-local-2.3.0/SCons/Tool/lex.py index 76e899248..63277309f 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/lex.py +++ b/scons/scons-local-2.3.0/SCons/Tool/lex.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/lex.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/link.py b/scons/scons-local-2.3.0/SCons/Tool/link.py similarity index 60% rename from scons/scons-local-2.2.0/SCons/Tool/link.py rename to scons/scons-local-2.3.0/SCons/Tool/link.py index 13a671d76..008a7d799 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/link.py +++ b/scons/scons-local-2.3.0/SCons/Tool/link.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,9 @@ selection method. # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # -__revision__ = "src/engine/SCons/Tool/link.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/link.py 2013/03/03 09:48:35 garyo" + +import re import SCons.Defaults import SCons.Tool @@ -64,10 +66,71 @@ def smart_link(source, target, env, for_signature): return '$CC' def shlib_emitter(target, source, env): + Verbose = False + platform = env.subst('$PLATFORM') for tgt in target: tgt.attributes.shared = 1 + try: + # target[0] comes in as libtest.so. Add the version extensions + version = env.subst('$SHLIBVERSION') + if version: + version_names = shlib_emitter_names(target, source, env) + # change the name of the target to include the version number + target[0].name = version_names[0] + for name in version_names: + env.SideEffect(name, target[0]) + env.Clean(target[0], name) + if Verbose: + print "shlib_emitter: add side effect - ",name + except KeyError: + version = None return (target, source) +def shlib_emitter_names(target, source, env): + """Return list of file names that are side effects for a versioned library build. The first name in the list is the new name for the target""" + Verbose = False + platform = env.subst('$PLATFORM') + version_names = [] + try: + # target[0] comes in as libtest.so. Add the version extensions + version = env.subst('$SHLIBVERSION') + if version.count(".") != 2: + # We need a version of the form x.y.z to proceed + raise ValueError + if version: + if platform == 'posix': + versionparts = version.split('.') + name = target[0].name + # generate library name with the version number + version_name = target[0].name + '.' + version + if Verbose: + print "shlib_emitter_names: target is ", version_name + print "shlib_emitter_names: side effect: ", name + # add version_name to list of names to be a Side effect + version_names.append(version_name) + if Verbose: + print "shlib_emitter_names: versionparts ",versionparts + for ver in versionparts[0:-1]: + name = name + '.' + ver + if Verbose: + print "shlib_emitter_names: side effect: ", name + # add name to list of names to be a Side effect + version_names.append(name) + elif platform == 'darwin': + shlib_suffix = env.subst('$SHLIBSUFFIX') + name = target[0].name + # generate library name with the version number + suffix_re = re.escape(shlib_suffix) + version_name = re.sub(suffix_re, '.' + version + shlib_suffix, name) + if Verbose: + print "shlib_emitter_names: target is ", version_name + print "shlib_emitter_names: side effect: ", name + # add version_name to list of names to be a Side effect + version_names.append(version_name) + except KeyError: + version = None + return version_names + def generate(env): """Add Builders and construction variables for gnulink to an Environment.""" SCons.Tool.createSharedLibBuilder(env) diff --git a/scons/scons-local-2.2.0/SCons/Tool/linkloc.py b/scons/scons-local-2.3.0/SCons/Tool/linkloc.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/linkloc.py rename to scons/scons-local-2.3.0/SCons/Tool/linkloc.py index 50a1a5159..6fdd4da4f 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/linkloc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/linkloc.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/linkloc.py 2013/03/03 09:48:35 garyo" import os.path import re diff --git a/scons/scons-local-2.2.0/SCons/Tool/m4.py b/scons/scons-local-2.3.0/SCons/Tool/m4.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/m4.py rename to scons/scons-local-2.3.0/SCons/Tool/m4.py index 9bd4ef7c8..dfef65945 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/m4.py +++ b/scons/scons-local-2.3.0/SCons/Tool/m4.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/m4.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/masm.py b/scons/scons-local-2.3.0/SCons/Tool/masm.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/masm.py rename to scons/scons-local-2.3.0/SCons/Tool/masm.py index f41f700a2..b7fb94ede 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/masm.py +++ b/scons/scons-local-2.3.0/SCons/Tool/masm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/masm.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/midl.py b/scons/scons-local-2.3.0/SCons/Tool/midl.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/midl.py rename to scons/scons-local-2.3.0/SCons/Tool/midl.py index 2cdcd5ae1..a69406d1a 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/midl.py +++ b/scons/scons-local-2.3.0/SCons/Tool/midl.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/midl.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/mingw.py b/scons/scons-local-2.3.0/SCons/Tool/mingw.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/mingw.py rename to scons/scons-local-2.3.0/SCons/Tool/mingw.py index 1c9c0829f..a81c94ccf 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/mingw.py +++ b/scons/scons-local-2.3.0/SCons/Tool/mingw.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/mingw.py 2013/03/03 09:48:35 garyo" import os import os.path @@ -133,7 +133,7 @@ def generate(env): # Most of mingw is the same as gcc and friends... - gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas', 'm4'] + gnu_tools = ['gcc', 'g++', 'gnulink', 'ar', 'gas', 'gfortran', 'm4'] for tool in gnu_tools: SCons.Tool.Tool(tool)(env) @@ -168,6 +168,7 @@ def generate(env): env['OBJSUFFIX'] = '.o' env['LIBPREFIX'] = 'lib' env['LIBSUFFIX'] = '.a' + env['PROGSUFFIX'] = '.exe' def exists(env): return find(env) diff --git a/scons/scons-local-2.2.0/SCons/Tool/msgfmt.py b/scons/scons-local-2.3.0/SCons/Tool/msgfmt.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/msgfmt.py rename to scons/scons-local-2.3.0/SCons/Tool/msgfmt.py index 4fcd8fcc4..d444ae21e 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/msgfmt.py +++ b/scons/scons-local-2.3.0/SCons/Tool/msgfmt.py @@ -1,6 +1,6 @@ """ msgfmt tool """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 @@ # 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" +__revision__ = "src/engine/SCons/Tool/msgfmt.py 2013/03/03 09:48:35 garyo" from SCons.Builder import BuilderBase ############################################################################# @@ -77,7 +77,10 @@ def generate(env,**kw): """ Generate `msgfmt` tool """ import SCons.Util from SCons.Tool.GettextCommon import _detect_msgfmt - env['MSGFMT'] = _detect_msgfmt(env) + try: + env['MSGFMT'] = _detect_msgfmt(env) + except: + env['MSGFMT'] = 'msgfmt' env.SetDefault( MSGFMTFLAGS = [ SCons.Util.CLVar('-c') ], MSGFMTCOM = '$MSGFMT $MSGFMTFLAGS -o $TARGET $SOURCE', @@ -92,7 +95,10 @@ def generate(env,**kw): def exists(env): """ Check if the tool exists """ from SCons.Tool.GettextCommon import _msgfmt_exists - return _msgfmt_exists(env) + try: + return _msgfmt_exists(env) + except: + return False ############################################################################# # Local Variables: diff --git a/scons/scons-local-2.2.0/SCons/Tool/msginit.py b/scons/scons-local-2.3.0/SCons/Tool/msginit.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/msginit.py rename to scons/scons-local-2.3.0/SCons/Tool/msginit.py index 210fbca58..fcbd564c0 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/msginit.py +++ b/scons/scons-local-2.3.0/SCons/Tool/msginit.py @@ -3,7 +3,7 @@ Tool specific initialization of msginit tool. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 @@ Tool specific initialization of msginit 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/msginit.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/msginit.py 2013/03/03 09:48:35 garyo" import SCons.Warnings import SCons.Builder @@ -79,7 +79,10 @@ def generate(env,**kw): """ Generate the `msginit` tool """ import SCons.Util from SCons.Tool.GettextCommon import _detect_msginit - env['MSGINIT'] = _detect_msginit(env) + try: + env['MSGINIT'] = _detect_msginit(env) + except: + env['MSGINIT'] = 'msginit' msginitcom = '$MSGINIT ${_MSGNoTranslator(__env__)} -l ${_MSGINITLOCALE}' \ + ' $MSGINITFLAGS -i $SOURCE -o $TARGET' # NOTE: We set POTSUFFIX here, in case the 'xgettext' is not loaded @@ -104,7 +107,10 @@ def generate(env,**kw): def exists(env): """ Check if the tool exists """ from SCons.Tool.GettextCommon import _msginit_exists - return _msginit_exists(env) + try: + return _msginit_exists(env) + except: + return False ############################################################################# # Local Variables: diff --git a/scons/scons-local-2.2.0/SCons/Tool/msgmerge.py b/scons/scons-local-2.3.0/SCons/Tool/msgmerge.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/msgmerge.py rename to scons/scons-local-2.3.0/SCons/Tool/msgmerge.py index 2bc89f4d5..35315f939 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/msgmerge.py +++ b/scons/scons-local-2.3.0/SCons/Tool/msgmerge.py @@ -3,7 +3,7 @@ Tool specific initialization for `msgmerge` tool. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 @@ Tool specific initialization for `msgmerge` 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/msgmerge.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/msgmerge.py 2013/03/03 09:48:35 garyo" ############################################################################# def _update_or_init_po_files(target, source, env): @@ -70,7 +70,10 @@ def _POUpdateBuilderWrapper(env, target=None, source=_null, **kw): def generate(env,**kw): """ Generate the `xgettext` tool """ from SCons.Tool.GettextCommon import _detect_msgmerge - env['MSGMERGE'] = _detect_msgmerge(env) + try: + env['MSGMERGE'] = _detect_msgmerge(env) + except: + env['MSGMERGE'] = 'msgmerge' env.SetDefault( POTSUFFIX = ['.pot'], POSUFFIX = ['.po'], @@ -88,7 +91,10 @@ def generate(env,**kw): def exists(env): """ Check if the tool exists """ from SCons.Tool.GettextCommon import _msgmerge_exists - return _msgmerge_exists(env) + try: + return _msgmerge_exists(env) + except: + return False ############################################################################# # Local Variables: diff --git a/scons/scons-local-2.2.0/SCons/Tool/mslib.py b/scons/scons-local-2.3.0/SCons/Tool/mslib.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/mslib.py rename to scons/scons-local-2.3.0/SCons/Tool/mslib.py index 82ea50323..b85186728 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/mslib.py +++ b/scons/scons-local-2.3.0/SCons/Tool/mslib.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/mslib.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/mslink.py b/scons/scons-local-2.3.0/SCons/Tool/mslink.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/mslink.py rename to scons/scons-local-2.3.0/SCons/Tool/mslink.py index 1f53295da..a35d7dab2 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/mslink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/mslink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/mslink.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/mssdk.py b/scons/scons-local-2.3.0/SCons/Tool/mssdk.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/mssdk.py rename to scons/scons-local-2.3.0/SCons/Tool/mssdk.py index f871c7d5a..84291bcba 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/mssdk.py +++ b/scons/scons-local-2.3.0/SCons/Tool/mssdk.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/mssdk.py 2013/03/03 09:48:35 garyo" """engine.SCons.Tool.mssdk diff --git a/scons/scons-local-2.2.0/SCons/Tool/msvc.py b/scons/scons-local-2.3.0/SCons/Tool/msvc.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/msvc.py rename to scons/scons-local-2.3.0/SCons/Tool/msvc.py index eb479a35b..552c8ef04 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/msvc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/msvc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/msvc.py 2013/03/03 09:48:35 garyo" import os.path import re diff --git a/scons/scons-local-2.2.0/SCons/Tool/msvs.py b/scons/scons-local-2.3.0/SCons/Tool/msvs.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Tool/msvs.py rename to scons/scons-local-2.3.0/SCons/Tool/msvs.py index c0443d96d..24f382742 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/msvs.py +++ b/scons/scons-local-2.3.0/SCons/Tool/msvs.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/msvs.py 2013/03/03 09:48:35 garyo" import SCons.compat @@ -1206,7 +1206,7 @@ class _GenerateV7DSW(_DSWGenerator): self.version_num, self.suite = msvs_parse_version(self.version) self.versionstr = '7.00' if self.version_num >= 11.0: - self.versionstr = '12.0' + self.versionstr = '12.00' elif self.version_num >= 10.0: self.versionstr = '11.00' elif self.version_num >= 9.0: @@ -1311,7 +1311,7 @@ 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.versionstr >= 11.0: + if self.version_num >= 11.0: self.file.write('# Visual Studio 11\n') elif self.version_num >= 10.0: self.file.write('# Visual Studio 2010\n') @@ -1654,6 +1654,10 @@ def projectEmitter(target, source, env): t, s = solutionEmitter(target, target, env) targetlist = targetlist + t + # Beginning with Visual Studio 2010 for each project file (.vcxproj) we have additional file (.vcxproj.filters) + if float(env['MSVS_VERSION']) >= 10.0: + targetlist.append(targetlist[0] + '.filters') + return (targetlist, sourcelist) def solutionEmitter(target, source, env): diff --git a/scons/scons-local-2.2.0/SCons/Tool/mwcc.py b/scons/scons-local-2.3.0/SCons/Tool/mwcc.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/mwcc.py rename to scons/scons-local-2.3.0/SCons/Tool/mwcc.py index 689c2739a..48433012f 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/mwcc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/mwcc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/mwcc.py 2013/03/03 09:48:35 garyo" import os import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/mwld.py b/scons/scons-local-2.3.0/SCons/Tool/mwld.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/mwld.py rename to scons/scons-local-2.3.0/SCons/Tool/mwld.py index 30149c37e..ff875a57d 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/mwld.py +++ b/scons/scons-local-2.3.0/SCons/Tool/mwld.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/mwld.py 2013/03/03 09:48:35 garyo" import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/nasm.py b/scons/scons-local-2.3.0/SCons/Tool/nasm.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/nasm.py rename to scons/scons-local-2.3.0/SCons/Tool/nasm.py index e76b51ab1..d754a2afb 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/nasm.py +++ b/scons/scons-local-2.3.0/SCons/Tool/nasm.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/nasm.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/__init__.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/__init__.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/__init__.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/__init__.py index f2b953d67..b0a7549e2 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/__init__.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/__init__.py 2013/03/03 09:48:35 garyo" import SCons.Environment from SCons.Variables import * diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/ipk.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/ipk.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/ipk.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/ipk.py index 251de8a33..77c6420d9 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/ipk.py +++ b/scons/scons-local-2.3.0/SCons/Tool/packaging/ipk.py @@ -2,7 +2,7 @@ """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/ipk.py 2013/03/03 09:48:35 garyo" import SCons.Builder import SCons.Node.FS diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/msi.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/msi.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/msi.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/msi.py index dc593b338..26eb63041 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/msi.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/msi.py 2013/03/03 09:48:35 garyo" import os import SCons diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/rpm.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/rpm.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/rpm.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/rpm.py index 1c83b6bba..d60166f7c 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/rpm.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,11 +25,12 @@ 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/rpm.py 2013/03/03 09:48:35 garyo" import os import SCons.Builder +import SCons.Tool.rpmutils from SCons.Environment import OverrideEnvironment from SCons.Tool.packaging import stripinstallbuilder, src_targz @@ -52,16 +53,7 @@ def package(env, target, source, PACKAGEROOT, NAME, VERSION, else: # This should be overridable from the construction environment, # which it is by using ARCHITECTURE=. - # Guessing based on what os.uname() returns at least allows it - # to work for both i386 and x86_64 Linux systems. - archmap = { - 'i686' : 'i386', - 'i586' : 'i386', - 'i486' : 'i386', - } - - buildarchitecture = os.uname()[4] - buildarchitecture = archmap.get(buildarchitecture, buildarchitecture) + buildarchitecture = SCons.Tool.rpmutils.defaultMachine() if 'ARCHITECTURE' in kw: buildarchitecture = kw['ARCHITECTURE'] diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/src_tarbz2.py similarity index 90% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/src_tarbz2.py index 41c37ac4b..1da2becae 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/src_tarbz2.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/src_tarbz2.py 2013/03/03 09:48:35 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/src_targz.py similarity index 90% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/src_targz.py index dbf1c2bbe..bde3316fe 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/src_targz.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/src_targz.py 2013/03/03 09:48:35 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/src_zip.py similarity index 90% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/src_zip.py index e12c3667b..e5a752e36 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/src_zip.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/src_zip.py 2013/03/03 09:48:35 garyo" from SCons.Tool.packaging import putintopackageroot diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/tarbz2.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/tarbz2.py index 73964eb83..0c8e4e768 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/tarbz2.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/tarbz2.py 2013/03/03 09:48:35 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/targz.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/targz.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/targz.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/targz.py index 1019bdbf5..32b74cfb9 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/targz.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/targz.py 2013/03/03 09:48:35 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.2.0/SCons/Tool/packaging/zip.py b/scons/scons-local-2.3.0/SCons/Tool/packaging/zip.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/Tool/packaging/zip.py rename to scons/scons-local-2.3.0/SCons/Tool/packaging/zip.py index a96278749..1f34581e1 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/packaging/zip.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/packaging/zip.py 2013/03/03 09:48:35 garyo" from SCons.Tool.packaging import stripinstallbuilder, putintopackageroot diff --git a/scons/scons-local-2.2.0/SCons/Tool/pdf.py b/scons/scons-local-2.3.0/SCons/Tool/pdf.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/pdf.py rename to scons/scons-local-2.3.0/SCons/Tool/pdf.py index beae6dd2a..1b68f107b 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/pdf.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/pdf.py 2013/03/03 09:48:35 garyo" import SCons.Builder import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/pdflatex.py b/scons/scons-local-2.3.0/SCons/Tool/pdflatex.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/pdflatex.py rename to scons/scons-local-2.3.0/SCons/Tool/pdflatex.py index 9d2a449ec..80756d184 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/pdflatex.py +++ b/scons/scons-local-2.3.0/SCons/Tool/pdflatex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/pdflatex.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/pdftex.py b/scons/scons-local-2.3.0/SCons/Tool/pdftex.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/pdftex.py rename to scons/scons-local-2.3.0/SCons/Tool/pdftex.py index b5898c17f..34ca325b0 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/pdftex.py +++ b/scons/scons-local-2.3.0/SCons/Tool/pdftex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/pdftex.py 2013/03/03 09:48:35 garyo" import os import SCons.Action diff --git a/scons/scons-local-2.2.0/SCons/Tool/qt.py b/scons/scons-local-2.3.0/SCons/Tool/qt.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Tool/qt.py rename to scons/scons-local-2.3.0/SCons/Tool/qt.py index d40337d44..96e14b1cf 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/qt.py +++ b/scons/scons-local-2.3.0/SCons/Tool/qt.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/qt.py 2013/03/03 09:48:35 garyo" import os.path import re diff --git a/scons/scons-local-2.2.0/SCons/Tool/rmic.py b/scons/scons-local-2.3.0/SCons/Tool/rmic.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/rmic.py rename to scons/scons-local-2.3.0/SCons/Tool/rmic.py index 0b32f06bd..df90bc081 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/rmic.py +++ b/scons/scons-local-2.3.0/SCons/Tool/rmic.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/rmic.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/rpcgen.py b/scons/scons-local-2.3.0/SCons/Tool/rpcgen.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/rpcgen.py rename to scons/scons-local-2.3.0/SCons/Tool/rpcgen.py index c1542dc55..309db8299 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/rpcgen.py +++ b/scons/scons-local-2.3.0/SCons/Tool/rpcgen.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/rpcgen.py 2013/03/03 09:48:35 garyo" from SCons.Builder import Builder import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/rpm.py b/scons/scons-local-2.3.0/SCons/Tool/rpm.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/rpm.py rename to scons/scons-local-2.3.0/SCons/Tool/rpm.py index 3a4d6a928..ef31bd574 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/rpm.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/rpm.py 2013/03/03 09:48:35 garyo" import os import re diff --git a/scons/scons-local-2.3.0/SCons/Tool/rpmutils.py b/scons/scons-local-2.3.0/SCons/Tool/rpmutils.py new file mode 100644 index 000000000..16d980a4f --- /dev/null +++ b/scons/scons-local-2.3.0/SCons/Tool/rpmutils.py @@ -0,0 +1,533 @@ +"""SCons.Tool.rpmutils.py + +RPM specific helper routines for general usage in the test framework +and SCons core modules. + +Since we check for the RPM package target name in several places, +we have to know which machine/system name RPM will use for the current +hardware setup. The following dictionaries and functions try to +mimic the exact naming rules of the RPM source code. +They were directly derived from the file "rpmrc.in" of the version +rpm-4.9.1.3. For updating to a more recent version of RPM, this Python +script can be used standalone. The usage() function below shows the +exact syntax. + +""" + +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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/rpmutils.py 2013/03/03 09:48:35 garyo" + + +import platform + +# Start of rpmrc dictionaries (Marker, don't change or remove!) +os_canon = { + 'AIX' : ['AIX','5'], + 'AmigaOS' : ['AmigaOS','5'], + 'BSD_OS' : ['bsdi','12'], + 'CYGWIN32_95' : ['cygwin32','15'], + 'CYGWIN32_NT' : ['cygwin32','14'], + 'Darwin' : ['darwin','21'], + 'FreeBSD' : ['FreeBSD','8'], + 'HP-UX' : ['hpux10','6'], + 'IRIX' : ['Irix','2'], + 'IRIX64' : ['Irix64','10'], + 'Linux' : ['Linux','1'], + 'Linux/390' : ['OS/390','20'], + 'Linux/ESA' : ['VM/ESA','20'], + 'MacOSX' : ['macosx','21'], + 'MiNT' : ['FreeMiNT','17'], + 'NEXTSTEP' : ['NextStep','11'], + 'OS/390' : ['OS/390','18'], + 'OSF1' : ['osf1','7'], + 'SCO_SV' : ['SCO_SV3.2v5.0.2','9'], + 'SunOS4' : ['SunOS','4'], + 'SunOS5' : ['solaris','3'], + 'UNIX_SV' : ['MP_RAS','16'], + 'VM/ESA' : ['VM/ESA','19'], + 'machten' : ['machten','13'], + 'osf3.2' : ['osf1','7'], + 'osf4.0' : ['osf1','7'], +} + +buildarch_compat = { + 'alpha' : ['noarch'], + 'alphaev5' : ['alpha'], + 'alphaev56' : ['alphaev5'], + 'alphaev6' : ['alphapca56'], + 'alphaev67' : ['alphaev6'], + 'alphapca56' : ['alphaev56'], + 'amd64' : ['x86_64'], + 'armv3l' : ['noarch'], + 'armv4b' : ['noarch'], + 'armv4l' : ['armv3l'], + 'armv4tl' : ['armv4l'], + 'armv5tejl' : ['armv5tel'], + 'armv5tel' : ['armv4tl'], + 'armv6l' : ['armv5tejl'], + 'armv7l' : ['armv6l'], + 'atariclone' : ['m68kmint','noarch'], + 'atarist' : ['m68kmint','noarch'], + 'atariste' : ['m68kmint','noarch'], + 'ataritt' : ['m68kmint','noarch'], + 'athlon' : ['i686'], + 'falcon' : ['m68kmint','noarch'], + 'geode' : ['i586'], + 'hades' : ['m68kmint','noarch'], + 'hppa1.0' : ['parisc'], + 'hppa1.1' : ['hppa1.0'], + 'hppa1.2' : ['hppa1.1'], + 'hppa2.0' : ['hppa1.2'], + 'i386' : ['noarch','fat'], + 'i486' : ['i386'], + 'i586' : ['i486'], + 'i686' : ['i586'], + 'ia32e' : ['x86_64'], + 'ia64' : ['noarch'], + 'm68k' : ['noarch'], + 'milan' : ['m68kmint','noarch'], + 'mips' : ['noarch'], + 'mipsel' : ['noarch'], + 'parisc' : ['noarch'], + 'pentium3' : ['i686'], + 'pentium4' : ['pentium3'], + 'ppc' : ['noarch','fat'], + 'ppc32dy4' : ['noarch'], + 'ppc64' : ['noarch','fat'], + 'ppc64iseries' : ['ppc64'], + 'ppc64pseries' : ['ppc64'], + 'ppc8260' : ['noarch'], + 'ppc8560' : ['noarch'], + 'ppciseries' : ['noarch'], + 'ppcpseries' : ['noarch'], + 's390' : ['noarch'], + 's390x' : ['noarch'], + 'sh3' : ['noarch'], + 'sh4' : ['noarch'], + 'sh4a' : ['sh4'], + 'sparc' : ['noarch'], + 'sparc64' : ['sparcv9v'], + 'sparc64v' : ['sparc64'], + 'sparcv8' : ['sparc'], + 'sparcv9' : ['sparcv8'], + 'sparcv9v' : ['sparcv9'], + 'sun4c' : ['noarch'], + 'sun4d' : ['noarch'], + 'sun4m' : ['noarch'], + 'sun4u' : ['noarch'], + 'x86_64' : ['noarch'], +} + +os_compat = { + 'BSD_OS' : ['bsdi'], + 'Darwin' : ['MacOSX'], + 'FreeMiNT' : ['mint','MiNT','TOS'], + 'IRIX64' : ['IRIX'], + 'MiNT' : ['FreeMiNT','mint','TOS'], + 'TOS' : ['FreeMiNT','MiNT','mint'], + 'bsdi4.0' : ['bsdi'], + 'hpux10.00' : ['hpux9.07'], + 'hpux10.01' : ['hpux10.00'], + 'hpux10.10' : ['hpux10.01'], + 'hpux10.20' : ['hpux10.10'], + 'hpux10.30' : ['hpux10.20'], + 'hpux11.00' : ['hpux10.30'], + 'hpux9.05' : ['hpux9.04'], + 'hpux9.07' : ['hpux9.05'], + 'mint' : ['FreeMiNT','MiNT','TOS'], + 'ncr-sysv4.3' : ['ncr-sysv4.2'], + 'osf4.0' : ['osf3.2','osf1'], + 'solaris2.4' : ['solaris2.3'], + 'solaris2.5' : ['solaris2.3','solaris2.4'], + 'solaris2.6' : ['solaris2.3','solaris2.4','solaris2.5'], + 'solaris2.7' : ['solaris2.3','solaris2.4','solaris2.5','solaris2.6'], +} + +arch_compat = { + 'alpha' : ['axp','noarch'], + 'alphaev5' : ['alpha'], + 'alphaev56' : ['alphaev5'], + 'alphaev6' : ['alphapca56'], + 'alphaev67' : ['alphaev6'], + 'alphapca56' : ['alphaev56'], + 'amd64' : ['x86_64','athlon','noarch'], + 'armv3l' : ['noarch'], + 'armv4b' : ['noarch'], + 'armv4l' : ['armv3l'], + 'armv4tl' : ['armv4l'], + 'armv5tejl' : ['armv5tel'], + 'armv5tel' : ['armv4tl'], + 'armv6l' : ['armv5tejl'], + 'armv7l' : ['armv6l'], + 'atariclone' : ['m68kmint','noarch'], + 'atarist' : ['m68kmint','noarch'], + 'atariste' : ['m68kmint','noarch'], + 'ataritt' : ['m68kmint','noarch'], + 'athlon' : ['i686'], + 'falcon' : ['m68kmint','noarch'], + 'geode' : ['i586'], + 'hades' : ['m68kmint','noarch'], + 'hppa1.0' : ['parisc'], + 'hppa1.1' : ['hppa1.0'], + 'hppa1.2' : ['hppa1.1'], + 'hppa2.0' : ['hppa1.2'], + 'i370' : ['noarch'], + 'i386' : ['noarch','fat'], + 'i486' : ['i386'], + 'i586' : ['i486'], + 'i686' : ['i586'], + 'ia32e' : ['x86_64','athlon','noarch'], + 'ia64' : ['noarch'], + 'milan' : ['m68kmint','noarch'], + 'mips' : ['noarch'], + 'mipsel' : ['noarch'], + 'osfmach3_i386' : ['i486'], + 'osfmach3_i486' : ['i486','osfmach3_i386'], + 'osfmach3_i586' : ['i586','osfmach3_i486'], + 'osfmach3_i686' : ['i686','osfmach3_i586'], + 'osfmach3_ppc' : ['ppc'], + 'parisc' : ['noarch'], + 'pentium3' : ['i686'], + 'pentium4' : ['pentium3'], + 'powerpc' : ['ppc'], + 'powerppc' : ['ppc'], + 'ppc' : ['rs6000'], + 'ppc32dy4' : ['ppc'], + 'ppc64' : ['ppc'], + 'ppc64iseries' : ['ppc64'], + 'ppc64pseries' : ['ppc64'], + 'ppc8260' : ['ppc'], + 'ppc8560' : ['ppc'], + 'ppciseries' : ['ppc'], + 'ppcpseries' : ['ppc'], + 'rs6000' : ['noarch','fat'], + 's390' : ['noarch'], + 's390x' : ['s390','noarch'], + 'sh3' : ['noarch'], + 'sh4' : ['noarch'], + 'sh4a' : ['sh4'], + 'sparc' : ['noarch'], + 'sparc64' : ['sparcv9'], + 'sparc64v' : ['sparc64'], + 'sparcv8' : ['sparc'], + 'sparcv9' : ['sparcv8'], + 'sparcv9v' : ['sparcv9'], + 'sun4c' : ['sparc'], + 'sun4d' : ['sparc'], + 'sun4m' : ['sparc'], + 'sun4u' : ['sparc64'], + 'x86_64' : ['amd64','athlon','noarch'], +} + +buildarchtranslate = { + 'alphaev5' : ['alpha'], + 'alphaev56' : ['alpha'], + 'alphaev6' : ['alpha'], + 'alphaev67' : ['alpha'], + 'alphapca56' : ['alpha'], + 'amd64' : ['x86_64'], + 'armv3l' : ['armv3l'], + 'armv4b' : ['armv4b'], + 'armv4l' : ['armv4l'], + 'armv4tl' : ['armv4tl'], + 'armv5tejl' : ['armv5tejl'], + 'armv5tel' : ['armv5tel'], + 'armv6l' : ['armv6l'], + 'armv7l' : ['armv7l'], + 'atariclone' : ['m68kmint'], + 'atarist' : ['m68kmint'], + 'atariste' : ['m68kmint'], + 'ataritt' : ['m68kmint'], + 'athlon' : ['i386'], + 'falcon' : ['m68kmint'], + 'geode' : ['i386'], + 'hades' : ['m68kmint'], + 'i386' : ['i386'], + 'i486' : ['i386'], + 'i586' : ['i386'], + 'i686' : ['i386'], + 'ia32e' : ['x86_64'], + 'ia64' : ['ia64'], + 'milan' : ['m68kmint'], + 'osfmach3_i386' : ['i386'], + 'osfmach3_i486' : ['i386'], + 'osfmach3_i586' : ['i386'], + 'osfmach3_i686' : ['i386'], + 'osfmach3_ppc' : ['ppc'], + 'pentium3' : ['i386'], + 'pentium4' : ['i386'], + 'powerpc' : ['ppc'], + 'powerppc' : ['ppc'], + 'ppc32dy4' : ['ppc'], + 'ppc64iseries' : ['ppc64'], + 'ppc64pseries' : ['ppc64'], + 'ppc8260' : ['ppc'], + 'ppc8560' : ['ppc'], + 'ppciseries' : ['ppc'], + 'ppcpseries' : ['ppc'], + 's390' : ['s390'], + 's390x' : ['s390x'], + 'sh3' : ['sh3'], + 'sh4' : ['sh4'], + 'sh4a' : ['sh4'], + 'sparc64v' : ['sparc64'], + 'sparcv8' : ['sparc'], + 'sparcv9' : ['sparc'], + 'sparcv9v' : ['sparc'], + 'sun4c' : ['sparc'], + 'sun4d' : ['sparc'], + 'sun4m' : ['sparc'], + 'sun4u' : ['sparc64'], + 'x86_64' : ['x86_64'], +} + +optflags = { + 'alpha' : ['-O2','-g','-mieee'], + 'alphaev5' : ['-O2','-g','-mieee','-mtune=ev5'], + 'alphaev56' : ['-O2','-g','-mieee','-mtune=ev56'], + 'alphaev6' : ['-O2','-g','-mieee','-mtune=ev6'], + 'alphaev67' : ['-O2','-g','-mieee','-mtune=ev67'], + 'alphapca56' : ['-O2','-g','-mieee','-mtune=pca56'], + 'amd64' : ['-O2','-g'], + 'armv3l' : ['-O2','-g','-march=armv3'], + 'armv4b' : ['-O2','-g','-march=armv4'], + 'armv4l' : ['-O2','-g','-march=armv4'], + 'armv4tl' : ['-O2','-g','-march=armv4t'], + 'armv5tejl' : ['-O2','-g','-march=armv5te'], + 'armv5tel' : ['-O2','-g','-march=armv5te'], + 'armv6l' : ['-O2','-g','-march=armv6'], + 'armv7l' : ['-O2','-g','-march=armv7'], + 'atariclone' : ['-O2','-g','-fomit-frame-pointer'], + 'atarist' : ['-O2','-g','-fomit-frame-pointer'], + 'atariste' : ['-O2','-g','-fomit-frame-pointer'], + 'ataritt' : ['-O2','-g','-fomit-frame-pointer'], + 'athlon' : ['-O2','-g','-march=athlon'], + 'falcon' : ['-O2','-g','-fomit-frame-pointer'], + 'fat' : ['-O2','-g','-arch','i386','-arch','ppc'], + 'geode' : ['-Os','-g','-m32','-march=geode'], + 'hades' : ['-O2','-g','-fomit-frame-pointer'], + 'hppa1.0' : ['-O2','-g','-mpa-risc-1-0'], + 'hppa1.1' : ['-O2','-g','-mpa-risc-1-0'], + 'hppa1.2' : ['-O2','-g','-mpa-risc-1-0'], + 'hppa2.0' : ['-O2','-g','-mpa-risc-1-0'], + 'i386' : ['-O2','-g','-march=i386','-mtune=i686'], + 'i486' : ['-O2','-g','-march=i486'], + 'i586' : ['-O2','-g','-march=i586'], + 'i686' : ['-O2','-g','-march=i686'], + 'ia32e' : ['-O2','-g'], + 'ia64' : ['-O2','-g'], + 'm68k' : ['-O2','-g','-fomit-frame-pointer'], + 'milan' : ['-O2','-g','-fomit-frame-pointer'], + 'mips' : ['-O2','-g'], + 'mipsel' : ['-O2','-g'], + 'parisc' : ['-O2','-g','-mpa-risc-1-0'], + 'pentium3' : ['-O2','-g','-march=pentium3'], + 'pentium4' : ['-O2','-g','-march=pentium4'], + 'ppc' : ['-O2','-g','-fsigned-char'], + 'ppc32dy4' : ['-O2','-g','-fsigned-char'], + 'ppc64' : ['-O2','-g','-fsigned-char'], + 'ppc8260' : ['-O2','-g','-fsigned-char'], + 'ppc8560' : ['-O2','-g','-fsigned-char'], + 'ppciseries' : ['-O2','-g','-fsigned-char'], + 'ppcpseries' : ['-O2','-g','-fsigned-char'], + 's390' : ['-O2','-g'], + 's390x' : ['-O2','-g'], + 'sh3' : ['-O2','-g'], + 'sh4' : ['-O2','-g','-mieee'], + 'sh4a' : ['-O2','-g','-mieee'], + 'sparc' : ['-O2','-g','-m32','-mtune=ultrasparc'], + 'sparc64' : ['-O2','-g','-m64','-mtune=ultrasparc'], + 'sparc64v' : ['-O2','-g','-m64','-mtune=niagara'], + 'sparcv8' : ['-O2','-g','-m32','-mtune=ultrasparc','-mv8'], + 'sparcv9' : ['-O2','-g','-m32','-mtune=ultrasparc'], + 'sparcv9v' : ['-O2','-g','-m32','-mtune=niagara'], + 'x86_64' : ['-O2','-g'], +} + +arch_canon = { + 'IP' : ['sgi','7'], + 'alpha' : ['alpha','2'], + 'alphaev5' : ['alphaev5','2'], + 'alphaev56' : ['alphaev56','2'], + 'alphaev6' : ['alphaev6','2'], + 'alphaev67' : ['alphaev67','2'], + 'alphapca56' : ['alphapca56','2'], + 'amd64' : ['amd64','1'], + 'armv3l' : ['armv3l','12'], + 'armv4b' : ['armv4b','12'], + 'armv4l' : ['armv4l','12'], + 'armv5tejl' : ['armv5tejl','12'], + 'armv5tel' : ['armv5tel','12'], + 'armv6l' : ['armv6l','12'], + 'armv7l' : ['armv7l','12'], + 'atariclone' : ['m68kmint','13'], + 'atarist' : ['m68kmint','13'], + 'atariste' : ['m68kmint','13'], + 'ataritt' : ['m68kmint','13'], + 'athlon' : ['athlon','1'], + 'falcon' : ['m68kmint','13'], + 'geode' : ['geode','1'], + 'hades' : ['m68kmint','13'], + 'i370' : ['i370','14'], + 'i386' : ['i386','1'], + 'i486' : ['i486','1'], + 'i586' : ['i586','1'], + 'i686' : ['i686','1'], + 'ia32e' : ['ia32e','1'], + 'ia64' : ['ia64','9'], + 'm68k' : ['m68k','6'], + 'm68kmint' : ['m68kmint','13'], + 'milan' : ['m68kmint','13'], + 'mips' : ['mips','4'], + 'mipsel' : ['mipsel','11'], + 'pentium3' : ['pentium3','1'], + 'pentium4' : ['pentium4','1'], + 'ppc' : ['ppc','5'], + 'ppc32dy4' : ['ppc32dy4','5'], + 'ppc64' : ['ppc64','16'], + 'ppc64iseries' : ['ppc64iseries','16'], + 'ppc64pseries' : ['ppc64pseries','16'], + 'ppc8260' : ['ppc8260','5'], + 'ppc8560' : ['ppc8560','5'], + 'ppciseries' : ['ppciseries','5'], + 'ppcpseries' : ['ppcpseries','5'], + 'rs6000' : ['rs6000','8'], + 's390' : ['s390','14'], + 's390x' : ['s390x','15'], + 'sh' : ['sh','17'], + 'sh3' : ['sh3','17'], + 'sh4' : ['sh4','17'], + 'sh4a' : ['sh4a','17'], + 'sparc' : ['sparc','3'], + 'sparc64' : ['sparc64','2'], + 'sparc64v' : ['sparc64v','2'], + 'sparcv8' : ['sparcv8','3'], + 'sparcv9' : ['sparcv9','3'], + 'sparcv9v' : ['sparcv9v','3'], + 'sun4' : ['sparc','3'], + 'sun4c' : ['sparc','3'], + 'sun4d' : ['sparc','3'], + 'sun4m' : ['sparc','3'], + 'sun4u' : ['sparc64','2'], + 'x86_64' : ['x86_64','1'], + 'xtensa' : ['xtensa','18'], +} + +# End of rpmrc dictionaries (Marker, don't change or remove!) + +def defaultMachine(): + """ Return the canonicalized machine name. """ + rmachine = platform.machine() + + # Try to lookup the string in the canon table + if rmachine in arch_canon: + rmachine = arch_canon[rmachine][0] + + return rmachine + +def defaultSystem(): + """ Return the canonicalized system name. """ + rsystem = platform.system() + + # Try to lookup the string in the canon tables + if rsystem in os_canon: + rsystem = os_canon[rsystem][0] + + return rsystem + +def defaultNames(): + """ Return the canonicalized machine and system name. """ + return defaultMachine(), defaultSystem() + +def updateRpmDicts(rpmrc, pyfile): + """ Read the given rpmrc file with RPM definitions and update the + info dictionaries in the file pyfile with it. + The arguments will usually be 'rpmrc.in' from a recent RPM source + tree, and 'rpmutils.py' referring to this script itself. + See also usage() below. + """ + try: + # Read old rpmutils.py file + oldpy = open(pyfile,"r").readlines() + # Read current rpmrc.in file + rpm = open(rpmrc,"r").readlines() + # Parse for data + data = {} + # Allowed section names that get parsed + sections = ['optflags', + 'arch_canon', + 'os_canon', + 'buildarchtranslate', + 'arch_compat', + 'os_compat', + 'buildarch_compat'] + for l in rpm: + l = l.rstrip('\n').replace(':',' ') + # Skip comments + if l.lstrip().startswith('#'): + continue + tokens = l.strip().split() + if len(tokens): + key = tokens[0] + if key in sections: + # Have we met this section before? + if not data.has_key(tokens[0]): + # No, so insert it + data[key] = {} + # Insert data + data[key][tokens[1]] = tokens[2:] + # Write new rpmutils.py file + out = open(pyfile,"w") + pm = 0 + for l in oldpy: + if pm: + if l.startswith('# End of rpmrc dictionaries'): + pm = 0 + out.write(l) + else: + out.write(l) + if l.startswith('# Start of rpmrc dictionaries'): + pm = 1 + # Write data sections to single dictionaries + for key, entries in data.iteritems(): + out.write("%s = {\n" % key) + for arch in sorted(entries.keys()): + out.write(" '%s' : ['%s'],\n" % (arch, "','".join(entries[arch]))) + out.write("}\n\n") + out.close() + except: + pass + +def usage(): + print "rpmutils.py rpmrc.in rpmutils.py" + +def main(): + import sys + + if len(sys.argv) < 3: + usage() + sys.exit(0) + updateRpmDicts(sys.argv[1], sys.argv[2]) + +if __name__ == "__main__": + main() diff --git a/scons/scons-local-2.2.0/SCons/Tool/sgiar.py b/scons/scons-local-2.3.0/SCons/Tool/sgiar.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/sgiar.py rename to scons/scons-local-2.3.0/SCons/Tool/sgiar.py index 42d07a2ed..27f5f7544 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sgiar.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sgiar.py @@ -11,7 +11,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sgiar.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/sgic++.py b/scons/scons-local-2.3.0/SCons/Tool/sgic++.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/sgic++.py rename to scons/scons-local-2.3.0/SCons/Tool/sgic++.py index 5358c4b66..ae2ac2c4b 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sgic++.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sgic++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sgic++.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/sgicc.py b/scons/scons-local-2.3.0/SCons/Tool/sgicc.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/sgicc.py rename to scons/scons-local-2.3.0/SCons/Tool/sgicc.py index c69d4fc9e..54e05a31b 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sgicc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sgicc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sgicc.py 2013/03/03 09:48:35 garyo" import cc diff --git a/scons/scons-local-2.2.0/SCons/Tool/sgilink.py b/scons/scons-local-2.3.0/SCons/Tool/sgilink.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/sgilink.py rename to scons/scons-local-2.3.0/SCons/Tool/sgilink.py index f65144697..82c44193e 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sgilink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sgilink.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sgilink.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/sunar.py b/scons/scons-local-2.3.0/SCons/Tool/sunar.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/sunar.py rename to scons/scons-local-2.3.0/SCons/Tool/sunar.py index 6e5f235f7..3a4d7c2dc 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sunar.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sunar.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sunar.py 2013/03/03 09:48:35 garyo" import SCons.Defaults import SCons.Tool diff --git a/scons/scons-local-2.2.0/SCons/Tool/sunc++.py b/scons/scons-local-2.3.0/SCons/Tool/sunc++.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Tool/sunc++.py rename to scons/scons-local-2.3.0/SCons/Tool/sunc++.py index 6effe32f8..7234239e0 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sunc++.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sunc++.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sunc++.py 2013/03/03 09:48:35 garyo" import SCons diff --git a/scons/scons-local-2.2.0/SCons/Tool/suncc.py b/scons/scons-local-2.3.0/SCons/Tool/suncc.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/suncc.py rename to scons/scons-local-2.3.0/SCons/Tool/suncc.py index 6b1461f85..f7442d8bd 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/suncc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/suncc.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/suncc.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/sunf77.py b/scons/scons-local-2.3.0/SCons/Tool/sunf77.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/sunf77.py rename to scons/scons-local-2.3.0/SCons/Tool/sunf77.py index 1536c7126..eb6378156 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sunf77.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sunf77.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sunf77.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/sunf90.py b/scons/scons-local-2.3.0/SCons/Tool/sunf90.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/sunf90.py rename to scons/scons-local-2.3.0/SCons/Tool/sunf90.py index 65417f153..cfee2ee7c 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sunf90.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sunf90.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sunf90.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/sunf95.py b/scons/scons-local-2.3.0/SCons/Tool/sunf95.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/sunf95.py rename to scons/scons-local-2.3.0/SCons/Tool/sunf95.py index c5300ad3b..31d57b11e 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sunf95.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sunf95.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sunf95.py 2013/03/03 09:48:35 garyo" import SCons.Util diff --git a/scons/scons-local-2.2.0/SCons/Tool/sunlink.py b/scons/scons-local-2.3.0/SCons/Tool/sunlink.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/Tool/sunlink.py rename to scons/scons-local-2.3.0/SCons/Tool/sunlink.py index b747c8f2e..46393417e 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/sunlink.py +++ b/scons/scons-local-2.3.0/SCons/Tool/sunlink.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/sunlink.py 2013/03/03 09:48:35 garyo" import os import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/swig.py b/scons/scons-local-2.3.0/SCons/Tool/swig.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/swig.py rename to scons/scons-local-2.3.0/SCons/Tool/swig.py index 9f2a3800d..6bbe922cb 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/swig.py +++ b/scons/scons-local-2.3.0/SCons/Tool/swig.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/swig.py 2013/03/03 09:48:35 garyo" import os.path import re diff --git a/scons/scons-local-2.2.0/SCons/Tool/tar.py b/scons/scons-local-2.3.0/SCons/Tool/tar.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Tool/tar.py rename to scons/scons-local-2.3.0/SCons/Tool/tar.py index 7cb9836b4..e28935839 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/tar.py +++ b/scons/scons-local-2.3.0/SCons/Tool/tar.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/tar.py 2013/03/03 09:48:35 garyo" import SCons.Action import SCons.Builder diff --git a/scons/scons-local-2.2.0/SCons/Tool/tex.py b/scons/scons-local-2.3.0/SCons/Tool/tex.py similarity index 90% rename from scons/scons-local-2.2.0/SCons/Tool/tex.py rename to scons/scons-local-2.3.0/SCons/Tool/tex.py index ce394e4f5..59606348c 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/tex.py +++ b/scons/scons-local-2.3.0/SCons/Tool/tex.py @@ -10,7 +10,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/tex.py 2013/03/03 09:48:35 garyo" import os.path import re @@ -100,6 +100,10 @@ makeglossary_re = re.compile(r"^[^%\n]*\\makeglossary", re.MULTILINE) makeglossaries_re = re.compile(r"^[^%\n]*\\makeglossaries", re.MULTILINE) makeacronyms_re = re.compile(r"^[^%\n]*\\makeglossaries", re.MULTILINE) beamer_re = re.compile(r"^[^%\n]*\\documentclass\{beamer\}", re.MULTILINE) +regex = r'^[^%\n]*\\newglossary\s*\[([^\]]+)\]?\s*\{([^}]*)\}\s*\{([^}]*)\}\s*\{([^}]*)\}\s*\{([^}]*)\}' +newglossary_re = re.compile(regex, re.MULTILINE) + +newglossary_suffix = [] # search to find all files included by Latex include_re = re.compile(r'^[^%\n]*\\(?:include|input){([^}]*)}', re.MULTILINE) @@ -125,6 +129,9 @@ LaTeXAction = None # An action to run BibTeX on a file. BibTeXAction = None +# An action to run Biber on a file. +BiberAction = None + # An action to run MakeIndex on a file. MakeIndexAction = None @@ -137,6 +144,9 @@ MakeGlossaryAction = None # An action to run MakeIndex (for acronyms) on a file. MakeAcronymsAction = None +# An action to run MakeIndex (for newglossary commands) on a file. +MakeNewGlossaryAction = None + # Used as a return value of modify_env_var if the variable is not set. _null = SCons.Scanner.LaTeX._null @@ -232,7 +242,8 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None saved_hashes = {} suffix_nodes = {} - for suffix in all_suffixes: + + for suffix in all_suffixes+sum(newglossary_suffix, []): theNode = env.fs.File(targetbase + suffix) suffix_nodes[suffix] = theNode saved_hashes[suffix] = theNode.get_csig() @@ -336,7 +347,9 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None must_rerun_latex = True # Now decide if biber will need to be run. - # The information that bibtex reads from the .bcf file is + # When the backend for biblatex is biber (by choice or default) the + # citation information is put in the .bcf file. + # The information that biber 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 @@ -349,11 +362,11 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None content = open(target_bcf, "rb").read() if content.find("bibdata") != -1: if Verbose: - print "Need to run bibtex on ",bcffilename + print "Need to run biber on ",bcffilename bibfile = env.fs.File(SCons.Util.splitext(target_bcf)[0]) - result = BibTeXAction(bibfile, bibfile, env) + result = BiberAction(bibfile, bibfile, env) if result != 0: - check_file_error_message(env['BIBTEX'], 'blg') + check_file_error_message(env['BIBER'], 'blg') must_rerun_latex = True # Now decide if latex will need to be run again due to index. @@ -410,6 +423,21 @@ def InternalLaTeXAuxAction(XXXLaTeXAction, target = None, source= None, env=None 'alg') return result + # Now decide if latex will need to be run again due to newglossary command. + for ig in range(len(newglossary_suffix)): + if check_MD5(suffix_nodes[newglossary_suffix[ig][2]],newglossary_suffix[ig][2]) or (count == 1): + # We must run makeindex + if Verbose: + print "Need to run makeindex for newglossary" + newglfile = suffix_nodes[newglossary_suffix[ig][2]] + MakeNewGlossaryAction = SCons.Action.Action("$MAKENEWGLOSSARY ${SOURCE.filebase}%s -s ${SOURCE.filebase}.ist -t ${SOURCE.filebase}%s -o ${SOURCE.filebase}%s" % (newglossary_suffix[ig][2],newglossary_suffix[ig][0],newglossary_suffix[ig][1]), "$MAKENEWGLOSSARYCOMSTR") + + result = MakeNewGlossaryAction(newglfile, newglfile, env) + if result != 0: + check_file_error_message('%s (newglossary)' % env['MAKENEWGLOSSARY'], + newglossary_suffix[ig][0]) + return result + # Now decide if latex needs to be run yet again to resolve warnings. if warning_rerun_re.search(logContent): must_rerun_latex = True @@ -595,9 +623,23 @@ 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: + if Verbose: + print "scan i ",i," files_tests[i] ",file_tests[i], file_tests[i][1] 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] + print " found match for ",file_tests[i][1][-1] + # for newglossary insert the suffixes in file_tests[i] + if file_tests[i][0] and file_tests[i][1][-1] == 'newglossary': + findresult = file_tests_search[i].findall(content) + for l in range(len(findresult)) : + (file_tests[i][1]).insert(0,'.'+findresult[l][3]) + (file_tests[i][1]).insert(0,'.'+findresult[l][2]) + (file_tests[i][1]).insert(0,'.'+findresult[l][0]) + suffix_list = ['.'+findresult[l][0],'.'+findresult[l][2],'.'+findresult[l][3] ] + newglossary_suffix.append(suffix_list) + if Verbose: + print " new suffixes for newglossary ",newglossary_suffix + incResult = includeOnly_re.search(content) if incResult: @@ -676,7 +718,8 @@ def tex_emitter_core(target, source, env, graphics_extensions): makeglossary_re, makeglossaries_re, makeacronyms_re, - beamer_re ] + beamer_re, + newglossary_re ] # set up list with the file suffixes that need emitting # when a feature is found file_tests_suff = [['.aux','aux_file'], @@ -693,7 +736,9 @@ def tex_emitter_core(target, source, env, graphics_extensions): ['.glo', '.gls', '.glg','glossary'], ['.glo', '.gls', '.glg','glossaries'], ['.acn', '.acr', '.alg','acronyms'], - ['.nav', '.snm', '.out', '.toc','beamer'] ] + ['.nav', '.snm', '.out', '.toc','beamer'], + ['newglossary',] ] + # for newglossary the suffixes are added as we find the command # build the list of lists file_tests = [] for i in range(len(file_tests_search)): @@ -722,6 +767,7 @@ def tex_emitter_core(target, source, env, graphics_extensions): if Verbose: print "search path ",paths + # scan all sources for side effect files aux_files = [] file_tests = ScanFiles(source[0], target, paths, file_tests, file_tests_search, env, graphics_extensions, targetdir, aux_files) @@ -839,6 +885,11 @@ def generate_common(env): if BibTeXAction is None: BibTeXAction = SCons.Action.Action("$BIBTEXCOM", "$BIBTEXCOMSTR") + # Define an action to run Biber on a file. + global BiberAction + if BiberAction is None: + BiberAction = SCons.Action.Action("$BIBERCOM", "$BIBERCOMSTR") + # Define an action to run MakeIndex on a file. global MakeIndexAction if MakeIndexAction is None: @@ -898,6 +949,10 @@ def generate_common(env): env['BIBTEXFLAGS'] = SCons.Util.CLVar('') env['BIBTEXCOM'] = CDCOM + '${TARGET.dir} && $BIBTEX $BIBTEXFLAGS ${SOURCE.filebase}' + env['BIBER'] = 'biber' + env['BIBERFLAGS'] = SCons.Util.CLVar('') + env['BIBERCOM'] = CDCOM + '${TARGET.dir} && $BIBER $BIBERFLAGS ${SOURCE.filebase}' + env['MAKEINDEX'] = 'makeindex' env['MAKEINDEXFLAGS'] = SCons.Util.CLVar('') env['MAKEINDEXCOM'] = CDCOM + '${TARGET.dir} && $MAKEINDEX $MAKEINDEXFLAGS ${SOURCE.file}' @@ -917,6 +972,9 @@ def generate_common(env): env['MAKENCLFLAGS'] = '-s ${MAKENCLSTYLE} -t ${SOURCE.filebase}.nlg' env['MAKENCLCOM'] = CDCOM + '${TARGET.dir} && $MAKENCL ${SOURCE.filebase}.nlo $MAKENCLFLAGS -o ${SOURCE.filebase}.nls' + env['MAKENEWGLOSSARY'] = 'makeindex' + env['MAKENEWGLOSSARYCOM'] = CDCOM + '${TARGET.dir} && $MAKENEWGLOSSARY ' + def exists(env): generate_darwin(env) return env.Detect('tex') diff --git a/scons/scons-local-2.2.0/SCons/Tool/textfile.py b/scons/scons-local-2.3.0/SCons/Tool/textfile.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/textfile.py rename to scons/scons-local-2.3.0/SCons/Tool/textfile.py index 44fd99941..5e8307bf0 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/textfile.py +++ b/scons/scons-local-2.3.0/SCons/Tool/textfile.py @@ -1,6 +1,6 @@ # -*- python -*- # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/textfile.py 2013/03/03 09:48:35 garyo" import SCons diff --git a/scons/scons-local-2.2.0/SCons/Tool/tlib.py b/scons/scons-local-2.3.0/SCons/Tool/tlib.py similarity index 92% rename from scons/scons-local-2.2.0/SCons/Tool/tlib.py rename to scons/scons-local-2.3.0/SCons/Tool/tlib.py index 5a24a0cf2..5a30712ff 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/tlib.py +++ b/scons/scons-local-2.3.0/SCons/Tool/tlib.py @@ -5,7 +5,7 @@ XXX """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/tlib.py 2013/03/03 09:48:35 garyo" import SCons.Tool import SCons.Tool.bcc32 diff --git a/scons/scons-local-2.2.0/SCons/Tool/wix.py b/scons/scons-local-2.3.0/SCons/Tool/wix.py similarity index 76% rename from scons/scons-local-2.2.0/SCons/Tool/wix.py rename to scons/scons-local-2.3.0/SCons/Tool/wix.py index eb88ce383..5b4c606bf 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/wix.py +++ b/scons/scons-local-2.3.0/SCons/Tool/wix.py @@ -8,7 +8,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/wix.py 2013/03/03 09:48:35 garyo" import SCons.Builder import SCons.Action @@ -47,15 +47,17 @@ def generate(env): env['WIXLIGHTFLAGS'].append( '-nologo' ) env['WIXLIGHTCOM'] = "$WIXLIGHT $WIXLIGHTFLAGS -out ${TARGET} ${SOURCES}" + env['WIXSRCSUF'] = '.wxs' + env['WIXOBJSUF'] = '.wixobj' object_builder = SCons.Builder.Builder( action = '$WIXCANDLECOM', - suffix = '.wxiobj', - src_suffix = '.wxs') + suffix = '$WIXOBJSUF', + src_suffix = '$WIXSRCSUF') linker_builder = SCons.Builder.Builder( action = '$WIXLIGHTCOM', - src_suffix = '.wxiobj', + src_suffix = '$WIXOBJSUF', src_builder = object_builder) env['BUILDERS']['WiX'] = linker_builder @@ -66,7 +68,6 @@ def exists(env): # try to find the candle.exe and light.exe tools and # add the install directory to light libpath. - #for path in os.environ['PATH'].split(os.pathsep): for path in os.environ['PATH'].split(os.pathsep): if not path: continue @@ -80,13 +81,17 @@ def exists(env): # search for the tools in the PATH environment variable try: - if env['WIXCANDLE'] in os.listdir(path) and\ - env['WIXLIGHT'] in os.listdir(path): - env.PrependENVPath('PATH', path) - env['WIXLIGHTFLAGS'] = [ os.path.join( path, 'wixui.wixlib' ), - '-loc', - os.path.join( path, 'WixUI_en-us.wxl' ) ] - return 1 + files = os.listdir(path) + if env['WIXCANDLE'] in files and env['WIXLIGHT'] in files: + env.PrependENVPath('PATH', path) + # include appropriate flags if running WiX 2.0 + if 'wixui.wixlib' in files and 'WixUI_en-us.wxl' in files: + env['WIXLIGHTFLAGS'] = [ os.path.join( path, 'wixui.wixlib' ), + '-loc', + os.path.join( path, 'WixUI_en-us.wxl' ) ] + else: + env['WIXLIGHTFLAGS'] = [] + return 1 except OSError: pass # ignore this, could be a stale PATH entry. diff --git a/scons/scons-local-2.2.0/SCons/Tool/xgettext.py b/scons/scons-local-2.3.0/SCons/Tool/xgettext.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/xgettext.py rename to scons/scons-local-2.3.0/SCons/Tool/xgettext.py index 9a5167c88..6de021ace 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/xgettext.py +++ b/scons/scons-local-2.3.0/SCons/Tool/xgettext.py @@ -3,7 +3,7 @@ Tool specific initialization of `xgettext` tool. """ -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 @@ Tool specific initialization of `xgettext` 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/xgettext.py issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/xgettext.py 2013/03/03 09:48:35 garyo" ############################################################################# class _CmdRunner(object): @@ -271,7 +271,10 @@ def generate(env,**kw): import SCons.Util from SCons.Tool.GettextCommon import RPaths, _detect_xgettext - env['XGETTEXT'] = _detect_xgettext(env) + try: + env['XGETTEXT'] = _detect_xgettext(env) + except: + env['XGETTEXT'] = 'xgettext' # 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 @@ -323,7 +326,10 @@ def generate(env,**kw): def exists(env): """ Check, whether the tool exists """ from SCons.Tool.GettextCommon import _xgettext_exists - return _xgettext_exists(env) + try: + return _xgettext_exists(env) + except: + return False ############################################################################# # Local Variables: diff --git a/scons/scons-local-2.2.0/SCons/Tool/yacc.py b/scons/scons-local-2.3.0/SCons/Tool/yacc.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Tool/yacc.py rename to scons/scons-local-2.3.0/SCons/Tool/yacc.py index 580fe76ff..1934181f7 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/yacc.py +++ b/scons/scons-local-2.3.0/SCons/Tool/yacc.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/yacc.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Tool/zip.py b/scons/scons-local-2.3.0/SCons/Tool/zip.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Tool/zip.py rename to scons/scons-local-2.3.0/SCons/Tool/zip.py index 77515ad35..86ae55e16 100644 --- a/scons/scons-local-2.2.0/SCons/Tool/zip.py +++ b/scons/scons-local-2.3.0/SCons/Tool/zip.py @@ -9,7 +9,7 @@ selection method. """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Tool/zip.py 2013/03/03 09:48:35 garyo" import os.path diff --git a/scons/scons-local-2.2.0/SCons/Util.py b/scons/scons-local-2.3.0/SCons/Util.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/Util.py rename to scons/scons-local-2.3.0/SCons/Util.py index c1f87a2e7..9f66ce099 100644 --- a/scons/scons-local-2.2.0/SCons/Util.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Util.py 2013/03/03 09:48:35 garyo" import os import sys diff --git a/scons/scons-local-2.2.0/SCons/Variables/BoolVariable.py b/scons/scons-local-2.3.0/SCons/Variables/BoolVariable.py similarity index 94% rename from scons/scons-local-2.2.0/SCons/Variables/BoolVariable.py rename to scons/scons-local-2.3.0/SCons/Variables/BoolVariable.py index 492f95e32..cdfe3671d 100644 --- a/scons/scons-local-2.2.0/SCons/Variables/BoolVariable.py +++ b/scons/scons-local-2.3.0/SCons/Variables/BoolVariable.py @@ -12,7 +12,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Variables/BoolVariable.py 2013/03/03 09:48:35 garyo" __all__ = ['BoolVariable',] diff --git a/scons/scons-local-2.2.0/SCons/Variables/EnumVariable.py b/scons/scons-local-2.3.0/SCons/Variables/EnumVariable.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Variables/EnumVariable.py rename to scons/scons-local-2.3.0/SCons/Variables/EnumVariable.py index e12c133ce..9e2970f6b 100644 --- a/scons/scons-local-2.2.0/SCons/Variables/EnumVariable.py +++ b/scons/scons-local-2.3.0/SCons/Variables/EnumVariable.py @@ -15,7 +15,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Variables/EnumVariable.py 2013/03/03 09:48:35 garyo" __all__ = ['EnumVariable',] diff --git a/scons/scons-local-2.2.0/SCons/Variables/ListVariable.py b/scons/scons-local-2.3.0/SCons/Variables/ListVariable.py similarity index 96% rename from scons/scons-local-2.2.0/SCons/Variables/ListVariable.py rename to scons/scons-local-2.3.0/SCons/Variables/ListVariable.py index 0763b29c4..735d5257b 100644 --- a/scons/scons-local-2.2.0/SCons/Variables/ListVariable.py +++ b/scons/scons-local-2.3.0/SCons/Variables/ListVariable.py @@ -25,7 +25,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Variables/ListVariable.py 2013/03/03 09:48:35 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.2.0/SCons/Variables/PackageVariable.py b/scons/scons-local-2.3.0/SCons/Variables/PackageVariable.py similarity index 95% rename from scons/scons-local-2.2.0/SCons/Variables/PackageVariable.py rename to scons/scons-local-2.3.0/SCons/Variables/PackageVariable.py index dfac082e4..665692c6c 100644 --- a/scons/scons-local-2.2.0/SCons/Variables/PackageVariable.py +++ b/scons/scons-local-2.3.0/SCons/Variables/PackageVariable.py @@ -28,7 +28,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Variables/PackageVariable.py 2013/03/03 09:48:35 garyo" __all__ = ['PackageVariable',] diff --git a/scons/scons-local-2.2.0/SCons/Variables/PathVariable.py b/scons/scons-local-2.3.0/SCons/Variables/PathVariable.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Variables/PathVariable.py rename to scons/scons-local-2.3.0/SCons/Variables/PathVariable.py index 77ef83eda..b79a7606a 100644 --- a/scons/scons-local-2.2.0/SCons/Variables/PathVariable.py +++ b/scons/scons-local-2.3.0/SCons/Variables/PathVariable.py @@ -46,7 +46,7 @@ Usage example: """ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Variables/PathVariable.py 2013/03/03 09:48:35 garyo" __all__ = ['PathVariable',] diff --git a/scons/scons-local-2.2.0/SCons/Variables/__init__.py b/scons/scons-local-2.3.0/SCons/Variables/__init__.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/Variables/__init__.py rename to scons/scons-local-2.3.0/SCons/Variables/__init__.py index 88df0218b..3d9d8452a 100644 --- a/scons/scons-local-2.2.0/SCons/Variables/__init__.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Variables/__init__.py 2013/03/03 09:48:35 garyo" import os.path import sys diff --git a/scons/scons-local-2.2.0/SCons/Warnings.py b/scons/scons-local-2.3.0/SCons/Warnings.py similarity index 97% rename from scons/scons-local-2.2.0/SCons/Warnings.py rename to scons/scons-local-2.3.0/SCons/Warnings.py index 42e396f88..d7cadc25a 100644 --- a/scons/scons-local-2.2.0/SCons/Warnings.py +++ b/scons/scons-local-2.3.0/SCons/Warnings.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/Warnings.py 2013/03/03 09:48:35 garyo" import sys diff --git a/scons/scons-local-2.2.0/SCons/__init__.py b/scons/scons-local-2.3.0/SCons/__init__.py similarity index 83% rename from scons/scons-local-2.2.0/SCons/__init__.py rename to scons/scons-local-2.3.0/SCons/__init__.py index d4b619f71..d1a369f4f 100644 --- a/scons/scons-local-2.2.0/SCons/__init__.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,15 +27,15 @@ 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/__init__.py 2013/03/03 09:48:35 garyo" -__version__ = "2.2.0" +__version__ = "2.3.0" -__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]" +__build__ = "" -__buildsys__ = "oberbrunner-dev" +__buildsys__ = "reepicheep" -__date__ = "2012/08/05 15:38:28" +__date__ = "2013/03/03 09:48:35" __developer__ = "garyo" diff --git a/scons/scons-local-2.2.0/SCons/compat/__init__.py b/scons/scons-local-2.3.0/SCons/compat/__init__.py similarity index 98% rename from scons/scons-local-2.2.0/SCons/compat/__init__.py rename to scons/scons-local-2.3.0/SCons/compat/__init__.py index 7dc6a68d5..56f374259 100644 --- a/scons/scons-local-2.2.0/SCons/compat/__init__.py +++ b/scons/scons-local-2.3.0/SCons/compat/__init__.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/compat/__init__.py 2013/03/03 09:48:35 garyo" import os import sys diff --git a/scons/scons-local-2.2.0/SCons/compat/_scons_builtins.py b/scons/scons-local-2.3.0/SCons/compat/_scons_builtins.py similarity index 69% rename from scons/scons-local-2.2.0/SCons/compat/_scons_builtins.py rename to scons/scons-local-2.3.0/SCons/compat/_scons_builtins.py index 32f4e7536..1202d46e0 100644 --- a/scons/scons-local-2.2.0/SCons/compat/_scons_builtins.py +++ b/scons/scons-local-2.3.0/SCons/compat/_scons_builtins.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,6 @@ This module checks for the following builtins names: all() any() - sorted() memoryview() Implementations of functions are *NOT* guaranteed to be fully compliant @@ -52,7 +51,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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/compat/_scons_builtins.py 2013/03/03 09:48:35 garyo" import builtins @@ -101,48 +100,6 @@ except NameError: return self.obj[indx] builtins.memoryview = memoryview -try: - sorted -except NameError: - # Pre-2.4 Python has no sorted() function. - # - # The pre-2.4 Python list.sort() method does not support - # list.sort(key=) nor list.sort(reverse=) keyword arguments, so - # we must implement the functionality of those keyword arguments - # by hand instead of passing them to list.sort(). - def sorted(iterable, cmp=None, key=None, reverse=False): - if key is not None: - result = [(key(x), x) for x in iterable] - else: - result = iterable[:] - if cmp is None: - # Pre-2.3 Python does not support list.sort(None). - result.sort() - else: - result.sort(cmp) - if key is not None: - result = [t1 for t0,t1 in result] - if reverse: - result.reverse() - return result - builtins.sorted = sorted - -#if sys.version_info[:3] in ((2, 2, 0), (2, 2, 1)): -# def lstrip(s, c=string.whitespace): -# while s and s[0] in c: -# s = s[1:] -# return s -# def rstrip(s, c=string.whitespace): -# while s and s[-1] in c: -# s = s[:-1] -# return s -# def strip(s, c=string.whitespace, l=lstrip, r=rstrip): -# return l(r(s, c), c) -# -# object.__setattr__(str, 'lstrip', lstrip) -# object.__setattr__(str, 'rstrip', rstrip) -# object.__setattr__(str, 'strip', strip) - # Local Variables: # tab-width:4 # indent-tabs-mode:nil diff --git a/scons/scons-local-2.2.0/SCons/compat/_scons_collections.py b/scons/scons-local-2.3.0/SCons/compat/_scons_collections.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/compat/_scons_collections.py rename to scons/scons-local-2.3.0/SCons/compat/_scons_collections.py index 4687642dd..7cf685ccd 100644 --- a/scons/scons-local-2.2.0/SCons/compat/_scons_collections.py +++ b/scons/scons-local-2.3.0/SCons/compat/_scons_collections.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/compat/_scons_collections.py 2013/03/03 09:48:35 garyo" # Use exec to hide old names from fixers. exec("""if True: diff --git a/scons/scons-local-2.2.0/SCons/compat/_scons_dbm.py b/scons/scons-local-2.3.0/SCons/compat/_scons_dbm.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/compat/_scons_dbm.py rename to scons/scons-local-2.3.0/SCons/compat/_scons_dbm.py index 0506ac804..e6df06341 100644 --- a/scons/scons-local-2.2.0/SCons/compat/_scons_dbm.py +++ b/scons/scons-local-2.3.0/SCons/compat/_scons_dbm.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/compat/_scons_dbm.py 2013/03/03 09:48:35 garyo" class error(Exception): pass diff --git a/scons/scons-local-2.2.0/SCons/compat/_scons_hashlib.py b/scons/scons-local-2.3.0/SCons/compat/_scons_hashlib.py similarity index 93% rename from scons/scons-local-2.2.0/SCons/compat/_scons_hashlib.py rename to scons/scons-local-2.3.0/SCons/compat/_scons_hashlib.py index 52cf3ba60..d4e30232b 100644 --- a/scons/scons-local-2.2.0/SCons/compat/_scons_hashlib.py +++ b/scons/scons-local-2.3.0/SCons/compat/_scons_hashlib.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/compat/_scons_hashlib.py 2013/03/03 09:48:35 garyo" import md5 from string import hexdigits diff --git a/scons/scons-local-2.2.0/SCons/compat/_scons_io.py b/scons/scons-local-2.3.0/SCons/compat/_scons_io.py similarity index 91% rename from scons/scons-local-2.2.0/SCons/compat/_scons_io.py rename to scons/scons-local-2.3.0/SCons/compat/_scons_io.py index df4d44497..194029efd 100644 --- a/scons/scons-local-2.2.0/SCons/compat/_scons_io.py +++ b/scons/scons-local-2.3.0/SCons/compat/_scons_io.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/compat/_scons_io.py 2013/03/03 09:48:35 garyo" # Use the "imp" module to protect the imports below from fixers. import imp diff --git a/scons/scons-local-2.2.0/SCons/compat/_scons_sets.py b/scons/scons-local-2.3.0/SCons/compat/_scons_sets.py similarity index 100% rename from scons/scons-local-2.2.0/SCons/compat/_scons_sets.py rename to scons/scons-local-2.3.0/SCons/compat/_scons_sets.py diff --git a/scons/scons-local-2.2.0/SCons/compat/_scons_subprocess.py b/scons/scons-local-2.3.0/SCons/compat/_scons_subprocess.py similarity index 100% rename from scons/scons-local-2.2.0/SCons/compat/_scons_subprocess.py rename to scons/scons-local-2.3.0/SCons/compat/_scons_subprocess.py diff --git a/scons/scons-local-2.2.0/SCons/cpp.py b/scons/scons-local-2.3.0/SCons/cpp.py similarity index 99% rename from scons/scons-local-2.2.0/SCons/cpp.py rename to scons/scons-local-2.3.0/SCons/cpp.py index 74fff7c70..6999292dc 100644 --- a/scons/scons-local-2.2.0/SCons/cpp.py +++ b/scons/scons-local-2.3.0/SCons/cpp.py @@ -1,5 +1,5 @@ # -# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/cpp.py 2013/03/03 09:48:35 garyo" __doc__ = """ SCons C Pre-Processor module diff --git a/scons/scons-local-2.2.0/SCons/dblite.py b/scons/scons-local-2.3.0/SCons/dblite.py similarity index 100% rename from scons/scons-local-2.2.0/SCons/dblite.py rename to scons/scons-local-2.3.0/SCons/dblite.py diff --git a/scons/scons-local-2.2.0/SCons/exitfuncs.py b/scons/scons-local-2.3.0/SCons/exitfuncs.py similarity index 79% rename from scons/scons-local-2.2.0/SCons/exitfuncs.py rename to scons/scons-local-2.3.0/SCons/exitfuncs.py index 4e604e193..26df1983d 100644 --- a/scons/scons-local-2.2.0/SCons/exitfuncs.py +++ b/scons/scons-local-2.3.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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,9 +27,10 @@ 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/engine/SCons/exitfuncs.py 2013/03/03 09:48:35 garyo" +import atexit _exithandlers = [] def _run_exitfuncs(): @@ -52,23 +53,9 @@ def register(func, *targs, **kargs): """ _exithandlers.append((func, targs, kargs)) -import sys -try: - x = sys.exitfunc - - # if x isn't our own exit func executive, assume it's another - # registered exit function - append it to our list... - if x != _run_exitfuncs: - register(x) - -except AttributeError: - pass - -# make our exit function get run by python when it exits: -sys.exitfunc = _run_exitfuncs - -del sys +# make our exit function get run by python when it exits +atexit.register(_run_exitfuncs) # Local Variables: # tab-width:4 diff --git a/scons/scons-local-2.2.0/scons-2.2.0.egg-info b/scons/scons-local-2.3.0/scons-2.3.0.egg-info similarity index 96% rename from scons/scons-local-2.2.0/scons-2.2.0.egg-info rename to scons/scons-local-2.3.0/scons-2.3.0.egg-info index b8f8d5e88..cd00aa720 100644 --- a/scons/scons-local-2.2.0/scons-2.2.0.egg-info +++ b/scons/scons-local-2.3.0/scons-2.3.0.egg-info @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: scons -Version: 2.2.0 +Version: 2.3.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 1d774cb22..2b67410ec 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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/script/scons-time.py 2013/03/03 09:48:35 garyo" import getopt import glob diff --git a/scons/scons.py b/scons/scons.py index 24686385c..466c72833 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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,15 +23,15 @@ # 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/script/scons.py 2013/03/03 09:48:35 garyo" -__version__ = "2.2.0" +__version__ = "2.3.0" -__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]" +__build__ = "" -__buildsys__ = "oberbrunner-dev" +__buildsys__ = "reepicheep" -__date__ = "2012/08/05 15:38:28" +__date__ = "2013/03/03 09:48:35" __developer__ = "garyo" @@ -55,18 +55,12 @@ import sys # engine modules if they're in either directory. -# Check to see if the python version is > 3.0 which is currently unsupported -# If so exit with error message -try: - if sys.version_info >= (3,0,0): - msg = "scons: *** SCons version %s does not run under Python version %s.\n\ -Python 3.0 and later are not yet supported.\n" - sys.stderr.write(msg % (__version__, sys.version.split()[0])) - sys.exit(1) -except AttributeError: - # Pre-1.6 Python has no sys.version_info - # No need to check version as we then know the version is < 3.0.0 and supported - pass +if sys.version_info >= (3,0,0): + msg = "scons: *** SCons version %s does not run under Python version %s.\n\ +Python 3 is not yet supported.\n" + sys.stderr.write(msg % (__version__, sys.version.split()[0])) + sys.exit(1) + script_dir = sys.path[0] @@ -184,7 +178,15 @@ sys.path = libs + sys.path ############################################################################## if __name__ == "__main__": - import SCons.Script + try: + import SCons.Script + except: + ROOT = os.path.join(os.path.abspath(os.path.dirname(__file__)), '..', 'engine') + if os.path.exists(ROOT): + sys.path += [ROOT] + print("SCons import failed. Trying to run from source directory") + import SCons.Script + # this does all the work, and calls sys.exit # with the proper exit status when done. SCons.Script.main() diff --git a/scons/sconsign.py b/scons/sconsign.py index 6e8df4e94..99f0ee83d 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, 2012 The SCons Foundation +# Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 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,15 +23,15 @@ # 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 issue-2856:2676:d23b7a2f45e8 2012/08/05 15:38:28 garyo" +__revision__ = "src/script/sconsign.py 2013/03/03 09:48:35 garyo" -__version__ = "2.2.0" +__version__ = "2.3.0" -__build__ = "issue-2856:2676:d23b7a2f45e8[MODIFIED]" +__build__ = "" -__buildsys__ = "oberbrunner-dev" +__buildsys__ = "reepicheep" -__date__ = "2012/08/05 15:38:28" +__date__ = "2013/03/03 09:48:35" __developer__ = "garyo" diff --git a/src/agg/process_debug_symbolizer.cpp b/src/agg/process_debug_symbolizer.cpp index 2bf8e276d..277f7fea6 100644 --- a/src/agg/process_debug_symbolizer.cpp +++ b/src/agg/process_debug_symbolizer.cpp @@ -52,10 +52,37 @@ void agg_renderer::process(debug_symbolizer const& sym, mapnik::feature_impl & feature, proj_transform const& prj_trans) { - label_collision_detector4::query_iterator itr = detector_->begin(), end = detector_->end(); - for (;itr!=end; itr++) + debug_symbolizer_mode_e mode = sym.get_mode(); + if (mode == DEBUG_SYM_MODE_COLLISION) { - draw_rect(pixmap_, itr->box); + label_collision_detector4::query_iterator itr = detector_->begin(), end = detector_->end(); + for (;itr!=end; itr++) + { + draw_rect(pixmap_, itr->box); + } + } + else if (mode == DEBUG_SYM_MODE_VERTEX) + { + for (unsigned i=0; i #include +#include + #include namespace mapnik { @@ -153,7 +155,6 @@ void cairo_context::set_operator(composite_mode_e comp_op) cairo_set_operator(cairo_.get(), CAIRO_OPERATOR_EXCLUSION); break; #else -#warning building against cairo older that 1.10.0, some compositing options are disabled case multiply: case screen: case overlay: diff --git a/src/cairo_renderer.cpp b/src/cairo_renderer.cpp index 16d331421..d0305b5d7 100644 --- a/src/cairo_renderer.cpp +++ b/src/cairo_renderer.cpp @@ -258,14 +258,9 @@ void cairo_renderer_base::setup(Map const& map) void cairo_renderer_base::start_map_processing(Map const& map) { MAPNIK_LOG_DEBUG(cairo_renderer) << "cairo_renderer_base: Start map processing bbox=" << map.get_current_extent(); - -#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 6, 0) box2d bounds = t_.forward(t_.extent()); context_.rectangle(bounds.minx(), bounds.miny(), bounds.maxx(), bounds.maxy()); context_.clip(); -#else -#warning building against cairo older that 1.6.0, map clipping is disabled -#endif } template <> @@ -669,6 +664,15 @@ void cairo_renderer_base::process(point_symbolizer const& sym, if (marker) { + box2d const& bbox = (*marker)->bounding_box(); + coord2d center = bbox.center(); + + agg::trans_affine tr; + evaluate_transform(tr, feature, sym.get_image_transform()); + agg::trans_affine_translation recenter(-center.x, -center.y); + agg::trans_affine recenter_tr = recenter * tr; + box2d label_ext = bbox * recenter_tr * agg::trans_affine_scaling(scale_factor_); + for (unsigned i = 0; i < feature.num_geometries(); ++i) { geometry_type const& geom = feature.get_geometry(i); @@ -689,15 +693,7 @@ void cairo_renderer_base::process(point_symbolizer const& sym, prj_trans.backward(x, y, z); t_.forward(&x, &y); - - double dx = 0.5 * (*marker)->width(); - double dy = 0.5 * (*marker)->height(); - agg::trans_affine tr; - 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); - label_ext *= agg::trans_affine_scaling(scale_factor_); + label_ext.re_center(x,y); if (sym.get_allow_overlap() || detector_->has_placement(label_ext)) { diff --git a/src/datasource_cache.cpp b/src/datasource_cache.cpp index 70e0f4636..e303d7d6e 100644 --- a/src/datasource_cache.cpp +++ b/src/datasource_cache.cpp @@ -38,6 +38,9 @@ namespace mapnik { +extern datasource_ptr create_static_datasource(parameters const& params); +extern std::vector get_static_datasource_names(); + bool is_input_plugin(std::string const& filename) { return boost::algorithm::ends_with(filename,std::string(".input")); @@ -62,13 +65,23 @@ datasource_ptr datasource_cache::create(parameters const& params) "parameter 'type' is missing"); } + datasource_ptr ds; + +#ifdef MAPNIK_STATIC_PLUGINS + // return if it's created, raise otherwise + ds = create_static_datasource(params); + if (ds) + { + return ds; + } +#endif + #ifdef MAPNIK_THREADSAFE mutex::scoped_lock lock(mutex_); #endif - datasource_ptr ds; std::map >::iterator itr=plugins_.find(*type); - if ( itr == plugins_.end() ) + if (itr == plugins_.end()) { std::string s("Could not create datasource for type: '"); s += *type + "'"; @@ -83,7 +96,7 @@ datasource_ptr datasource_cache::create(parameters const& params) throw config_error(s); } - if (!itr->second->valid()) + if (! itr->second->valid()) { throw std::runtime_error(std::string("Cannot load library: ") + itr->second->get_error()); @@ -95,13 +108,19 @@ datasource_ptr datasource_cache::create(parameters const& params) #endif create_ds* create_datasource = reinterpret_cast(itr->second->get_symbol("create")); - if (!create_datasource) + if (! create_datasource) { throw std::runtime_error(std::string("Cannot load symbols: ") + itr->second->get_error()); } + ds = datasource_ptr(create_datasource(params), datasource_deleter()); + #ifdef MAPNIK_LOG + MAPNIK_LOG_DEBUG(datasource_cache) + << "datasource_cache: Datasource=" + << ds << " type=" << type; + MAPNIK_LOG_DEBUG(datasource_cache) << "datasource_cache: Size=" << params.size(); @@ -115,12 +134,6 @@ datasource_ptr datasource_cache::create(parameters const& params) } #endif - ds = datasource_ptr(create_datasource(params), datasource_deleter()); - - MAPNIK_LOG_DEBUG(datasource_cache) - << "datasource_cache: Datasource=" - << ds << " type=" << type; - return ds; } @@ -132,11 +145,17 @@ std::string datasource_cache::plugin_directories() std::vector datasource_cache::plugin_names() { std::vector names; + +#ifdef MAPNIK_STATIC_PLUGINS + names = get_static_datasource_names(); +#endif + std::map >::const_iterator itr; - for (itr = plugins_.begin();itr!=plugins_.end();++itr) + for (itr = plugins_.begin(); itr != plugins_.end(); ++itr) { names.push_back(itr->first); } + return names; } @@ -145,6 +164,7 @@ void datasource_cache::register_datasources(std::string const& str) #ifdef MAPNIK_THREADSAFE mutex::scoped_lock lock(mutex_); #endif + boost::filesystem::path path(str); // TODO - only push unique paths plugin_directories_.push_back(str); @@ -152,24 +172,24 @@ void datasource_cache::register_datasources(std::string const& str) if (exists(path) && is_directory(path)) { - for (boost::filesystem::directory_iterator itr(path);itr!=end_itr;++itr ) + for (boost::filesystem::directory_iterator itr(path); itr != end_itr; ++itr ) { #if (BOOST_FILESYSTEM_VERSION == 3) - if (!is_directory( *itr ) && is_input_plugin(itr->path().filename().string())) + if (! is_directory(*itr) && is_input_plugin(itr->path().filename().string())) #else // v2 - if (!is_directory( *itr ) && is_input_plugin(itr->path().leaf())) + if (! is_directory(*itr) && is_input_plugin(itr->path().leaf())) +#endif + { +#if (BOOST_FILESYSTEM_VERSION == 3) + if (register_datasource(itr->path().string())) +#else // v2 + if (register_datasource(itr->string())) #endif { -#if (BOOST_FILESYSTEM_VERSION == 3) - if (register_datasource(itr->path().string())) -#else // v2 - if (register_datasource(itr->string())) -#endif - { - registered_ = true; - } + registered_ = true; } + } } } } @@ -206,9 +226,9 @@ bool datasource_cache::register_datasource(std::string const& filename) } catch (std::exception const& ex) { - MAPNIK_LOG_ERROR(datasource_cache) - << "Exception caught while loading plugin library: " - << filename << " (" << ex.what() << ")"; + MAPNIK_LOG_ERROR(datasource_cache) + << "Exception caught while loading plugin library: " + << filename << " (" << ex.what() << ")"; } return success; } diff --git a/src/datasource_cache_static.cpp b/src/datasource_cache_static.cpp new file mode 100644 index 000000000..02ee005e5 --- /dev/null +++ b/src/datasource_cache_static.cpp @@ -0,0 +1,171 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2013 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 + +#ifdef MAPNIK_STATIC_PLUGINS +#include + +// boost +#include +#include +#include +#endif + +// stl +#include + +// static plugin linkage +#ifdef MAPNIK_STATIC_PLUGINS + #if defined(MAPNIK_STATIC_PLUGIN_CSV) + #include "plugins/input/csv/csv_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_GDAL) + #include "plugins/input/gdal/gdal_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_GEOJSON) + #include "plugins/input/geojson/geojson_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_GEOS) + #include "plugins/input/geos/geos_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_KISMET) + #include "plugins/input/kismet/kismet_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_OCCI) + #include "plugins/input/occi/occi_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_OGR) + #include "plugins/input/ogr/ogr_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_OSM) + #include "plugins/input/osm/osm_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_POSTGIS) + #include "plugins/input/postgis/postgis_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_PYTHON) + #include "plugins/input/python/python_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_RASTER) + #include "plugins/input/raster/raster_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_RASTERLITE) + #include "plugins/input/rasterlite/rasterlite_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_SHAPE) + #include "plugins/input/shape/shape_datasource.hpp" + #endif + #if defined(MAPNIK_STATIC_PLUGIN_SQLITE) + #include "plugins/input/sqlite/sqlite_datasource.hpp" + #endif +#endif + +namespace mapnik { + +#ifdef MAPNIK_STATIC_PLUGINS +template +datasource_ptr ds_generator(parameters const& params) +{ + return boost::make_shared(params); +} + +typedef datasource_ptr (*ds_generator_ptr)(parameters const& params); +typedef boost::unordered::unordered_map datasource_map; + +static datasource_map ds_map = boost::assign::map_list_of + #if defined(MAPNIK_STATIC_PLUGIN_CSV) + (std::string("csv"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_GDAL) + (std::string("gdal"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_GEOJSON) + (std::string("geojson"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_OCCI) + (std::string("occi"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_OGR) + (std::string("ogr"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_OSM) + (std::string("osm"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_POSTGIS) + (std::string("postgis"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_PYTHON) + (std::string("python"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_RASTER) + (std::string("raster"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_RASTERLITE) + (std::string("rasterlite"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_SHAPE) + (std::string("shape"), &ds_generator) + #endif + #if defined(MAPNIK_STATIC_PLUGIN_SQLITE) + (std::string("sqlite"), &ds_generator) + #endif +; +#endif + +datasource_ptr create_static_datasource(parameters const& params) +{ + datasource_ptr ds; + +#ifdef MAPNIK_STATIC_PLUGINS + boost::optional type = params.get("type"); + + datasource_map::iterator it = ds_map.find(*type); + + if (it != ds_map.end()) + { + ds = it->second(params); + } +#endif + + return ds; +} + +std::vector get_static_datasource_names() +{ + std::vector names; + +#ifdef MAPNIK_STATIC_PLUGINS + datasource_map::iterator it = ds_map.begin(); + while (it != ds_map.end()) + { + names.push_back(it->first); + + it++; + } +#endif + + return names; +} + +} diff --git a/src/debug_symbolizer.cpp b/src/debug_symbolizer.cpp new file mode 100644 index 000000000..1b064dbca --- /dev/null +++ b/src/debug_symbolizer.cpp @@ -0,0 +1,57 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2013 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 + +namespace mapnik +{ + +static const char * debug_symbolizer_mode_strings[] = { + "collision", + "vertex", + "" +}; + +IMPLEMENT_ENUM( debug_symbolizer_mode_e, debug_symbolizer_mode_strings ) + +debug_symbolizer::debug_symbolizer() +: symbolizer_base(), + mode_(DEBUG_SYM_MODE_COLLISION) {} + +debug_symbolizer::debug_symbolizer(debug_symbolizer const& rhs) + : symbolizer_base(rhs), + mode_(rhs.mode_) {} + +debug_symbolizer_mode_e debug_symbolizer::get_mode() const +{ + return mode_; +} + +void debug_symbolizer::set_mode(debug_symbolizer_mode_e mode) +{ + mode_ = mode; +} + +} + diff --git a/src/feature_type_style.cpp b/src/feature_type_style.cpp index f041b714f..f850a86f8 100644 --- a/src/feature_type_style.cpp +++ b/src/feature_type_style.cpp @@ -22,6 +22,7 @@ #include #include +#include // boost #include diff --git a/src/gamma_method.cpp b/src/gamma_method.cpp index 4a7fad31f..f1adf99e2 100644 --- a/src/gamma_method.cpp +++ b/src/gamma_method.cpp @@ -22,6 +22,7 @@ // mapnik #include +#include namespace mapnik { diff --git a/src/gradient.cpp b/src/gradient.cpp index 3af55050b..41612833b 100644 --- a/src/gradient.cpp +++ b/src/gradient.cpp @@ -21,6 +21,7 @@ *****************************************************************************/ #include +#include namespace mapnik { diff --git a/src/load_map.cpp b/src/load_map.cpp index d8ad805a9..8919f1477 100644 --- a/src/load_map.cpp +++ b/src/load_map.cpp @@ -1537,8 +1537,10 @@ void map_parser::parse_raster_symbolizer(rule & rule, xml_node const & sym) void map_parser::parse_debug_symbolizer(rule & rule, xml_node const & sym) { debug_symbolizer symbol; - parse_symbolizer_base(symbol, sym); + debug_symbolizer_mode_e mode = + sym.get_attr("mode", DEBUG_SYM_MODE_COLLISION); + symbol.set_mode(mode); rule.append(symbol); } diff --git a/src/markers_symbolizer.cpp b/src/markers_symbolizer.cpp index 0bb371cb1..6c48effd2 100644 --- a/src/markers_symbolizer.cpp +++ b/src/markers_symbolizer.cpp @@ -25,6 +25,7 @@ #include #include #include +#include namespace mapnik { diff --git a/src/memory_datasource.cpp b/src/memory_datasource.cpp index f198f3e74..46dbb151b 100644 --- a/src/memory_datasource.cpp +++ b/src/memory_datasource.cpp @@ -90,9 +90,8 @@ featureset_ptr memory_datasource::features(const query& q) const featureset_ptr memory_datasource::features_at_point(coord2d const& pt, double tol) const { box2d box = box2d(pt.x, pt.y, pt.x, pt.y); - + box.pad(tol); MAPNIK_LOG_DEBUG(memory_datasource) << "memory_datasource: Box=" << box << ", Point x=" << pt.x << ",y=" << pt.y; - return boost::make_shared(box,*this); } diff --git a/src/polygon_pattern_symbolizer.cpp b/src/polygon_pattern_symbolizer.cpp index 4a2e60c31..67449890e 100644 --- a/src/polygon_pattern_symbolizer.cpp +++ b/src/polygon_pattern_symbolizer.cpp @@ -22,6 +22,7 @@ // mapnik #include +#include namespace mapnik { diff --git a/src/projection.cpp b/src/projection.cpp index 53ffce126..57dcdb243 100644 --- a/src/projection.cpp +++ b/src/projection.cpp @@ -31,7 +31,11 @@ #include #if defined(MAPNIK_THREADSAFE) && PJ_VERSION < 480 #include +#ifdef _MSC_VER +#pragma NOTE(mapnik is building against < proj 4.8, reprojection will be faster if you use >= 4.8) +#else #warning mapnik is building against < proj 4.8, reprojection will be faster if you use >= 4.8 +#endif static boost::mutex mutex_; #endif diff --git a/src/rapidxml_loader.cpp b/src/rapidxml_loader.cpp index dcd172a0a..dda323118 100644 --- a/src/rapidxml_loader.cpp +++ b/src/rapidxml_loader.cpp @@ -79,8 +79,9 @@ public: try { // Parse using appropriate flags - const int f_tws = rapidxml::parse_normalize_whitespace - | rapidxml::parse_trim_whitespace; + // https://github.com/mapnik/mapnik/issues/1856 + // const int f_tws = rapidxml::parse_normalize_whitespace; + const int f_tws = rapidxml::parse_trim_whitespace; rapidxml::xml_document<> doc; doc.parse(&v.front()); @@ -110,8 +111,10 @@ public: // } // } - - load(buffer, node); + // https://github.com/mapnik/mapnik/issues/1857 + std::stringstream s; + s << buffer; + load(s, node); } private: void populate_tree(rapidxml::xml_node *cur_node, xml_node &node) @@ -141,10 +144,7 @@ private: case rapidxml::node_data: case rapidxml::node_cdata: { - std::string trimmed(cur_node->value()); - mapnik::util::trim(trimmed); - if (trimmed.empty()) break; //Don't add empty text nodes - node.add_child(trimmed, 0, true); + node.add_child(cur_node->value(), 0, true); } break; default: diff --git a/src/raster_colorizer.cpp b/src/raster_colorizer.cpp index 25cacf679..fbacb1212 100644 --- a/src/raster_colorizer.cpp +++ b/src/raster_colorizer.cpp @@ -27,6 +27,7 @@ #include #include #include +#include // stl #include diff --git a/src/stroke.cpp b/src/stroke.cpp index acaf6c93b..deb4ce625 100644 --- a/src/stroke.cpp +++ b/src/stroke.cpp @@ -21,6 +21,7 @@ *****************************************************************************/ #include +#include namespace mapnik { diff --git a/src/utils.cpp b/src/utils.cpp new file mode 100644 index 000000000..a10102889 --- /dev/null +++ b/src/utils.cpp @@ -0,0 +1,61 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2013 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 + * + *****************************************************************************/ + +#ifdef _WINDOWS +// windows specific methods for UTF8 from/to UTF16 +#include +#include +#include + +#include + +namespace mapnik { + +std::string utf16_to_utf8(std::wstring const& wstr) +{ + std::string str; + int size = WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), -1, 0, 0, 0, 0); + if(size > 0) + { + std::vector buffer(size); + WideCharToMultiByte(CP_UTF8, 0, wstr.c_str(), -1, &buffer[0], size, 0, 0); + str.assign(buffer.begin(), buffer.end() - 1); + } + return str; +} + +std::wstring utf8_to_utf16 (std::string const& str) +{ + std::wstring wstr; + int size = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, 0, 0); + if (size > 0) + { + std::vector buffer(size); + MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, &buffer[0], size); + wstr.assign(buffer.begin(), buffer.end() - 1); + } + return wstr; +} + +} // namespace mapnik + +#endif // _WINDOWS diff --git a/src/well_known_srs.cpp b/src/well_known_srs.cpp index a6e8d0ae6..c3163df0d 100644 --- a/src/well_known_srs.cpp +++ b/src/well_known_srs.cpp @@ -23,6 +23,7 @@ // mapnik #include #include +#include // boost #include diff --git a/src/xml_tree.cpp b/src/xml_tree.cpp index b9c15d407..53cea607e 100644 --- a/src/xml_tree.cpp +++ b/src/xml_tree.cpp @@ -405,6 +405,7 @@ compile_get_opt_attr(expression_ptr); compile_get_attr(std::string); compile_get_attr(filter_mode_e); compile_get_attr(point_placement_e); +compile_get_attr(debug_symbolizer_mode_e); compile_get_attr(marker_placement_e); compile_get_attr(marker_multi_policy_e); compile_get_attr(pattern_alignment_e); diff --git a/tests/cpp_tests/agg_blend_src_over_test.cpp b/tests/cpp_tests/agg_blend_src_over_test.cpp index 8f0427bb9..d3014df5a 100644 --- a/tests/cpp_tests/agg_blend_src_over_test.cpp +++ b/tests/cpp_tests/agg_blend_src_over_test.cpp @@ -4,6 +4,7 @@ #include #include #include +#include #include "agg_color_rgba.h" #include "agg_pixfmt_rgba.h" #include "agg_rendering_buffer.h" @@ -130,8 +131,15 @@ template struct comp_op_rgba_src_over2 } -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i source_over_old_agg; typedef agg::comp_op_rgba_src_over source_over; @@ -194,7 +202,8 @@ int main( int, char*[] ) */ if (!::boost::detail::test_errors()) { - std::clog << "C++ AGG blending: \x1b[1;32m✓ \x1b[0m\n"; + if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; + else std::clog << "C++ AGG blending: \x1b[1;32m✓ \x1b[0m\n"; #if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/build.py b/tests/cpp_tests/build.py index d47c167bc..af79532bf 100644 --- a/tests/cpp_tests/build.py +++ b/tests/cpp_tests/build.py @@ -6,40 +6,41 @@ Import ('env') test_env = env.Clone() -test_env['LIBS'] = copy(env['LIBMAPNIK_LIBS']) -test_env.AppendUnique(LIBS='mapnik') -test_env.AppendUnique(LIBS='sqlite3') -test_env.AppendUnique(CXXFLAGS='-g') - -test_env['CXXFLAGS'] = copy(test_env['LIBMAPNIK_CXXFLAGS']) - -if test_env['HAS_CAIRO']: - test_env.PrependUnique(CPPPATH=test_env['CAIRO_CPPPATHS']) - test_env.Append(CPPDEFINES = '-DHAVE_CAIRO') - -for cpp_test in glob.glob('*_test.cpp'): - name = cpp_test.replace('.cpp','-bin') - source_files = [cpp_test] - test_program = None - # enable for faster compile while developing just this test - #if 'agg_blend_src_over_test' in cpp_test: - if False: - # customization here for faster compile - agg_env = Environment(ENV=os.environ) - agg_env['CXX'] = env['CXX'] - agg_env['CXXFLAGS'] = env['CXXFLAGS'] - if 'agg' in test_env['LIBS']: - agg_env.AppendUnique(LIBS='agg') - agg_env.Append(CPPPATH = '#deps/agg/include') - agg_env.Append(LIBPATH = '#deps/agg') - agg_env['CPPPATH'] = ['#deps/agg/include',env['BOOST_INCLUDES']] - test_program = agg_env.Program(name, source=source_files, LINKFLAGS=env['CUSTOM_LDFLAGS']) - else: - test_env_local = test_env.Clone() - if 'csv_parse' in cpp_test: - source_files += glob.glob('../../plugins/input/csv/' + '*.cpp') - test_program = test_env_local.Program(name, source=source_files, LINKFLAGS=env['CUSTOM_LDFLAGS']) - Depends(test_program, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME'])) - # build locally if installing - if 'install' in COMMAND_LINE_TARGETS: - env.Alias('install',test_program) +if not env['CPP_TESTS']: + for cpp_test_bin in glob.glob('*-bin'): + os.unlink(cpp_test_bin) +else: + test_env['LIBS'] = copy(env['LIBMAPNIK_LIBS']) + test_env.AppendUnique(LIBS='mapnik') + test_env.AppendUnique(LIBS='sqlite3') + test_env.AppendUnique(CXXFLAGS='-g') + test_env['CXXFLAGS'] = copy(test_env['LIBMAPNIK_CXXFLAGS']) + if test_env['HAS_CAIRO']: + test_env.PrependUnique(CPPPATH=test_env['CAIRO_CPPPATHS']) + test_env.Append(CPPDEFINES = '-DHAVE_CAIRO') + for cpp_test in glob.glob('*_test.cpp'): + name = cpp_test.replace('.cpp','-bin') + source_files = [cpp_test] + test_program = None + # enable for faster compile while developing just this test + #if 'agg_blend_src_over_test' in cpp_test: + if False: + # customization here for faster compile + agg_env = Environment(ENV=os.environ) + agg_env['CXX'] = env['CXX'] + agg_env['CXXFLAGS'] = env['CXXFLAGS'] + if 'agg' in test_env['LIBS']: + agg_env.AppendUnique(LIBS='agg') + agg_env.Append(CPPPATH = '#deps/agg/include') + agg_env.Append(LIBPATH = '#deps/agg') + agg_env['CPPPATH'] = ['#deps/agg/include',env['BOOST_INCLUDES']] + test_program = agg_env.Program(name, source=source_files, LINKFLAGS=env['CUSTOM_LDFLAGS']) + else: + test_env_local = test_env.Clone() + if 'csv_parse' in cpp_test: + source_files += glob.glob('../../plugins/input/csv/' + '*.cpp') + test_program = test_env_local.Program(name, source=source_files, LINKFLAGS=env['CUSTOM_LDFLAGS']) + Depends(test_program, env.subst('../../src/%s' % env['MAPNIK_LIB_NAME'])) + # build locally if installing + if 'install' in COMMAND_LINE_TARGETS: + env.Alias('install',test_program) diff --git a/tests/cpp_tests/clipping_test.cpp b/tests/cpp_tests/clipping_test.cpp index 457cacfec..655c0c4d2 100644 --- a/tests/cpp_tests/clipping_test.cpp +++ b/tests/cpp_tests/clipping_test.cpp @@ -76,8 +76,15 @@ void parse_geom(mapnik::geometry_type & geom, } } -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/conversions_test.cpp b/tests/cpp_tests/conversions_test.cpp index 023d7f703..3be55b73d 100644 --- a/tests/cpp_tests/conversions_test.cpp +++ b/tests/cpp_tests/conversions_test.cpp @@ -3,9 +3,17 @@ #include #include #include +#include -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/csv_parse_test.cpp b/tests/cpp_tests/csv_parse_test.cpp index edd0835d9..cf4aa22db 100644 --- a/tests/cpp_tests/csv_parse_test.cpp +++ b/tests/cpp_tests/csv_parse_test.cpp @@ -3,10 +3,17 @@ #include #include "plugins/input/csv/csv_datasource.hpp" #include +#include - -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/data/cases.txt b/tests/cpp_tests/data/cases.txt index d161516d2..6ba17a96d 100644 --- a/tests/cpp_tests/data/cases.txt +++ b/tests/cpp_tests/data/cases.txt @@ -3,5 +3,7 @@ # SEG_END=0 SEG_MOVETO = 1 SEG_LINETO = 2 SEG_CLOSE = (0x40 | 0x0f) 50,50,150,150;0 0 1,200 200 2;50 50 1,150 150 2 50,50,150,150;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2 +# points are dropped by line clipper +50,50,150,150;75 75 1; # TODO - should the close path be kept after clipping? # 50,50,150,150;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2,0 0 79;50 50 1,150 50 2,150 150 2,50 150 2,50 50 2 diff --git a/tests/cpp_tests/exceptions_test.cpp b/tests/cpp_tests/exceptions_test.cpp index 2841a43ee..c56aae050 100644 --- a/tests/cpp_tests/exceptions_test.cpp +++ b/tests/cpp_tests/exceptions_test.cpp @@ -19,13 +19,21 @@ #include #include #include +#include extern "C" { #include } -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/font_registration_test.cpp b/tests/cpp_tests/font_registration_test.cpp index 41908c21d..6c7ac84fe 100644 --- a/tests/cpp_tests/font_registration_test.cpp +++ b/tests/cpp_tests/font_registration_test.cpp @@ -7,9 +7,17 @@ namespace sys = boost::system; #include #include #include +#include -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/fontset_runtime_test.cpp b/tests/cpp_tests/fontset_runtime_test.cpp index ca587620e..e7599e8ec 100644 --- a/tests/cpp_tests/fontset_runtime_test.cpp +++ b/tests/cpp_tests/fontset_runtime_test.cpp @@ -17,10 +17,18 @@ #include #include #include +#include -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i(); @@ -61,7 +69,8 @@ int main( int, char*[] ) BOOST_TEST_EQ(std::string(ex.what()),std::string("No valid font face could be loaded for font set: 'fontset'")); } if (!::boost::detail::test_errors()) { - std::clog << "C++ fontset runtime: \x1b[1;32m✓ \x1b[0m\n"; + if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; + else std::clog << "C++ fontset runtime: \x1b[1;32m✓ \x1b[0m\n"; #if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/geometry_converters_test.cpp b/tests/cpp_tests/geometry_converters_test.cpp index fbf60a5c0..3ba82c85d 100644 --- a/tests/cpp_tests/geometry_converters_test.cpp +++ b/tests/cpp_tests/geometry_converters_test.cpp @@ -17,6 +17,7 @@ #include #include +#include struct output_geometry_backend { @@ -122,8 +123,15 @@ boost::optional polygon_bbox_clipping(mapnik::box2d bbox, return boost::optional(); } -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/image_io_test.cpp b/tests/cpp_tests/image_io_test.cpp index ea51b1d70..0d3e10be1 100644 --- a/tests/cpp_tests/image_io_test.cpp +++ b/tests/cpp_tests/image_io_test.cpp @@ -8,10 +8,17 @@ namespace sys = boost::system; #include #include #include +#include - -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i type; try @@ -80,7 +87,8 @@ int main( int, char*[] ) } if (!::boost::detail::test_errors()) { - std::clog << "C++ image i/o: \x1b[1;32m✓ \x1b[0m\n"; + if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; + else std::clog << "C++ image i/o: \x1b[1;32m✓ \x1b[0m\n"; #if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/label_algo_test.cpp b/tests/cpp_tests/label_algo_test.cpp index e2d36328b..abd6b604c 100644 --- a/tests/cpp_tests/label_algo_test.cpp +++ b/tests/cpp_tests/label_algo_test.cpp @@ -3,10 +3,18 @@ #include #include #include +#include -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/map_request_test.cpp b/tests/cpp_tests/map_request_test.cpp index d14474750..6bf777514 100644 --- a/tests/cpp_tests/map_request_test.cpp +++ b/tests/cpp_tests/map_request_test.cpp @@ -18,6 +18,7 @@ #include #include #include +#include bool compare_images(std::string const& src_fn,std::string const& dest_fn) { @@ -56,8 +57,15 @@ bool compare_images(std::string const& src_fn,std::string const& dest_fn) return true; } -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/params_test.cpp b/tests/cpp_tests/params_test.cpp index fe2e717dd..a262d9005 100644 --- a/tests/cpp_tests/params_test.cpp +++ b/tests/cpp_tests/params_test.cpp @@ -4,11 +4,17 @@ #include #include #include - +#include #include -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i("null")/* && *params.get("null") == mapnik::value_null()*/) ); if (!::boost::detail::test_errors()) { - std::clog << "C++ parameters: \x1b[1;32m✓ \x1b[0m\n"; + if (quiet) std::clog << "\x1b[1;32m.\x1b[0m"; + else std::clog << "C++ parameters: \x1b[1;32m✓ \x1b[0m\n"; #if BOOST_VERSION >= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/cpp_tests/support/map-request-marker-text-line-expected-cairo.png b/tests/cpp_tests/support/map-request-marker-text-line-expected-cairo.png index b09606829..cb8e47826 100644 Binary files a/tests/cpp_tests/support/map-request-marker-text-line-expected-cairo.png and b/tests/cpp_tests/support/map-request-marker-text-line-expected-cairo.png differ diff --git a/tests/cpp_tests/wkb_formats_test.cpp b/tests/cpp_tests/wkb_formats_test.cpp index e1dd8402f..10715ec3f 100644 --- a/tests/cpp_tests/wkb_formats_test.cpp +++ b/tests/cpp_tests/wkb_formats_test.cpp @@ -5,10 +5,18 @@ #include #include #include +#include -int main( int, char*[] ) +int main(int argc, char** argv) { + std::vector args; + for (int i=1;i= 104600 ::boost::detail::report_errors_remind().called_report_errors_function = true; #endif diff --git a/tests/data/good_maps/line_symbolizer.xml b/tests/data/good_maps/line_symbolizer.xml index d58791861..7a4944aea 100644 --- a/tests/data/good_maps/line_symbolizer.xml +++ b/tests/data/good_maps/line_symbolizer.xml @@ -6,7 +6,7 @@ - + diff --git a/tests/data/pngsuite/xcsn0g01.png b/tests/data/pngsuite/xcsn0g01.png deleted file mode 100644 index 9863a262c..000000000 Binary files a/tests/data/pngsuite/xcsn0g01.png and /dev/null differ diff --git a/tests/data/pngsuite/xhdn0g08.png b/tests/data/pngsuite/xhdn0g08.png deleted file mode 100644 index fcb8737fa..000000000 Binary files a/tests/data/pngsuite/xhdn0g08.png and /dev/null differ diff --git a/demo/data/test/charplacement.dbf b/tests/data/shp/charplacement.dbf similarity index 100% rename from demo/data/test/charplacement.dbf rename to tests/data/shp/charplacement.dbf diff --git a/demo/data/test/charplacement.shp b/tests/data/shp/charplacement.shp similarity index 100% rename from demo/data/test/charplacement.shp rename to tests/data/shp/charplacement.shp diff --git a/demo/data/test/charplacement.shx b/tests/data/shp/charplacement.shx similarity index 100% rename from demo/data/test/charplacement.shx rename to tests/data/shp/charplacement.shx diff --git a/demo/data/test/displacement.dbf b/tests/data/shp/displacement.dbf similarity index 100% rename from demo/data/test/displacement.dbf rename to tests/data/shp/displacement.dbf diff --git a/demo/data/test/displacement.shp b/tests/data/shp/displacement.shp similarity index 100% rename from demo/data/test/displacement.shp rename to tests/data/shp/displacement.shp diff --git a/demo/data/test/displacement.shx b/tests/data/shp/displacement.shx similarity index 100% rename from demo/data/test/displacement.shx rename to tests/data/shp/displacement.shx diff --git a/demo/data/test/overlap.dbf b/tests/data/shp/overlap.dbf similarity index 100% rename from demo/data/test/overlap.dbf rename to tests/data/shp/overlap.dbf diff --git a/demo/data/test/overlap.shp b/tests/data/shp/overlap.shp similarity index 100% rename from demo/data/test/overlap.shp rename to tests/data/shp/overlap.shp diff --git a/demo/data/test/overlap.shx b/tests/data/shp/overlap.shx similarity index 100% rename from demo/data/test/overlap.shx rename to tests/data/shp/overlap.shx diff --git a/demo/data/test/textspacing.dbf b/tests/data/shp/textspacing.dbf similarity index 100% rename from demo/data/test/textspacing.dbf rename to tests/data/shp/textspacing.dbf diff --git a/demo/data/test/textspacing.shp b/tests/data/shp/textspacing.shp similarity index 100% rename from demo/data/test/textspacing.shp rename to tests/data/shp/textspacing.shp diff --git a/demo/data/test/textspacing.shx b/tests/data/shp/textspacing.shx similarity index 100% rename from demo/data/test/textspacing.shx rename to tests/data/shp/textspacing.shx diff --git a/tests/python_tests/box2d_test.py b/tests/python_tests/box2d_test.py index ef7a2f95b..8fa9b20b5 100644 --- a/tests/python_tests/box2d_test.py +++ b/tests/python_tests/box2d_test.py @@ -100,8 +100,34 @@ def test_envelope_static_init(): eq_(c.y, 150) def test_envelope_multiplication(): + # no width then no impact of multiplication + a = mapnik.Box2d(100, 100, 100, 100) + a *= 5 + eq_(a.minx,100) + eq_(a.miny,100) + eq_(a.maxx,100) + eq_(a.maxy,100) + + a = mapnik.Box2d(100.0, 100.0, 100.0, 100.0) + a *= 5 + eq_(a.minx,100) + eq_(a.miny,100) + eq_(a.maxx,100) + eq_(a.maxy,100) + + a = mapnik.Box2d(100.0, 100.0, 100.001, 100.001) + a *= 5 + assert_almost_equal(a.minx, 99.9979, places=3) + assert_almost_equal(a.miny, 99.9979, places=3) + assert_almost_equal(a.maxx, 100.0030, places=3) + assert_almost_equal(a.maxy, 100.0030, places=3) + e = mapnik.Box2d(100, 100, 200, 200) e *= 2 + eq_(e.minx,50) + eq_(e.miny,50) + eq_(e.maxx,250) + eq_(e.maxy,250) assert_true(e.contains(50, 50)) assert_true(e.contains(50, 250)) @@ -148,5 +174,4 @@ def test_envelope_clipping(): eq_(e1,e2) if __name__ == "__main__": - setup() [eval(run)() for run in dir() if 'test_' in run] diff --git a/tests/python_tests/images/support/char_placement.png b/tests/python_tests/images/support/char_placement.png new file mode 100644 index 000000000..7abcb6f20 Binary files /dev/null and b/tests/python_tests/images/support/char_placement.png differ diff --git a/tests/python_tests/images/support/displacement.png b/tests/python_tests/images/support/displacement.png new file mode 100644 index 000000000..644aeb6a5 Binary files /dev/null and b/tests/python_tests/images/support/displacement.png differ diff --git a/tests/python_tests/images/support/overlap.png b/tests/python_tests/images/support/overlap.png new file mode 100644 index 000000000..56abfbaa4 Binary files /dev/null and b/tests/python_tests/images/support/overlap.png differ diff --git a/tests/python_tests/images/support/spacing.png b/tests/python_tests/images/support/spacing.png new file mode 100644 index 000000000..8d6bb4026 Binary files /dev/null and b/tests/python_tests/images/support/spacing.png differ diff --git a/tests/python_tests/layer_buffer_size_test.py b/tests/python_tests/layer_buffer_size_test.py index 5d3a9c06c..4e7e76ab4 100644 --- a/tests/python_tests/layer_buffer_size_test.py +++ b/tests/python_tests/layer_buffer_size_test.py @@ -9,23 +9,25 @@ def setup(): # from another directory we need to chdir() os.chdir(execution_path('.')) -# the negative buffer on the layer should -# override the postive map buffer leading -# only one point to be rendered in the map -def test_layer_buffer_size_1(): - m = mapnik.Map(512,512) - eq_(m.buffer_size,0) - mapnik.load_map(m,'../data/good_maps/layer_buffer_size_reduction.xml') - eq_(m.buffer_size,256) - eq_(m.layers[0].buffer_size,-150) - m.zoom_all() - im = mapnik.Image(m.width,m.height) - mapnik.render(m,im) - actual = '/tmp/mapnik-layer-buffer-size.png' - expected = 'images/support/mapnik-layer-buffer-size.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 'sqlite' in mapnik.DatasourceCache.plugin_names(): + + # the negative buffer on the layer should + # override the postive map buffer leading + # only one point to be rendered in the map + def test_layer_buffer_size_1(): + m = mapnik.Map(512,512) + eq_(m.buffer_size,0) + mapnik.load_map(m,'../data/good_maps/layer_buffer_size_reduction.xml') + eq_(m.buffer_size,256) + eq_(m.layers[0].buffer_size,-150) + m.zoom_all() + im = mapnik.Image(m.width,m.height) + mapnik.render(m,im) + actual = '/tmp/mapnik-layer-buffer-size.png' + expected = 'images/support/mapnik-layer-buffer-size.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__": diff --git a/tests/python_tests/object_test.py b/tests/python_tests/object_test.py index 0a83ddc95..c18d07e8a 100644 --- a/tests/python_tests/object_test.py +++ b/tests/python_tests/object_test.py @@ -14,6 +14,10 @@ def setup(): # from another directory we need to chdir() os.chdir(execution_path('.')) +def test_debug_symbolizer(): + s = mapnik.DebugSymbolizer() + eq_(s.mode,mapnik.debug_symbolizer_mode.collision) + def test_raster_symbolizer(): s = mapnik.RasterSymbolizer() eq_(s.comp_op,mapnik.CompositeOp.src_over) # note: mode is deprecated diff --git a/tests/python_tests/ogr_test.py b/tests/python_tests/ogr_test.py index baf982bd7..4a0acc659 100644 --- a/tests/python_tests/ogr_test.py +++ b/tests/python_tests/ogr_test.py @@ -30,7 +30,7 @@ if 'ogr' in mapnik.DatasourceCache.plugin_names(): # See SHAPE_ENCODING for overriding: http://gdal.org/ogr/drv_shapefile.html # So: failure for the NOM_FR field is expected for older gdal ds = mapnik.Ogr(file='../../demo/data/boundaries.shp',layer_by_index=0) - f = ds.features_at_point(ds.envelope().center()).features[0] + f = ds.features_at_point(ds.envelope().center(), 0.001).features[0] eq_(ds.geometry_type(),mapnik.DataGeometryType.Polygon) eq_(f['CGNS_FID'], u'6f733341ba2011d892e2080020a0f4c9') diff --git a/tests/python_tests/palette_test.py b/tests/python_tests/palette_test.py index caa50d604..45cb358b0 100644 --- a/tests/python_tests/palette_test.py +++ b/tests/python_tests/palette_test.py @@ -27,22 +27,24 @@ def test_reading_palettes(): palette = mapnik.Palette('\xff\x00\xff\xff\xff\xff', 'rgb') eq_(palette.to_string(),expected_rgb); -def test_render_with_palette(): - m = mapnik.Map(600,400) - mapnik.load_map(m,'../data/good_maps/agg_poly_gamma_map.xml') - m.zoom_all() - im = mapnik.Image(m.width,m.height) - mapnik.render(m,im) - act = open('../data/palettes/palette256.act','rb') - palette = mapnik.Palette(act.read(),'act') - # test saving directly to filesystem - im.save('/tmp/mapnik-palette-test.png','png',palette) - # test saving to a string - open('/tmp/mapnik-palette-test2.png','wb').write(im.tostring('png',palette)); - # compare the two methods - eq_(mapnik.Image.open('/tmp/mapnik-palette-test.png').tostring(),mapnik.Image.open('/tmp/mapnik-palette-test2.png').tostring(),'%s not eq to %s' % ('/tmp/mapnik-palette-test.png','/tmp/mapnik-palette-test2.png')) - # compare to expected - eq_(mapnik.Image.open('/tmp/mapnik-palette-test.png').tostring(),mapnik.Image.open('./images/support/mapnik-palette-test.png').tostring(),'%s not eq to %s' % ('/tmp/mapnik-palette-test.png','./images/support/mapnik-palette-test.png')) +if 'shape' in mapnik.DatasourceCache.plugin_names(): + + def test_render_with_palette(): + m = mapnik.Map(600,400) + mapnik.load_map(m,'../data/good_maps/agg_poly_gamma_map.xml') + m.zoom_all() + im = mapnik.Image(m.width,m.height) + mapnik.render(m,im) + act = open('../data/palettes/palette256.act','rb') + palette = mapnik.Palette(act.read(),'act') + # test saving directly to filesystem + im.save('/tmp/mapnik-palette-test.png','png',palette) + # test saving to a string + open('/tmp/mapnik-palette-test2.png','wb').write(im.tostring('png',palette)); + # compare the two methods + eq_(mapnik.Image.open('/tmp/mapnik-palette-test.png').tostring(),mapnik.Image.open('/tmp/mapnik-palette-test2.png').tostring(),'%s not eq to %s' % ('/tmp/mapnik-palette-test.png','/tmp/mapnik-palette-test2.png')) + # compare to expected + eq_(mapnik.Image.open('/tmp/mapnik-palette-test.png').tostring(),mapnik.Image.open('./images/support/mapnik-palette-test.png').tostring(),'%s not eq to %s' % ('/tmp/mapnik-palette-test.png','./images/support/mapnik-palette-test.png')) if __name__ == "__main__": setup() diff --git a/tests/python_tests/png_encoding_test.py b/tests/python_tests/png_encoding_test.py index fc571ba28..1cded9073 100644 --- a/tests/python_tests/png_encoding_test.py +++ b/tests/python_tests/png_encoding_test.py @@ -131,6 +131,7 @@ def test_transparency_levels_aerial(): im_in = mapnik.Image.open('./images/support/transparency/aerial_rgb.png') eq_(len(im.tostring('png')),len(im_in.tostring('png'))) eq_(len(im.tostring('png:t=0')),len(im_in.tostring('png:t=0'))) + eq_(len(im.tostring('png:t=0')) == len(im_in.tostring('png')), False) if __name__ == "__main__": diff --git a/tests/python_tests/postgis_test.py b/tests/python_tests/postgis_test.py index 8e7bda160..4c3c75f4e 100644 --- a/tests/python_tests/postgis_test.py +++ b/tests/python_tests/postgis_test.py @@ -472,10 +472,15 @@ if 'postgis' in mapnik.DatasourceCache.plugin_names() \ def create_ds(): ds = mapnik.PostGIS(dbname=MAPNIK_TEST_DBNAME, table='test', - max_size=20) + max_size=20, + geometry_field='geom') fs = ds.all_features() def test_threaded_create(NUM_THREADS=100): + # run one to start before thread loop + # to ensure that a throw stops the test + # from running all threads + create_ds() for i in range(NUM_THREADS): t = threading.Thread(target=create_ds) t.start() @@ -497,7 +502,8 @@ if 'postgis' in mapnik.DatasourceCache.plugin_names() \ def test_that_64bit_int_fields_work(): ds = mapnik.PostGIS(dbname=MAPNIK_TEST_DBNAME, - table='test8') + table='test8', + geometry_field='geom') eq_(len(ds.fields()),2) eq_(ds.fields(),['gid','int_field']) eq_(ds.field_types(),['int','int']) diff --git a/tests/python_tests/render_test.py b/tests/python_tests/render_test.py index 0490dafa6..cf8e577a8 100644 --- a/tests/python_tests/render_test.py +++ b/tests/python_tests/render_test.py @@ -173,22 +173,24 @@ def test_render_with_scale_factor_zero_throws(): im = mapnik.Image(256, 256) mapnik.render(m,im,0.0) -def test_render_with_scale_factor(): - m = mapnik.Map(256,256) - mapnik.load_map(m,'../data/good_maps/marker-text-line.xml') - m.zoom_all() - sizes = [.00001,.005,.1,.899,1,1.5,2,5,10,100] - for size in sizes: - im = mapnik.Image(256, 256) - mapnik.render(m,im,size) - expected_file = './images/support/marker-text-line-scale-factor-%s.png' % size - actual_file = '/tmp/' + os.path.basename(expected_file) - im.save(actual_file,'png8') - #im.save(expected_file,'png8') - # we save and re-open here so both png8 images are ready as full color png - actual = mapnik.Image.open(expected_file) - expected = mapnik.Image.open(expected_file) - eq_(actual.tostring(),expected.tostring(), 'failed comparing actual (%s) and expected (%s)' % (actual_file,expected_file)) +if 'shape' in mapnik.DatasourceCache.plugin_names(): + + def test_render_with_scale_factor(): + m = mapnik.Map(256,256) + mapnik.load_map(m,'../data/good_maps/marker-text-line.xml') + m.zoom_all() + sizes = [.00001,.005,.1,.899,1,1.5,2,5,10,100] + for size in sizes: + im = mapnik.Image(256, 256) + mapnik.render(m,im,size) + expected_file = './images/support/marker-text-line-scale-factor-%s.png' % size + actual_file = '/tmp/' + os.path.basename(expected_file) + im.save(actual_file,'png8') + #im.save(expected_file,'png8') + # we save and re-open here so both png8 images are ready as full color png + actual = mapnik.Image.open(expected_file) + expected = mapnik.Image.open(expected_file) + eq_(actual.tostring(),expected.tostring(), 'failed comparing actual (%s) and expected (%s)' % (actual_file,expected_file)) if __name__ == "__main__": setup() diff --git a/tests/visual_tests/data/line-offset.csv b/tests/visual_tests/data/line-offset.csv new file mode 100644 index 000000000..fe557d89f --- /dev/null +++ b/tests/visual_tests/data/line-offset.csv @@ -0,0 +1,9 @@ +wkt,name,nr,ref +"LineString(-5.177724 50.191914,-5.177742 50.191769,-5.17773 50.191624,-5.177689 50.191481,-5.177619 50.191343,-5.177522 50.191212,-5.177398 50.19109,-5.177251 50.190979,-5.177082 50.190882,-5.176895 50.190799,-5.176693 50.190733,-5.176479 50.190685,-5.176257 50.190654,-5.176031 50.190643,-5.175804 50.19065,-5.175581 50.190677,-5.175365 50.190722,-5.17516 50.190784,-5.17497 50.190863,-5.174797 50.190957,-5.174645 50.191065,-5.174516 50.191185,-5.174413 50.191314,-5.174337 50.191451,-5.17429 50.191594,-5.174272 50.191738,-5.174283 50.191884,-5.174324 50.192026,-5.174394 50.192165,-5.174492 50.192296,-5.174615 50.192418,-5.174763 50.192529,-5.174931 50.192626,-5.175118 50.192708,-5.17532 50.192774,-5.175534 50.192823,-5.175756 50.192853,-5.175983 50.192865,-5.176209 50.192857,-5.176433 50.192831,-5.176649 50.192786,-5.176854 50.192724,-5.177044 50.192645,-5.177217 50.19255,-5.177369 50.192442,-5.177498 50.192323,-5.177601 50.192193,-5.177677 50.192056,-5.177724 50.191914)","",,4 +"LineString(-5.182328 50.19193,-5.182346 50.191785,-5.182334 50.19164,-5.182293 50.191497,-5.182223 50.191358,-5.182125 50.191227,-5.182002 50.191105,-5.181854 50.190995,-5.181686 50.190897,-5.181499 50.190815,-5.181297 50.190749,-5.181083 50.1907,-5.180861 50.19067,-5.180634 50.190658,-5.180408 50.190666,-5.180184 50.190692,-5.179968 50.190737,-5.179763 50.190799,-5.179573 50.190878,-5.1794 50.190973,-5.179248 50.191081,-5.179119 50.1912,-5.179016 50.19133,-5.17894 50.191467,-5.178893 50.191609,-5.178875 50.191754,-5.178887 50.191899,-5.178928 50.192042,-5.178998 50.19218,-5.179095 50.192311,-5.179219 50.192433,-5.179366 50.192544,-5.179535 50.192641,-5.179722 50.192724,-5.179924 50.19279,-5.180138 50.192838,-5.18036 50.192869,-5.180586 50.19288,-5.180813 50.192873,-5.181036 50.192846,-5.181252 50.192802,-5.181457 50.192739,-5.181648 50.19266,-5.18182 50.192566,-5.181972 50.192458,-5.182101 50.192338,-5.182204 50.192209,-5.18228 50.192072,-5.182328 50.19193)","",,3 +"LineString(-5.187052 50.191945,-5.187004 50.192087,-5.186928 50.192224,-5.186825 50.192354,-5.186696 50.192473,-5.186544 50.192581,-5.186371 50.192675,-5.186181 50.192755,-5.185976 50.192817,-5.18576 50.192862,-5.185537 50.192888,-5.18531 50.192896,-5.185084 50.192884,-5.184862 50.192854,-5.184648 50.192805,-5.184446 50.192739,-5.184259 50.192657,-5.18409 50.192559,-5.183943 50.192449,-5.183819 50.192327,-5.183722 50.192196,-5.183652 50.192057,-5.183611 50.191914,-5.183599 50.191769,-5.183617 50.191624,-5.183664 50.191482,-5.18374 50.191345,-5.183843 50.191216,-5.183972 50.191096,-5.184124 50.190988,-5.184297 50.190894,-5.184487 50.190815,-5.184692 50.190752,-5.184908 50.190708,-5.185132 50.190681,-5.185358 50.190674,-5.185585 50.190685,-5.185807 50.190716,-5.186021 50.190764,-5.186223 50.19083,-5.18641 50.190913,-5.186578 50.19101,-5.186726 50.191121,-5.186849 50.191243,-5.186947 50.191374,-5.187017 50.191512,-5.187058 50.191655,-5.18707 50.1918,-5.187052 50.191945)","",,2 +"LineString(-5.191775 50.191899,-5.191728 50.192041,-5.191652 50.192178,-5.191549 50.192307,-5.19142 50.192427,-5.191268 50.192535,-5.191095 50.192629,-5.190905 50.192708,-5.1907 50.192771,-5.190484 50.192816,-5.190261 50.192842,-5.190034 50.192849,-5.189808 50.192838,-5.189586 50.192808,-5.189372 50.192759,-5.18917 50.192693,-5.188983 50.19261,-5.188814 50.192513,-5.188667 50.192402,-5.188543 50.192281,-5.188446 50.192149,-5.188376 50.192011,-5.188334 50.191868,-5.188323 50.191723,-5.188341 50.191578,-5.188388 50.191436,-5.188464 50.191299,-5.188567 50.19117,-5.188696 50.19105,-5.188848 50.190942,-5.189021 50.190848,-5.189211 50.190769,-5.189416 50.190706,-5.189632 50.190661,-5.189856 50.190635,-5.190082 50.190627,-5.190309 50.190639,-5.190531 50.190669,-5.190744 50.190718,-5.190947 50.190784,-5.191134 50.190866,-5.191302 50.190964,-5.19145 50.191074,-5.191573 50.191196,-5.191671 50.191328,-5.191741 50.191466,-5.191782 50.191609,-5.191793 50.191754,-5.191775 50.191899)","",,1 +"LineString(-5.177742 50.191769,-5.174272 50.191738)","CCW, dy > 0",, +"LineString(-5.182346 50.191785,-5.178875 50.191754)","CCW, dy < 0",, +"LineString(-5.18707 50.1918,-5.183599 50.191769)","CW, dy > 0",, +"LineString(-5.191793 50.191754,-5.188323 50.191723)","CW, dy < 0",, \ No newline at end of file diff --git a/tests/visual_tests/data/line-offset.osm b/tests/visual_tests/data/line-offset.osm deleted file mode 100644 index 9a568dc30..000000000 --- a/tests/visual_tests/data/line-offset.osm +++ /dev/null @@ -1,435 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/tests/visual_tests/data/lines.csv b/tests/visual_tests/data/lines.csv new file mode 100644 index 000000000..f67763eba --- /dev/null +++ b/tests/visual_tests/data/lines.csv @@ -0,0 +1,10 @@ +wkt,name,nr +"LineString(0.194483 -0.117354,0.23691 -0.137246,0.252846 -0.181313,0.232953 -0.223741,0.188886 -0.239676,0.146458 -0.219784,0.130523 -0.175717,0.150415 -0.133289,0.194483 -0.117354)","Circle",6 +"LineString(0.747335 -0.107159,0.789763 -0.127051,0.805698 -0.171118,0.785806 -0.213546,0.741739 -0.229481,0.699311 -0.209589,0.683376 -0.165522,0.703268 -0.123094,0.747335 -0.107159)","Circle with long name",7 +"LineString(0.346487 -0.240215,0.535306 -0.240215)","Short line with long name",5 +"LineString(0.347059 -0.122112,0.535878 -0.122112)","Short line",4 +"LineString(0 0,0.9 0)","Rendered @ integer pos. ABCDEFGHIJKLMNOPQRSTUVWXYZ",3 +"LineString(0.002268 0.073178,0.902268 0.073178)","Long line with long name",2 +"LineString(0.003411 0.172529,0.103411 0.172529,0.203411 0.172529,0.303411 0.172529,0.403411 0.172529,0.503411 0.172529,0.603411 0.172529,0.703411 0.172529,0.803411 0.172529,0.903411 0.172529)","Long line with long name and many points",1 +"LineString(0.002841 0.250458,0.902841 0.250458)","Short name",8 +"LineString(0 -0.051,0.9 -0.051)","Rendered @ non-integer p. ABCDEFGHIJKLMNOPQRSTUVWXYZ",9 diff --git a/tests/visual_tests/data/lines.osm b/tests/visual_tests/data/lines.osm deleted file mode 100644 index e04b6fb14..000000000 --- a/tests/visual_tests/data/lines.osm +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/visual_tests/data/points.csv b/tests/visual_tests/data/points.csv new file mode 100644 index 000000000..f895b612f --- /dev/null +++ b/tests/visual_tests/data/points.csv @@ -0,0 +1,11 @@ +lat,long,name,nr +0,0,Test one,1 +0,0.1,Test two,2 +0,0.2,Test three,3 +0,0.3,Test four,4 +0,0.4,Test five,5 +0,0.5,Test six,6 +0,0.6,Test seven,7 +0,0.7,Test eight,8 +0,0.8,Test nine,9 +0,0.9,Test ten,10 \ No newline at end of file diff --git a/tests/visual_tests/data/points.osm b/tests/visual_tests/data/points.osm deleted file mode 100644 index 086f0a479..000000000 --- a/tests/visual_tests/data/points.osm +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/tests/visual_tests/grids/expressionformat-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/expressionformat-500-100-1.0-grid-reference.json index dfe52da9e..c5fce6529 100644 --- a/tests/visual_tests/grids/expressionformat-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/expressionformat-500-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-2", - "-3", - "-4", - "-5", - "-6", - "-7", - "-8", - "-9", - "-10" + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/formatting-1-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/formatting-1-500-100-1.0-grid-reference.json index 087556523..2725f745d 100644 --- a/tests/visual_tests/grids/formatting-1-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/formatting-1-500-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-2", - "-3", - "-4", - "-5", - "-6", - "-7", - "-8", - "-9", - "-10" + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/formatting-2-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/formatting-2-500-100-1.0-grid-reference.json index 087556523..2725f745d 100644 --- a/tests/visual_tests/grids/formatting-2-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/formatting-2-500-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-2", - "-3", - "-4", - "-5", - "-6", - "-7", - "-8", - "-9", - "-10" + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/formatting-3-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/formatting-3-500-100-1.0-grid-reference.json index 748a69aa6..ef9f0089b 100644 --- a/tests/visual_tests/grids/formatting-3-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/formatting-3-500-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-2", - "-3", - "-4", - "-5", - "-6", - "-7", - "-8", - "-9", - "-10" + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/formatting-4-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/formatting-4-500-100-1.0-grid-reference.json index db8079a13..8bddd0118 100644 --- a/tests/visual_tests/grids/formatting-4-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/formatting-4-500-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-2", - "-3", - "-4", - "-5", - "-6", - "-7", - "-8", - "-9", - "-10" + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/jalign-auto-200-200-1.0-grid-reference.json b/tests/visual_tests/grids/jalign-auto-200-200-1.0-grid-reference.json index 77a9a0ad3..0a2e7e41a 100644 --- a/tests/visual_tests/grids/jalign-auto-200-200-1.0-grid-reference.json +++ b/tests/visual_tests/grids/jalign-auto-200-200-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/line-offset-900-250-1.0-grid-reference.json b/tests/visual_tests/grids/line-offset-900-250-1.0-grid-reference.json index c0742a097..db3484bdf 100644 --- a/tests/visual_tests/grids/line-offset-900-250-1.0-grid-reference.json +++ b/tests/visual_tests/grids/line-offset-900-250-1.0-grid-reference.json @@ -1,14 +1,14 @@ { "keys": [ "", - "-350", - "-400", - "-461", - "-302", - "-112", - "-115", - "-117", - "-118" + "3", + "2", + "1", + "4", + "8", + "7", + "6", + "5" ], "data": {}, "grid": [ @@ -40,14 +40,14 @@ " % %%%%%%%%%% %%%%%%%% %% !!!! ! !!! #### # ### $ $$$$$$$$$ $$$$$$$ $$ $ ", " % %%%%%%%%%%%%%%%%%% %% % !!! ! ! #### # # $ $$$$$$$$$$ $ $$$$$$$$$ $ ", " % %%% %%% %%% %%% % !!!!! ! ! ##### # # $$$$$ $$$$$$$ $ ", - " % %%%% %%%%% % !!!!! !!!!! ### # ### $ $$$$ $ ", + " % %%%% %%%%% !!!!! !!!!! ### # ### $ $$$$ $ ", " %%%%% %%%%% % !! !!!!! #### ##### $ $$$$ $ ", " % %%%% %%% % ! ! !!! # ### $ $$$ $ ", " %%%% % % % !!!! # ## $$$ $$$ $ ", " %%%%% %%% ! !! # ## $$$ $ $$ ", " %%%% &&&& & && %%% ''''' '''' '''''''' !!!!! # (((((( (((( ((( ### $$$$ )))))) )) ) )) $$$$$ ", " % % &&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ! !! '''''''' '''' ! ! # (((((((((( (((( # $$ $ )))))))))) ))))))))))))))) ", - " % &&&&&&&& &&& %%%% !!!! ' ' ! !!! #### ( ( # ### $$$ ))))))))) ) $$ $ ", + " % &&&&&&&& &&& %%%% !!!! ' ! !!! #### ( ( # ### $$$ ))))))))) ) $$ $ ", " % %%%%% !!! !!! #### # ### $$$ $$$ $ ", " %%% % !!! ! ! !!! ## # ### $$$$ $$$ ", " % % % !!! !!!! ### # ### $$$$ $$$$$ ", @@ -56,7 +56,7 @@ " %%%%%%%% % %%%%% % !!!! ! !!!!!! ### # ###### $ $$$$$ $ $$$$$$$$$ ", " % %%%%%%%%%%%%% %%%%%%%%% % !!!!! ! ! !!! ### # # ## ### $ $$$$$$$$$$$$$$$$ $$$$$ $ ", " % %%%%%% %%%%%%%%%%%% % ! !! ! ! ! ## ## # ## ## $$ $$$ $$$$$$$$$$ $ $ ", - " %% %% %%%%%%% %%%% !!!!! !! !!! ! #### ## ## # $$$$$$$$$$$$$$ $$ ", + " %% %% %%%%%%% %%%% !!!!! !!! !!! ! #### ## ## # $ $$$$$$$$$$$$ $$ ", " %%% %%% !!!!!! !!!!!!! !! # ##### ######### ### $$$$$ $$$$$ ", " !!!!! !!! !!!!!!!! ###### ### ######## ", " !! !!!!!!!!!! !!!!!! ## ########## ###### ", diff --git a/tests/visual_tests/grids/lines-1-200-200-1.0-grid-reference.json b/tests/visual_tests/grids/lines-1-200-200-1.0-grid-reference.json index cbab0d249..05e606e8b 100644 --- a/tests/visual_tests/grids/lines-1-200-200-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-1-200-200-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "200", - "206", - "202", - "204" + "8", + "7", + "6", + "5", + "9", + "1", + "4", + "2", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-1-400-400-1.0-grid-reference.json b/tests/visual_tests/grids/lines-1-400-400-1.0-grid-reference.json index 01bba2c59..3859dd6c7 100644 --- a/tests/visual_tests/grids/lines-1-400-400-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-1-400-400-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-1-600-600-1.0-grid-reference.json b/tests/visual_tests/grids/lines-1-600-600-1.0-grid-reference.json index 5d9834d5a..ae13670ff 100644 --- a/tests/visual_tests/grids/lines-1-600-600-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-1-600-600-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-1-800-800-1.0-grid-reference.json b/tests/visual_tests/grids/lines-1-800-800-1.0-grid-reference.json index 8db7d3c07..75c1e0755 100644 --- a/tests/visual_tests/grids/lines-1-800-800-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-1-800-800-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-2-200-200-1.0-grid-reference.json b/tests/visual_tests/grids/lines-2-200-200-1.0-grid-reference.json index 79636ad9b..4b34f29ff 100644 --- a/tests/visual_tests/grids/lines-2-200-200-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-2-200-200-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "200", - "206", - "202", - "204" + "8", + "7", + "6", + "5", + "9", + "1", + "4", + "2", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-2-400-400-1.0-grid-reference.json b/tests/visual_tests/grids/lines-2-400-400-1.0-grid-reference.json index 782c89483..3aa89339a 100644 --- a/tests/visual_tests/grids/lines-2-400-400-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-2-400-400-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-2-600-600-1.0-grid-reference.json b/tests/visual_tests/grids/lines-2-600-600-1.0-grid-reference.json index 7eac49371..6269e3550 100644 --- a/tests/visual_tests/grids/lines-2-600-600-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-2-600-600-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-2-800-800-1.0-grid-reference.json b/tests/visual_tests/grids/lines-2-800-800-1.0-grid-reference.json index 5cfb73770..98a1c1a8c 100644 --- a/tests/visual_tests/grids/lines-2-800-800-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-2-800-800-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-3-200-200-1.0-grid-reference.json b/tests/visual_tests/grids/lines-3-200-200-1.0-grid-reference.json index cbab0d249..05e606e8b 100644 --- a/tests/visual_tests/grids/lines-3-200-200-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-3-200-200-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "200", - "206", - "202", - "204" + "8", + "7", + "6", + "5", + "9", + "1", + "4", + "2", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-3-400-400-1.0-grid-reference.json b/tests/visual_tests/grids/lines-3-400-400-1.0-grid-reference.json index 01bba2c59..3859dd6c7 100644 --- a/tests/visual_tests/grids/lines-3-400-400-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-3-400-400-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-3-600-600-1.0-grid-reference.json b/tests/visual_tests/grids/lines-3-600-600-1.0-grid-reference.json index 11d3e3c47..67b4633c9 100644 --- a/tests/visual_tests/grids/lines-3-600-600-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-3-600-600-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/lines-3-800-800-1.0-grid-reference.json b/tests/visual_tests/grids/lines-3-800-800-1.0-grid-reference.json index 20ded9891..e7bd89e95 100644 --- a/tests/visual_tests/grids/lines-3-800-800-1.0-grid-reference.json +++ b/tests/visual_tests/grids/lines-3-800-800-1.0-grid-reference.json @@ -1,15 +1,15 @@ { "keys": [ "", - "216", - "212", - "210", - "208", - "240", - "202", - "200", - "206", - "204" + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" ], "data": {}, "grid": [ @@ -80,7 +80,7 @@ " #################################################################################################################################################################################### ", " #################################################################################################################################################################################### ", " #################################################################################################################################################################################### ", - " # # # # # # # # ## # # # # # # # # # # # ## # # ", + " # # # # # # # # # ## # # # # # # # # # # # ## # # ", " ", " ", " ", diff --git a/tests/visual_tests/grids/lines-shield-200-200-1.0-grid-reference.json b/tests/visual_tests/grids/lines-shield-200-200-1.0-grid-reference.json new file mode 100644 index 000000000..9fd0cc8c0 --- /dev/null +++ b/tests/visual_tests/grids/lines-shield-200-200-1.0-grid-reference.json @@ -0,0 +1,65 @@ +{ + "keys": [ + "", + "7", + "6", + "5", + "4", + "1", + "2", + "3" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " !! !!! !! !!! !! !!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !! !! !! !! !! !! ", + " ! ! ! ", + " ", + " ", + " ############################################# ", + " ", + " $ $ $ ", + " $$ $$ $$ $$ $$ $$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$ $ $$ $ $$ $ ", + " ", + " ", + " ", + " %% ", + " &&& %%%%%%%%%% ' '' ", + " && & %% '' ' ' ", + " & && '''' ' ", + " & &&&&& '' '' ", + " &&& &&& ' ' ' ", + " & && (( ''' ", + " & (((((((((( ", + " (( ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/lines-shield-400-400-1.0-grid-reference.json b/tests/visual_tests/grids/lines-shield-400-400-1.0-grid-reference.json new file mode 100644 index 000000000..cfac4935e --- /dev/null +++ b/tests/visual_tests/grids/lines-shield-400-400-1.0-grid-reference.json @@ -0,0 +1,117 @@ +{ + "keys": [ + "", + "8", + "7", + "6", + "5", + "9", + "4", + "2", + "1", + "3" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ! ! ! ! ! ! ", + " !! !! !! !! !! !! !! !! !! !! !! !! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!! !! !!! !! !!! !! !!! !! !!! !! !!! !! ", + " ", + " ", + " ", + " ", + " # # # # # # ", + " # ## # ## # ## # ## # ## # ## ", + " # ## # ## # ## # ## # ## # ## ", + " ### # ### # ### # ### # ### # ### # ", + " ", + " ", + " ", + " ", + " ", + " ", + " $ $ $ $ $ $ ", + " $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ ", + " $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ ", + " $$$ $$$ $$$ $$$ $$$ $$$ ", + " ", + " ", + " ", + " % % % % % % ", + " %% %% %% %% %% %% %% %% %% %% %% %% ", + " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", + " % %% % %% % %% % %% % %% % %% ", + " ", + " & & & & & & ", + " & && & && & && & && & && & && ", + " &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ", + " & && & && & && & && & && & && ", + " & & & & & & ", + " ", + " ", + " ", + " '' ' ' (( (((( ( ", + " ))) ))) ''''''''''''''''''' (((( ((( ", + " ))))) ))) '' ' (( ( ", + " )) )) ( ((( ", + " )) ))) ( ( ", + " ( ", + " ) ) ", + " ) ) ( ( ", + " ) (( ", + " ) ) ( (( ", + " )) )) (((( (((( ", + " )))) )))) * (((( (((( ", + " ) ) ) )) ** * ( ", + " ) ) ******************* ", + " ** * ", + " * ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/lines-shield-600-600-1.0-grid-reference.json b/tests/visual_tests/grids/lines-shield-600-600-1.0-grid-reference.json new file mode 100644 index 000000000..a43b5759d --- /dev/null +++ b/tests/visual_tests/grids/lines-shield-600-600-1.0-grid-reference.json @@ -0,0 +1,167 @@ +{ + "keys": [ + "", + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ! !!! ! !!! ! !!! ! !!! ! !!! ! !!! ! !!! ! !!! ! !!! ", + " ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ! ", + " !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! ", + " ! ! ! ! ! ! ! ! ! ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " # # # # # # # # # ", + " # ## # ## # ## # ## # ## # ## # ## # ## # ## ", + " ######################################################################################################################################## ", + " # ## # ## # ## # ## # ## # ## # ## # ## # ## ", + " # # # # # # # # # ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " $ $ $ $ $ $ $ $ $ ", + " $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$ $$$ $$ $$$ $$ $$$ $$ $$$ $$ $$$ $$ $$$ $$ $$$ $$ $$$ $$ $$$ ", + " $ $ $ $ $ $ $ $ $ ", + " ", + " ", + " ", + " ", + " ", + " ", + " % % % % % % % % % ", + " %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% ", + " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", + " %% % %% % %% % %% % %% % %% % %% % %% % %% % ", + " ", + " ", + " ", + " ", + " && & & && & & && & & && & & && & & && & & && & & && & & && & & ", + " && & && & && & && & && & && & && & && & && & ", + " && && && && && && && && && && && && && && && && && && ", + " &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & &&& & & ", + " ", + " ", + " ", + " ", + " ", + " ", + " ' ' '' ' ", + " ( )) ) ))) '' ''' ", + " (( ( (( (( )))))))))))))))))))))))))))) '''' '' ", + " (((( (((( )) )) )) ''' ' ", + " ( ((( ((( ) ) ' ' ", + " ( ( ", + " ( '' ' ", + " ((( ( '''' '' ", + " ( ( ' ' '' ", + " ( (((( ' '' ", + " ((( (( ' ", + " ( ( ' ", + " ( ' ' ", + " ( ''' ", + " ( ( ' '' ", + " (( ( ( ' '''' ", + " ((((( ( ' ' ' ", + " ((( ( ' ' ' '' ", + " ( ( ((( ( * * ''' ", + " (( ( ** ** ** '' ", + " (((( **************************** ", + " ( ( ** ** *** ", + " * * ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/lines-shield-800-800-1.0-grid-reference.json b/tests/visual_tests/grids/lines-shield-800-800-1.0-grid-reference.json new file mode 100644 index 000000000..6ec6c7d12 --- /dev/null +++ b/tests/visual_tests/grids/lines-shield-800-800-1.0-grid-reference.json @@ -0,0 +1,217 @@ +{ + "keys": [ + "", + "8", + "7", + "6", + "5", + "9", + "2", + "1", + "4", + "3" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ! ! ! ! ! ! ! ! ! ! ! ! ", + " !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! !! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! !! ! ! ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " # ### # ### # ### # ### # ### # ### # ### # ### # ### # ### # ### # ### ", + " ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ", + " ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ## # ", + " # # # # # # # # # # # # ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " $$ $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ $ $$ $ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ $$ ", + " $ $ $ $ $ $ $ $ $ $ $ $ ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " % % % % % % % % % % % % ", + " %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% %% ", + " %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% ", + " % %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %% % %% ", + " ", + " ", + " ", + " ", + " ", + " ", + " & & & & & & & & & & & & ", + " & && & && & && & && & && & && & && & && & && & && & && & && ", + " &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&& ", + " && && && && && && && && && && && && && && && && && && && && && && && && ", + " & & & & & & & & & & & & ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ' ", + " '''' ' '' ", + " ( ))) ) ) )) ) ) ) ''' ''''' ", + " ( ( ( ( ) ) ) ) )) ' ' ''' ", + " (((( (((( )) )) )) )) )) ' ' ' ", + " (( ((( (((( ) ) '' ' ", + " ( (( ' ''' ", + " ((( '' ''''' ", + " ( (( ' ' ", + " (( (( ' ' ", + " ( (( ' ", + " ( ' ' ", + " ( ", + " '' '' ", + " ( ( '''' '' ", + " ( '' '''' ", + " (((( (( ' '' ", + " (( (((( '' ", + " (( ' ' ", + " ( ' ' ", + " ( ( ' ' ' ' ", + " ( '''' '' ", + " ((( ( ''' ''''' ", + " (( ((( '' ' ' '' ", + " ((( (((( '''''' ' ", + " ( ( (( (( * * * '''' ", + " ((( ( ** ** ** ** ** '' ", + " (((( ************************************** ", + " ( *** ** ** * ** ", + " * * * ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/list-100-100-1.0-grid-reference.json b/tests/visual_tests/grids/list-100-100-1.0-grid-reference.json index e013c4972..b633480e3 100644 --- a/tests/visual_tests/grids/list-100-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/list-100-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-3", - "-5", - "-7", - "-9", - "-2", - "-4", - "-6", - "-8", - "-10" + "1", + "3", + "5", + "7", + "9", + "2", + "4", + "6", + "8", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/list-150-100-1.0-grid-reference.json b/tests/visual_tests/grids/list-150-100-1.0-grid-reference.json index 9f783721e..aacf5a57b 100644 --- a/tests/visual_tests/grids/list-150-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/list-150-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-4", - "-6", - "-7", - "-8", - "-9", - "-2", - "-1", - "-3", - "-5", - "-10" + "4", + "6", + "7", + "8", + "9", + "2", + "1", + "3", + "5", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/list-250-100-1.0-grid-reference.json b/tests/visual_tests/grids/list-250-100-1.0-grid-reference.json index 3da38a934..3ead5a120 100644 --- a/tests/visual_tests/grids/list-250-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/list-250-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-3", - "-5", - "-7", - "-9", - "-2", - "-4", - "-6", - "-8", - "-10" + "1", + "3", + "5", + "7", + "9", + "2", + "4", + "6", + "8", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/list-300-100-1.0-grid-reference.json b/tests/visual_tests/grids/list-300-100-1.0-grid-reference.json index 3a5b45829..91ac6b3da 100644 --- a/tests/visual_tests/grids/list-300-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/list-300-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-3", - "-5", - "-7", - "-9", - "-2", - "-4", - "-6", - "-8", - "-10" + "1", + "3", + "5", + "7", + "9", + "2", + "4", + "6", + "8", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/list-400-100-1.0-grid-reference.json b/tests/visual_tests/grids/list-400-100-1.0-grid-reference.json index e802ae4f0..ea336f358 100644 --- a/tests/visual_tests/grids/list-400-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/list-400-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-3", - "-5", - "-7", - "-9", - "-10", - "-2", - "-4", - "-6", - "-8" + "1", + "3", + "5", + "7", + "9", + "10", + "2", + "4", + "6", + "8" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/list-600-100-1.0-grid-reference.json b/tests/visual_tests/grids/list-600-100-1.0-grid-reference.json index 5d40ccd6c..a846513de 100644 --- a/tests/visual_tests/grids/list-600-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/list-600-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-2", - "-4", - "-6", - "-8", - "-10", - "-1", - "-3", - "-5", - "-7", - "-9" + "2", + "4", + "6", + "8", + "10", + "1", + "3", + "5", + "7", + "9" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/list-800-100-1.0-grid-reference.json b/tests/visual_tests/grids/list-800-100-1.0-grid-reference.json index b9b246738..692e6adac 100644 --- a/tests/visual_tests/grids/list-800-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/list-800-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-2", - "-3", - "-4", - "-5", - "-6", - "-7", - "-8", - "-9", - "-10" + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/rtl-point-200-200-1.0-grid-reference.json b/tests/visual_tests/grids/rtl-point-200-200-1.0-grid-reference.json index c2292c1d4..aa24b0418 100644 --- a/tests/visual_tests/grids/rtl-point-200-200-1.0-grid-reference.json +++ b/tests/visual_tests/grids/rtl-point-200-200-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shield-on-line-spacing-eq-width-600-400-1.0-grid-reference.json b/tests/visual_tests/grids/shield-on-line-spacing-eq-width-600-400-1.0-grid-reference.json new file mode 100644 index 000000000..25c5fc711 --- /dev/null +++ b/tests/visual_tests/grids/shield-on-line-spacing-eq-width-600-400-1.0-grid-reference.json @@ -0,0 +1,109 @@ +{ + "keys": [ + "", + "1" + ], + "data": {}, + "grid": [ + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " ", + " !", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !!!!! !! ", + " !!!!! !! ", + " !!!!! ", + " !! !!!!! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + " !! ", + "! ", + " ", + " ", + " ", + " " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/shield-on-polygon-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/shield-on-polygon-500-100-1.0-grid-reference.json new file mode 100644 index 000000000..83e2d2aaa --- /dev/null +++ b/tests/visual_tests/grids/shield-on-polygon-500-100-1.0-grid-reference.json @@ -0,0 +1,39 @@ +{ + "keys": [ + "", + "1", + "3", + "2", + "4", + "5", + "6" + ], + "data": {}, + "grid": [ + " ! ", + " !! ", + " !!! ", + " !! # ", + " !!! ", + " !!!! ", + " !!!! !! ", + " !!!!!!!! ", + " !!!!!!!! ", + " !!!!!!!!! ", + " !!!!!!! ", + " !!!! ", + " $$ % !!! ", + " $$$$$!!! ", + " $$$$$$ ! ", + " $$$$$$ ", + " $$$$$$ ", + " $$$$$$ ", + " $$$$$$$$ ", + " $$$$$$$$ ", + " $$$$$$$$$ ", + " $$$$$$$$$ ", + " &$$$$$$$$ ", + " $$$$$$$$ ", + " '' $ " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/shield-on-polygon-600-400-1.0-grid-reference.json b/tests/visual_tests/grids/shield-on-polygon-600-400-1.0-grid-reference.json new file mode 100644 index 000000000..176d251f7 --- /dev/null +++ b/tests/visual_tests/grids/shield-on-polygon-600-400-1.0-grid-reference.json @@ -0,0 +1,115 @@ +{ + "keys": [ + "", + "1", + "3", + "2", + "4", + "7", + "5", + "6" + ], + "data": {}, + "grid": [ + " !!! ", + " !!! ", + " !! ", + " !! ! ", + " !!!!! ", + " !!!!!!!! ", + " !!!!!!!! ! ", + " !!!!!!!!! ", + " !!!!!!!!!! ", + " !!!!!!!!!! ", + " !!!!!!!!! ", + " !!!!!!! ", + " !!!!!!! ", + " !!!!!!! ## ", + " !!!!!!! ## ", + " !!!!!!! ", + " !!!!! ! ", + " !!!!! !! ", + " !!! !!! ", + " !!!!!! !!!! ", + " !!!!!!! !!! ", + " !!!!!!! !!! ", + " !!!!!!!!!!! ", + " !!!!!!!!!!! ", + " !!!!!!!!!!!! !!! ", + " !!!!!!!!!!!! !!!!!!! ", + " !!!!!!!!!!!!!! !!!!!!!! ", + " !!!!!!!!!!!!!!!!!! !!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!!! ! ", + " !!!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!!!! ", + " !!!!!!!!!!!!! ", + " !!!!!!!!!!!! ", + " $$$ !!!!!!!!!!!! ", + " $$ !!!!!!!!!!! ", + " $$$$$ %% !!!!!!!!!!! ", + " $$$$$$$$ %% !!!!!!!!!!! ", + " $$$$$$$$ $$$$$$ !!!!!!!!!!! ", + " $$$$$$$$ $$$$$$$$ !!!!!!!!!!! ", + " $$$$$$$$$$$$$$$$$$ !!!!!!!!!!! ", + " $$$$$$$$$$$$$$$$$$ !!!!!!!! ", + " $$$$$$$$$$$$$$$$$ !!!! ", + " $$$$$$$$$$$$$$$$$$$ ! ", + " $$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " &&$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " ''$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " ''$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$$$$$$$$$$$$$ ", + " $$$$$$ $$$$$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$$$$$ ", + " $$$$$$$$$$$$ ", + " $$ $$$$$ ", + " ((( ", + " (((( ", + " (((((( ", + " (((((( " + ] +} \ No newline at end of file diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-490-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-490-100-1.0-grid-reference.json index d8dbd6f75..a5d255d4b 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-490-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-490-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-6", - "-7", - "-9", - "-10", - "-3", - "-4" + "8", + "5", + "1", + "2", + "6", + "7", + "9", + "10", + "3", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-495-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-495-100-1.0-grid-reference.json index f6efaf5b4..b0f75845b 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-495-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-495-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-3", - "-6", - "-7", - "-9", - "-10", - "-4" + "8", + "5", + "1", + "2", + "3", + "6", + "7", + "9", + "10", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-497-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-497-100-1.0-grid-reference.json index be04f3405..b190871af 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-497-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-497-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-3", - "-6", - "-7", - "-9", - "-10", - "-4" + "8", + "5", + "1", + "2", + "3", + "6", + "7", + "9", + "10", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-498-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-498-100-1.0-grid-reference.json index 52bf4d53a..ca0db3884 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-498-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-498-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-3", - "-6", - "-7", - "-9", - "-10", - "-4" + "8", + "5", + "1", + "2", + "3", + "6", + "7", + "9", + "10", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-499-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-499-100-1.0-grid-reference.json index e7e48c88a..1b92a2855 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-499-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-499-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-3", - "-6", - "-7", - "-9", - "-10", - "-4" + "8", + "5", + "1", + "2", + "3", + "6", + "7", + "9", + "10", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-500-100-1.0-grid-reference.json index 2a6f9bbaa..26459bd0f 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-500-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-3", - "-6", - "-7", - "-9", - "-10", - "-4" + "8", + "5", + "1", + "2", + "3", + "6", + "7", + "9", + "10", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-501-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-501-100-1.0-grid-reference.json index d72cfe602..88cc49451 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-501-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-501-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-3", - "-6", - "-7", - "-9", - "-10", - "-4" + "8", + "5", + "1", + "2", + "3", + "6", + "7", + "9", + "10", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-502-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-502-100-1.0-grid-reference.json index b48db9f64..050335c81 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-502-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-502-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-6", - "-7", - "-9", - "-10", - "-3", - "-4" + "8", + "5", + "1", + "2", + "6", + "7", + "9", + "10", + "3", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-505-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-505-100-1.0-grid-reference.json index bc8af027f..aa2e746c4 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-505-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-505-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-6", - "-7", - "-9", - "-10", - "-3", - "-4" + "8", + "5", + "1", + "2", + "6", + "7", + "9", + "10", + "3", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/shieldsymbolizer-1-510-100-1.0-grid-reference.json b/tests/visual_tests/grids/shieldsymbolizer-1-510-100-1.0-grid-reference.json index 04693f989..f0706c77d 100644 --- a/tests/visual_tests/grids/shieldsymbolizer-1-510-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/shieldsymbolizer-1-510-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-8", - "-5", - "-1", - "-2", - "-6", - "-7", - "-9", - "-10", - "-3", - "-4" + "8", + "5", + "1", + "2", + "6", + "7", + "9", + "10", + "3", + "4" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-100-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-100-100-1.0-grid-reference.json index a93d7f62e..d250023b9 100644 --- a/tests/visual_tests/grids/simple-100-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-100-100-1.0-grid-reference.json @@ -1,14 +1,14 @@ { "keys": [ "", - "-2", - "-5", - "-8", - "-1", - "-9", - "-10", - "-3", - "-7" + "2", + "5", + "8", + "1", + "9", + "10", + "3", + "7" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-150-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-150-100-1.0-grid-reference.json index 5e3afa8a4..8b25d98e0 100644 --- a/tests/visual_tests/grids/simple-150-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-150-100-1.0-grid-reference.json @@ -1,14 +1,14 @@ { "keys": [ "", - "-2", - "-7", - "-4", - "-10", - "-1", - "-6", - "-3", - "-8" + "2", + "7", + "4", + "10", + "1", + "6", + "3", + "8" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-250-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-250-100-1.0-grid-reference.json index 8f11c4ca2..f52fcbdfa 100644 --- a/tests/visual_tests/grids/simple-250-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-250-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-2", - "-5", - "-8", - "-10", - "-1", - "-4", - "-7", - "-3", - "-6", - "-9" + "2", + "5", + "8", + "10", + "1", + "4", + "7", + "3", + "6", + "9" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-300-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-300-100-1.0-grid-reference.json index d2bcad422..3bf047bed 100644 --- a/tests/visual_tests/grids/simple-300-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-300-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-2", - "-5", - "-8", - "-10", - "-1", - "-4", - "-7", - "-3", - "-6", - "-9" + "2", + "5", + "8", + "10", + "1", + "4", + "7", + "3", + "6", + "9" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-400-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-400-100-1.0-grid-reference.json index a0c3ee225..b88c666e5 100644 --- a/tests/visual_tests/grids/simple-400-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-400-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-2", - "-4", - "-6", - "-8", - "-10", - "-1", - "-3", - "-5", - "-7", - "-9" + "2", + "4", + "6", + "8", + "10", + "1", + "3", + "5", + "7", + "9" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-600-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-600-100-1.0-grid-reference.json index 8fbe2e8ab..a6638f296 100644 --- a/tests/visual_tests/grids/simple-600-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-600-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-3", - "-5", - "-7", - "-9", - "-2", - "-4", - "-6", - "-8", - "-10" + "1", + "3", + "5", + "7", + "9", + "2", + "4", + "6", + "8", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-800-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-800-100-1.0-grid-reference.json index a884777f0..dbd1b4bca 100644 --- a/tests/visual_tests/grids/simple-800-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-800-100-1.0-grid-reference.json @@ -1,16 +1,16 @@ { "keys": [ "", - "-1", - "-2", - "-3", - "-4", - "-5", - "-6", - "-7", - "-8", - "-9", - "-10" + "1", + "2", + "3", + "4", + "5", + "6", + "7", + "8", + "9", + "10" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-E-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-E-500-100-1.0-grid-reference.json index c83d9f9bc..8a1b162de 100644 --- a/tests/visual_tests/grids/simple-E-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-E-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-N-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-N-500-100-1.0-grid-reference.json index ecd2f97d0..b049b10d1 100644 --- a/tests/visual_tests/grids/simple-N-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-N-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-NE-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-NE-500-100-1.0-grid-reference.json index cc5e49b81..aa030d211 100644 --- a/tests/visual_tests/grids/simple-NE-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-NE-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-NW-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-NW-500-100-1.0-grid-reference.json index 3ac668c0d..1d054206d 100644 --- a/tests/visual_tests/grids/simple-NW-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-NW-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-S-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-S-500-100-1.0-grid-reference.json index 60b30e0f4..28fb8011c 100644 --- a/tests/visual_tests/grids/simple-S-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-S-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-SE-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-SE-500-100-1.0-grid-reference.json index 125524dd2..691c6d843 100644 --- a/tests/visual_tests/grids/simple-SE-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-SE-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-SW-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-SW-500-100-1.0-grid-reference.json index 794db25f2..6f39d2c38 100644 --- a/tests/visual_tests/grids/simple-SW-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-SW-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/simple-W-500-100-1.0-grid-reference.json b/tests/visual_tests/grids/simple-W-500-100-1.0-grid-reference.json index 9725865bc..e52b12abb 100644 --- a/tests/visual_tests/grids/simple-W-500-100-1.0-grid-reference.json +++ b/tests/visual_tests/grids/simple-W-500-100-1.0-grid-reference.json @@ -1,7 +1,7 @@ { "keys": [ "", - "-5" + "5" ], "data": {}, "grid": [ diff --git a/tests/visual_tests/grids/text-halo-rasterizer-600-400-1.0-grid-reference.json b/tests/visual_tests/grids/text-halo-rasterizer-600-400-1.0-grid-reference.json index ee24381b3..56a29ed9e 100644 --- a/tests/visual_tests/grids/text-halo-rasterizer-600-400-1.0-grid-reference.json +++ b/tests/visual_tests/grids/text-halo-rasterizer-600-400-1.0-grid-reference.json @@ -1,16 +1,22 @@ { "keys": [ "", - "5", - "10", - "4", - "9", - "3", - "8", - "2", - "7", "1", - "6" + "9", + "2", + "10", + "3", + "11", + "4", + "12", + "5", + "13", + "6", + "14", + "7", + "15", + "8", + "16" ], "data": {}, "grid": [ @@ -22,20 +28,10 @@ " ", " ", " ", - " !!! !!!!!! ### ###### ", - " !!!!!!!!!!!! ########## ", - " !!!!!!!!!!!! ########### ", - " !!!!!!!!!!! ########### ", - " !!!!!!!!!!! ####### ## ", " ", - " ", - " ", - " ", - " ", - " $$ $$$$$$ %% %% %% %%% ", - " $$$$$$$$$$$$$$ %%%%%% %% %%% ", - " $$$$$$$$$$$$$$ %%%%%% %% %%% ", - " $$$$$$$$$$$$$ %%%%%%%%%%%%% ", + " ! ! ! ## ## ", + " ! ! !! ! #### # ", + " !!! ! ! !! #### ### ", " ", " ", " ", @@ -43,6 +39,9 @@ " ", " ", " ", + " $ $ $ %% %% ", + " $ $ $$ $$ %%%% % ", + " $$$ $ $ $$ %%%% %%% ", " ", " ", " ", @@ -50,12 +49,9 @@ " ", " ", " ", - " ", - " ", - " ", - " &&&&&&&&& && '''''' '' '' ", - " &&&&&& & && ' '''' ' ''' ", - " &&&&&&&&&&&&& ' '''' '''''' ", + " & & '' ' ", + " & & && & '''' '' ", + " &&& & & && '''' ''' ", " ", " ", " ", @@ -63,6 +59,9 @@ " ", " ", " ", + " ( ( (( )) )) ", + " ( ( (( )))) ) ", + " ((( ( ( ( )))) ) ", " ", " ", " ", @@ -70,12 +69,9 @@ " ", " ", " ", - " ", - " ", - " ", - " (((((((((( )) ))) ) ", - " (((((( ( )) ))) ) ", - " ((((((((( )))))) )) ", + " ********** ++ +++ + ", + " ****** * ++ +++ + ", + " ********* ++++++ ++ ", " ", " ", " ", @@ -83,21 +79,31 @@ " ", " ", " ", + " ,,,,,,,,, ,, ------ -- -- ", + " ,,,,,, , ,, - ---- - --- ", + " ,,,,,,,,,,,,, - ---- ------ ", " ", " ", " ", " ", " ", " ", + " .. ...... // // // /// ", + " .............. ////// // /// ", + " .............. ////// // /// ", + " ............. ///////////// ", " ", " ", " ", " ", - " * * ++ + ", - " * * ** * ++++ ++ ", - " *** * * ** ++++ +++ ", " ", " ", + " 000 000000 111 111111 ", + " 000000000000 1111111111 ", + " 000000000000 11111111111 ", + " 00000000000 11111111111 ", + " 00000000000 1111111 11 ", + " ", " ", " ", " ", diff --git a/tests/visual_tests/html_report_template.html b/tests/visual_tests/html_report_template.html new file mode 100644 index 000000000..759b8fe40 --- /dev/null +++ b/tests/visual_tests/html_report_template.html @@ -0,0 +1,33 @@ + + + + + + + +
+
expected
+
% difference
+
actual
+{{RESULTS}} +
+ + diff --git a/tests/visual_tests/images/collision-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/collision-600-400-1.0-cairo-reference.png index 4780ab994..c8a3eba8d 100644 Binary files a/tests/visual_tests/images/collision-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/collision-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/collision-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/collision-600-400-2.0-cairo-reference.png index 6bba24c5e..d72f19440 100644 Binary files a/tests/visual_tests/images/collision-600-400-2.0-cairo-reference.png and b/tests/visual_tests/images/collision-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/line-offset-900-250-1.0-agg-reference.png b/tests/visual_tests/images/line-offset-900-250-1.0-agg-reference.png index f147141c7..19f85db78 100644 Binary files a/tests/visual_tests/images/line-offset-900-250-1.0-agg-reference.png and b/tests/visual_tests/images/line-offset-900-250-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/line-offset-900-250-1.0-cairo-reference.png b/tests/visual_tests/images/line-offset-900-250-1.0-cairo-reference.png index c93bdbb11..51a7333be 100644 Binary files a/tests/visual_tests/images/line-offset-900-250-1.0-cairo-reference.png and b/tests/visual_tests/images/line-offset-900-250-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/line-offset-900-250-2.0-agg-reference.png b/tests/visual_tests/images/line-offset-900-250-2.0-agg-reference.png index 9c63bf81e..53ffcc28c 100644 Binary files a/tests/visual_tests/images/line-offset-900-250-2.0-agg-reference.png and b/tests/visual_tests/images/line-offset-900-250-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/line-offset-900-250-2.0-cairo-reference.png b/tests/visual_tests/images/line-offset-900-250-2.0-cairo-reference.png index c36588076..b83bd731f 100644 Binary files a/tests/visual_tests/images/line-offset-900-250-2.0-cairo-reference.png and b/tests/visual_tests/images/line-offset-900-250-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-1-200-200-1.0-cairo-reference.png b/tests/visual_tests/images/lines-1-200-200-1.0-cairo-reference.png index dae174f22..b2d300f0f 100644 Binary files a/tests/visual_tests/images/lines-1-200-200-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-1-200-200-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-1-200-200-2.0-cairo-reference.png b/tests/visual_tests/images/lines-1-200-200-2.0-cairo-reference.png index d97b38ca2..81727a68e 100644 Binary files a/tests/visual_tests/images/lines-1-200-200-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-1-200-200-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-1-400-400-1.0-agg-reference.png b/tests/visual_tests/images/lines-1-400-400-1.0-agg-reference.png index 25f6452c6..551ae51eb 100644 Binary files a/tests/visual_tests/images/lines-1-400-400-1.0-agg-reference.png and b/tests/visual_tests/images/lines-1-400-400-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-1-400-400-2.0-cairo-reference.png b/tests/visual_tests/images/lines-1-400-400-2.0-cairo-reference.png index 3c26f266f..249edc709 100644 Binary files a/tests/visual_tests/images/lines-1-400-400-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-1-400-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-1-600-600-1.0-cairo-reference.png b/tests/visual_tests/images/lines-1-600-600-1.0-cairo-reference.png index 1f5feb8f4..515daedab 100644 Binary files a/tests/visual_tests/images/lines-1-600-600-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-1-600-600-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-1-600-600-2.0-cairo-reference.png b/tests/visual_tests/images/lines-1-600-600-2.0-cairo-reference.png index b08213070..64faecd1d 100644 Binary files a/tests/visual_tests/images/lines-1-600-600-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-1-600-600-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-1-800-800-1.0-agg-reference.png b/tests/visual_tests/images/lines-1-800-800-1.0-agg-reference.png index 0e9080ee8..02209ef2b 100644 Binary files a/tests/visual_tests/images/lines-1-800-800-1.0-agg-reference.png and b/tests/visual_tests/images/lines-1-800-800-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-1-800-800-1.0-cairo-reference.png b/tests/visual_tests/images/lines-1-800-800-1.0-cairo-reference.png index 9af56e9b4..425b01edf 100644 Binary files a/tests/visual_tests/images/lines-1-800-800-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-1-800-800-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-1-800-800-2.0-agg-reference.png b/tests/visual_tests/images/lines-1-800-800-2.0-agg-reference.png index 46271acdc..c4da4f388 100644 Binary files a/tests/visual_tests/images/lines-1-800-800-2.0-agg-reference.png and b/tests/visual_tests/images/lines-1-800-800-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-1-800-800-2.0-cairo-reference.png b/tests/visual_tests/images/lines-1-800-800-2.0-cairo-reference.png index 734d85c6a..a26355864 100644 Binary files a/tests/visual_tests/images/lines-1-800-800-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-1-800-800-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-2-200-200-1.0-cairo-reference.png b/tests/visual_tests/images/lines-2-200-200-1.0-cairo-reference.png index ef832ce86..05dbf909a 100644 Binary files a/tests/visual_tests/images/lines-2-200-200-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-2-200-200-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-2-200-200-2.0-cairo-reference.png b/tests/visual_tests/images/lines-2-200-200-2.0-cairo-reference.png index d97b38ca2..81727a68e 100644 Binary files a/tests/visual_tests/images/lines-2-200-200-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-2-200-200-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-2-400-400-1.0-agg-reference.png b/tests/visual_tests/images/lines-2-400-400-1.0-agg-reference.png index 66679050f..965ad6a45 100644 Binary files a/tests/visual_tests/images/lines-2-400-400-1.0-agg-reference.png and b/tests/visual_tests/images/lines-2-400-400-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-2-400-400-2.0-cairo-reference.png b/tests/visual_tests/images/lines-2-400-400-2.0-cairo-reference.png index 62ebc42e2..ca17344c8 100644 Binary files a/tests/visual_tests/images/lines-2-400-400-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-2-400-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-2-600-600-1.0-agg-reference.png b/tests/visual_tests/images/lines-2-600-600-1.0-agg-reference.png index 409c83542..4c81dc28c 100644 Binary files a/tests/visual_tests/images/lines-2-600-600-1.0-agg-reference.png and b/tests/visual_tests/images/lines-2-600-600-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-2-600-600-1.0-cairo-reference.png b/tests/visual_tests/images/lines-2-600-600-1.0-cairo-reference.png index bf2eeda13..d7f2277cb 100644 Binary files a/tests/visual_tests/images/lines-2-600-600-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-2-600-600-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-2-600-600-2.0-cairo-reference.png b/tests/visual_tests/images/lines-2-600-600-2.0-cairo-reference.png index b946b4903..62a026b9e 100644 Binary files a/tests/visual_tests/images/lines-2-600-600-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-2-600-600-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-2-800-800-1.0-agg-reference.png b/tests/visual_tests/images/lines-2-800-800-1.0-agg-reference.png index 07724980c..132acbcaa 100644 Binary files a/tests/visual_tests/images/lines-2-800-800-1.0-agg-reference.png and b/tests/visual_tests/images/lines-2-800-800-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-2-800-800-1.0-cairo-reference.png b/tests/visual_tests/images/lines-2-800-800-1.0-cairo-reference.png index 8732867f1..8a11d0236 100644 Binary files a/tests/visual_tests/images/lines-2-800-800-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-2-800-800-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-2-800-800-2.0-cairo-reference.png b/tests/visual_tests/images/lines-2-800-800-2.0-cairo-reference.png index 2794e90cf..e4cd18585 100644 Binary files a/tests/visual_tests/images/lines-2-800-800-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-2-800-800-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-3-200-200-1.0-cairo-reference.png b/tests/visual_tests/images/lines-3-200-200-1.0-cairo-reference.png index dae174f22..b2d300f0f 100644 Binary files a/tests/visual_tests/images/lines-3-200-200-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-3-200-200-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-3-200-200-2.0-cairo-reference.png b/tests/visual_tests/images/lines-3-200-200-2.0-cairo-reference.png index d97b38ca2..81727a68e 100644 Binary files a/tests/visual_tests/images/lines-3-200-200-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-3-200-200-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-3-400-400-1.0-agg-reference.png b/tests/visual_tests/images/lines-3-400-400-1.0-agg-reference.png index 7c9285efd..a552848a5 100644 Binary files a/tests/visual_tests/images/lines-3-400-400-1.0-agg-reference.png and b/tests/visual_tests/images/lines-3-400-400-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-3-400-400-2.0-cairo-reference.png b/tests/visual_tests/images/lines-3-400-400-2.0-cairo-reference.png index 3c26f266f..249edc709 100644 Binary files a/tests/visual_tests/images/lines-3-400-400-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-3-400-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-3-600-600-1.0-cairo-reference.png b/tests/visual_tests/images/lines-3-600-600-1.0-cairo-reference.png index 752b03977..c6ecf9c73 100644 Binary files a/tests/visual_tests/images/lines-3-600-600-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-3-600-600-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-3-600-600-2.0-cairo-reference.png b/tests/visual_tests/images/lines-3-600-600-2.0-cairo-reference.png index e2cba88af..654a636bc 100644 Binary files a/tests/visual_tests/images/lines-3-600-600-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-3-600-600-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-3-800-800-1.0-agg-reference.png b/tests/visual_tests/images/lines-3-800-800-1.0-agg-reference.png index 305e8c700..3a9295667 100644 Binary files a/tests/visual_tests/images/lines-3-800-800-1.0-agg-reference.png and b/tests/visual_tests/images/lines-3-800-800-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-3-800-800-1.0-cairo-reference.png b/tests/visual_tests/images/lines-3-800-800-1.0-cairo-reference.png index 9b49af262..1d94e755c 100644 Binary files a/tests/visual_tests/images/lines-3-800-800-1.0-cairo-reference.png and b/tests/visual_tests/images/lines-3-800-800-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-3-800-800-2.0-agg-reference.png b/tests/visual_tests/images/lines-3-800-800-2.0-agg-reference.png index f003769f5..a8bdfead8 100644 Binary files a/tests/visual_tests/images/lines-3-800-800-2.0-agg-reference.png and b/tests/visual_tests/images/lines-3-800-800-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-3-800-800-2.0-cairo-reference.png b/tests/visual_tests/images/lines-3-800-800-2.0-cairo-reference.png index 53c62c7d5..d1eb38697 100644 Binary files a/tests/visual_tests/images/lines-3-800-800-2.0-cairo-reference.png and b/tests/visual_tests/images/lines-3-800-800-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-200-200-1.0-agg-reference.png b/tests/visual_tests/images/lines-shield-200-200-1.0-agg-reference.png new file mode 100644 index 000000000..0ab97cb12 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-200-200-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-200-200-1.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-200-200-1.0-cairo-reference.png new file mode 100644 index 000000000..2db6719ec Binary files /dev/null and b/tests/visual_tests/images/lines-shield-200-200-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-200-200-2.0-agg-reference.png b/tests/visual_tests/images/lines-shield-200-200-2.0-agg-reference.png new file mode 100644 index 000000000..d7ae2234d Binary files /dev/null and b/tests/visual_tests/images/lines-shield-200-200-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-200-200-2.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-200-200-2.0-cairo-reference.png new file mode 100644 index 000000000..e4d817d6e Binary files /dev/null and b/tests/visual_tests/images/lines-shield-200-200-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-400-400-1.0-agg-reference.png b/tests/visual_tests/images/lines-shield-400-400-1.0-agg-reference.png new file mode 100644 index 000000000..4269b4c06 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-400-400-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-400-400-1.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-400-400-1.0-cairo-reference.png new file mode 100644 index 000000000..d30efaca0 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-400-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-400-400-2.0-agg-reference.png b/tests/visual_tests/images/lines-shield-400-400-2.0-agg-reference.png new file mode 100644 index 000000000..75a0ec6a2 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-400-400-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-400-400-2.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-400-400-2.0-cairo-reference.png new file mode 100644 index 000000000..5f32ddaf0 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-400-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-600-600-1.0-agg-reference.png b/tests/visual_tests/images/lines-shield-600-600-1.0-agg-reference.png new file mode 100644 index 000000000..f8fdcadac Binary files /dev/null and b/tests/visual_tests/images/lines-shield-600-600-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-600-600-1.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-600-600-1.0-cairo-reference.png new file mode 100644 index 000000000..20ba67d4e Binary files /dev/null and b/tests/visual_tests/images/lines-shield-600-600-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-600-600-2.0-agg-reference.png b/tests/visual_tests/images/lines-shield-600-600-2.0-agg-reference.png new file mode 100644 index 000000000..ae0f4d94d Binary files /dev/null and b/tests/visual_tests/images/lines-shield-600-600-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-600-600-2.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-600-600-2.0-cairo-reference.png new file mode 100644 index 000000000..a94c464a2 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-600-600-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-800-800-1.0-agg-reference.png b/tests/visual_tests/images/lines-shield-800-800-1.0-agg-reference.png new file mode 100644 index 000000000..6e05b9255 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-800-800-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-800-800-1.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-800-800-1.0-cairo-reference.png new file mode 100644 index 000000000..54fbbabd4 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-800-800-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-800-800-2.0-agg-reference.png b/tests/visual_tests/images/lines-shield-800-800-2.0-agg-reference.png new file mode 100644 index 000000000..a3797ce56 Binary files /dev/null and b/tests/visual_tests/images/lines-shield-800-800-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/lines-shield-800-800-2.0-cairo-reference.png b/tests/visual_tests/images/lines-shield-800-800-2.0-cairo-reference.png new file mode 100644 index 000000000..4641d23ee Binary files /dev/null and b/tests/visual_tests/images/lines-shield-800-800-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/list-150-100-2.0-cairo-reference.png b/tests/visual_tests/images/list-150-100-2.0-cairo-reference.png index b3e61b44b..99cc5c435 100644 Binary files a/tests/visual_tests/images/list-150-100-2.0-cairo-reference.png and b/tests/visual_tests/images/list-150-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/list-300-100-2.0-cairo-reference.png b/tests/visual_tests/images/list-300-100-2.0-cairo-reference.png index 4cdace7a6..b0c77c6ee 100644 Binary files a/tests/visual_tests/images/list-300-100-2.0-cairo-reference.png and b/tests/visual_tests/images/list-300-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/list-400-100-1.0-cairo-reference.png b/tests/visual_tests/images/list-400-100-1.0-cairo-reference.png index 4219f4411..ed891a4b5 100644 Binary files a/tests/visual_tests/images/list-400-100-1.0-cairo-reference.png and b/tests/visual_tests/images/list-400-100-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/list-600-100-1.0-cairo-reference.png b/tests/visual_tests/images/list-600-100-1.0-cairo-reference.png index 2d8bff642..5dd736041 100644 Binary files a/tests/visual_tests/images/list-600-100-1.0-cairo-reference.png and b/tests/visual_tests/images/list-600-100-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/list-800-100-2.0-cairo-reference.png b/tests/visual_tests/images/list-800-100-2.0-cairo-reference.png index 8a716f1d5..1fa3a7bdd 100644 Binary files a/tests/visual_tests/images/list-800-100-2.0-cairo-reference.png and b/tests/visual_tests/images/list-800-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-multi-policy-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/marker-multi-policy-600-400-2.0-cairo-reference.png index 5b157353f..1b2a9ce26 100644 Binary files a/tests/visual_tests/images/marker-multi-policy-600-400-2.0-cairo-reference.png and b/tests/visual_tests/images/marker-multi-policy-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-hex-grid-400-600-1.0-cairo-reference.png b/tests/visual_tests/images/marker-on-hex-grid-400-600-1.0-cairo-reference.png index 0a730a5db..75362bc95 100644 Binary files a/tests/visual_tests/images/marker-on-hex-grid-400-600-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-hex-grid-400-600-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-hex-grid-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/marker-on-hex-grid-600-400-1.0-cairo-reference.png index 28f7da078..de0885e9c 100644 Binary files a/tests/visual_tests/images/marker-on-hex-grid-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-hex-grid-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-line-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/marker-on-line-600-400-1.0-cairo-reference.png index 7bea4f62f..788a1aa36 100644 Binary files a/tests/visual_tests/images/marker-on-line-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-line-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-line-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/marker-on-line-600-400-2.0-cairo-reference.png index 22b1822ee..efafa2799 100644 Binary files a/tests/visual_tests/images/marker-on-line-600-400-2.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-line-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-1.0-cairo-reference.png index 5ddd5a620..b73700424 100644 Binary files a/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-2.0-cairo-reference.png index 853ea43cf..9f2e33cb3 100644 Binary files a/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-2.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-line-spacing-eq-width-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-1.0-cairo-reference.png index 387a35da6..d02bd8e3c 100644 Binary files a/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-2.0-cairo-reference.png index 256ee1918..a7523da64 100644 Binary files a/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-2.0-cairo-reference.png and b/tests/visual_tests/images/marker-on-line-spacing-eq-width-overlap-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-with-background-image-257-256-1.0-cairo-reference.png b/tests/visual_tests/images/marker-with-background-image-257-256-1.0-cairo-reference.png index ffa40ac2d..761743e75 100644 Binary files a/tests/visual_tests/images/marker-with-background-image-257-256-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-with-background-image-257-256-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-with-background-image-400-600-1.0-cairo-reference.png b/tests/visual_tests/images/marker-with-background-image-400-600-1.0-cairo-reference.png index cbfda129c..e991deb99 100644 Binary files a/tests/visual_tests/images/marker-with-background-image-400-600-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-with-background-image-400-600-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-with-background-image-400-600-2.0-cairo-reference.png b/tests/visual_tests/images/marker-with-background-image-400-600-2.0-cairo-reference.png index fb4489a65..a4aec0749 100644 Binary files a/tests/visual_tests/images/marker-with-background-image-400-600-2.0-cairo-reference.png and b/tests/visual_tests/images/marker-with-background-image-400-600-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-with-background-image-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/marker-with-background-image-600-400-1.0-cairo-reference.png index cf585a900..a7bc35af6 100644 Binary files a/tests/visual_tests/images/marker-with-background-image-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/marker-with-background-image-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker-with-background-image-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/marker-with-background-image-600-400-2.0-cairo-reference.png index b242281b5..784c23c62 100644 Binary files a/tests/visual_tests/images/marker-with-background-image-600-400-2.0-cairo-reference.png and b/tests/visual_tests/images/marker-with-background-image-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker_line_placement_on_points-500-100-1.0-cairo-reference.png b/tests/visual_tests/images/marker_line_placement_on_points-500-100-1.0-cairo-reference.png index 8bb0b7649..8943bfa53 100644 Binary files a/tests/visual_tests/images/marker_line_placement_on_points-500-100-1.0-cairo-reference.png and b/tests/visual_tests/images/marker_line_placement_on_points-500-100-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/marker_line_placement_on_points-500-100-2.0-cairo-reference.png b/tests/visual_tests/images/marker_line_placement_on_points-500-100-2.0-cairo-reference.png index 57e41b1f5..4cf7ae33b 100644 Binary files a/tests/visual_tests/images/marker_line_placement_on_points-500-100-2.0-cairo-reference.png and b/tests/visual_tests/images/marker_line_placement_on_points-500-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-1.0-agg-reference.png b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-1.0-agg-reference.png new file mode 100644 index 000000000..7eea9485e Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-1.0-cairo-reference.png new file mode 100644 index 000000000..49bfde802 Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-2.0-agg-reference.png b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-2.0-agg-reference.png new file mode 100644 index 000000000..627acd957 Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-2.0-cairo-reference.png new file mode 100644 index 000000000..61e332ddf Binary files /dev/null and b/tests/visual_tests/images/shield-on-line-spacing-eq-width-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shield-on-polygon-500-100-1.0-cairo-reference.png b/tests/visual_tests/images/shield-on-polygon-500-100-1.0-cairo-reference.png new file mode 100644 index 000000000..bcb680333 Binary files /dev/null and b/tests/visual_tests/images/shield-on-polygon-500-100-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shield-on-polygon-500-100-2.0-cairo-reference.png b/tests/visual_tests/images/shield-on-polygon-500-100-2.0-cairo-reference.png new file mode 100644 index 000000000..8ebad2380 Binary files /dev/null and b/tests/visual_tests/images/shield-on-polygon-500-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shield-on-polygon-600-400-1.0-agg-reference.png b/tests/visual_tests/images/shield-on-polygon-600-400-1.0-agg-reference.png new file mode 100644 index 000000000..b5dd8e45e Binary files /dev/null and b/tests/visual_tests/images/shield-on-polygon-600-400-1.0-agg-reference.png differ diff --git a/tests/visual_tests/images/shield-on-polygon-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/shield-on-polygon-600-400-1.0-cairo-reference.png new file mode 100644 index 000000000..f486e6c3e Binary files /dev/null and b/tests/visual_tests/images/shield-on-polygon-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shield-on-polygon-600-400-2.0-agg-reference.png b/tests/visual_tests/images/shield-on-polygon-600-400-2.0-agg-reference.png new file mode 100644 index 000000000..87fa8b772 Binary files /dev/null and b/tests/visual_tests/images/shield-on-polygon-600-400-2.0-agg-reference.png differ diff --git a/tests/visual_tests/images/shield-on-polygon-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/shield-on-polygon-600-400-2.0-cairo-reference.png new file mode 100644 index 000000000..0d4c6a74c Binary files /dev/null and b/tests/visual_tests/images/shield-on-polygon-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shieldsymbolizer-1-498-100-2.0-cairo-reference.png b/tests/visual_tests/images/shieldsymbolizer-1-498-100-2.0-cairo-reference.png index 6a0c1a0fa..3bd5dd3a8 100644 Binary files a/tests/visual_tests/images/shieldsymbolizer-1-498-100-2.0-cairo-reference.png and b/tests/visual_tests/images/shieldsymbolizer-1-498-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shieldsymbolizer-1-501-100-2.0-cairo-reference.png b/tests/visual_tests/images/shieldsymbolizer-1-501-100-2.0-cairo-reference.png index ccc333e4e..f6bd195bb 100644 Binary files a/tests/visual_tests/images/shieldsymbolizer-1-501-100-2.0-cairo-reference.png and b/tests/visual_tests/images/shieldsymbolizer-1-501-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/shieldsymbolizer-1-502-100-2.0-cairo-reference.png b/tests/visual_tests/images/shieldsymbolizer-1-502-100-2.0-cairo-reference.png index bafc15711..36cdec4a9 100644 Binary files a/tests/visual_tests/images/shieldsymbolizer-1-502-100-2.0-cairo-reference.png and b/tests/visual_tests/images/shieldsymbolizer-1-502-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/simple-400-100-2.0-cairo-reference.png b/tests/visual_tests/images/simple-400-100-2.0-cairo-reference.png index cd18a67df..aab6f1a33 100644 Binary files a/tests/visual_tests/images/simple-400-100-2.0-cairo-reference.png and b/tests/visual_tests/images/simple-400-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/simple-600-100-1.0-cairo-reference.png b/tests/visual_tests/images/simple-600-100-1.0-cairo-reference.png index cb1b88e53..1a41fd780 100644 Binary files a/tests/visual_tests/images/simple-600-100-1.0-cairo-reference.png and b/tests/visual_tests/images/simple-600-100-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/simple-800-100-2.0-cairo-reference.png b/tests/visual_tests/images/simple-800-100-2.0-cairo-reference.png index 149f319f7..644d3549e 100644 Binary files a/tests/visual_tests/images/simple-800-100-2.0-cairo-reference.png and b/tests/visual_tests/images/simple-800-100-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/text-halo-rasterizer-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/text-halo-rasterizer-600-400-1.0-cairo-reference.png index c4c6ddc7f..05bb4b852 100644 Binary files a/tests/visual_tests/images/text-halo-rasterizer-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/text-halo-rasterizer-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/text-halo-rasterizer-600-400-2.0-cairo-reference.png b/tests/visual_tests/images/text-halo-rasterizer-600-400-2.0-cairo-reference.png index e5cb5b699..b4fd03c35 100644 Binary files a/tests/visual_tests/images/text-halo-rasterizer-600-400-2.0-cairo-reference.png and b/tests/visual_tests/images/text-halo-rasterizer-600-400-2.0-cairo-reference.png differ diff --git a/tests/visual_tests/images/whole-centroid-600-400-1.0-cairo-reference.png b/tests/visual_tests/images/whole-centroid-600-400-1.0-cairo-reference.png index 4dca4fb3f..35f2d678e 100644 Binary files a/tests/visual_tests/images/whole-centroid-600-400-1.0-cairo-reference.png and b/tests/visual_tests/images/whole-centroid-600-400-1.0-cairo-reference.png differ diff --git a/tests/visual_tests/styles/expressionformat.xml b/tests/visual_tests/styles/expressionformat.xml index 919430f97..81c7b65c3 100644 --- a/tests/visual_tests/styles/expressionformat.xml +++ b/tests/visual_tests/styles/expressionformat.xml @@ -5,8 +5,8 @@ My Style - osm - ../data/points.osm + csv + ../data/points.csv diff --git a/tests/visual_tests/styles/formatting-1.xml b/tests/visual_tests/styles/formatting-1.xml index 15f512abf..7bb62f15f 100644 --- a/tests/visual_tests/styles/formatting-1.xml +++ b/tests/visual_tests/styles/formatting-1.xml @@ -5,8 +5,8 @@ My Style - osm - ../data/points.osm + csv + ../data/points.csv diff --git a/tests/visual_tests/styles/formatting-2.xml b/tests/visual_tests/styles/formatting-2.xml index 635af6a39..ca7646a47 100644 --- a/tests/visual_tests/styles/formatting-2.xml +++ b/tests/visual_tests/styles/formatting-2.xml @@ -5,8 +5,8 @@ My Style - osm - ../data/points.osm + csv + ../data/points.csv diff --git a/tests/visual_tests/styles/formatting-3.xml b/tests/visual_tests/styles/formatting-3.xml index 97a5fb1f2..eb9e449fe 100644 --- a/tests/visual_tests/styles/formatting-3.xml +++ b/tests/visual_tests/styles/formatting-3.xml @@ -5,8 +5,8 @@ My Style - osm - ../data/points.osm + csv + ../data/points.csv diff --git a/tests/visual_tests/styles/formatting-4.xml b/tests/visual_tests/styles/formatting-4.xml index b09f59a26..984a654fb 100644 --- a/tests/visual_tests/styles/formatting-4.xml +++ b/tests/visual_tests/styles/formatting-4.xml @@ -5,8 +5,8 @@ My Style - osm - ../data/points.osm + csv + ../data/points.csv diff --git a/tests/visual_tests/styles/jalign-auto.xml b/tests/visual_tests/styles/jalign-auto.xml index f59f31cba..2ee79edd5 100644 --- a/tests/visual_tests/styles/jalign-auto.xml +++ b/tests/visual_tests/styles/jalign-auto.xml @@ -5,14 +5,14 @@ My Style - osm - ../data/points.osm + csv + ../data/points.csv diff --git a/tests/visual_tests/styles/lines-1.xml b/tests/visual_tests/styles/lines-1.xml index dfd534efb..086f99205 100644 --- a/tests/visual_tests/styles/lines-1.xml +++ b/tests/visual_tests/styles/lines-1.xml @@ -5,13 +5,14 @@ My Style - osm - ../data/lines.osm + csv + ../data/lines.csv + + +
\ No newline at end of file diff --git a/tests/visual_tests/styles/shield-on-polygon.xml b/tests/visual_tests/styles/shield-on-polygon.xml new file mode 100644 index 000000000..c4f2f9e55 --- /dev/null +++ b/tests/visual_tests/styles/shield-on-polygon.xml @@ -0,0 +1,49 @@ + + + + + + -180,-85.05112877980659,180,85.05112877980659 + 0,0,2 + png + 0 + 22 + + + + + + + countries-outline + countries + + ../../data/shp/new_zealand/ne_50m_land.shp + + + + + + + places + + ../../data/shp/new_zealand/ne_50m_populated_places_simple.shp + + + + + \ No newline at end of file diff --git a/tests/visual_tests/styles/shieldsymbolizer-1.xml b/tests/visual_tests/styles/shieldsymbolizer-1.xml index 815f22920..cc37000d5 100644 --- a/tests/visual_tests/styles/shieldsymbolizer-1.xml +++ b/tests/visual_tests/styles/shieldsymbolizer-1.xml @@ -5,50 +5,50 @@ My Style - osm - ../data/points.osm + csv + ../data/points.csv diff --git a/tests/visual_tests/test.py b/tests/visual_tests/test.py index 076f2d1ae..905555cdc 100755 --- a/tests/visual_tests/test.py +++ b/tests/visual_tests/test.py @@ -4,6 +4,7 @@ import mapnik mapnik.logger.set_severity(mapnik.severity_type.None) +import shutil import sys import os.path from compare import compare, compare_grids @@ -19,8 +20,8 @@ defaults = { 'sizes': [(500, 100)], 'scales':[1.0,2.0], 'agg': True, - 'cairo': True, - 'grid': True, + 'cairo': mapnik.has_cairo(), + 'grid': True } sizes_many_in_big_range = [(800, 100), (600, 100), (400, 100), @@ -34,80 +35,81 @@ default_text_box = mapnik.Box2d(-0.05, -0.01, 0.95, 0.01) dirname = os.path.dirname(__file__) -files = [ - {'name': "list", 'sizes': sizes_many_in_big_range,'bbox':default_text_box}, - {'name': "simple", 'sizes': sizes_many_in_big_range,'bbox':default_text_box}, - {'name': "lines-1", 'sizes': sizes_few_square,'bbox':default_text_box}, - {'name': "lines-2", 'sizes': sizes_few_square,'bbox':default_text_box}, - {'name': "lines-3", 'sizes': sizes_few_square,'bbox':default_text_box}, +files = { + 'list': {'sizes': sizes_many_in_big_range,'bbox':default_text_box}, + 'simple': {'sizes': sizes_many_in_big_range,'bbox':default_text_box}, + 'lines-1': {'sizes': sizes_few_square,'bbox':default_text_box}, + 'lines-2': {'sizes': sizes_few_square,'bbox':default_text_box}, + 'lines-3': {'sizes': sizes_few_square,'bbox':default_text_box}, # https://github.com/mapnik/mapnik/issues/1696 # https://github.com/mapnik/mapnik/issues/1521 # fails with clang++ on os x - #{'name': "lines-shield", 'sizes': sizes_few_square,'bbox':default_text_box}, - {'name': "collision", 'sizes':[(600,400)]}, - {'name': "marker-svg-opacity"}, - {'name': "marker-multi-policy", 'sizes':[(600,400)]}, - {'name': "marker-on-line", 'sizes':[(600,400)], + 'lines-shield': {'sizes': sizes_few_square,'bbox':default_text_box}, + 'collision': {'sizes':[(600,400)]}, + 'shield-on-polygon': {'sizes':[(600,400)]}, + 'shield-on-line-spacing-eq-width': {'sizes':[(600,400)]}, + 'marker-svg-opacity':{}, + 'marker-multi-policy': {'sizes':[(600,400)]}, + 'marker-on-line': {'sizes':[(600,400)], 'bbox': mapnik.Box2d(-10, 0, 15, 20)}, - {'name': "marker-on-line-spacing-eq-width", 'sizes':[(600,400)]}, - {'name': "marker-on-line-spacing-eq-width-overlap", 'sizes':[(600,400)]}, - {'name': "marker_line_placement_on_points"}, - {'name': "marker-with-background-image", 'sizes':[(600,400),(400,600),(257,256)]}, - #{'name': "marker-with-background-image-and-hsla-transform", 'sizes':[(600,400),(400,600),(257,256)]}, - {'name': "marker-on-hex-grid", 'sizes':[(600,400),(400,600),(257,256)]}, - {'name': "whole-centroid", 'sizes':[(600,400)], + 'marker-on-line-spacing-eq-width': {'sizes':[(600,400)]}, + 'marker-on-line-spacing-eq-width-overlap': {'sizes':[(600,400)]}, + 'marker_line_placement_on_points':{}, + 'marker-with-background-image': {'sizes':[(600,400),(400,600),(257,256)]}, + #'marker-with-background-image-and-hsla-transform': {'sizes':[(600,400),(400,600),(257,256)]}, + 'marker-on-hex-grid': {'sizes':[(600,400),(400,600),(257,256)]}, + 'whole-centroid': {'sizes':[(600,400)], 'bbox': mapnik.Box2d(736908, 4390316, 2060771, 5942346)}, - {'name': "text-halo-rasterizer", 'sizes':[(600,400)]}, - {'name': "simple-E", 'bbox':mapnik.Box2d(-0.05, -0.01, 0.95, 0.01)}, - {'name': "simple-NE",'bbox':default_text_box}, - {'name': "simple-NW",'bbox':default_text_box}, - {'name': "simple-N",'bbox':default_text_box}, - {'name': "simple-SE",'bbox':default_text_box}, - {'name': "simple-SW",'bbox':default_text_box}, - {'name': "simple-S",'bbox':default_text_box}, - {'name': "simple-W",'bbox':default_text_box}, - {'name': "formatting-1",'bbox':default_text_box}, - {'name': "formatting-2",'bbox':default_text_box}, - {'name': "formatting-3",'bbox':default_text_box}, - {'name': "formatting-4",'bbox':default_text_box}, - {'name': "expressionformat",'bbox':default_text_box}, - {'name': "shieldsymbolizer-1", 'sizes': sizes_many_in_small_range,'bbox':default_text_box}, - {'name': "rtl-point", 'sizes': [(200, 200)],'bbox':default_text_box}, - {'name': "jalign-auto", 'sizes': [(200, 200)],'bbox':default_text_box}, - {'name': "line-offset", 'sizes':[(900, 250)],'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)}, - {'name': "tiff-alpha-gdal", 'sizes':[(600,400)]}, - {'name': "tiff-alpha-broken-assoc-alpha-gdal", 'sizes':[(600,400)]}, - {'name': "tiff-alpha-gradient-gdal", 'sizes':[(600,400)]}, - {'name': "tiff-nodata-edge-gdal", 'sizes':[(600,400),(969,793)]}, - {'name': "tiff-opaque-edge-gdal", 'sizes':[(256,256),(969,793)]}, - {'name': "tiff-opaque-edge-gdal2", 'sizes':[(600,400),(969,793)]}, - {'name': "tiff-opaque-edge-raster2", 'sizes':[(600,400),(969,793)]}, - {'name': "tiff-resampling", 'sizes':[(600,400)]}, + 'text-halo-rasterizer': {'sizes':[(600,400)]}, + 'simple-E': {'bbox':mapnik.Box2d(-0.05, -0.01, 0.95, 0.01)}, + 'simple-NE': {'bbox':default_text_box}, + 'simple-NW': {'bbox':default_text_box}, + 'simple-N': {'bbox':default_text_box}, + 'simple-SE': {'bbox':default_text_box}, + 'simple-SW': {'bbox':default_text_box}, + 'simple-S': {'bbox':default_text_box}, + 'simple-W': {'bbox':default_text_box}, + 'formatting-1': {'bbox':default_text_box}, + 'formatting-2': {'bbox':default_text_box}, + 'formatting-3': {'bbox':default_text_box}, + 'formatting-4': {'bbox':default_text_box}, + 'expressionformat': {'bbox':default_text_box}, + 'shieldsymbolizer-1': {'sizes': sizes_many_in_small_range,'bbox':default_text_box}, + 'rtl-point': {'sizes': [(200, 200)],'bbox':default_text_box}, + 'jalign-auto': {'sizes': [(200, 200)],'bbox':default_text_box}, + 'line-offset': {'sizes':[(900, 250)],'bbox': mapnik.Box2d(-5.192, 50.189, -5.174, 50.195)}, + 'tiff-alpha-gdal': {'sizes':[(600,400)]}, + 'tiff-alpha-broken-assoc-alpha-gdal': {'sizes':[(600,400)]}, + 'tiff-alpha-gradient-gdal': {'sizes':[(600,400)]}, + 'tiff-nodata-edge-gdal': {'sizes':[(600,400),(969,793)]}, + 'tiff-opaque-edge-gdal': {'sizes':[(256,256),(969,793)]}, + 'tiff-opaque-edge-gdal2': {'sizes':[(600,400),(969,793)]}, + 'tiff-opaque-edge-raster2': {'sizes':[(600,400),(969,793)]}, + 'tiff-resampling': {'sizes':[(600,400)]}, # https://github.com/mapnik/mapnik/issues/1622 - {'name': "tiff-edge-alignment-gdal1", 'sizes':[(256,256),(255,257)], + 'tiff-edge-alignment-gdal1': {'sizes':[(256,256),(255,257)], 'bbox':mapnik.Box2d(-13267022.12540147,4618019.500877209,-13247454.246160466,4637587.380118214) }, - {'name': "tiff-edge-alignment-gdal2", 'sizes':[(256,256),(255,257)], + 'tiff-edge-alignment-gdal2': {'sizes':[(256,256),(255,257)], 'bbox':mapnik.Box2d(-13267022.12540147,4598451.621636203,-13247454.246160466,4618019.500877209) }, # https://github.com/mapnik/mapnik/issues/1520 # commented because these are not critical failures - #{'name': "tiff-alpha-raster", 'sizes':[(600,400)]}, - #{'name': "tiff-alpha-broken-assoc-alpha-raster", 'sizes':[(600,400)]}, - #{'name': "tiff-nodata-edge-raster", 'sizes':[(600,400)]}, - #{'name': "tiff-opaque-edge-raster", 'sizes':[(256,256)]}, - ] + #'tiff-alpha-raster': {'sizes':[(600,400)]}, + #'tiff-alpha-broken-assoc-alpha-raster': {'sizes':[(600,400)]}, + #'tiff-nodata-edge-raster': {'sizes':[(600,400)]}, + #'tiff-opaque-edge-raster': {'sizes':[(256,256)]}, + } class Reporting: DIFF = 1 NOT_FOUND = 2 OTHER = 3 REPLACE = 4 - def __init__(self, quiet, generate = False, overwrite_failures = False): + def __init__(self, quiet, overwrite_failures = False): self.quiet = quiet self.passed = 0 self.failed = 0 - self.generate = generate self.overwrite_failures = overwrite_failures self.errors = [ #(type, actual, expected, diff, message) ] @@ -119,7 +121,7 @@ class Reporting: else: print '\x1b[31m✘\x1b[0m (\x1b[34m%u different pixels\x1b[0m)' % diff - if self.generate: + if self.overwrite_failures: self.errors.append((self.REPLACE, actual, expected, diff, None)) contents = open(actual, 'r').read() open(expected, 'wb').write(contents) @@ -139,10 +141,9 @@ class Reporting: if self.quiet: sys.stderr.write('\x1b[33m.\x1b[0m') else: - print '\x1b[33m?\x1b[0m (\x1b[34mReference file not found\x1b[0m)' - if self.generate: - contents = open(actual, 'r').read() - open(expected, 'wb').write(contents) + print '\x1b[33m?\x1b[0m (\x1b[34mReference file not found, creating\x1b[0m)' + contents = open(actual, 'r').read() + open(expected, 'wb').write(contents) def other_error(self, expected, message): self.failed += 1 @@ -152,24 +153,68 @@ class Reporting: else: print '\x1b[31m✘\x1b[0m (\x1b[34m%s\x1b[0m)' % message - def summary(self, generate=False): + def make_html_item(self,actual,expected,diff): + item = ''' +
+ + + +
+ ''' % (expected,expected,'%') + item += '
%s
' % (diff) + item += ''' +
+ + + +
+ ''' % (actual,actual,'%') + return item + + def summary(self): + if self.passed == 0: + print '\nNOTICE: No valid visual tests were run' + return 0 if len(self.errors) == 0: print '\nAll %s visual tests passed: \x1b[1;32m✓ \x1b[0m' % self.passed return 0 + sortable_errors = [] print "\nVisual rendering: %s failed / %s passed" % (len(self.errors), self.passed) for idx, error in enumerate(self.errors): if error[0] == self.OTHER: print str(idx+1) + ") \x1b[31mfailure to run test:\x1b[0m %s" % error[2] elif error[0] == self.NOT_FOUND: - if self.generate: - print str(idx+1) + ") Generating reference image: '%s'" % error[2] - else: - print str(idx+1) + ")Could not verify %s: No reference image found!" % error[1] + print str(idx+1) + ") Generating reference image: '%s'" % error[2] continue elif error[0] == self.DIFF: print str(idx+1) + ") \x1b[34m%s different pixels\x1b[0m:\n\t%s (\x1b[31mactual\x1b[0m)\n\t%s (\x1b[32mexpected\x1b[0m)" % (error[3], error[1], error[2]) + if '.png' in error[1]: # ignore grids + sortable_errors.append((error[3],error)) elif error[0] == self.REPLACE: print str(idx+1) + ") \x1b[31mreplaced reference with new version:\x1b[0m %s" % error[2] + if len(sortable_errors): + # drop failure results in folder + vdir = os.path.join(visual_output_dir,'visual-test-results') + if not os.path.exists(vdir): + os.makedirs(vdir) + html_template = open(os.path.join(dirname,'html_report_template.html'),'r').read() + name = 'comparison.html' + failures_realpath = os.path.join(vdir,name) + html_out = open(failures_realpath,'w+') + sortable_errors.sort(reverse=True) + html_body = '' + for item in sortable_errors: + # copy images into single directory + actual = item[1][1] + expected = item[1][2] + diff = item[0] + actual_new = os.path.join(vdir,os.path.basename(actual)) + shutil.copy(actual,actual_new) + expected_new = os.path.join(vdir,os.path.basename(expected)) + shutil.copy(expected,expected_new) + html_body += self.make_html_item(os.path.relpath(actual_new,vdir),os.path.relpath(expected_new,vdir),diff) + html_out.write(html_template.replace('{{RESULTS}}',html_body)) + print 'View failures by opening %s' % failures_realpath return 1 def render_cairo(m, output, scale_factor): @@ -196,7 +241,7 @@ renderers = [ { 'name': 'cairo', 'render': render_cairo, 'compare': lambda actual, reference: compare(actual, reference, alpha=False), - 'threshold': 0, + 'threshold': 10, 'filetype': 'png', 'dir': 'images' }, @@ -210,8 +255,7 @@ renderers = [ ] -def render(config, width, height, bbox, scale_factor, reporting): - filename = config['name'] +def render(filename,config, width, height, bbox, scale_factor, reporting): m = mapnik.Map(width, height) postfix = "%s-%d-%d-%s" % (filename, width, height, scale_factor) @@ -222,6 +266,8 @@ def render(config, width, height, bbox, scale_factor, reporting): else: m.zoom_all() except Exception, e: + if 'Could not create datasource' in str(e): + return m reporting.other_error(filename, repr(e)) return m @@ -263,32 +309,32 @@ if __name__ == "__main__": else: overwrite_failures = False - if len(sys.argv) == 2: - files = [{"name": sys.argv[1], "sizes": sizes_few_square}] - elif len(sys.argv) > 2: - files = [] + select_files = {} + if len(sys.argv) > 1: for name in sys.argv[1:]: - files.append({"name": name}) + if name in files: + select_files[name]=files[name] + else: + select_files[name]={} + if len(select_files) > 0: + files = select_files if not os.path.exists(visual_output_dir): os.makedirs(visual_output_dir) + reporting = Reporting(quiet, overwrite_failures) + for filename in files: + config = dict(defaults) + config.update(files[filename]) + for size in config['sizes']: + for scale_factor in config['scales']: + m = render(filename, + config, + size[0], + size[1], + config.get('bbox'), + scale_factor, + reporting) + mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % filename)) - if 'osm' in mapnik.DatasourceCache.plugin_names(): - reporting = Reporting(quiet, overwrite_failures) - for f in files: - config = dict(defaults) - config.update(f) - for size in config['sizes']: - for scale_factor in config['scales']: - m = render(config, - size[0], - size[1], - config.get('bbox'), - scale_factor, - reporting) - mapnik.save_map(m, os.path.join(dirname, 'xml_output', "%s-out.xml" % config['name'])) - - sys.exit(reporting.summary(generate=True)) - else: - print "OSM plugin required" + sys.exit(reporting.summary()) diff --git a/tests/visual_tests/test_python.py b/tests/visual_tests/test_python.py index 00857fbd1..ac5165c1d 100755 --- a/tests/visual_tests/test_python.py +++ b/tests/visual_tests/test_python.py @@ -71,7 +71,7 @@ m.append_style('Style', style) layer = mapnik.Layer('Layer') -layer.datasource = mapnik.Osm(file=os.path.join(dirname,"data/points.osm")) +layer.datasource = mapnik.Datasource(**{file=os.path.join(dirname,"data/points.csv")) layer.styles.append('Style') m.layers.append(layer) @@ -85,7 +85,7 @@ formatnode.fill = mapnik.Color("green") format_trees = [ ('TextNode', mapnik.FormattingText("[name]")), ('MyText', MyText()), - ('IfElse', IfElse("[nr] != '5'", + ('IfElse', IfElse("[nr] != 5", mapnik.FormattingText("[name]"), mapnik.FormattingText("'SPECIAL!'"))), ('Format', formatnode), diff --git a/utils/mapnik-config/build.py b/utils/mapnik-config/build.py index deef156a7..6b94f3c37 100644 --- a/utils/mapnik-config/build.py +++ b/utils/mapnik-config/build.py @@ -52,6 +52,7 @@ if config_env['HAS_CAIRO']: dep_includes += ''.join([' -I%s' % i for i in env['CAIRO_CPPPATHS'] if not i.startswith('#')]) ldflags = config_env['CUSTOM_LDFLAGS'] + ''.join([' -L%s' % i for i in config_env['LIBPATH'] if not i.startswith('#')]) +ldflags += config_env['LIBMAPNIK_LINKFLAGS'] dep_libs = ''.join([' -l%s' % i for i in env['LIBMAPNIK_LIBS']]) diff --git a/utils/mapnik-config/mapnik-config.template.sh b/utils/mapnik-config/mapnik-config.template.sh index 7e1237cff..a71fdf642 100755 --- a/utils/mapnik-config/mapnik-config.template.sh +++ b/utils/mapnik-config/mapnik-config.template.sh @@ -10,23 +10,23 @@ Known values for OPTION are: -h --help display this help and exit -v --version version information (MAPNIK_VERSION_STRING) - --version-number version number (MAPNIK_VERSION) + --version-number version number (MAPNIK_VERSION) (new in 2.2.0) --git-revision git hash from "git rev-list --max-count=1 HEAD" - --git-describe git decribe output (new in 2.2.x) + --git-describe git decribe output (new in 2.2.0) --fonts default fonts directory --input-plugins default input plugins directory - --defines pre-processor defines for Mapnik build (new in 2.2.x) + --defines pre-processor defines for Mapnik build (new in 2.2.0) --prefix Mapnik prefix [default $CONFIG_PREFIX] --lib-name Mapnik library name --libs library linking information --dep-libs library linking information for Mapnik dependencies --ldflags library paths (-L) information - --includes include paths (-I) for Mapnik headers (new in 2.2.x) - --dep-includes include paths (-I) for Mapnik dependencies (new in 2.2.x) - --cxxflags c++ compiler flags and pre-processor defines (new in 2.2.x) + --includes include paths (-I) for Mapnik headers (new in 2.2.0) + --dep-includes include paths (-I) for Mapnik dependencies (new in 2.2.0) + --cxxflags c++ compiler flags and pre-processor defines (new in 2.2.0) --cflags all include paths, compiler flags, and pre-processor defines (for back-compatibility) - --cxx c++ compiler used to build mapnik (new in 2.2.x) - --all-flags all compile and link flags + --cxx c++ compiler used to build mapnik (new in 2.2.0) + --all-flags all compile and link flags (new in 2.2.0) EOF exit $1