Merge branch 'master' of https://github.com/mapnik/mapnik into geobuf

This commit is contained in:
bergwerkgis 2016-08-16 10:50:24 +02:00
commit 7e642481af
743 changed files with 17851 additions and 21210 deletions

3
.gitmodules vendored
View file

@ -6,3 +6,6 @@
path = test/data-visual
url = https://github.com/mapnik/test-data-visual.git
branch = master
[submodule "deps/mapbox/variant"]
path = deps/mapbox/variant
url = https://github.com/mapbox/variant.git

View file

@ -1,23 +1,20 @@
language: cpp
sudo: false
git:
depth: 10
submodules: true
submodules: false
env:
global:
- CCACHE_TEMPDIR=/tmp/.ccache-temp
- CCACHE_COMPRESS=1
- HEAVY_JOBS="2"
- PREFIX=/tmp/mapnik
- secure: "N3a5nzzsgpuu45k8qWdYsHNxrSnqeAGLTOYpfYoAH7B94vuf7pa7XV1tQjXbxrnx2D6ryTdtUtyRKwy7zXbwXxGt4DpczWEo8f6DUd6+obAp3kdnXABg2Sj4oA7KMs0F0CmoADy0jdUZD5YyOJHu64LCIIgzEQ9q49PFMNbU3IE="
- secure: "iQYPNpMtejcgYeUkWZGIWz1msIco5qydJrhZTSCQOYahAQerdT7q5WZEpEo3G6IWOGgO1eo7GFuY8DvqQjw1+jC9b9mhkRNdo3LhGTKS9Gsbl5Q27k0rjlaFZmmQHrfPlQJwhfAIp+KLugHtQw5bCoLh+95E3j0F0DayF1tuJ3s="
- secure: "F6ivqDNMBQQnrDGA9+7IX+GDswuIqQQd7YPJdQqa2Ked9jddAQDeJClb05ig3JlwfOlYLGZOd43ZX0pKuMtI2Gbkwz211agGP9S3YunwlRg8iWtJlO5kYFUdKCmJNhjg4icfkGELCgwXn+zuEWFSLpkPcjqAFKFlQrIJeAJJgKM="
addons:
postgresql: "9.4"
apt:
sources:
- ubuntu-toolchain-r-test
- llvm-toolchain-precise-3.5
packages:
- clang-3.5
cache:
directories:
@ -26,66 +23,86 @@ cache:
matrix:
include:
- os: linux
compiler: clang
env: JOBS=8 MASON_PUBLISH=true
sudo: false
compiler: ": clang"
env: JOBS=8 MASON_PUBLISH=true _CXX="ccache clang++-3.8 -Qunused-arguments" _CC="clang-3.8" TRIGGER=true
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test']
packages: [ 'libstdc++-5-dev', 'xutils']
- os: linux
compiler: gcc
env: JOBS=6
sudo: false
compiler: ": clang-coverage"
env: JOBS=8 COVERAGE=true _CXX="ccache clang++-3.8 -Qunused-arguments" _CC="clang-3.8"
addons:
apt:
sources: [ 'ubuntu-toolchain-r-test']
packages: ['libstdc++-5-dev', 'xutils' ]
- os: osx
compiler: clang
env: JOBS=8 MASON_PUBLISH=true
- os: osx
compiler: clang
env: JOBS=8 COVERAGE=true
compiler: ": clang-osx"
# https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions
osx_image: xcode7.3 # upgrades clang from 6 -> 7
env: JOBS=4 MASON_PUBLISH=true _CXX="ccache clang++ -Qunused-arguments"
before_install:
# workaround travis rvm bug
# http://superuser.com/questions/1044130/why-am-i-having-how-can-i-fix-this-error-shell-session-update-command-not-f
- |
if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then
rvm get head || true
fi
- if [[ ${_CXX:-false} != false ]]; then export CXX=${_CXX}; fi
- if [[ ${_CC:-false} != false ]]; then export CC=${_CC}; fi
- source scripts/travis-common.sh
- export PYTHONUSERBASE=$(pwd)/mason_packages/.link
- export PATH=${PREFIX}/bin:$(pwd)/mason_packages/.link/bin:${PYTHONUSERBASE}/bin:${PATH}
- export COVERAGE=${COVERAGE:-false}
- export MASON_PUBLISH=${MASON_PUBLISH:-false}
- export BENCH=${BENCH:-false}
- if [[ ${TRAVIS_BRANCH} != 'master' ]]; then export MASON_PUBLISH=false; fi
- if [[ ${TRAVIS_PULL_REQUEST} != 'false' ]]; then export MASON_PUBLISH=false; fi
- git_submodule_update --init --depth=10
install:
- if [[ $(uname -s) == 'Linux' ]]; then
export CXX="ccache clang++-3.5 -Qunused-arguments";
export CC="ccache clang-3.5 -Qunused-arguments";
export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python2.7/site-packages;
else
brew rm postgis --force;
brew install postgis --force;
pg_ctl -w start -l postgres.log --pgdata /usr/local/var/postgres;
createuser -s postgres;
export PYTHONPATH=$(pwd)/mason_packages/.link/lib/python/site-packages;
fi
- psql -c 'create database template_postgis;' -U postgres;
- psql -c 'create extension postgis;' -d template_postgis -U postgres;
- if [[ ${COVERAGE} == true ]]; then
PYTHONUSERBASE=$(pwd)/mason_packages/.link pip install --user cpp-coveralls;
- on 'linux' export PYTHONPATH=${PYTHONUSERBASE}/lib/python2.7/site-packages
- on 'osx' export PYTHONPATH=${PYTHONUSERBASE}/lib/python/site-packages
- on 'osx' export DATA_PATH=$(brew --prefix)/var/postgres
- on 'osx' rm -rf ${DATA_PATH}
- on 'osx' initdb ${DATA_PATH} -E utf8
- on 'osx' pg_ctl -w start -l postgres.log --pgdata ${DATA_PATH};
- on 'osx' cat postgres.log;
- on 'osx' createuser -s postgres
- psql -c 'create database template_postgis;' -U postgres
- psql -c 'create extension postgis;' -d template_postgis -U postgres
- enabled ${COVERAGE} pip install --user cpp-coveralls
before_script:
- source bootstrap.sh
- |
if [[ $(uname -s) == 'Linux' ]]; then
mason install clang 3.8.0
export PATH=$(mason prefix clang 3.8.0)/bin:${PATH}
which clang++
export LLVM_COV="$(mason prefix clang 3.8.0)/bin/llvm-cov"
fi
- ccache --version
- ccache -p || true
- ccache --show-stats || true
- commit_message_parse
script:
- source bootstrap.sh
- if [[ ${COVERAGE} == true ]]; then
./configure CUSTOM_LDFLAGS='--coverage' CUSTOM_CXXFLAGS='--coverage' CUSTOM_CFLAGS='--coverage' DEBUG=True;
elif [[ ${MASON_PUBLISH} == true ]]; then
export MASON_NAME=mapnik;
export MASON_VERSION=latest;
export MASON_LIB_FILE=lib/libmapnik-wkt.a;
source ./.mason/mason.sh;
./configure PREFIX=${MASON_PREFIX} PATH_REPLACE='' MAPNIK_BUNDLED_SHARE_DIRECTORY=True RUNTIME_LINK='static';
else
./configure;
fi
- export SCONSFLAGS='--debug=time'
- configure BENCHMARK=${BENCH}
- cat config.log
- make
- make test || TEST_RESULT=$?
- if [[ ${COVERAGE} == true ]]; then
./mason_packages/.link/bin/cpp-coveralls --build-root . --gcov-options '\-lp' --exclude mason_packages --exclude .sconf_temp --exclude benchmark --exclude deps --exclude scons --exclude test --exclude demo --exclude docs --exclude fonts --exclude utils > /dev/null;
fi
- if [[ ${COVERAGE} != true ]]; then
make bench;
fi
- if [[ ${TEST_RESULT} != 0 ]]; then exit $TEST_RESULT ; fi;
- if [[ ${MASON_PUBLISH} == true ]]; then
./mason_latest.sh build;
./mason_latest.sh link;
- make test
- enabled ${COVERAGE} coverage
- enabled ${BENCH} make bench
after_success:
- enabled ${TRIGGER} trigger_downstream
- if enabled ${MASON_PUBLISH}; then
source ./.mason/mason.sh &&
./mason_latest.sh build &&
./mason_latest.sh publish;
fi

View file

