From d2eca542a9efa4b6d2f779613b4def0e844548d0 Mon Sep 17 00:00:00 2001 From: artemp Date: Mon, 9 Jun 2014 12:13:07 +0100 Subject: [PATCH 1/3] formatting --- include/mapnik/color.hpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/include/mapnik/color.hpp b/include/mapnik/color.hpp index f21ef76f8..e1d919df0 100644 --- a/include/mapnik/color.hpp +++ b/include/mapnik/color.hpp @@ -97,10 +97,12 @@ public: { return green_; } + inline std::uint8_t blue() const { return blue_; } + inline std::uint8_t alpha() const { return alpha_; @@ -110,6 +112,7 @@ public: { red_ = red; } + inline void set_green(std::uint8_t green) { green_ = green; From 3ded23fbab2d4183da3aa86cb5e4a46d2df543d8 Mon Sep 17 00:00:00 2001 From: artemp Date: Thu, 12 Jun 2014 15:14:05 +0100 Subject: [PATCH 2/3] move make_unique out of std namespace and allow building with c++14 compilers ( -std=c++1y ) --- include/mapnik/{std.hpp => make_unique.hpp} | 12 ++++++------ include/mapnik/util/geometry_to_wkb.hpp | 2 +- plugins/input/gdal/gdal_featureset.cpp | 2 +- plugins/input/osm/osm_featureset.cpp | 3 +-- plugins/input/shape/shape_datasource.cpp | 2 +- plugins/input/shape/shape_io.cpp | 2 +- src/agg/process_building_symbolizer.cpp | 2 +- src/cairo/cairo_renderer.cpp | 2 +- src/grid/process_building_symbolizer.cpp | 2 +- src/webp_reader.cpp | 2 +- src/wkb.cpp | 2 +- src/xml_tree.cpp | 2 +- tests/cpp_tests/fontset_runtime_test.cpp | 2 +- 13 files changed, 18 insertions(+), 19 deletions(-) rename include/mapnik/{std.hpp => make_unique.hpp} (82%) diff --git a/include/mapnik/std.hpp b/include/mapnik/make_unique.hpp similarity index 82% rename from include/mapnik/std.hpp rename to include/mapnik/make_unique.hpp index b3fb25898..0434cec78 100644 --- a/include/mapnik/std.hpp +++ b/include/mapnik/make_unique.hpp @@ -20,19 +20,19 @@ * *****************************************************************************/ -#ifndef MAPNIK_STD_HPP -#define MAPNIK_STD_HPP +#ifndef MAPNIK_MAKE_UNIQUE_HPP +#define MAPNIK_MAKE_UNIQUE_HPP #include -namespace std { +namespace mapnik { // C++14 backfill from http://herbsutter.com/gotw/_102/ template -inline ::std::unique_ptr make_unique(Args&& ...args) { - return ::std::unique_ptr(new T(::std::forward(args)...)); +inline std::unique_ptr make_unique(Args&& ...args) { + return std::unique_ptr(new T(std::forward(args)...)); } } -#endif +#endif // MAPNIK_MAKE_UNIQUE_HPP diff --git a/include/mapnik/util/geometry_to_wkb.hpp b/include/mapnik/util/geometry_to_wkb.hpp index 70afb69c1..58967394e 100644 --- a/include/mapnik/util/geometry_to_wkb.hpp +++ b/include/mapnik/util/geometry_to_wkb.hpp @@ -24,7 +24,7 @@ #define MAPNIK_GEOMETRY_TO_WKB_HPP // mapnik -#include +#include #include #include diff --git a/plugins/input/gdal/gdal_featureset.cpp b/plugins/input/gdal/gdal_featureset.cpp index 5663032ff..d131c951a 100644 --- a/plugins/input/gdal/gdal_featureset.cpp +++ b/plugins/input/gdal/gdal_featureset.cpp @@ -21,7 +21,7 @@ *****************************************************************************/ // mapnik -#include +#include #include #include #include diff --git a/plugins/input/osm/osm_featureset.cpp b/plugins/input/osm/osm_featureset.cpp index b6f68af39..99be92be0 100644 --- a/plugins/input/osm/osm_featureset.cpp +++ b/plugins/input/osm/osm_featureset.cpp @@ -1,4 +1,3 @@ - /***************************************************************************** * * This file is part of Mapnik (c++ mapping toolkit) @@ -22,7 +21,7 @@ *****************************************************************************/ // mapnik -#include +#include #include #include #include diff --git a/plugins/input/shape/shape_datasource.cpp b/plugins/input/shape/shape_datasource.cpp index 9fc6f85ff..e027990ab 100644 --- a/plugins/input/shape/shape_datasource.cpp +++ b/plugins/input/shape/shape_datasource.cpp @@ -31,7 +31,7 @@ // mapnik #include -#include +#include #include #include #include diff --git a/plugins/input/shape/shape_io.cpp b/plugins/input/shape/shape_io.cpp index 5118a92eb..bd6737f07 100644 --- a/plugins/input/shape/shape_io.cpp +++ b/plugins/input/shape/shape_io.cpp @@ -24,7 +24,7 @@ // mapnik #include -#include +#include #include #include diff --git a/src/agg/process_building_symbolizer.cpp b/src/agg/process_building_symbolizer.cpp index 51ae6d993..d988973e0 100644 --- a/src/agg/process_building_symbolizer.cpp +++ b/src/agg/process_building_symbolizer.cpp @@ -21,7 +21,7 @@ *****************************************************************************/ // mapnik -#include +#include #include #include #include diff --git a/src/cairo/cairo_renderer.cpp b/src/cairo/cairo_renderer.cpp index a4f0dd4d3..93b983e13 100644 --- a/src/cairo/cairo_renderer.cpp +++ b/src/cairo/cairo_renderer.cpp @@ -23,7 +23,7 @@ #if defined(HAVE_CAIRO) // mapnik -#include +#include #include #include #include diff --git a/src/grid/process_building_symbolizer.cpp b/src/grid/process_building_symbolizer.cpp index 3779a1c99..c27f43884 100644 --- a/src/grid/process_building_symbolizer.cpp +++ b/src/grid/process_building_symbolizer.cpp @@ -23,7 +23,7 @@ #if defined(GRID_RENDERER) // mapnik -#include +#include #include #include #include diff --git a/src/webp_reader.cpp b/src/webp_reader.cpp index 8116e98a8..75391ffdb 100644 --- a/src/webp_reader.cpp +++ b/src/webp_reader.cpp @@ -21,7 +21,7 @@ *****************************************************************************/ // mapnik -#include +#include #include #include diff --git a/src/wkb.cpp b/src/wkb.cpp index facee7113..143d95260 100644 --- a/src/wkb.cpp +++ b/src/wkb.cpp @@ -21,7 +21,7 @@ *****************************************************************************/ // mapnik -#include +#include #include #include #include diff --git a/src/xml_tree.cpp b/src/xml_tree.cpp index 8e53470cf..02cda08c3 100644 --- a/src/xml_tree.cpp +++ b/src/xml_tree.cpp @@ -21,7 +21,7 @@ *****************************************************************************/ //mapnik -#include +#include #include #include #include diff --git a/tests/cpp_tests/fontset_runtime_test.cpp b/tests/cpp_tests/fontset_runtime_test.cpp index 69082b2a1..5e4acc03e 100644 --- a/tests/cpp_tests/fontset_runtime_test.cpp +++ b/tests/cpp_tests/fontset_runtime_test.cpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include "utils.hpp" From 4cb331b11934a9765dcc8d439973812171ef7d48 Mon Sep 17 00:00:00 2001 From: Sean Gillies Date: Thu, 12 Jun 2014 08:54:52 -0700 Subject: [PATCH 3/3] Add an example config file for cpp03-libstdcpp-x86_64-macosx. --- config-cpp03-libstdcpp-x86_64-macosx.py | 33 +++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 config-cpp03-libstdcpp-x86_64-macosx.py diff --git a/config-cpp03-libstdcpp-x86_64-macosx.py b/config-cpp03-libstdcpp-x86_64-macosx.py new file mode 100644 index 000000000..e1a732773 --- /dev/null +++ b/config-cpp03-libstdcpp-x86_64-macosx.py @@ -0,0 +1,33 @@ +# cpp03-libstdcpp-x86_64-macosx +# +# Forcing stdlib is the key for this platform. + +CUSTOM_CXXFLAGS = '-fvisibility-inlines-hidden -DU_CHARSET_IS_UTF8=1 -stdlib=libstdc++' +CUSTOM_LDFLAGS = '-stdlib=libstdc++' +RUNTIME_LINK = 'static' +INPUT_PLUGINS = 'csv,gdal,geojson,occi,ogr,osm,postgis,python,raster,rasterlite,shape,sqlite' +WARNING_CXXFLAGS = '-Wno-deprecated-register -Wno-redeclared-class-member' +PATH = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/bin/' +BOOST_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include/boost' +BOOST_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +BOOST_PYTHON_LIB = 'boost_python-2.7' +FREETYPE_CONFIG = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/bin/freetype-config' +ICU_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include' +ICU_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +PNG_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include' +PNG_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +JPEG_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include' +JPEG_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +TIFF_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include' +TIFF_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +PROJ_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include' +PROJ_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +BENCHMARK = True +CAIRO_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include' +CAIRO_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +SQLITE_INCLUDES = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/include' +SQLITE_LIBS = '../mapnik-packaging/osx/out/build-cpp03-libstdcpp-x86_64-macosx/lib' +FRAMEWORK_PYTHON = False +BINDINGS = 'python' +XMLPARSER = 'ptree' +