@ -6,6 +6,83 @@ Developers: Please commit along with changes.
For a complete change history, see the git log.
## 3.0.12
Released: xx-xx-xx
(Packaged from xxxxxx)
#### Summary
- Ensured gdal.input is registered once (refs #3093 #3339 #3340)
- Fixed `mapnik::util::is_clockwise` implementation to use coordinates relative to the origin and avoid numeric precision issues
- `mapnik-index` is updated to fail on first error in input (csv)
- Added `guard` to `get_object_severity` method (ref #3322)
- Improved `hash` calculation for `mapnik::value` (ref #3406)
- AGG - made cover `unsigned` to avoid left shift of negative values (ref #3406)
- Fixed using `scale_factor` in `evaluate_transform(..)`
- Fixed line spacing logic by applying `scale factor`
- ~~Fixed `stringify_object/stringify_array` implementations by disabling white space skipping (ref #3419)~~
- Added geojson unit test for property types/values
- JSON - added support for object and array type in `json_value` and update `stringifier`
- GDAL.input - fallback to using `overviews` if present (8e8482803bb435726534c3b686a56037b7d3e8ad)
- TopoJSON.input - improved and simplified grammer/parser implementation (https://github.com/mapnik/mapnik/pull/3429)
- GDAL.input - Added support for non-alpha mask band
- TopoJSON.input - fixed order of ellements limitation (ref #3434)
- Fixed stroke-width size not included in markers ellipse bounding box (ref #3445)
- Implemented `char_array_buffer` and removed `boost::iostreams` dependency (2e8c0d36c2237f2815d8004c1b96bad909056eb9)
- JSON.input - `extract_bounding_box_grammar` - make features optional (ref #3463)
- Ensure input plugins return `empty_featureset` rather than `nullptr` (feature_ptr())
- Added support for quantising small (less than 3 pixel) images (ref #3466)
- Added support for natural logarithm function in expressions (ref #3475)
- Improved logic determining if certain compiler features are available e.g `inheriting constructors` (MSVC)
- GeoJSON - corrected quoting in `stringgifird` objects (ref #3491)
## 3.0.11
Released: April 1, 2016
(Packaged from 8d9dc27)
#### Summary
- Raster scaling: fixed crash and clipping negative pixel values of floating point rasters (https://github.com/mapnik/mapnik/pull/3349)
- Restored support for unquoted strings in expressions (https://github.com/mapnik/mapnik/pull/3390)
- [TWKB](https://github.com/TWKB/) support via https://github.com/mapnik/mapnik/pull/3356 (#3355)
- Visual test runner can render SVG, PDF and Postscript with Cairo renderer (https://github.com/mapnik/mapnik/pull/3418)
- Scale factor is now applied also to `text-line-spacing` and transforms (https://github.com/mapnik/mapnik/pull/3416)
## 3.0.10
Released: February 25, 2016
(Packaged from 5c0d496)
#### Summary
- The `shapeindex` command now has a `--index-parts` option. When used the index will be bigger
but will allow the Shapefile datasource to only parse polygon parts within the query bounds.
- WARNING: index files generated with this newer Mapnik are invalid for older versions of Mapnik.
- Any `.index` files accompanying a `.shp` must now be regenerated otherwise
it will be skipped. To avoid this problem you can delete the existing `.index` files, or ideally run `shapeindex` to recreate the `.index`. (https://github.com/mapnik/mapnik/pull/3300)
The trigger for this change was an optimization that required a new binary format for the shapefile indexes (https://github.com/mapnik/mapnik/pull/3217).
- Shapeindex - another fix for skipping `null` shapes (#3288)
- Fixed support for filter expressions starting with `not` (https://github.com/mapnik/mapnik/issues/3017)
- Ensure `mapped_memory_cache` acts as singleton across shared objects (#3306)
- Removed miniz support in PNG encoder (#3281)
- Added `-fvisibility=hidden -fvisibility-inlines-hidden` to default compiler flags
- Fixed parsing of SVG `PathElement` (https://github.com/mapnik/mapnik/issues/3225)
- JSON parsing now supports arbitrary (nested) attributes in `geometry`
- Support for rendering `dash-array` in SVGs
- SVG parser is now stricter (fails is all input is not parsable) (#3251)
- SVG parser now correctly handles optional separator `(,)` between multiple command parts
- Optimized parsing of `png` format string
- The `memory_datasource` now dynamically reports correct datasource type (vector or raster)
- Upgraded `mapbox::variant v1.1.0`
- Compare: https://github.com/mapnik/mapnik/compare/v3.0.9...v3.0.10
## 3.0.9
Released: November 26, 2015
@ -18,12 +95,12 @@ Released: November 26, 2015
- Fixed mapnik.util.variant issue when compiling with gcc-5.x and SSO enabled by default (https://github.com/mapnik/mapnik/issues/3103) (via @nkovacs)
- Fixed issue with complex scripts where some character sequences weren't rendered correctly (https://github.com/mapnik/mapnik/issues/3050) (via @jkroll20)
- Revived postgis.input tests
- JSON: geometry grammar has been refactored and optimized to have expectation points
- JSON: geometry grammar has been re-factored and optimized to have expectation points
- Filled missing specializations for value_bool in `mapnik::value` comparison operators
- `mapnik.Image` - fixed copy semantics implementation for internal buffer
- JSON parsing: unified error_handler across all grammars
- Improved unit test coverage
- Raster scaling: fixed nodata handling, acurracy when working with small floats and clipping floats by \[0; 255\] (https://github.com/mapnik/mapnik/pull/3147)
- Raster scaling: fixed nodata handling, accuracy when working with small floats and clipping floats by \[0; 255\] (https://github.com/mapnik/mapnik/pull/3147)
- Added [`code of conduct`](http://contributor-covenant.org)
- GeoJSON plug-in is updated to skip feature with empty geometries
- GeoJSON plug-in : ensure original order of features is preserved (fixed) (https://github.com/mapnik/mapnik/issues/3182)
@ -41,9 +118,9 @@ Released: October 23, 2015
- Renamed `SHAPE_MEMORY_MAPPED_FILE` define to `MAPNIK_MEMORY_MAPPED_FILE`. Pass `./configure MEMORY_MAPPED_FILE=True|False` to request
support for memory mapped files across Mapnik plugins (currently shape, csv, and geojson).
- Unified `mapnik-index` utility supporing GeoJSON and CSV formats
- Unified `mapnik-index` utility supporting GeoJSON and CSV formats
- Increased unit test coverage for GeoJSON and CSV plugins
- shape.input - refactor to support *.shx and improve handling various bogus shapefiles
- shape.input - re-factor to support *.shx and improve handling various bogus shapefiles
- geojson.input - make JSON parser stricter + support single Feature/Geometry as well as FeatureCollection
- maintain 'FT_LOAD_NO_HINTING' + support >= harfbuzz 1.0.5
- geojson.input - implement on-disk-index support
@ -109,7 +186,7 @@ Released: August 26, 2015
#### Summary
- CSV.input: plug-in has been refactored to minimise memory usage and to improve handling of larger input.
- CSV.input: plug-in has been re-factored to minimise memory usage and to improve handling of larger input.
(NOTE: [large_csv](https://github.com/mapnik/mapnik/tree/large_csv) branch adds experimental trunsduction parser with deferred string initialisation)
- CSV.input: added internal spatial index (boost::geometry::index::tree) for fast `bounding box` queries (https://github.com/mapnik/mapnik/pull/3010)
- Fixed deadlock in recursive datasource registration via @zerebubuth (https://github.com/mapnik/mapnik/pull/3038)
@ -1200,7 +1277,7 @@ Released April 1, 2009
- Plugins: Use memory mapped files for reading shape file (r628)
- Core: Use streams to write images (i/o refactor) (r628) (#15)
- Core: Use streams to write images (i/o re-factor) (r628) (#15)
# Mapnik 0.5.1

View file

@ -2,6 +2,13 @@
Mapnik runs on Linux, OS X, Windows, and BSD systems.
First clone mapnik from github and initialize submodules
```bash
git clone https://github.com/mapnik/mapnik.git
git submodule update --init
```
To configure and build Mapnik do:
```bash
@ -35,7 +42,6 @@ NOTE: the above will not work on windows, rather see https://github.com/mapnik/m
Then to run the tests locally (without needing to install):
git submodule update --init
make test
Install like:
@ -92,7 +98,7 @@ Additional optional dependencies:
* PostgreSQL (for PostGIS plugin support)
- libpq - PostreSQL libraries
- pg_config - PostgreSQL installation capabilities
* libgdal - GDAL/OGR input (For gdal and ogr plugin support)
* libgdal - GDAL/OGR input (For gdal and ogr plugin support) (>= GDAL 2.0.2 for thread safety - https://github.com/mapnik/mapnik/issues/3339)
* libsqlite3 - SQLite input (needs RTree support builtin) (sqlite plugin support)
Instructions for installing many of these dependencies on

View file

@ -7,6 +7,10 @@ ifeq ($(JOBS),)
JOBS:=1
endif
ifeq ($(HEAVY_JOBS),)
HEAVY_JOBS:=1
endif
all: mapnik
install:
@ -20,7 +24,8 @@ release:
git clone --depth 1 --branch v$${MAPNIK_VERSION} git@github.com:mapnik/mapnik.git $${TARBALL_NAME} && \
cd $${TARBALL_NAME} && \
git checkout "tags/v$${MAPNIK_VERSION}" && \
git submodule update --depth 1 --init && \
git submodule update --depth 100 --init && \
rm -rf deps/mapbox/variant/.git && \
rm -rf test/data/.git && \
rm -rf test/data/.gitignore && \
rm -rf test/data-visual/.git && \
@ -37,22 +42,28 @@ python:
python bindings/python/test/visual.py -q
src/json/libmapnik-json.a:
# we first build memory intensive files with -j1
$(PYTHON) scons/scons.py -j1 \
# we first build memory intensive files with -j$(HEAVY_JOBS)
$(PYTHON) scons/scons.py -j$(HEAVY_JOBS) \
--config=cache --implicit-cache --max-drift=1 \
src/renderer_common/process_group_symbolizer.os \
src/renderer_common/render_group_symbolizer.os \
src/renderer_common/render_markers_symbolizer.os \
src/renderer_common/render_thunk_extractor.os \
src/json/libmapnik-json.a \
src/wkt/libmapnik-wkt.a \
src/css_color_grammar.os \
src/expression_grammar.os \
src/transform_expression_grammar.os \
src/image_filter_types.os \
src/agg/process_markers_symbolizer.os \
src/agg/process_group_symbolizer.os \
src/grid/process_markers_symbolizer.os \
src/grid/process_group_symbolizer.os \
src/cairo/process_markers_symbolizer.os \
src/cairo/process_group_symbolizer.os \
src/image_filter_grammar.os \
src/marker_helpers.os \
src/svg/svg_transform_parser.os \
src/agg/process_line_symbolizer.os \
plugins/input/geojson/geojson_datasource.os \
utils/mapnik-index/process_geojson_file.o \
src/svg/svg_path_parser.os \
src/svg/svg_parser.os \
src/svg/svg_points_parser.os \
src/svg/svg_transform_parser.os \
mapnik: src/json/libmapnik-json.a
# then install the rest with -j$(JOBS)
@ -70,6 +81,8 @@ clean:
@find ./src/ -name "*.so" -exec rm {} \;
@find ./ -name "*.o" -exec rm {} \;
@find ./src/ -name "*.a" -exec rm {} \;
@find ./ -name "*.gcda" -exec rm {} \;
@find ./ -name "*.gcno" -exec rm {} \;
distclean:
if test -e "config.py"; then mv "config.py" "config.py.backup"; fi

View file

@ -8,8 +8,9 @@ _/ _/ _/_/_/ _/_/_/ _/ _/ _/ _/ _/
_/
```
[![Build Status Linux](https://secure.travis-ci.org/mapnik/mapnik.png)](http://travis-ci.org/mapnik/mapnik)
[![Build status Windows](https://ci.appveyor.com/api/projects/status/hc9l7okdjtucfqqn?svg=true)](https://ci.appveyor.com/project/Mapbox/mapnik)
[![Build Status Linux](https://api.travis-ci.org/mapnik/mapnik.svg?branch=master)](http://travis-ci.org/mapnik/mapnik)
[![CircleCI](https://circleci.com/gh/mapnik/mapnik.svg?style=svg)](https://circleci.com/gh/mapnik/mapnik)
[![Build Status Windows](https://ci.appveyor.com/api/projects/status/hc9l7okdjtucfqqn?branch=master&svg=true)](https://ci.appveyor.com/project/Mapbox/mapnik)
[![Coverage Status](https://coveralls.io/repos/mapnik/mapnik/badge.svg?branch=master&service=github)](https://coveralls.io/github/mapnik/mapnik?branch=master)
Mapnik is an open source toolkit for developing mapping applications. At the core is a C++ shared library providing algorithms and patterns for spatial data access and visualization.
@ -20,7 +21,7 @@ For further information see [http://mapnik.org](http://mapnik.org) and also our
# Installation
See [INSTALL.md](https://github.com/mapnik/mapnik/blob/master/INSTALL.md) for installation instructions and the [Install](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) page on the wiki for guides.
See [INSTALL.md](INSTALL.md) for installation instructions and the [Install](https://github.com/mapnik/mapnik/wiki/Mapnik-Installation) page on the wiki for guides.
# Code of Conduct
@ -28,4 +29,4 @@ Please note that this project is released with a [Contributor Code of Conduct](h
# License
Mapnik software is free and is released under the LGPL ([GNU Lesser General Public License](http://www.gnu.org/licenses/lgpl.html_)). Please see [COPYING](https://github.com/mapnik/mapnik/blob/master/COPYING) for more information.
Mapnik software is free and is released under the LGPL ([GNU Lesser General Public License](http://www.gnu.org/licenses/lgpl.html)). Please see [COPYING](https://github.com/mapnik/mapnik/blob/master/COPYING) for more information.

View file

@ -294,7 +294,9 @@ opts.AddVariables(
EnumVariable('OPTIMIZATION','Set compiler optimization level','3', ['0','1','2','3','4','s']),
# Note: setting DEBUG=True will override any custom OPTIMIZATION level
BoolVariable('DEBUG', 'Compile a debug version of Mapnik', 'False'),
BoolVariable('COVERAGE', 'Compile a libmapnik and plugins with --coverage', 'False'),
BoolVariable('DEBUG_UNDEFINED', 'Compile a version of Mapnik using clang/llvm undefined behavior asserts', 'False'),
BoolVariable('DEBUG_SANITIZE', 'Compile a version of Mapnik using clang/llvm address sanitation', 'False'),
ListVariable('INPUT_PLUGINS','Input drivers to include',DEFAULT_PLUGINS,PLUGINS.keys()),
('WARNING_CXXFLAGS', 'Compiler flags you can set to reduce warning levels which are placed after -Wall.', ''),
@ -303,6 +305,7 @@ opts.AddVariables(
('CONFIG', "The path to the python file in which to save user configuration options. Currently : '%s'" % SCONS_LOCAL_CONFIG,SCONS_LOCAL_CONFIG),
BoolVariable('USE_CONFIG', "Use SCons user '%s' file (will also write variables after successful configuration)", 'True'),
BoolVariable('NO_ATEXIT', 'Will prevent Singletons from being deleted atexit of main thread', 'False'),
BoolVariable('NO_DLCLOSE', 'Will prevent plugins from being unloaded', 'False'),
# http://www.scons.org/wiki/GoFastButton
# http://stackoverflow.com/questions/1318863/how-to-optimize-an-scons-script
BoolVariable('FAST', "Make SCons faster at the cost of less precise dependency tracking", 'False'),
@ -317,7 +320,6 @@ opts.AddVariables(
('PATH_REMOVE', 'A path prefix to exclude from all known command and compile paths (create multiple excludes separated by :)', ''),
('PATH_REPLACE', 'Two path prefixes (divided with a :) to search/replace from all known command and compile paths', ''),
('MAPNIK_NAME', 'Name of library', 'mapnik'),
BoolVariable('MAPNIK_BUNDLED_SHARE_DIRECTORY', 'For portable packaging: instruct mapnik-config to report relative paths to bundled GDAL_DATA, PROJ_LIB, and ICU_DATA','False'),
# Boost variables
# default is '/usr/include', see FindBoost method below
@ -703,10 +705,6 @@ def FindBoost(context, prefixes, thread_flag):
BOOST_INCLUDE_DIR = None
BOOST_APPEND = None
env['BOOST_APPEND'] = str()
if env['THREADING'] == 'multi':
search_lib = 'libboost_thread'
else:
search_lib = 'libboost_filesystem'
# note: must call normpath to strip trailing slash otherwise dirname
@ -1139,6 +1137,9 @@ if not preconfigured:
else:
mode = 'release mode'
if env['COVERAGE']:
mode += ' (with coverage)'
env['PLATFORM'] = platform.uname()[0]
color_print(4,"Configuring on %s in *%s*..." % (env['PLATFORM'],mode))
@ -1355,7 +1356,7 @@ if not preconfigured:
# test for C++11 support, which is required
if not env['HOST'] and not conf.supports_cxx11():
color_print(1,"C++ compiler does not support C++11 standard (-std=c++11), which is required. Please upgrade your compiler to at least g++ 4.7 (ideally 4.8)")
color_print(1,"C++ compiler does not support C++11 standard (-std=c++11), which is required. Please upgrade your compiler")
Exit(1)
if not env['HOST']:
@ -1407,15 +1408,6 @@ if not preconfigured:
['program_options', 'boost/program_options.hpp', False]
]
if env['THREADING'] == 'multi':
BOOST_LIBSHEADERS.append(['thread', 'boost/thread/mutex.hpp', True])
# on solaris the configure checks for boost_thread
# require the -pthreads flag to be able to check for
# threading support, so we add as a global library instead
# of attaching to cxxflags after configure
if env['PLATFORM'] == 'SunOS':
env.Append(CXXFLAGS = '-pthreads')
# if requested, sort LIBPATH and CPPPATH before running CheckLibWithHeader tests
if env['PRIORITIZE_LINKING']:
conf.prioritize_paths(silent=True)
@ -1447,6 +1439,7 @@ if not preconfigured:
# just turn it off like this, but seems the only available work-
# around. See https://svn.boost.org/trac/boost/ticket/6779 for more
# details.
if not env['HOST']:
boost_version = [int(x) for x in env.get('BOOST_LIB_VERSION_FROM_HEADER').split('_')]
if not conf.CheckBoostScopedEnum():
if boost_version < [1, 51]:
@ -1605,6 +1598,7 @@ if not preconfigured:
# prepend to make sure we link locally
env.Prepend(CPPPATH = '#deps/agg/include')
env.Prepend(LIBPATH = '#deps/agg')
env.Prepend(CPPPATH = '#deps/mapbox/variant/include')
# prepend deps dir for auxillary headers
env.Prepend(CPPPATH = '#deps')
@ -1630,7 +1624,7 @@ if not preconfigured:
env["CAIRO_ALL_LIBS"] = ['cairo']
if env['RUNTIME_LINK'] == 'static':
env["CAIRO_ALL_LIBS"].extend(
['pixman-1','expat']
['pixman-1']
)
# todo - run actual checkLib?
env['HAS_CAIRO'] = True
@ -1727,6 +1721,9 @@ if not preconfigured:
if env['NO_ATEXIT']:
env.Append(CPPDEFINES = '-DMAPNIK_NO_ATEXIT')
if env['NO_DLCLOSE'] or env['COVERAGE']:
env.Append(CPPDEFINES = '-DMAPNIK_NO_DLCLOSE')
# Mac OSX (Darwin) special settings
if env['PLATFORM'] == 'Darwin':
pthread = ''
@ -1786,20 +1783,24 @@ if not preconfigured:
# Common flags for g++/clang++ CXX compiler.
# TODO: clean up code more to make -Wextra -Wsign-compare -Wsign-conversion -Wconversion viable
common_cxx_flags = '-Wall %s %s -ftemplate-depth-300 -Wsign-compare -Wshadow ' % (env['WARNING_CXXFLAGS'], pthread)
# -Wfloat-equal -Wold-style-cast -Wexit-time-destructors -Wglobal-constructors -Wreserved-id-macro -Wheader-hygiene -Wmissing-noreturn
common_cxx_flags = '-fvisibility=hidden -fvisibility-inlines-hidden -Wall %s %s -ftemplate-depth-300 -Wsign-compare -Wshadow ' % (env['WARNING_CXXFLAGS'], pthread)
if 'clang++' in env['CXX']:
common_cxx_flags += ' -Wno-unsequenced '
common_cxx_flags += ' -Wno-unsequenced -Wtautological-compare -Wheader-hygiene '
if env['DEBUG']:
env.Append(CXXFLAGS = common_cxx_flags + '-O0')
else:
# TODO - add back -fvisibility-inlines-hidden
# https://github.com/mapnik/mapnik/issues/1863
env.Append(CXXFLAGS = common_cxx_flags + '-O%s' % (env['OPTIMIZATION']))
if env['DEBUG_UNDEFINED']:
env.Append(CXXFLAGS = '-fsanitize=undefined-trap -fsanitize-undefined-trap-on-error -ftrapv -fwrapv')
if env['DEBUG_SANITIZE']:
env.Append(CXXFLAGS = ['-fsanitize=address'])
env.Append(LINKFLAGS = ['-fsanitize=address'])
# if requested, sort LIBPATH and CPPPATH one last time before saving...
if env['PRIORITIZE_LINKING']:
conf.prioritize_paths(silent=True)
@ -1888,6 +1889,10 @@ if not HELP_REQUESTED:
plugin_base = env.Clone()
if env['COVERAGE']:
plugin_base.Append(LINKFLAGS='--coverage')
plugin_base.Append(CXXFLAGS='--coverage')
Export('plugin_base')
if env['FAST']:

View file

@ -1,6 +1,6 @@
environment:
msvs_toolset: 14
BOOST_VERSION: 59
BOOST_VERSION: 60
FASTBUILD: 1
matrix:
- platform: x64
@ -8,11 +8,24 @@ environment:
os: Visual Studio 2015
shallow_clone: true
#shallow_clone: true
# limit clone to latest 5 commits
clone_depth: 5
services:
- postgresql94 #if changing this, also change PATH below
install:
- SET PGUSER=postgres
- SET PGPASSWORD=Password12!
- SET PATH=C:\Program Files\PostgreSQL\9.4\bin\;%PATH%
build_script:
- scripts\build-appveyor.bat
after_build:
- 7z a mapnik-visual-images.zip C:\tmp\mapnik-visual-images
artifacts:
- path: mapnik-gyp\msbuild-summary.txt
name: msbuild-summary.txt
@ -20,7 +33,8 @@ artifacts:
name: msbuild-errors.txt
- path: mapnik-gyp\msbuild-warnings.txt
name: msbuild-warnings.txt
- path: mapnik-visual-images.zip
name: mapnik-visual-images.zip
build: off
test: off
deploy: off

View file

@ -1,7 +1,8 @@
#ifndef __MAPNIK_BENCH_FRAMEWORK_HPP__
#define __MAPNIK_BENCH_FRAMEWORK_HPP__
#ifndef MAPNIK_BENCH_FRAMEWORK_HPP
#define MAPNIK_BENCH_FRAMEWORK_HPP
// mapnik
#include <mapnik/debug.hpp>
#include <mapnik/params.hpp>
#include <mapnik/value_types.hpp>
#include <mapnik/safe_cast.hpp>
@ -9,7 +10,8 @@
// stl
#include <chrono>
#include <iomanip>
#include <cmath> // log10, round
#include <cstdio> // snprintf
#include <iostream>
#include <set>
#include <sstream>
@ -18,6 +20,12 @@
namespace benchmark {
template <typename T>
using milliseconds = std::chrono::duration<T, std::milli>;
template <typename T>
using seconds = std::chrono::duration<T>;
class test_case
{
protected:
@ -38,26 +46,78 @@ public:
{
return iterations_;
}
mapnik::parameters const& params() const
{
return params_;
}
virtual bool validate() const = 0;
virtual bool operator()() const = 0;
virtual ~test_case() {}
};
void handle_args(int argc, char** argv, mapnik::parameters & params)
// gathers --long-option values in 'params';
// returns the index of the first non-option argument,
// or negated index of an ill-formed option argument
inline int parse_args(int argc, char** argv, mapnik::parameters & params)
{
if (argc > 0) {
for (int i = 1; i < argc; ++i) {
std::string opt(argv[i]);
// parse --foo bar
if (!opt.empty() && (opt.find("--") != 0)) {
std::string key = std::string(argv[i-1]);
if (!key.empty() && (key.find("--") == 0)) {
key = key.substr(key.find_first_not_of("-"));
params[key] = opt;
const char* opt = argv[i];
if (opt[0] != '-') {
// non-option argument, return its index
return i;
}
if (opt[1] != '-') {
// we only accept --long-options, but instead of throwing,
// just issue a warning and let the caller decide what to do
std::clog << argv[0] << ": invalid option '" << opt << "'\n";
return -i; // negative means ill-formed option #i
}
if (opt[2] == '\0') {
// option-list terminator '--'
return i + 1;
}
// take option name without the leading '--'
std::string key(opt + 2);
size_t eq = key.find('=');
if (eq != std::string::npos) {
// one-argument form '--foo=bar'
params[key.substr(0, eq)] = key.substr(eq + 1);
}
else if (i + 1 < argc) {
// two-argument form '--foo' 'bar'
params[key] = std::string(argv[++i]);
}
else {
// missing second argument
std::clog << argv[0] << ": missing option '" << opt << "' value\n";
return -i; // negative means ill-formed option #i
}
}
return argc; // there were no non-option arguments
}
inline void handle_common_args(mapnik::parameters const& params)
{
if (auto severity = params.get<std::string>("log")) {
if (*severity == "debug")
mapnik::logger::set_severity(mapnik::logger::debug);
else if (*severity == "warn")
mapnik::logger::set_severity(mapnik::logger::warn);
else if (*severity == "error")
mapnik::logger::set_severity(mapnik::logger::error);
else if (*severity == "none")
mapnik::logger::set_severity(mapnik::logger::none);
else
std::clog << "ignoring option --log='" << *severity
<< "' (allowed values are: debug, warn, error, none)\n";
}
}
inline int handle_args(int argc, char** argv, mapnik::parameters & params)
{
int res = parse_args(argc, argv, params);
handle_common_args(params);
return res;
}
#define BENCHMARK(test_class,name) \
@ -80,6 +140,29 @@ void handle_args(int argc, char** argv, mapnik::parameters & params)
} \
} \
struct big_number_fmt
{
int w;
double v;
const char* u;
big_number_fmt(int width, double value, int base = 1000)
: w(width), v(value), u("")
{
static const char* suffixes = "\0\0k\0M\0G\0T\0P\0E\0Z\0Y\0\0";
u = suffixes;
while (v > 1 && std::log10(std::round(v)) >= width && u[2])
{
v /= base;
u += 2;
}
// adjust width for proper alignment without suffix
w += (u == suffixes);
}
};
template <typename T>
int run(T const& test_runner, std::string const& name)
{
@ -88,52 +171,120 @@ int run(T const& test_runner, std::string const& name)
if (!test_runner.validate())
{
std::clog << "test did not validate: " << name << "\n";
return -1;
return 1;
}
// run test once before timing
// if it returns false then we'll abort timing
if (test_runner())
if (!test_runner())
{
return 2;
}
std::chrono::high_resolution_clock::time_point start;
std::chrono::high_resolution_clock::duration elapsed;
std::stringstream s;
s << name << ":"
<< std::setw(45 - (int)s.tellp()) << std::right
<< " t:" << test_runner.threads()
<< " i:" << test_runner.iterations();
if (test_runner.threads() > 0)
auto opt_min_duration = test_runner.params().template get<double>("min-duration", 0.0);
std::chrono::duration<double> min_seconds(*opt_min_duration);
auto min_duration = std::chrono::duration_cast<decltype(elapsed)>(min_seconds);
auto num_iters = test_runner.iterations();
auto num_threads = test_runner.threads();
auto total_iters = 0;
if (num_threads > 0)
{
using thread_group = std::vector<std::unique_ptr<std::thread> >;
using value_type = thread_group::value_type;
thread_group tg;
for (std::size_t i=0;i<test_runner.threads();++i)
std::mutex mtx_ready;
std::unique_lock<std::mutex> lock_ready(mtx_ready);
auto stub = [&](T const& test_copy)
{
tg.emplace_back(new std::thread(test_runner));
// workers will wait on this mutex until the main thread
// constructs all of them and starts measuring time
std::unique_lock<std::mutex> my_lock(mtx_ready);
my_lock.unlock();
test_copy();
};
std::vector<std::thread> tg;
tg.reserve(num_threads);
for (auto i = num_threads; i-- > 0; )
{
tg.emplace_back(stub, test_runner);
}
start = std::chrono::high_resolution_clock::now();
std::for_each(tg.begin(), tg.end(), [](value_type & t) {if (t->joinable()) t->join();});
lock_ready.unlock();
// wait for all workers to finish
for (auto & t : tg)
{
if (t.joinable())
t.join();
}
elapsed = std::chrono::high_resolution_clock::now() - start;
// this is actually per-thread count, not total, but I think
// reporting average 'iters/thread/second' is more useful
// than 'iters/second' multiplied by the number of threads
total_iters += num_iters;
}
else
{
start = std::chrono::high_resolution_clock::now();
do {
test_runner();
elapsed = std::chrono::high_resolution_clock::now() - start;
total_iters += num_iters;
} while (elapsed < min_duration);
}
s << std::setw(65 - (int)s.tellp()) << std::right
<< std::chrono::duration_cast<std::chrono::milliseconds>(elapsed).count() << " milliseconds\n";
std::clog << s.str();
}
char msg[200];
double dur_total = milliseconds<double>(elapsed).count();
auto elapsed_nonzero = std::max(elapsed, decltype(elapsed){1});
big_number_fmt itersf(4, total_iters);
big_number_fmt ips(5, total_iters / seconds<double>(elapsed_nonzero).count());
std::snprintf(msg, sizeof(msg),
"%-43s %3zu threads %*.0f%s iters %6.0f milliseconds %*.0f%s i/s\n",
name.c_str(),
num_threads,
itersf.w, itersf.v, itersf.u,
dur_total,
ips.w, ips.v, ips.u
);
std::clog << msg;
return 0;
}
catch (std::exception const& ex)
{
std::clog << "test runner did not complete: " << ex.what() << "\n";
return -1;
return 4;
}
return 0;
}
struct sequencer
{
sequencer(int argc, char** argv)
: exit_code_(0)
{
benchmark::handle_args(argc, argv, params_);
}
int done() const
{
return exit_code_;
}
template <typename Test, typename... Args>
sequencer & run(std::string const& name, Args && ...args)
{
// Test instance lifetime is confined to this function
Test test_runner(params_, std::forward<Args>(args)...);
// any failing test run will make exit code non-zero
exit_code_ |= benchmark::run(test_runner, name);
return *this; // allow chaining calls
}
protected:
mapnik::parameters params_;
int exit_code_;
};
}
#endif // __MAPNIK_BENCH_FRAMEWORK_HPP__
#endif // MAPNIK_BENCH_FRAMEWORK_HPP

View file

@ -1,11 +1,10 @@
#ifndef __MAPNIK_COMPARE_IMAGES_HPP__
#define __MAPNIK_COMPARE_IMAGES_HPP__
#ifndef MAPNIK_COMPARE_IMAGES_HPP
#define MAPNIK_COMPARE_IMAGES_HPP
#include <mapnik/image.hpp>
#include <mapnik/image_util.hpp>
#include <mapnik/image_reader.hpp>
using namespace mapnik;
namespace benchmark {
@ -23,15 +22,15 @@ namespace benchmark {
throw mapnik::image_reader_exception("Failed to load: " + src_fn);
}
const image_any desc_any = reader1->read(0,0,reader1->width(), reader1->height());
const image_any src_any = reader2->read(0,0,reader2->width(), reader2->height());
const mapnik::image_any desc_any = reader1->read(0,0,reader1->width(), reader1->height());
const mapnik::image_any src_any = reader2->read(0,0,reader2->width(), reader2->height());
image_rgba8 const& dest = util::get<image_rgba8>(desc_any);
image_rgba8 const& src = util::get<image_rgba8>(src_any);
mapnik::image_rgba8 const& dest = mapnik::util::get<mapnik::image_rgba8>(desc_any);
mapnik::image_rgba8 const& src = mapnik::util::get<mapnik::image_rgba8>(src_any);
return compare(dest, src, 0, true) == 0;
}
}
#endif // __MAPNIK_COMPARE_IMAGES_HPP__
#endif // MAPNIK_COMPARE_IMAGES_HPP

View file

@ -6,8 +6,14 @@ source ./localize.sh
BASE=./benchmark/out
function run {
${BASE}/$1 --threads 0 --iterations $3;
${BASE}/$1 --threads $2 --iterations $(expr $3 / $2);
local runner="$BASE/$1 --log=none"
local threads="$2"
local iters="$3"
shift 3
$runner --threads 0 --iterations $iters "$@"
if test $threads -gt 0; then
$runner --threads $threads --iterations $((iters/threads)) "$@"
fi
}
run test_getline 30 10000000
#run test_array_allocation 20 100000
@ -23,6 +29,8 @@ run test_face_ptr_creation 10 1000
run test_font_registration 10 100
run test_offset_converter 10 1000
# commented since this is really slow on travis
: '
./benchmark/out/test_rendering \
--name "text rendering" \
--map benchmark/data/roads.xml \
@ -31,6 +39,7 @@ run test_offset_converter 10 1000
--height 600 \
--iterations 20 \
--threads 10
'
./benchmark/out/test_rendering \
--name "gdal tiff rendering" \

View file

@ -231,33 +231,6 @@ public:
}
};
class test3d : public benchmark::test_case
{
public:
uint32_t size_;
std::vector<uint8_t> array_;
test3d(mapnik::parameters const& params)
: test_case(params),
size_(*params.get<mapnik::value_integer>("size",256*256)),
array_(size_,0) { }
bool validate() const
{
return true;
}
bool operator()() const
{
for (std::size_t i=0;i<iterations_;++i) {
std::deque<uint8_t> data(size_);
for (std::size_t i=0;i<size_;++i) {
if (data[i] != 0) {
throw std::runtime_error("found non zero value");
}
}
}
return true;
}
};
class test4 : public benchmark::test_case
{
public:
@ -386,62 +359,21 @@ public:
int main(int argc, char** argv)
{
int return_value = 0;
mapnik::parameters params;
benchmark::handle_args(argc,argv,params);
{
test4 test_runner4(params);
return_value = return_value | run(test_runner4,"calloc");
}
{
test1 test_runner(params);
return_value = return_value | run(test_runner,"malloc/memcpy");
}
{
test1b test_runner(params);
return_value = return_value | run(test_runner,"malloc/memset");
}
{
test1c test_runner(params);
return_value = return_value | run(test_runner,"operator new/std::fill");
}
{
test2 test_runner(params);
return_value = return_value | run(test_runner,"operator new/memcpy");
}
{
test3 test_runner(params);
return_value = return_value | run(test_runner,"vector(N)");
}
{
test3b test_runner(params);
return_value = return_value | run(test_runner,"vector/resize");
}
{
test3c test_runner(params);
return_value = return_value | run(test_runner,"vector/assign");
}
{
test3d test_runner(params);
return_value = return_value | run(test_runner,"deque(N)");
}
{
test5 test_runner(params);
return_value = return_value | run(test_runner,"std::string range");
}
{
test5b test_runner(params);
return_value = return_value | run(test_runner,"std::string &[0]");
}
{
test6 test_runner(params);
return_value = return_value | run(test_runner,"valarray");
}
return benchmark::sequencer(argc, argv)
.run<test4>("calloc")
.run<test1>("malloc/memcpy")
.run<test1b>("malloc/memset")
.run<test1c>("operator new/std::fill")
.run<test2>("operator new/memcpy")
.run<test3>("vector(N)")
.run<test3b>("vector/resize")
.run<test3c>("vector/assign")
.run<test3d>("deque(N)")
.run<test5>("std::string range")
.run<test5b>("std::string &[0]")
.run<test6>("valarray")
#if BOOST_VERSION >= 105400
{
test7 test_runner(params);
return_value = return_value | run(test_runner,"static_vector");
}
.run<test7>("static_vector")
#endif
return return_value;
.done();
}

View file

@ -1,7 +1,7 @@
#include "bench_framework.hpp"
#include <cstring>
#include <cstdlib>
#include "../plugins/input/csv/csv_utils.hpp"
#include "../plugins/input/csv/csv_getline.hpp"
class test : public benchmark::test_case
{

View file

@ -73,16 +73,8 @@ public:
int main(int argc, char** argv)
{
mapnik::parameters params;
benchmark::handle_args(argc,argv,params);
int return_value = 0;
{
test_static test_runner(params);
return_value = return_value | run(test_runner,"static_cast");
}
{
test_numeric test_runner(params);
return_value = return_value | run(test_runner,"numeric_cast");
}
return return_value;
return benchmark::sequencer(argc, argv)
.run<test_static>("static_cast")
.run<test_numeric>("numeric_cast")
.done();
}

View file

@ -19,8 +19,8 @@ public:
out.clear();
out = mapnik::save_to_string(im_,"png8:m=h:z=1");
}
}
return true;
}
};
BENCHMARK(test,"encoding blank png")

View file

@ -30,8 +30,8 @@ public:
out.clear();
out = mapnik::save_to_string(*im_,"png8:m=h:z=1");
}
}
return true;
}
};
BENCHMARK(test,"encoding multicolor png")

View file

@ -51,30 +51,10 @@ int main(int argc, char** argv)
mapnik::box2d<double> z1(-20037508.3428,-8317435.0606,20037508.3428,18399242.7298);
// bbox for 16/10491/22911.png
mapnik::box2d<double> z16(-13622912.929097254,6026906.8062295765,-13621689.93664469,6028129.79868214);
int return_value = 0;
{
test test_runner(params,
"benchmark/data/polygon_rendering_clip.xml",
z1);
return_value = return_value | run(test_runner,"polygon clip render z1");
}
{
test test_runner(params,
"benchmark/data/polygon_rendering_no_clip.xml",
z1);
return_value = return_value | run(test_runner,"polygon noclip render z1");
}
{
test test_runner(params,
"benchmark/data/polygon_rendering_clip.xml",
z16);
return_value = return_value | run(test_runner,"polygon clip render z16");
}
{
test test_runner(params,
"benchmark/data/polygon_rendering_no_clip.xml",
z16);
return_value = return_value | run(test_runner,"polygon noclip render z16");
}
return return_value;
return benchmark::sequencer(argc, argv)
.run<test>("polygon clip render z1", "benchmark/data/polygon_rendering_clip.xml", z1)
.run<test>("polygon noclip render z1", "benchmark/data/polygon_rendering_no_clip.xml", z1)
.run<test>("polygon clip render z16", "benchmark/data/polygon_rendering_clip.xml", z16)
.run<test>("polygon noclip render z16", "benchmark/data/polygon_rendering_no_clip.xml", z16)
.done();
}

View file

@ -59,42 +59,16 @@ public:
// echo -180 -60 | cs2cs -f "%.10f" +init=epsg:4326 +to +init=epsg:3857
int main(int argc, char** argv)
{
mapnik::parameters params;
benchmark::handle_args(argc,argv,params);
mapnik::box2d<double> from(-180,-80,180,80);
mapnik::box2d<double> to(-20037508.3427892476,-15538711.0963092316,20037508.3427892476,15538711.0963092316);
std::string from_str("+init=epsg:4326");
std::string to_str("+init=epsg:3857");
std::string from_str2("+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs");
std::string to_str2("+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over");
int return_value = 0;
test test_runner(params,
from_str,
to_str,
from,
to,
true);
return_value = return_value | run(test_runner,"lonlat->merc epsg");
test test_runner2(params,
from_str2,
to_str2,
from,
to,
true);
return_value = return_value | run(test_runner2,"lonlat->merc literal");
test test_runner3(params,
to_str,
from_str,
to,
from,
true);
return_value = return_value | run(test_runner3,"merc->lonlat epsg");
test test_runner4(params,
to_str2,
from_str2,
to,
from,
true);
return_value = return_value | run(test_runner4,"merc->lonlat literal");
return return_value;
return benchmark::sequencer(argc, argv)
.run<test>("lonlat->merc epsg", from_str, to_str, from, to, true)
.run<test>("lonlat->merc literal", from_str2, to_str2, from, to, true)
.run<test>("merc->lonlat epsg", to_str, from_str, to, from, true)
.run<test>("merc->lonlat literal", to_str2, from_str2, to, from, true)
.done();
}

View file

@ -1,6 +1,7 @@
#!/usr/bin/env bash
#set -eu
set -eu
set -o pipefail
: '
@ -10,67 +11,75 @@ todo
- shrink icu data
'
MASON_VERSION="7ed8931"
function setup_mason() {
if [[ ! -d ./.mason ]]; then
git clone --depth 1 https://github.com/mapbox/mason.git ./.mason
git clone https://github.com/mapbox/mason.git ./.mason
(cd ./.mason && git checkout ${MASON_VERSION})
else
echo "Updating to latest mason"
(cd ./.mason && git pull)
(cd ./.mason && git fetch && git checkout ${MASON_VERSION})
fi
export MASON_DIR=$(pwd)/.mason
export PATH=$(pwd)/.mason:$PATH
export CXX=${CXX:-clang++}
export CC=${CC:-clang}
}
if [[ $(uname -s) == 'Darwin' ]]; then
FIND_PATTERN="\/Users\/travis\/build\/mapbox\/mason"
else
FIND_PATTERN="\/home\/travis\/build\/mapbox\/mason"
fi
REPLACE="$(pwd)"
REPLACE=${REPLACE////\\/}
function install() {
MASON_PLATFORM_ID=$(mason env MASON_PLATFORM_ID)
if [[ ! -d ./mason_packages/${MASON_PLATFORM_ID}/${1}/${2} ]]; then
mason install $1 $2
mason link $1 $2
if [[ $3 ]]; then
LA_FILE=$(${MASON_DIR:-~/.mason}/mason prefix $1 $2)/lib/$3.la
if [[ ${3:-false} != false ]]; then
LA_FILE=$(mason prefix $1 $2)/lib/$3.la
if [[ -f ${LA_FILE} ]]; then
perl -i -p -e "s/${FIND_PATTERN}/${REPLACE}/g;" ${LA_FILE}
perl -i -p -e 's:\Q$ENV{HOME}/build/mapbox/mason\E:$ENV{PWD}:g' ${LA_FILE}
else
echo "$LA_FILE not found"
fi
fi
fi
mason link $1 $2
}
ICU_VERSION="55.1"
function install_mason_deps() {
install gdal 1.11.2 libgdal &
install boost 1.59.0 &
install boost_liball 1.59.0 &
install freetype 2.6 libfreetype &
install harfbuzz 0.9.40 libharfbuzz &
FAIL=0
install ccache 3.2.4 &
install jpeg_turbo 1.4.0 libjpeg &
install libpng 1.6.17 libpng &
install webp 0.4.2 libwebp &
install libpng 1.6.20 libpng &
install libtiff 4.0.4beta libtiff &
install libpq 9.4.1 &
install sqlite 3.8.8.3 libsqlite3 &
install expat 2.1.0 libexpat &
install icu ${ICU_VERSION} &
install proj 4.8.0 libproj &
install libtiff 4.0.4beta libtiff &
install libpq 9.4.0 &
install sqlite 3.8.8.1 libsqlite3 &
install expat 2.1.0 libexpat &
install pixman 0.32.6 libpixman-1 &
install cairo 1.14.2 libcairo &
install protobuf 2.6.1 &
wait
# technically protobuf is not a mapnik core dep, but installing
# here by default helps make mapnik-vector-tile builds easier
install webp 0.5.0 libwebp &
install gdal 1.11.2 libgdal &
install boost 1.61.0 &
install boost_libsystem 1.61.0 &
install boost_libfilesystem 1.61.0 &
install boost_libprogram_options 1.61.0 &
install boost_libregex_icu 1.61.0 &
# technically boost thread and python are not a core dep, but installing
# here by default helps make python-mapnik builds easier
install boost_libthread 1.61.0 &
install boost_libpython 1.61.0 &
install freetype 2.6 libfreetype &
install harfbuzz 0.9.41 libharfbuzz &
for job in $(jobs -p)
do
wait $job || let "FAIL+=1"
done
if [[ "$FAIL" != "0" ]]; then
exit ${FAIL}
fi
}
MASON_LINKED_ABS=$(pwd)/mason_packages/.link
@ -80,22 +89,15 @@ export CPLUS_INCLUDE_PATH="${MASON_LINKED_ABS}/include"
export LIBRARY_PATH="${MASON_LINKED_ABS}/lib"
function make_config() {
if [[ $(uname -s) == 'Darwin' ]]; then
local PATH_REPLACE="/Users/travis/build/mapbox/mason/mason_packages:./mason_packages"
else
local PATH_REPLACE="/home/travis/build/mapbox/mason/mason_packages:./mason_packages"
fi
echo "
CXX = '$CXX'
CC = '$CC'
CUSTOM_CXXFLAGS = '-fvisibility=hidden -fvisibility-inlines-hidden -DU_CHARSET_IS_UTF8=1'
RUNTIME_LINK = 'static'
INPUT_PLUGINS = 'all'
PATH = '${MASON_LINKED_REL}/bin'
PKG_CONFIG_PATH = '${MASON_LINKED_REL}/lib/pkgconfig'
PATH_REMOVE = '/usr:/usr/local'
PATH_REPLACE = '${PATH_REPLACE}'
PATH_REPLACE = '$HOME/build/mapbox/mason/mason_packages:./mason_packages'
BOOST_INCLUDES = '${MASON_LINKED_REL}/include'
BOOST_LIBS = '${MASON_LINKED_REL}/lib'
ICU_INCLUDES = '${MASON_LINKED_REL}/include'
@ -126,8 +128,7 @@ CPP_TESTS = True
PGSQL2SQLITE = True
XMLPARSER = 'ptree'
SVG2PNG = True
SAMPLE_INPUT_PLUGINS = True
" > ./config.py
"
}
# NOTE: the `mapnik-settings.env` is used by test/run (which is run by `make test`)
@ -141,7 +142,7 @@ function setup_runtime_settings() {
function main() {
setup_mason
install_mason_deps
make_config
make_config > ./config.py
setup_runtime_settings
echo "Ready, now run:"
echo ""
@ -149,3 +150,8 @@ function main() {
}
main
# allow sourcing of script without
# causing the terminal to bail on error
set +eu
set +o pipefail

45
circle.yml Normal file
View file

@ -0,0 +1,45 @@
machine:
xcode:
version: 7.3
environment:
XCODE_SCHEME: "no"
XCODE_WORKSPACE: "no"
JOBS: 8
CCACHE_TEMPDIR: /tmp/.ccache-temp
CCACHE_COMPRESS: 1
LLVM_VERSION: 3.8
pre:
- echo "here"
post:
- echo "there"
checkout:
post:
- git submodule update --init
dependencies:
cache_directories:
- "~/.ccache"
- "~/.apt-cache"
pre:
# https://discuss.circleci.com/t/add-ability-to-cache-apt-get-programs/598/3
- sudo rm -rf /var/cache/apt/archives && sudo ln -s ~/.apt-cache /var/cache/apt/archives && mkdir -p ~/.apt-cache/partial
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
override:
- sudo apt-get update -y
- sudo apt-get install -y libstdc++-5-dev xutils
database:
pre:
- ./bootstrap.sh
- ./.mason/mason install clang ${LLVM_VERSION}.0
- ./.mason/mason link clang ${LLVM_VERSION}.0
- ./configure CC="$(pwd)/mason_packages/.link/bin/clang-${LLVM_VERSION}" CXX="$(pwd)/mason_packages/.link/bin/ccache $(pwd)/mason_packages/.link/bin/clang++-${LLVM_VERSION} -Qunused-arguments"
- make
override:
- psql -c 'create database template_postgis;'
- psql -c 'create extension postgis;' -d template_postgis
test:
override:
- make test

View file

@ -55,7 +55,7 @@ int main ( int, char** )
try {
std::cout << " running demo ... \n";
datasource_cache::instance().register_datasources("plugins/input/");
freetype_engine::register_font("fonts/dejavu-fonts-ttf-2.34/ttf/DejaVuSans.ttf");
freetype_engine::register_font("fonts/dejavu-fonts-ttf-2.35/ttf/DejaVuSans.ttf");
Map m(800,600);
m.set_background(parse_color("white"));
@ -230,7 +230,7 @@ int main ( int, char** )
parameters p;
p["type"]="shape";
p["file"]="demo/data/boundaries";
p["encoding"]="latin1";
p["encoding"]="utf8";
layer lyr("Provinces");
lyr.set_datasource(datasource_cache::instance().create(p));
@ -295,7 +295,7 @@ int main ( int, char** )
parameters p;
p["type"]="shape";
p["file"]="demo/data/popplaces";
p["encoding"] = "latin1";
p["encoding"] = "utf8";
layer lyr("Populated Places");
lyr.set_srs(srs_lcc);
lyr.set_datasource(datasource_cache::instance().create(p));

Binary file not shown.

View file

@ -1 +0,0 @@
PROJCS["Atlas of Canada Lambert Conformal Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-95.0],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",77.0],PARAMETER["Latitude_Of_Origin",49.0],UNIT["Meter",1.0]]

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
PROJCS["Atlas of Canada Lambert Conformal Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-95.0],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",77.0],PARAMETER["Latitude_Of_Origin",49.0],UNIT["Meter",1.0]]

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
PROJCS["Atlas of Canada Lambert Conformal Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-95.0],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",77.0],PARAMETER["Latitude_Of_Origin",49.0],UNIT["Meter",1.0]]

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
PROJCS["Atlas of Canada Lambert Conformal Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-95.0],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",77.0],PARAMETER["Latitude_Of_Origin",49.0],UNIT["Meter",1.0]]

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
PROJCS["Atlas of Canada Lambert Conformal Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-95.0],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",77.0],PARAMETER["Latitude_Of_Origin",49.0],UNIT["Meter",1.0]]

Binary file not shown.

Binary file not shown.

View file

@ -1 +0,0 @@
PROJCS["Atlas of Canada Lambert Conformal Conic",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-95.0],PARAMETER["Standard_Parallel_1",49.0],PARAMETER["Standard_Parallel_2",77.0],PARAMETER["Latitude_Of_Origin",49.0],UNIT["Meter",1.0]]

Binary file not shown.

View file

@ -18,7 +18,7 @@
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
from __future__ import print_function
import sys
from os import path

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef LAYER_DELEGATE_HPP

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -14,7 +14,7 @@
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/

View file

@ -27,8 +27,8 @@ namespace agg
{
public:
typedef T value_type;
pod_array_adaptor(T* array, unsigned size) :
m_array(array), m_size(size) {}
pod_array_adaptor(T* array, unsigned _size) :
m_array(array), m_size(_size) {}
unsigned size() const { return m_size; }
const T& operator [] (unsigned i) const { return m_array[i]; }
@ -87,7 +87,7 @@ namespace agg
void clear() { m_size = 0; }
void add(const T& v) { m_array[m_size++] = v; }
void push_back(const T& v) { m_array[m_size++] = v; }
void inc_size(unsigned size) { m_size += size; }
void inc_size(unsigned _size) { m_size += _size; }
unsigned size() const { return m_size; }
const T& operator [] (unsigned i) const { return m_array[i]; }
@ -112,9 +112,9 @@ namespace agg
~pod_array() { pod_allocator<T>::deallocate(m_array, m_size); }
pod_array() : m_array(0), m_size(0) {}
pod_array(unsigned size) :
m_array(pod_allocator<T>::allocate(size)),
m_size(size)
pod_array(unsigned _size) :
m_array(pod_allocator<T>::allocate(_size)),
m_size(_size)
{}
pod_array(const self_type& v) :
@ -124,12 +124,12 @@ namespace agg
memcpy(m_array, v.m_array, sizeof(T) * m_size);
}
void resize(unsigned size)
void resize(unsigned _size)
{
if(size != m_size)
if(_size != m_size)
{
pod_allocator<T>::deallocate(m_array, m_size);
m_array = pod_allocator<T>::allocate(m_size = size);
m_array = pod_allocator<T>::allocate(m_size = _size);
}
}
const self_type& operator = (const self_type& v)
@ -191,7 +191,7 @@ namespace agg
void add(const T& v) { m_array[m_size++] = v; }
void push_back(const T& v) { m_array[m_size++] = v; }
void insert_at(unsigned pos, const T& val);
void inc_size(unsigned size) { m_size += size; }
void inc_size(unsigned _size) { m_size += _size; }
unsigned size() const { return m_size; }
unsigned byte_size() const { return m_size * sizeof(T); }
void serialize(int8u* ptr) const;
@ -230,10 +230,10 @@ namespace agg
//------------------------------------------------------------------------
template<class T>
void pod_vector<T>::allocate(unsigned size, unsigned extra_tail)
void pod_vector<T>::allocate(unsigned _size, unsigned extra_tail)
{
capacity(size, extra_tail);
m_size = size;
capacity(_size, extra_tail);
m_size = _size;
}
@ -245,10 +245,10 @@ namespace agg
{
if(new_size > m_capacity)
{
T* data = pod_allocator<T>::allocate(new_size);
memcpy(data, m_array, m_size * sizeof(T));
T* _data = pod_allocator<T>::allocate(new_size);
memcpy(_data, m_array, m_size * sizeof(T));
pod_allocator<T>::deallocate(m_array, m_capacity);
m_array = data;
m_array = _data;
}
}
else
@ -289,11 +289,11 @@ namespace agg
//------------------------------------------------------------------------
template<class T>
void pod_vector<T>::deserialize(const int8u* data, unsigned byte_size)
void pod_vector<T>::deserialize(const int8u* _data, unsigned _byte_size)
{
byte_size /= sizeof(T);
allocate(byte_size);
if(byte_size) memcpy(m_array, data, byte_size * sizeof(T));
_byte_size /= sizeof(T);
allocate(_byte_size);
if(_byte_size) memcpy(m_array, _data, _byte_size * sizeof(T));
}
//------------------------------------------------------------------------
@ -371,9 +371,9 @@ namespace agg
}
}
void cut_at(unsigned size)
void cut_at(unsigned _size)
{
if(size < m_size) m_size = size;
if(_size < m_size) m_size = _size;
}
unsigned size() const { return m_size; }
@ -529,11 +529,11 @@ namespace agg
//------------------------------------------------------------------------
template<class T, unsigned S>
void pod_bvector<T, S>::free_tail(unsigned size)
void pod_bvector<T, S>::free_tail(unsigned _size)
{
if(size < m_size)
if(_size < m_size)
{
unsigned nb = (size + block_mask) >> block_shift;
unsigned nb = (_size + block_mask) >> block_shift;
while(m_num_blocks > nb)
{
pod_allocator<T>::deallocate(m_blocks[--m_num_blocks], block_size);
@ -544,7 +544,7 @@ namespace agg
m_blocks = 0;
m_max_blocks = 0;
}
m_size = size;
m_size = _size;
}
}
@ -728,16 +728,16 @@ namespace agg
//------------------------------------------------------------------------
template<class T, unsigned S>
void pod_bvector<T, S>::deserialize(const int8u* data, unsigned byte_size)
void pod_bvector<T, S>::deserialize(const int8u* _data, unsigned _byte_size)
{
remove_all();
byte_size /= sizeof(T);
for(unsigned i = 0; i < byte_size; ++i)
_byte_size /= sizeof(T);
for(unsigned i = 0; i < _byte_size; ++i)
{
T* ptr = data_ptr();
memcpy(ptr, data, sizeof(T));
memcpy(ptr, _data, sizeof(T));
++m_size;
data += sizeof(T);
_data += sizeof(T);
}
}
@ -746,27 +746,27 @@ namespace agg
//------------------------------------------------------------------------
template<class T, unsigned S>
void pod_bvector<T, S>::deserialize(unsigned start, const T& empty_val,
const int8u* data, unsigned byte_size)
const int8u* _data, unsigned _byte_size)
{
while(m_size < start)
{
add(empty_val);
}
byte_size /= sizeof(T);
for(unsigned i = 0; i < byte_size; ++i)
_byte_size /= sizeof(T);
for(unsigned i = 0; i < _byte_size; ++i)
{
if(start + i < m_size)
{
memcpy(&((*this)[start + i]), data, sizeof(T));
memcpy(&((*this)[start + i]), _data, sizeof(T));
}
else
{
T* ptr = data_ptr();
memcpy(ptr, data, sizeof(T));
memcpy(ptr, _data, sizeof(T));
++m_size;
}
data += sizeof(T);
_data += sizeof(T);
}
}
@ -1087,8 +1087,8 @@ namespace agg
public:
typedef typename Array::value_type value_type;
range_adaptor(Array& array, unsigned start, unsigned size) :
m_array(array), m_start(start), m_size(size)
range_adaptor(Array& array, unsigned start, unsigned _size) :
m_array(array), m_start(start), m_size(_size)
{}
unsigned size() const { return m_size; }

View file

@ -42,9 +42,9 @@ namespace agg
conv_clip_polygon(VertexSource& vs) :
conv_adaptor_vpgen<VertexSource, vpgen_clip_polygon>(vs) {}
void clip_box(double x1, double y1, double x2, double y2)
void clip_box(double _x1, double _y1, double _x2, double _y2)
{
base_type::vpgen().clip_box(x1, y1, x2, y2);
base_type::vpgen().clip_box(_x1, _y1, _x2, _y2);
}
double x1() const { return base_type::vpgen().x1(); }

View file

@ -42,9 +42,9 @@ namespace agg
conv_clip_polyline(VertexSource& vs) :
conv_adaptor_vpgen<VertexSource, vpgen_clip_polyline>(vs) {}
void clip_box(double x1, double y1, double x2, double y2)
void clip_box(double _x1, double _y1, double _x2, double _y2)
{
base_type::vpgen().clip_box(x1, y1, x2, y2);
base_type::vpgen().clip_box(_x1, _y1, _x2, _y2);
}
double x1() const { return base_type::vpgen().x1(); }

0
deps/agg/include/agg_rasterizer_cells_aa.h vendored Executable file → Normal file
View file

0
deps/agg/include/agg_rasterizer_compound_aa.h vendored Executable file → Normal file
View file

View file

@ -237,7 +237,7 @@ namespace agg
sl.reset_spans();
unsigned num_cells = m_outline.scanline_num_cells(m_scan_y);
const cell_aa* const* cells = m_outline.scanline_cells(m_scan_y);
int cover = 0;
unsigned cover = 0;
while(num_cells)
{
@ -507,4 +507,3 @@ namespace agg
#endif

View file

@ -21,6 +21,7 @@
#include "agg_basics.h"
#include "agg_vertex_sequence.h"
#include <mapnik/config.hpp>
namespace agg
{
@ -29,7 +30,7 @@ namespace agg
//
// See Implementation agg_vcgen_dash.cpp
//
class vcgen_dash
class MAPNIK_DECL vcgen_dash
{
enum max_dashes_e
{

1
deps/mapbox/variant vendored Submodule

@ -0,0 +1 @@
Subproject commit aaddee9270e3956cee98cdd7d04aea848d69f5f0

11
deps/mapnik/build.py vendored
View file

@ -4,14 +4,15 @@ from glob import glob
Import('env')
subdirs = {
'sparsehash':'sparsehash',
'sparsehash/internal':'sparsehash/internal',
'../agg/include':'agg',
'./sparsehash':{'dir':'sparsehash','glob':'*'},
'./sparsehash/internal':{'dir':'sparsehash/internal','glob':'*'},
'../agg/include':{'dir':'agg','glob':'agg*'},
'../mapbox/variant/include':{'dir':'mapbox','glob':'*/*.hpp'}
}
if 'install' in COMMAND_LINE_TARGETS:
for k,v in subdirs.items():
pathdir = os.path.join(k,'*')
pathdir = os.path.join(k,v['glob'])
includes = glob(pathdir)
inc_target = os.path.normpath(env['INSTALL_PREFIX']+'/include/mapnik/'+v)
inc_target = os.path.normpath(env['INSTALL_PREFIX']+'/include/mapnik/'+v['dir'])
env.Alias(target='install', source=env.Install(inc_target, includes))

View file

@ -21,7 +21,7 @@ James Cloos
James Crippen
John Karp
Keenan Pepper
Lars Naesbye Christensen
Lars Næsbye Christensen
Lior Halphon
MaEr
Mashrab Kuvatov
@ -33,6 +33,7 @@ Misu Moldovan
Nguyen Thai Ngoc Duy
Nicolas Mailhot
Norayr Chilingarian
Olleg Samoylov
Ognyan Kulev
Ondrej Koala Vacha
Peter Cernak
@ -53,4 +54,4 @@ Vasek Stodulka
Wesley Transue
Yoshiki Ohshima
$Id: AUTHORS 2593 2015-05-17 07:47:39Z ben_laenen $
$Id$

View file

@ -1,3 +1,3 @@
See http://dejavu.sourceforge.net/wiki/index.php/Bugs
$Id: BUGS 80 2004-11-13 13:12:02Z src $
$Id$

View file

@ -1,6 +1,7 @@
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
Glyphs imported from Arev fonts are (c) Tavmjong Bah (see below)
Bitstream Vera Fonts Copyright
------------------------------
@ -96,4 +97,91 @@ dealings in this Font Software without prior written authorization
from Tavmjong Bah. For further information, contact: tavmjong @ free
. fr.
$Id: LICENSE 2133 2007-11-28 02:46:28Z lechimp $
TeX Gyre DJV Math
-----------------
Fonts are (c) Bitstream (see below). DejaVu changes are in public domain.
Math extensions done by B. Jackowski, P. Strzelczyk and P. Pianowski
(on behalf of TeX users groups) are in public domain.
Letters imported from Euler Fraktur from AMSfonts are (c) American
Mathematical Society (see below).
Bitstream Vera Fonts Copyright
Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. Bitstream Vera
is a trademark of Bitstream, Inc.
Permission is hereby granted, free of charge, to any person obtaining a copy
of the fonts accompanying this license (“Fonts”) and associated
documentation
files (the “Font Software”), to reproduce and distribute the Font Software,
including without limitation the rights to use, copy, merge, publish,
distribute,
and/or sell copies of the Font Software, and to permit persons to whom
the Font Software is furnished to do so, subject to the following
conditions:
The above copyright and trademark notices and this permission notice
shall be
included in all copies of one or more of the Font Software typefaces.
The Font Software may be modified, altered, or added to, and in particular
the designs of glyphs or characters in the Fonts may be modified and
additional
glyphs or characters may be added to the Fonts, only if the fonts are
renamed
to names not containing either the words “Bitstream” or the word “Vera”.
This License becomes null and void to the extent applicable to Fonts or
Font Software
that has been modified and is distributed under the “Bitstream Vera”
names.
The Font Software may be sold as part of a larger software package but
no copy
of one or more of the Font Software typefaces may be sold by itself.
THE FONT SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT,
TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL BITSTREAM OR THE GNOME
FOUNDATION
BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL,
SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN
ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR
INABILITY TO USE
THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
Except as contained in this notice, the names of GNOME, the GNOME
Foundation,
and Bitstream Inc., shall not be used in advertising or otherwise to promote
the sale, use or other dealings in this Font Software without prior written
authorization from the GNOME Foundation or Bitstream Inc., respectively.
For further information, contact: fonts at gnome dot org.
AMSFonts (v. 2.2) copyright
The PostScript Type 1 implementation of the AMSFonts produced by and
previously distributed by Blue Sky Research and Y&Y, Inc. are now freely
available for general use. This has been accomplished through the
cooperation
of a consortium of scientific publishers with Blue Sky Research and Y&Y.
Members of this consortium include:
Elsevier Science IBM Corporation Society for Industrial and Applied
Mathematics (SIAM) Springer-Verlag American Mathematical Society (AMS)
In order to assure the authenticity of these fonts, copyright will be
held by
the American Mathematical Society. This is not meant to restrict in any way
the legitimate use of the fonts, such as (but not limited to) electronic
distribution of documents containing these fonts, inclusion of these fonts
into other public domain or commercial font collections or computer
applications, use of the outline data to create derivative fonts and/or
faces, etc. However, the AMS does require that the AMS copyright notice be
removed from any derivative versions of the fonts which have been altered in
any way. In addition, to ensure the fidelity of TeX documents using Computer
Modern fonts, Professor Donald Knuth, creator of the Computer Modern faces,
has requested that any alterations which yield different font metrics be
given a different name.
$Id$

View file

@ -1,3 +1,29 @@
Changes from 2.35 to 2.36
* Fix issue with empty glyphs in condensed typefaces in the released source files.
Changes from 2.35 to 2.36
* Math: added DejaVu Math Tex Gyre by B. Jackowski, P. Strzelczyk and
P. Pianowski (on behalf of TeX users groups)
* Sans: removed dot of U+06BA in all forms
* Sans: fixed position of three dots of U+06BD in init and medi forms (by
Denis Jacquerye)
* Sans: corrected direction of contours in U+05E7 (by Lior Halphon)
* Sans: added U+1F643 (by Olleg Samoylov)
* Serif: moved up U+0360-0361 (by Gee Fung Sit 薛至峰)
* Serif: increased spacing of Roman numerals U+2161-2163, U+2165-2168,
U+216A-216B (by Gee Fung Sit 薛至峰)
* Serif: fixed anchor position of U+00E6 (by Gee Fung Sit 薛至峰)
* Sans: fixed vertical position of U+20BA (by Gee Fung Sit 薛至峰)
* Sans, Serif: fixed glyph height of Block Elements (by Gee Fung Sit 薛至峰)
* Sans, Serif: added U+A698-A699 (by Gee Fung Sit 薛至峰)
* Sans, Mono, Serif: added U+037F (by Gee Fung Sit 薛至峰)
* Mono: added U+0376-0377, U+037B-037D (by Gee Fung Sit 薛至峰)
* Serif: removed duplicate point from U+1D05 (by Gee Fung Sit 薛至峰)
* Mono: added U+20BA, U+20BD (by Gee Fung Sit 薛至峰)
* Sans: added moon symbols U+1F311-1F318 (by Ben Laenen)
Changes from 2.34 to 2.35
* Sans, SansMono, Serif: added U+0E3F, U+A7F8-U+A7F9 (by Gee Fung Sit 薛至峰)
@ -1426,4 +1452,4 @@ Changes from 0.9 to 0.9.1:
- proper caron shape for dcaron and tcaron
- minor visual changes
$Id: NEWS 2594 2015-05-17 07:54:48Z ben_laenen $
$Id$

View file

@ -1,4 +1,6 @@
DejaVu fonts 2.35 (c)2004-2015 DejaVu fonts team
[![Build Status](https://travis-ci.org/dejavu-fonts/dejavu-fonts.svg)](https://travis-ci.org/dejavu-fonts/dejavu-fonts)
DejaVu fonts 2.37 (c)2004-2016 DejaVu fonts team
------------------------------------------------
The DejaVu fonts are a font family based on the Bitstream Vera Fonts
@ -31,6 +33,7 @@ DejaVu Serif Condensed (experimental)
DejaVu Serif Condensed Bold (experimental)
DejaVu Serif Condensed Bold Italic (experimental)
DejaVu Serif Condensed Italic (experimental)
DejaVu Math TeX Gyre
All fonts are also available as derivative called DejaVu LGC with support
only for Latin, Greek and Cyrillic scripts.
@ -56,4 +59,9 @@ U+213C-U+2140, U+2295-U+2298, U+2308-U+230B, U+26A2-U+26B1, U+2701-U+2704,
U+2706-U+2709, U+270C-U+274B, U+2758-U+275A, U+2761-U+2775, U+2780-U+2794,
U+2798-U+27AF, U+27B1-U+27BE, U+FB05-U+FB06
$Id: README 2595 2015-05-17 07:57:27Z ben_laenen $
DejaVu Math TeX Gyre
--------------------
TeX Gyre DJV Math by B. Jackowski, P. Strzelczyk and P. Pianowski
(on behalf of TeX users groups).
$Id$

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show more