diff --git a/ports/mapnik/0001-CMakeFiles.patch b/ports/mapnik/0001-CMakeFiles.patch new file mode 100644 index 00000000000000..4a68e6917070f7 --- /dev/null +++ b/ports/mapnik/0001-CMakeFiles.patch @@ -0,0 +1,1197 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +new file mode 100644 +index 0000000..f07a5ce +--- /dev/null ++++ b/CMakeLists.txt +@@ -0,0 +1,306 @@ ++cmake_minimum_required(VERSION 3.13.4) ++project(mapnik) ++set(CMAKE_CXX_STANDARD 14) ++include(CMakeDependentOption) ++ ++ ++option(MAPNIK_STATIC_LIB "Build a static library" OFF) ++ ++option(WITH_DEMO "Build demo" OFF) ++option(WITH_VIEWER "Build viewer" OFF) ++ ++ ++option(WITH_INPUTS "Build input plugins" ON) ++ ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_CSV "Build the csv input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_GDAL "Build the gdal input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_GEOBUF "Build the geobuf input plugin" OFF "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_GEOJSON "Build the geojson input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_OGR "Build the ogr input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_PGRASTER "Build the pgraster input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_POSTGIS "Build the postgis input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_RASTER "Build the raster input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_SHAPE "Build the shape input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_SQLITE "Build the sqlite input plugin" ON "WITH_INPUTS" ON) ++CMAKE_DEPENDENT_OPTION(WITH_INPUT_TOPOJSON "Build the topojson input plugin" ON "WITH_INPUTS" ON) ++ ++MESSAGE(WITH_INPUT_POSTGIS ${WITH_INPUT_POSTGIS}}) ++ ++option(WITH_UTILS "Build the utilities" ON ) ++ ++option(WITH_GRID "Use the grid renderer" OFF) ++option(WITH_CAIRO "Use cairo" ON) ++option(WITH_PROJ4 "Use proj4" ON) ++ ++if(MSVC) ++ # Force to always compile with W4 ++ if(CMAKE_CXX_FLAGS MATCHES "/W[0-4]") ++ string(REGEX REPLACE "/W[0-4]" "/W1" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") ++ else() ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /W1") ++ endif() ++ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd\"4068\" /wd\"4661\" /wd\"4503\" ") ++ add_compile_options(/MP) ++ add_compile_options(-bigobj) #added by @am2222 ++ add_compile_definitions(ACCEPT_USE_OF_DEPRECATED_PROJ_API_H=1) #added by @am2222 for proj4 compile ++ add_definitions(-DMAPNIK_THREADSAFE) ++ ++endif() ++ ++find_package(Boost REQUIRED ++ COMPONENTS filesystem system regex program_options) ++ ++find_package(FreeType REQUIRED) ++ ++find_library(HARFBUZZ_LIB harfbuzz.lib) ++find_package(ICU REQUIRED COMPONENTS uc) ++ ++find_package(PNG REQUIRED) ++find_package(jpeg REQUIRED) ++find_package(tiff REQUIRED) ++find_package(WebP REQUIRED) ++find_package(LibXml2 REQUIRED) ++find_package(ZLIB REQUIRED) ++ ++set (MAPNIK_DEFS ++ -DHAVE_PNG ++ -DHAVE_JPEG ++ -DHAVE_TIFF ++ -DHAVE_WEBP) ++ ++set(thirdparty_include_paths ${thirdparty_include_paths} ++ ${JPEG_INCLUDE_DIR} ${WEBP_INCLUDE_DIRS} ${LIBXML2_INCLUDE_DIR}) ++ ++set(thirdparty_libraries ${thirdparty_libraries} ++ ${JPEG_LIBRARIES} ${WEBP_LIBRARIES} ${LIBXML2_LIBRARIES} ${HARFBUZZ_LIB}) ++ ++# AGG ++ ++include(files.cmake) ++ ++if (WITH_CAIRO) ++ find_library(CAIRO_LIB_DEBUG cairod) ++ find_library(CAIRO_LIB_RELEASE cairo) ++ find_library(CAIRO_GOBJECT_LIB_DEBUG cairo-gobjectd) ++ find_library(CAIRO_GOBJECT_LIB_RELEASE cairo-gobject) ++ find_path(CAIRO_INCLUDE_DIR cairo/cairo.h) ++ ++ set(thirdparty_include_paths ${thirdparty_include_paths} ${CAIRO_INCLUDE_DIR}) ++ set(thirdparty_libraries ${thirdparty_libraries} $<$:${CAIRO_LIB_DEBUG}> $<$:${CAIRO_LIB_RELEASE}>) ++ ++ set(MAPNIK_SOURCES ${MAPNIK_SOURCES} ++ src/cairo/process_markers_symbolizer.cpp ++ src/cairo/process_group_symbolizer.cpp ++ ++ src/cairo/cairo_context.cpp ++ src/cairo/cairo_render_vector.cpp ++ src/cairo/cairo_renderer.cpp ++ src/cairo/process_building_symbolizer.cpp ++ src/cairo/process_debug_symbolizer.cpp ++ src/cairo/process_line_pattern_symbolizer.cpp ++ src/cairo/process_line_symbolizer.cpp ++ src/cairo/process_point_symbolizer.cpp ++ src/cairo/process_polygon_pattern_symbolizer.cpp ++ src/cairo/process_polygon_symbolizer.cpp ++ src/cairo/process_raster_symbolizer.cpp ++ src/cairo/process_text_symbolizer.cpp) ++ ++ set(MAPNIK_DEFS ${MAPNIK_DEFS} -DHAVE_CAIRO) ++endif() ++message(STATUS "Cairo renderer " ${WITH_CAIRO}) ++ ++if (WITH_PROJ4) ++ find_package(PROJ4 REQUIRED) ++ set(thirdparty_include_paths ${thirdparty_include_paths} ${PROJ4_INCLUDE_DIRS}) ++ set(thirdparty_libraries ${thirdparty_libraries} ${PROJ4_LIBRARIES}) ++ ++ set(MAPNIK_DEFS ${MAPNIK_DEFS} -DMAPNIK_USE_PROJ4) ++endif() ++ ++if (WITH_GRID) ++ set(MAPNIK_SOURCES ${MAPNIK_SOURCES} ++ src/grid/grid.cpp ++ src/grid/grid_renderer.cpp ++ src/grid/process_building_symbolizer.cpp ++ src/grid/process_line_pattern_symbolizer.cpp ++ src/grid/process_line_symbolizer.cpp ++ src/grid/process_point_symbolizer.cpp ++ src/grid/process_polygon_pattern_symbolizer.cpp ++ src/grid/process_polygon_symbolizer.cpp ++ src/grid/process_raster_symbolizer.cpp ++ src/grid/process_shield_symbolizer.cpp ++ src/grid/process_text_symbolizer.cpp) ++ set(MAPNIK_DEFS ${MAPNIK_DEFS} -DGRID_RENDERER) ++ENDIF() ++message(STATUS "Grid renderer: " ${WITH_GRID}) ++ ++set(MAPNIK_SOURCES ${MAPNIK_SOURCES} ++ src/svg/output/svg_output_grammars.cpp ++ src/svg/output/svg_renderer.cpp ++ src/svg/output/svg_generator.cpp ++ src/svg/output/svg_output_attributes.cpp ++ src/svg/output/process_symbolizers.cpp ++ src/svg/output/process_line_symbolizer.cpp ++ src/svg/output/process_polygon_symbolizer.cpp) ++set(MAPNIK_DEFS ${MAPNIK_DEFS} -DSVG_RENDERER) ++ ++ ++set(MAPNIK_SOURCES ${MAPNIK_SOURCES} ++ src/jpeg_reader.cpp ++ src/libxml2_loader.cpp ++ src/png_reader.cpp ++ src/tiff_reader.cpp ++ src/webp_reader.cpp ++ ) ++ ++#set(MAPNIK_SOURCES ${MAPNIK_SOURCES} src/rapidxml_loader.cpp) ++ ++set(MAPNIK_DEFS ${MAPNIK_DEFS} -DHAVE_LIBXML2 -DBOOST_REGEX_HAS_ICU) ++ ++set(mapnik_include_paths ++ include ++ deps ++ deps/agg/include ++ deps/mapbox/geometry/include ++ deps/mapbox/polylabel/include ++ deps/mapbox/variant/include) ++ ++ ++ ++include_directories(${mapnik_include_paths} ${thirdparty_include_paths}) ++ ++if (MAPNIK_STATIC_LIB) ++ message(STATUS "Building static library") ++ add_library(mapnik STATIC ${MAPNIK_SOURCES} ${MAPNIK_AGG_SOURCES} ${AGG_SOURCES}) ++ target_compile_definitions(mapnik PUBLIC -DMAPNIK_STATICLIB) ++ set(MAPNIK_LIB_DEFINITION -DMAPNIK_STATICLIB) ++else () ++ message(STATUS "Building shared library") ++ add_library(mapnik SHARED ${MAPNIK_SOURCES} ${MAPNIK_AGG_SOURCES} ${AGG_SOURCES}) ++ target_compile_definitions(mapnik PRIVATE -DMAPNIK_EXPORTS) ++ set(MAPNIK_LIB_DEFINITION ) ++endif () ++ ++target_compile_definitions(mapnik PUBLIC ${MAPNIK_DEFS}) ++ ++target_include_directories(mapnik INTERFACE ${mapnik_include_paths} ${thirdparty_include_paths} ) ++target_link_libraries(mapnik PUBLIC ++ ${thirdparty_libraries} ++ Boost::boost Boost::filesystem Boost::system Boost::regex Boost::program_options Boost::system ++ Freetype::Freetype ++ ICU::uc ++ PNG::PNG ++ TIFF::TIFF ++ ZLIB::ZLIB) ++ ++install(TARGETS mapnik ++ LIBRARY DESTINATION lib) ++ ++install(DIRECTORY include/ DESTINATION include/ CONFIGURATIONS Release) ++ ++add_subdirectory(src/json) ++add_subdirectory(src/wkt) ++ ++# ideally we should also generate mapnik-config ++ ++if (WITH_INPUT_CSV) ++ add_subdirectory(plugins/input/csv) ++endif() ++ ++if (WITH_INPUT_GDAL) ++ find_package(GDAL REQUIRED) ++ add_subdirectory(plugins/input/gdal) ++endif() ++ ++if (WITH_INPUT_GEOBUF) ++ # TODO insert protozero here ++ add_subdirectory(plugins/input/geobuf) ++endif() ++ ++if (WITH_INPUT_GEOJSON) ++ add_subdirectory(plugins/input/geojson) ++endif() ++ ++if (WITH_INPUT_OGR) ++ add_subdirectory(plugins/input/ogr) ++endif() ++ ++if (WITH_INPUT_PGRASTER) ++ find_package(PostgreSQL REQUIRED) ++ add_subdirectory(plugins/input/pgraster) ++endif() ++ ++if (WITH_INPUT_POSTGIS) ++ find_package(PostgreSQL REQUIRED) ++ add_subdirectory(plugins/input/postgis) ++endif() ++ ++if (WITH_INPUT_RASTER) ++ add_subdirectory(plugins/input/raster) ++endif() ++ ++if (WITH_INPUT_SHAPE) ++ add_subdirectory(plugins/input/shape) ++endif() ++ ++if (WITH_INPUT_SQLITE) ++ find_package(sqlite3 REQUIRED) ++ add_subdirectory(plugins/input/sqlite) ++endif() ++ ++if (WITH_INPUT_TOPOJSON) ++ add_subdirectory(plugins/input/topojson) ++endif() ++ ++if (WITH_INPUTS) ++ message(STATUS "Input plugins:") ++ if(WITH_INPUT_CSV ) ++ message(STATUS " - csv ") ++ endif() ++ if(WITH_INPUT_GDAL ) ++ message(STATUS " - gdal ") ++ endif() ++ if(WITH_INPUT_GEOBUF ) ++ message(STATUS " - geobuf ") ++ endif() ++ if(WITH_INPUT_GEOJSON ) ++ message(STATUS " - geojson ") ++ endif() ++ if(WITH_INPUT_OGR ) ++ message(STATUS " - ogr ") ++ endif() ++ if(WITH_INPUT_PGRASTER ) ++ message(STATUS " - pgraster") ++ endif() ++ if(WITH_INPUT_POSTGIS ) ++ message(STATUS " - postgis ") ++ endif() ++ if(WITH_INPUT_RASTER ) ++ message(STATUS " - raster ") ++ endif() ++ if(WITH_INPUT_SHAPE ) ++ message(STATUS " - shape ") ++ endif() ++ if(WITH_INPUT_SQLITE ) ++ message(STATUS " - sqlite ") ++ endif() ++ if(WITH_INPUT_TOPOJSON ) ++ message(STATUS " - topojson") ++ endif() ++else() ++ message(STATUS "Input plugins OFF") ++endif() ++ ++if(WITH_DEMO) ++ add_subdirectory(demo/c++) ++endif() ++ ++if(WITH_VIEWER) ++ find_package(Qt5 COMPONENTS Widgets REQUIRED) ++ add_subdirectory(demo/viewer) ++endif() ++ ++if(WITH_UTILS) ++ add_subdirectory(utils/mapnik-render) ++ add_subdirectory(utils/shapeindex) ++endif() +diff --git a/demo/c++/CMakeLists.txt b/demo/c++/CMakeLists.txt +new file mode 100644 +index 0000000..a0a48b8 +--- /dev/null ++++ b/demo/c++/CMakeLists.txt +@@ -0,0 +1,4 @@ ++add_executable(mapnik-demo rundemo.cpp) ++add_dependencies(mapnik-demo mapnik) ++target_link_libraries(mapnik-demo PRIVATE mapnik) ++install(TARGETS mapnik-demo DESTINATION bin) +diff --git a/demo/viewer/CMakeLists.txt b/demo/viewer/CMakeLists.txt +new file mode 100644 +index 0000000..86034a0 +--- /dev/null ++++ b/demo/viewer/CMakeLists.txt +@@ -0,0 +1,27 @@ ++add_executable(mapnik-viewer ++ about_dialog.cpp ++ info_dialog.cpp ++ layerdelegate.cpp ++ layerlistmodel.cpp ++ layerwidget.cpp ++ layer_info_dialog.cpp ++ main.cpp ++ mainwindow.cpp ++ mapwidget.cpp ++ styles_model.cpp ++ ++ forms/about.ui ++ forms/info.ui ++ forms/layer_info.ui ++ ++ mapnik_viewer.qrc) ++ ++set_target_properties(mapnik-viewer PROPERTIES ++ AUTOUIC_SEARCH_PATHS forms ++ AUTORCC ON ++ AUTOUIC ON ++ AUTOMOC ON) ++ ++add_dependencies(mapnik-viewer mapnik) ++target_link_libraries(mapnik-viewer PRIVATE mapnik Qt5::Widgets) ++install(TARGETS mapnik-viewer DESTINATION bin) +diff --git a/files.cmake b/files.cmake +new file mode 100644 +index 0000000..b9d767f +--- /dev/null ++++ b/files.cmake +@@ -0,0 +1,557 @@ ++set (MAPNIK_SOURCES ++ src/cairo_io.cpp ++ src/color.cpp ++ src/color_factory.cpp ++ src/config_error.cpp ++ src/conversions.cpp ++ src/css_color_grammar.cpp ++ src/dasharray_parser.cpp ++ src/datasource_cache.cpp ++ src/datasource_cache_static.cpp ++ src/debug.cpp ++ src/box2d.cpp ++ src/expression.cpp ++ src/expression_grammar.cpp ++ src/expression_node.cpp ++ src/expression_string.cpp ++ src/feature_kv_iterator.cpp ++ src/feature_style_processor.cpp ++ src/feature_type_style.cpp ++ src/font_engine_freetype.cpp ++ src/font_set.cpp ++ src/fs.cpp ++ src/function_call.cpp ++ src/geometry/interior.cpp ++ src/geometry_envelope.cpp ++ src/geometry_reprojection.cpp ++ src/gradient.cpp ++ src/group/group_layout_manager.cpp ++ src/group/group_rule.cpp ++ src/group/group_symbolizer_helper.cpp ++ src/image.cpp ++ src/image_any.cpp ++ src/image_compositing.cpp ++ src/image_copy.cpp ++ src/image_filter_grammar.cpp ++ src/image_filter_types.cpp ++ src/image_options.cpp ++ src/image_reader.cpp ++ src/image_scaling.cpp ++ src/image_util.cpp ++ src/image_util_jpeg.cpp ++ src/image_util_png.cpp ++ src/image_util_tiff.cpp ++ src/image_util_webp.cpp ++ src/image_view.cpp ++ src/image_view_any.cpp ++ src/layer.cpp ++ src/load_map.cpp ++ src/map.cpp ++ src/math.cpp ++ src/mapped_memory_cache.cpp ++ src/marker_cache.cpp ++ src/marker_helpers.cpp ++ src/memory_datasource.cpp ++ src/palette.cpp ++ src/params.cpp ++ src/parse_path.cpp ++ src/parse_transform.cpp ++ src/plugin.cpp ++ src/proj_transform.cpp ++ src/projection.cpp ++ src/raster_colorizer.cpp ++ src/renderer_common.cpp ++ src/renderer_common/pattern_alignment.cpp ++ src/renderer_common/render_group_symbolizer.cpp ++ src/renderer_common/render_markers_symbolizer.cpp ++ src/renderer_common/render_pattern.cpp ++ src/renderer_common/render_thunk_extractor.cpp ++ src/request.cpp ++ src/rule.cpp ++ src/save_map.cpp ++ src/scale_denominator.cpp ++ src/simplify.cpp ++ src/svg/svg_parser.cpp ++ src/svg/svg_path_parser.cpp ++ src/svg/svg_points_parser.cpp ++ src/svg/svg_transform_parser.cpp ++ src/symbolizer.cpp ++ src/symbolizer_enumerations.cpp ++ src/symbolizer_keys.cpp ++ src/text/face.cpp ++ src/text/font_feature_settings.cpp ++ src/text/font_library.cpp ++ src/text/formatting/base.cpp ++ src/text/formatting/format.cpp ++ src/text/formatting/layout.cpp ++ src/text/formatting/list.cpp ++ src/text/formatting/registry.cpp ++ src/text/formatting/text.cpp ++ src/text/glyph_positions.cpp ++ src/text/itemizer.cpp ++ src/text/placement_finder.cpp ++ src/text/placements/base.cpp ++ src/text/placements/dummy.cpp ++ src/text/placements/list.cpp ++ src/text/placements/registry.cpp ++ src/text/placements/simple.cpp ++ src/text/properties_util.cpp ++ src/text/renderer.cpp ++ src/text/scrptrun.cpp ++ src/text/symbolizer_helpers.cpp ++ src/text/text_layout.cpp ++ src/text/text_line.cpp ++ src/text/text_properties.cpp ++ src/transform_expression.cpp ++ src/transform_expression_grammar.cpp ++ src/twkb.cpp ++ src/unicode.cpp ++ src/util/utf_conv_win.cpp ++ src/value.cpp ++ src/vertex_adapters.cpp ++ src/vertex_cache.cpp ++ src/warp.cpp ++ src/well_known_srs.cpp ++ src/wkb.cpp ++ src/xml_tree.cpp ++ ) ++ ++ ++set(MAPNIK_AGG_SOURCES ++ src/agg/agg_renderer.cpp ++ src/agg/process_building_symbolizer.cpp ++ src/agg/process_debug_symbolizer.cpp ++ src/agg/process_dot_symbolizer.cpp ++ src/agg/process_group_symbolizer.cpp ++ src/agg/process_line_pattern_symbolizer.cpp ++ src/agg/process_line_symbolizer.cpp ++ src/agg/process_markers_symbolizer.cpp ++ src/agg/process_point_symbolizer.cpp ++ src/agg/process_polygon_pattern_symbolizer.cpp ++ src/agg/process_polygon_symbolizer.cpp ++ src/agg/process_raster_symbolizer.cpp ++ src/agg/process_shield_symbolizer.cpp ++ src/agg/process_text_symbolizer.cpp) ++ ++ ++set(AGG_SOURCES ++ deps/agg/src/agg_arc.cpp ++ deps/agg/src/agg_arrowhead.cpp ++ deps/agg/src/agg_bezier_arc.cpp ++ deps/agg/src/agg_bspline.cpp ++ deps/agg/src/agg_curves.cpp ++ deps/agg/src/agg_embedded_raster_fonts.cpp ++ deps/agg/src/agg_gsv_text.cpp ++ deps/agg/src/agg_image_filters.cpp ++ deps/agg/src/agg_line_aa_basics.cpp ++ deps/agg/src/agg_line_profile_aa.cpp ++ deps/agg/src/agg_pixfmt_rgba.cpp ++ deps/agg/src/agg_rounded_rect.cpp ++ deps/agg/src/agg_sqrt_tables.cpp ++ deps/agg/src/agg_trans_affine.cpp ++ deps/agg/src/agg_trans_double_path.cpp ++ deps/agg/src/agg_trans_single_path.cpp ++ deps/agg/src/agg_trans_warp_magnifier.cpp ++ deps/agg/src/agg_vcgen_bspline.cpp ++ deps/agg/src/agg_vcgen_contour.cpp ++ deps/agg/src/agg_vcgen_dash.cpp ++ deps/agg/src/agg_vcgen_markers_term.cpp ++ deps/agg/src/agg_vcgen_stroke.cpp ++ deps/agg/src/agg_vcgen_smooth_poly1.cpp ++ deps/agg/src/agg_vpgen_clip_polygon.cpp ++ deps/agg/src/agg_vpgen_clip_polyline.cpp ++ deps/agg/src/agg_vpgen_segmentator.cpp ) ++ ++set(MAPNIK_INC ++ mapnik/adaptive_smooth.hpp ++ mapnik/agg_helpers.hpp ++ mapnik/agg_pattern_source.hpp ++ mapnik/agg_rasterizer.hpp ++ mapnik/agg_renderer.hpp ++ mapnik/agg_render_marker.hpp ++ mapnik/attribute.hpp ++ mapnik/attribute_collector.hpp ++ mapnik/attribute_descriptor.hpp ++ mapnik/boolean.hpp ++ mapnik/boost_spirit_instantiate.hpp ++ mapnik/cairo_io.hpp ++ mapnik/color.hpp ++ mapnik/color_factory.hpp ++ mapnik/config.hpp ++ mapnik/config_error.hpp ++ mapnik/coord.hpp ++ mapnik/css_color_grammar.hpp ++ mapnik/css_color_grammar_impl.hpp ++ mapnik/cxx11_support.hpp ++ mapnik/datasource.hpp ++ mapnik/datasource_cache.hpp ++ mapnik/datasource_geometry_type.hpp ++ mapnik/debug.hpp ++ mapnik/enumeration.hpp ++ mapnik/evaluate_global_attributes.hpp ++ mapnik/expression.hpp ++ mapnik/expression_evaluator.hpp ++ mapnik/expression_grammar.hpp ++ mapnik/expression_grammar_config.hpp ++ mapnik/expression_grammar_def.hpp ++ mapnik/expression_node.hpp ++ mapnik/expression_node_types.hpp ++ mapnik/expression_string.hpp ++ mapnik/extend_converter.hpp ++ mapnik/factory.hpp ++ mapnik/feature.hpp ++ mapnik/featureset.hpp ++ mapnik/feature_factory.hpp ++ mapnik/feature_kv_iterator.hpp ++ mapnik/feature_layer_desc.hpp ++ mapnik/feature_style_processor.hpp ++ mapnik/feature_style_processor_context.hpp ++ mapnik/feature_style_processor_impl.hpp ++ mapnik/feature_type_style.hpp ++ mapnik/filter_featureset.hpp ++ mapnik/font_engine_freetype.hpp ++ mapnik/font_set.hpp ++ mapnik/function_call.hpp ++ mapnik/geometry.hpp ++ mapnik/geom_util.hpp ++ mapnik/global.hpp ++ mapnik/gradient.hpp ++ mapnik/grid_vertex_converter.hpp ++ mapnik/hextree.hpp ++ mapnik/hit_test_filter.hpp ++ mapnik/image.hpp ++ mapnik/image_any.hpp ++ mapnik/image_compositing.hpp ++ mapnik/image_copy.hpp ++ mapnik/image_filter.hpp ++ mapnik/image_filter_grammar.hpp ++ mapnik/image_filter_grammar_def.hpp ++ mapnik/image_filter_types.hpp ++ mapnik/image_impl.hpp ++ mapnik/image_null.hpp ++ mapnik/image_options.hpp ++ mapnik/image_reader.hpp ++ mapnik/image_scaling.hpp ++ mapnik/image_scaling_traits.hpp ++ mapnik/image_util.hpp ++ mapnik/image_util_jpeg.hpp ++ mapnik/image_util_png.hpp ++ mapnik/image_util_tiff.hpp ++ mapnik/image_util_webp.hpp ++ mapnik/image_view.hpp ++ mapnik/image_view_any.hpp ++ mapnik/image_view_impl.hpp ++ mapnik/image_view_null.hpp ++ mapnik/init_priority.hpp ++ mapnik/jpeg_io.hpp ++ mapnik/label_collision_detector.hpp ++ mapnik/layer.hpp ++ mapnik/load_map.hpp ++ mapnik/make_unique.hpp ++ mapnik/map.hpp ++ mapnik/mapped_memory_cache.hpp ++ mapnik/marker.hpp ++ mapnik/markers_placement.hpp ++ mapnik/marker_cache.hpp ++ mapnik/marker_helpers.hpp ++ mapnik/memory_datasource.hpp ++ mapnik/memory_featureset.hpp ++ mapnik/octree.hpp ++ mapnik/offset_converter.hpp ++ mapnik/palette.hpp ++ mapnik/params.hpp ++ mapnik/params_impl.hpp ++ mapnik/parse_path.hpp ++ mapnik/path.hpp ++ mapnik/path_expression.hpp ++ mapnik/path_expression_grammar.hpp ++ mapnik/path_expression_grammar_def.hpp ++ mapnik/pixel_position.hpp ++ mapnik/pixel_types.hpp ++ mapnik/plugin.hpp ++ mapnik/png_io.hpp ++ mapnik/pool.hpp ++ mapnik/projection.hpp ++ mapnik/proj_strategy.hpp ++ mapnik/proj_transform.hpp ++ mapnik/ptree_helpers.hpp ++ mapnik/quad_tree.hpp ++ mapnik/query.hpp ++ mapnik/raster.hpp ++ mapnik/raster_colorizer.hpp ++ mapnik/renderer_common.hpp ++ mapnik/request.hpp ++ mapnik/rule.hpp ++ mapnik/rule_cache.hpp ++ mapnik/safe_cast.hpp ++ mapnik/save_map.hpp ++ mapnik/scale_denominator.hpp ++ mapnik/simplify.hpp ++ mapnik/simplify_converter.hpp ++ mapnik/span_image_filter.hpp ++ mapnik/sql_utils.hpp ++ mapnik/sse.hpp ++ mapnik/stringify_macro.hpp ++ mapnik/symbolizer.hpp ++ mapnik/symbolizer_base.hpp ++ mapnik/symbolizer_default_values.hpp ++ mapnik/symbolizer_dispatch.hpp ++ mapnik/symbolizer_enumerations.hpp ++ mapnik/symbolizer_hash.hpp ++ mapnik/symbolizer_keys.hpp ++ mapnik/symbolizer_utils.hpp ++ mapnik/tiff_io.hpp ++ mapnik/timer.hpp ++ mapnik/tolerance_iterator.hpp ++ mapnik/transform_path_adapter.hpp ++ mapnik/unicode.hpp ++ mapnik/value.hpp ++ mapnik/version.hpp ++ mapnik/vertex.hpp ++ mapnik/vertex_adapters.hpp ++ mapnik/vertex_cache.hpp ++ mapnik/vertex_converters.hpp ++ mapnik/vertex_processor.hpp ++ mapnik/vertex_vector.hpp ++ mapnik/view_strategy.hpp ++ mapnik/view_transform.hpp ++ mapnik/warning_ignore.hpp ++ mapnik/warning_ignore_agg.hpp ++ mapnik/warp.hpp ++ mapnik/webp_io.hpp ++ mapnik/well_known_srs.hpp ++ mapnik/wkb.hpp ++ mapnik/xml_attribute_cast.hpp ++ mapnik/xml_loader.hpp ++ mapnik/xml_node.hpp ++ mapnik/xml_tree.hpp ++ mapnik/geometry/boost_adapters.hpp ++ mapnik/geometry/boost_spirit_karma_adapter.hpp ++ mapnik/geometry/box2d.hpp ++ mapnik/geometry/box2d_impl.hpp ++ mapnik/geometry/centroid.hpp ++ mapnik/geometry/closest_point.hpp ++ mapnik/geometry/correct.hpp ++ mapnik/geometry/envelope.hpp ++ mapnik/geometry/envelope_impl.hpp ++ mapnik/geometry/fusion_adapted.hpp ++ mapnik/geometry/geometry_type.hpp ++ mapnik/geometry/geometry_types.hpp ++ mapnik/geometry/interior.hpp ++ mapnik/geometry/is_empty.hpp ++ mapnik/geometry/is_simple.hpp ++ mapnik/geometry/is_valid.hpp ++ mapnik/geometry/line_string.hpp ++ mapnik/geometry/multi_line_string.hpp ++ mapnik/geometry/multi_point.hpp ++ mapnik/geometry/multi_polygon.hpp ++ mapnik/geometry/point.hpp ++ mapnik/geometry/polygon.hpp ++ mapnik/geometry/polygon_vertex_processor.hpp ++ mapnik/geometry/polylabel.hpp ++ mapnik/geometry/remove_empty.hpp ++ mapnik/geometry/reprojection.hpp ++ mapnik/geometry/reprojection_impl.hpp ++ mapnik/geometry/strategy.hpp ++ mapnik/geometry/to_path.hpp ++ mapnik/geometry/transform.hpp ++ mapnik/csv/csv_grammar_x3.hpp ++ mapnik/csv/csv_grammar_x3_def.hpp ++ mapnik/csv/csv_types.hpp ++ mapnik/svg/geometry_svg_generator.hpp ++ mapnik/svg/geometry_svg_generator_impl.hpp ++ mapnik/svg/svg_converter.hpp ++ mapnik/svg/svg_grammar_config_x3.hpp ++ mapnik/svg/svg_parser.hpp ++ mapnik/svg/svg_parser_exception.hpp ++ mapnik/svg/svg_path_adapter.hpp ++ mapnik/svg/svg_path_attributes.hpp ++ mapnik/svg/svg_path_commands.hpp ++ mapnik/svg/svg_path_grammar_x3.hpp ++ mapnik/svg/svg_path_grammar_x3_def.hpp ++ mapnik/svg/svg_path_parser.hpp ++ mapnik/svg/svg_renderer_agg.hpp ++ mapnik/svg/svg_storage.hpp ++ mapnik/svg/svg_transform_grammar_x3.hpp ++ mapnik/svg/svg_transform_grammar_x3_def.hpp ++ mapnik/wkt/wkt_factory.hpp ++ mapnik/wkt/wkt_generator_grammar.hpp ++ mapnik/wkt/wkt_generator_grammar_impl.hpp ++ mapnik/wkt/wkt_grammar_x3.hpp ++ mapnik/wkt/wkt_grammar_x3_def.hpp ++ mapnik/cairo/cairo_context.hpp ++ mapnik/cairo/cairo_image_util.hpp ++ mapnik/cairo/cairo_renderer.hpp ++ mapnik/cairo/cairo_render_vector.hpp ++ mapnik/cairo/render_polygon_pattern.hpp ++ mapnik/grid/grid.hpp ++ mapnik/grid/grid_pixel.hpp ++ mapnik/grid/grid_pixfmt.hpp ++ mapnik/grid/grid_rasterizer.hpp ++ mapnik/grid/grid_renderer.hpp ++ mapnik/grid/grid_renderer_base.hpp ++ mapnik/grid/grid_rendering_buffer.hpp ++ mapnik/grid/grid_render_marker.hpp ++ mapnik/grid/grid_view.hpp ++ mapnik/json/attribute_value_visitor.hpp ++ mapnik/json/create_feature.hpp ++ mapnik/json/create_geometry.hpp ++ mapnik/json/extract_bounding_boxes.hpp ++ mapnik/json/extract_bounding_boxes_config.hpp ++ mapnik/json/feature_generator_grammar.hpp ++ mapnik/json/feature_generator_grammar_impl.hpp ++ mapnik/json/feature_grammar_x3.hpp ++ mapnik/json/feature_grammar_x3_def.hpp ++ mapnik/json/feature_parser.hpp ++ mapnik/json/generic_json_grammar_x3.hpp ++ mapnik/json/generic_json_grammar_x3_def.hpp ++ mapnik/json/geojson_grammar_x3.hpp ++ mapnik/json/geojson_grammar_x3_def.hpp ++ mapnik/json/geometry_generator_grammar.hpp ++ mapnik/json/geometry_generator_grammar_impl.hpp ++ mapnik/json/geometry_parser.hpp ++ mapnik/json/json_grammar_config.hpp ++ mapnik/json/json_value.hpp ++ mapnik/json/parse_feature.hpp ++ mapnik/json/positions_grammar_x3.hpp ++ mapnik/json/positions_grammar_x3_def.hpp ++ mapnik/json/positions_x3.hpp ++ mapnik/json/properties_generator_grammar.hpp ++ mapnik/json/properties_generator_grammar_impl.hpp ++ mapnik/json/stringifier.hpp ++ mapnik/json/topojson_grammar_x3.hpp ++ mapnik/json/topojson_grammar_x3_def.hpp ++ mapnik/json/topojson_utils.hpp ++ mapnik/json/topology.hpp ++ mapnik/json/unicode_string_grammar_x3.hpp ++ mapnik/json/unicode_string_grammar_x3_def.hpp ++ mapnik/json/value_converters.hpp ++ mapnik/util/char_array_buffer.hpp ++ mapnik/util/const_rendering_buffer.hpp ++ mapnik/util/container_adapter.hpp ++ mapnik/util/conversions.hpp ++ mapnik/util/dasharray_parser.hpp ++ mapnik/util/featureset_buffer.hpp ++ mapnik/util/feature_to_geojson.hpp ++ mapnik/util/file_io.hpp ++ mapnik/util/fs.hpp ++ mapnik/util/geometry_to_ds_type.hpp ++ mapnik/util/geometry_to_geojson.hpp ++ mapnik/util/geometry_to_svg.hpp ++ mapnik/util/geometry_to_wkb.hpp ++ mapnik/util/geometry_to_wkt.hpp ++ mapnik/util/hsl.hpp ++ mapnik/util/is_clockwise.hpp ++ mapnik/util/math.hpp ++ mapnik/util/name_to_int.hpp ++ mapnik/util/noncopyable.hpp ++ mapnik/util/path_iterator.hpp ++ mapnik/util/rounding_cast.hpp ++ mapnik/util/singleton.hpp ++ mapnik/util/spatial_index.hpp ++ mapnik/util/spirit_transform_attribute.hpp ++ mapnik/util/timer.hpp ++ mapnik/util/trim.hpp ++ mapnik/util/utf_conv_win.hpp ++ mapnik/util/variant.hpp ++ mapnik/util/variant_io.hpp ++ mapnik/group/group_layout.hpp ++ mapnik/group/group_layout_manager.hpp ++ mapnik/group/group_rule.hpp ++ mapnik/group/group_symbolizer_helper.hpp ++ mapnik/group/group_symbolizer_properties.hpp ++ mapnik/text/color_font_renderer.hpp ++ mapnik/text/evaluated_format_properties_ptr.hpp ++ mapnik/text/face.hpp ++ mapnik/text/font_feature_settings.hpp ++ mapnik/text/font_library.hpp ++ mapnik/text/glyph_info.hpp ++ mapnik/text/glyph_positions.hpp ++ mapnik/text/harfbuzz_shaper.hpp ++ mapnik/text/icu_shaper.hpp ++ mapnik/text/itemizer.hpp ++ mapnik/text/placement_finder.hpp ++ mapnik/text/placement_finder_impl.hpp ++ mapnik/text/properties_util.hpp ++ mapnik/text/renderer.hpp ++ mapnik/text/rotation.hpp ++ mapnik/text/scrptrun.hpp ++ mapnik/text/symbolizer_helpers.hpp ++ mapnik/text/text_layout.hpp ++ mapnik/text/text_line.hpp ++ mapnik/text/text_properties.hpp ++ mapnik/text/placements/base.hpp ++ mapnik/text/placements/dummy.hpp ++ mapnik/text/placements/list.hpp ++ mapnik/text/placements/registry.hpp ++ mapnik/text/placements/simple.hpp ++ mapnik/text/formatting/base.hpp ++ mapnik/text/formatting/format.hpp ++ mapnik/text/formatting/layout.hpp ++ mapnik/text/formatting/list.hpp ++ mapnik/text/formatting/registry.hpp ++ mapnik/text/formatting/text.hpp ++ mapnik/transform/parse_transform.hpp ++ mapnik/transform/transform_expression.hpp ++ mapnik/transform/transform_expression_grammar_x3.hpp ++ mapnik/transform/transform_expression_grammar_x3_def.hpp ++ mapnik/transform/transform_processor.hpp ++ mapnik/markers_placements/basic.hpp ++ mapnik/markers_placements/interior.hpp ++ mapnik/markers_placements/line.hpp ++ mapnik/markers_placements/point.hpp ++ mapnik/markers_placements/polylabel.hpp ++ mapnik/markers_placements/vertex_first.hpp ++ mapnik/markers_placements/vertex_last.hpp ++ mapnik/geometry/boost_adapters.hpp ++ mapnik/geometry/boost_spirit_karma_adapter.hpp ++ mapnik/geometry/box2d.hpp ++ mapnik/geometry/box2d_impl.hpp ++ mapnik/geometry/centroid.hpp ++ mapnik/geometry/closest_point.hpp ++ mapnik/geometry/correct.hpp ++ mapnik/geometry/envelope.hpp ++ mapnik/geometry/envelope_impl.hpp ++ mapnik/geometry/fusion_adapted.hpp ++ mapnik/geometry/geometry_type.hpp ++ mapnik/geometry/geometry_types.hpp ++ mapnik/geometry/interior.hpp ++ mapnik/geometry/is_empty.hpp ++ mapnik/geometry/is_simple.hpp ++ mapnik/geometry/is_valid.hpp ++ mapnik/geometry/line_string.hpp ++ mapnik/geometry/multi_line_string.hpp ++ mapnik/geometry/multi_point.hpp ++ mapnik/geometry/multi_polygon.hpp ++ mapnik/geometry/point.hpp ++ mapnik/geometry/polygon.hpp ++ mapnik/geometry/polygon_vertex_processor.hpp ++ mapnik/geometry/polylabel.hpp ++ mapnik/geometry/remove_empty.hpp ++ mapnik/geometry/reprojection.hpp ++ mapnik/geometry/reprojection_impl.hpp ++ mapnik/geometry/strategy.hpp ++ mapnik/geometry/to_path.hpp ++ mapnik/geometry/transform.hpp ++ mapnik/value/error.hpp ++ mapnik/value/hash.hpp ++ mapnik/value/types.hpp) ++ ++set(MAPNIK_INC ${MAPNIK_INC} ++ mapnik/svg/output/svg_generator.hpp ++ mapnik/svg/output/svg_output_attributes.hpp ++ mapnik/svg/output/svg_output_grammars.hpp ++ mapnik/svg/output/svg_output_grammars_impl.hpp ++ mapnik/svg/output/svg_path_iterator.hpp ++ mapnik/svg/output/svg_renderer.hpp) ++ ++set(MAPNIK_INC ${MAPNIK_INC} ++ mapnik/grid/grid.hpp ++ mapnik/grid/grid_pixel.hpp ++ mapnik/grid/grid_pixfmt.hpp ++ mapnik/grid/grid_rasterizer.hpp ++ mapnik/grid/grid_renderer.hpp ++ mapnik/grid/grid_renderer_base.hpp ++ mapnik/grid/grid_rendering_buffer.hpp ++ mapnik/grid/grid_render_marker.hpp ++ mapnik/grid/grid_view.hpp) +\ No newline at end of file +diff --git a/include/mapnik/config.hpp b/include/mapnik/config.hpp +index a9168e5..9bdcad4 100644 +--- a/include/mapnik/config.hpp ++++ b/include/mapnik/config.hpp +@@ -30,8 +30,10 @@ + # define MAPNIK_IMP __declspec (dllimport) + # ifdef MAPNIK_EXPORTS + # define MAPNIK_DECL __declspec (dllexport) +-# else ++# elif !defined(MAPNIK_STATICLIB) + # define MAPNIK_DECL __declspec (dllimport) ++# else ++# define MAPNIK_DECL + # endif + # pragma warning( disable: 4251 ) + # pragma warning( disable: 4275 ) +diff --git a/include/mapnik/geometry.hpp b/include/mapnik/geometry.hpp +index aae2bf3..6484dd3 100644 +--- a/include/mapnik/geometry.hpp ++++ b/include/mapnik/geometry.hpp +@@ -146,7 +146,7 @@ struct geometry : geometry_base + { + using coord_type = T; + +-#if __cpp_inheriting_constructors >= 200802 ++#if __cpp_inheriting_constructors >= 200802 && !defined (_MSC_VER) + + using geometry_base::geometry_base; + +diff --git a/include/mapnik/json/generic_json.hpp b/include/mapnik/json/generic_json.hpp +index 65c04c4..6c04609 100644 +--- a/include/mapnik/json/generic_json.hpp ++++ b/include/mapnik/json/generic_json.hpp +@@ -57,7 +57,7 @@ using json_value_base = mapnik::util::variant >; + struct json_value : json_value_base + { +-#if __cpp_inheriting_constructors >= 200802 ++#if __cpp_inheriting_constructors >= 200802 && !defined (_MSC_VER) + + using json_value_base::json_value_base; + +diff --git a/plugins/input/csv/CMakeLists.txt b/plugins/input/csv/CMakeLists.txt +new file mode 100644 +index 0000000..34a2e75 +--- /dev/null ++++ b/plugins/input/csv/CMakeLists.txt +@@ -0,0 +1,12 @@ ++add_library(mapnik-input-csv SHARED ++ csv_datasource.cpp ++ csv_featureset.cpp ++ csv_index_featureset.cpp ++ csv_inline_featureset.cpp ++ csv_utils.cpp) ++ ++target_link_libraries(mapnik-input-csv PUBLIC mapnik mapnik-wkt mapnik-json) ++set_target_properties(mapnik-input-csv PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-csv PROPERTIES OUTPUT_NAME "csv") ++set_target_properties(mapnik-input-csv PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-csv DESTINATION bin/plugins/input) +\ No newline at end of file +diff --git a/plugins/input/gdal/CMakeLists.txt b/plugins/input/gdal/CMakeLists.txt +new file mode 100644 +index 0000000..274ee44 +--- /dev/null ++++ b/plugins/input/gdal/CMakeLists.txt +@@ -0,0 +1,9 @@ ++add_library(mapnik-input-gdal SHARED ++ gdal_datasource.cpp ++ gdal_featureset.cpp) ++ ++target_link_libraries(mapnik-input-gdal PUBLIC mapnik ${GDAL_LIBRARIES}) ++set_target_properties(mapnik-input-gdal PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-gdal PROPERTIES OUTPUT_NAME "gdal") ++set_target_properties(mapnik-input-gdal PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-gdal DESTINATION bin/plugins/input) +diff --git a/plugins/input/geobuf/CMakeLists.txt b/plugins/input/geobuf/CMakeLists.txt +new file mode 100644 +index 0000000..1b798e5 +--- /dev/null ++++ b/plugins/input/geobuf/CMakeLists.txt +@@ -0,0 +1,9 @@ ++add_library(mapnik-input-geobuf SHARED ++ geobuf_datasource.cpp ++ geobuf_featureset.cpp) ++ ++target_link_libraries(mapnik-input-geobuf PUBLIC mapnik) ++set_target_properties(mapnik-input-geobuf PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-geobuf PROPERTIES OUTPUT_NAME "geobuf") ++set_target_properties(mapnik-input-geobuf PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-geobuf DESTINATION bin/plugins/input) +diff --git a/plugins/input/geojson/CMakeLists.txt b/plugins/input/geojson/CMakeLists.txt +new file mode 100644 +index 0000000..fb53a3c +--- /dev/null ++++ b/plugins/input/geojson/CMakeLists.txt +@@ -0,0 +1,11 @@ ++add_library(mapnik-input-geojson SHARED ++ geojson_datasource.cpp ++ geojson_featureset.cpp ++ geojson_index_featureset.cpp ++ geojson_memory_index_featureset.cpp) ++ ++target_link_libraries(mapnik-input-geojson PUBLIC mapnik mapnik-json) ++set_target_properties(mapnik-input-geojson PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-geojson PROPERTIES OUTPUT_NAME "geojson") ++set_target_properties(mapnik-input-geojson PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-geojson DESTINATION bin/plugins/input) +diff --git a/plugins/input/ogr/CMakeLists.txt b/plugins/input/ogr/CMakeLists.txt +new file mode 100644 +index 0000000..6d7fd9a +--- /dev/null ++++ b/plugins/input/ogr/CMakeLists.txt +@@ -0,0 +1,11 @@ ++add_library(mapnik-input-ogr SHARED ++ ogr_converter.cpp ++ ogr_datasource.cpp ++ ogr_featureset.cpp ++ ogr_index_featureset.cpp) ++ ++target_link_libraries(mapnik-input-ogr PUBLIC mapnik ${OGR_LIBRARIES} ${GDAL_LIBRARIES}) ++set_target_properties(mapnik-input-ogr PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-ogr PROPERTIES OUTPUT_NAME "ogr") ++set_target_properties(mapnik-input-ogr PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-ogr DESTINATION bin/plugins/input) +diff --git a/plugins/input/pgraster/CMakeLists.txt b/plugins/input/pgraster/CMakeLists.txt +new file mode 100644 +index 0000000..ada5d08 +--- /dev/null ++++ b/plugins/input/pgraster/CMakeLists.txt +@@ -0,0 +1,10 @@ ++add_library(mapnik-input-pgraster SHARED ++ pgraster_datasource.cpp ++ pgraster_featureset.cpp ++ pgraster_wkb_reader.cpp) ++ ++target_link_libraries(mapnik-input-pgraster PUBLIC mapnik ${PostgreSQL_LIBRARIES}) ++set_target_properties(mapnik-input-pgraster PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-pgraster PROPERTIES OUTPUT_NAME "pgraster") ++set_target_properties(mapnik-input-pgraster PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-pgraster DESTINATION bin/plugins/input) +diff --git a/plugins/input/postgis/CMakeLists.txt b/plugins/input/postgis/CMakeLists.txt +new file mode 100644 +index 0000000..385faa3 +--- /dev/null ++++ b/plugins/input/postgis/CMakeLists.txt +@@ -0,0 +1,9 @@ ++add_library(mapnik-input-postgis SHARED ++ postgis_datasource.cpp ++ postgis_featureset.cpp ) ++ ++target_link_libraries(mapnik-input-postgis PUBLIC mapnik ${PostgreSQL_LIBRARIES}) ++set_target_properties(mapnik-input-postgis PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-postgis PROPERTIES OUTPUT_NAME "postgis") ++set_target_properties(mapnik-input-postgis PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-postgis DESTINATION bin/plugins/input) +diff --git a/plugins/input/raster/CMakeLists.txt b/plugins/input/raster/CMakeLists.txt +new file mode 100644 +index 0000000..b08be98 +--- /dev/null ++++ b/plugins/input/raster/CMakeLists.txt +@@ -0,0 +1,10 @@ ++add_library(mapnik-input-raster SHARED ++ raster_datasource.cpp ++ raster_featureset.cpp ++ raster_info.cpp) ++ ++target_link_libraries(mapnik-input-raster PUBLIC mapnik) ++set_target_properties(mapnik-input-raster PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-raster PROPERTIES OUTPUT_NAME "raster") ++set_target_properties(mapnik-input-raster PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-raster DESTINATION bin/plugins/input) +diff --git a/plugins/input/shape/CMakeLists.txt b/plugins/input/shape/CMakeLists.txt +new file mode 100644 +index 0000000..cac54dd +--- /dev/null ++++ b/plugins/input/shape/CMakeLists.txt +@@ -0,0 +1,9 @@ ++SET(INPUT_SHAPE_SOURCES ++ dbfile.cpp dbf_test.cpp shape_datasource.cpp shape_featureset.cpp shape_index_featureset.cpp shape_io.cpp shape_utils.cpp) ++ ++add_library(mapnik-input-shape SHARED ${INPUT_SHAPE_SOURCES}) ++target_link_libraries(mapnik-input-shape PUBLIC mapnik) ++set_target_properties(mapnik-input-shape PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-shape PROPERTIES OUTPUT_NAME "shape") ++set_target_properties(mapnik-input-shape PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-shape DESTINATION bin/plugins/input) +diff --git a/plugins/input/sqlite/CMakeLists.txt b/plugins/input/sqlite/CMakeLists.txt +new file mode 100644 +index 0000000..b84528e +--- /dev/null ++++ b/plugins/input/sqlite/CMakeLists.txt +@@ -0,0 +1,9 @@ ++add_library(mapnik-input-sqlite SHARED ++ sqlite_datasource.cpp ++ sqlite_featureset.cpp) ++ ++target_link_libraries(mapnik-input-sqlite PUBLIC mapnik SQLite::SQLite3) ++set_target_properties(mapnik-input-sqlite PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-sqlite PROPERTIES OUTPUT_NAME "sqlite") ++set_target_properties(mapnik-input-sqlite PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-sqlite DESTINATION bin/plugins/input) +diff --git a/plugins/input/topojson/CMakeLists.txt b/plugins/input/topojson/CMakeLists.txt +new file mode 100644 +index 0000000..aeb559b +--- /dev/null ++++ b/plugins/input/topojson/CMakeLists.txt +@@ -0,0 +1,9 @@ ++add_library(mapnik-input-topojson SHARED ++ topojson_datasource.cpp ++ topojson_featureset.cpp) ++ ++target_link_libraries(mapnik-input-topojson PUBLIC mapnik mapnik-json) ++set_target_properties(mapnik-input-topojson PROPERTIES PREFIX "") ++set_target_properties(mapnik-input-topojson PROPERTIES OUTPUT_NAME "topojson") ++set_target_properties(mapnik-input-topojson PROPERTIES SUFFIX ".input") ++install(TARGETS mapnik-input-topojson DESTINATION bin/plugins/input) +diff --git a/src/agg/CMakeLists.txt b/src/agg/CMakeLists.txt +new file mode 100644 +index 0000000..e69de29 +diff --git a/src/geometry/CMakeLists.txt b/src/geometry/CMakeLists.txt +new file mode 100644 +index 0000000..e69de29 +diff --git a/src/json/CMakeLists.txt b/src/json/CMakeLists.txt +new file mode 100644 +index 0000000..76a23b9 +--- /dev/null ++++ b/src/json/CMakeLists.txt +@@ -0,0 +1,17 @@ ++add_library(mapnik-json STATIC ++ generic_json.cpp ++ mapnik_geometry_to_geojson.cpp ++ mapnik_json_feature_collection_grammar.cpp ++ mapnik_json_feature_grammar.cpp ++ mapnik_json_generator_grammar.cpp ++ mapnik_json_geometry_grammar.cpp ++ mapnik_json_geometry_parser.cpp ++ mapnik_json_positions_grammar.cpp ++ mapnik_topojson_grammar.cpp ++) ++ ++ ++target_link_libraries(mapnik-json INTERFACE ${ICUU_LIB}) ++ ++install(TARGETS mapnik-json LIBRARY DESTINATION lib) ++target_compile_definitions(mapnik-json PRIVATE ${MAPNIK_LIB_DEFINITION}) +diff --git a/src/wkt/CMakeLists.txt b/src/wkt/CMakeLists.txt +new file mode 100644 +index 0000000..dbaf010 +--- /dev/null ++++ b/src/wkt/CMakeLists.txt +@@ -0,0 +1,7 @@ ++add_library(mapnik-wkt STATIC ++ mapnik_wkt_grammar.cpp ++ mapnik_wkt_generator_grammar.cpp ++) ++ ++install(TARGETS mapnik-wkt LIBRARY DESTINATION lib) ++target_compile_definitions(mapnik-json PRIVATE ${MAPNIK_LIB_DEFINITION}) +diff --git a/utils/mapnik-render/CMakeLists.txt b/utils/mapnik-render/CMakeLists.txt +new file mode 100644 +index 0000000..7cfff00 +--- /dev/null ++++ b/utils/mapnik-render/CMakeLists.txt +@@ -0,0 +1,3 @@ ++add_executable(mapnik-render mapnik-render.cpp) ++target_link_libraries(mapnik-render PRIVATE mapnik) ++install(TARGETS mapnik-render DESTINATION tools) +diff --git a/utils/shapeindex/CMakeLists.txt b/utils/shapeindex/CMakeLists.txt +new file mode 100644 +index 0000000..484200a +--- /dev/null ++++ b/utils/shapeindex/CMakeLists.txt +@@ -0,0 +1,4 @@ ++add_executable(shapeindex shapeindex.cpp) ++target_link_libraries(shapeindex PRIVATE mapnik) ++target_include_directories(shapeindex PRIVATE ../../plugins/input/shape) ++install(TARGETS shapeindex DESTINATION tools) diff --git a/ports/mapnik/0002-sqlitepixelwidth.patch b/ports/mapnik/0002-sqlitepixelwidth.patch new file mode 100644 index 00000000000000..df0e27ac13ee03 --- /dev/null +++ b/ports/mapnik/0002-sqlitepixelwidth.patch @@ -0,0 +1,120 @@ +diff --git a/plugins/input/sqlite/sqlite_datasource.cpp b/plugins/input/sqlite/sqlite_datasource.cpp +index 28add64..286edce 100644 +--- a/plugins/input/sqlite/sqlite_datasource.cpp ++++ b/plugins/input/sqlite/sqlite_datasource.cpp +@@ -67,6 +67,8 @@ sqlite_datasource::sqlite_datasource(parameters const& params) + row_offset_(*params.get("row_offset", 0)), + row_limit_(*params.get("row_limit", 0)), + intersects_token_("!intersects!"), ++ pixel_width_token_("!pixel_width!"), ++ pixel_height_token_("!pixel_height!"), + desc_(sqlite_datasource::name(), *params.get("encoding", "utf-8")), + format_(mapnik::wkbAuto) + { +@@ -211,7 +213,7 @@ sqlite_datasource::sqlite_datasource(parameters const& params) + if (using_subquery_) + { + std::ostringstream s; +- std::string query = populate_tokens(table_); ++ std::string query = populate_tokens(table_,0,0); + s << "SELECT " << fields_ << " FROM (" << query << ") LIMIT 1"; + found_types_via_subquery = sqlite_utils::detect_types_from_subquery( + s.str(), +@@ -333,7 +335,7 @@ sqlite_datasource::sqlite_datasource(parameters const& params) + mapnik::progress_timer __stats2__(std::clog, "sqlite_datasource::init(detect_extent)"); + #endif + // TODO - clean this up - reducing arguments +- std::string query = populate_tokens(table_); ++ std::string query = populate_tokens(table_,0,0); + if (!sqlite_utils::detect_extent(dataset_, + has_spatial_index_, + extent_, +@@ -356,7 +358,7 @@ sqlite_datasource::sqlite_datasource(parameters const& params) + + } + +-std::string sqlite_datasource::populate_tokens(std::string const& sql) const ++std::string sqlite_datasource::populate_tokens(std::string const& sql, double pixel_width, double pixel_height) const + { + std::string populated_sql = sql; + if (boost::algorithm::ifind_first(populated_sql, intersects_token_)) +@@ -364,6 +366,19 @@ std::string sqlite_datasource::populate_tokens(std::string const& sql) const + // replace with dummy comparison that is true + boost::algorithm::ireplace_first(populated_sql, intersects_token_, "1=1"); + } ++ if (boost::algorithm::icontains(sql, pixel_width_token_)) ++ { ++ std::ostringstream ss; ++ ss << pixel_width; ++ boost::algorithm::replace_all(populated_sql, pixel_width_token_, ss.str()); ++ } ++ if (boost::algorithm::icontains(sql, pixel_height_token_)) ++ { ++ std::ostringstream ss; ++ ss << pixel_height; ++ boost::algorithm::replace_all(populated_sql, pixel_height_token_, ss.str()); ++ } ++ + return populated_sql; + } + +@@ -487,6 +502,8 @@ featureset_ptr sqlite_datasource::features(query const& q) const + mapnik::box2d const& e = q.get_bbox(); + + std::ostringstream s; ++ const double px_gw = 1.0 / std::get<0>(q.resolution()); ++ const double px_gh = 1.0 / std::get<1>(q.resolution()); + mapnik::context_ptr ctx = std::make_shared(); + + s << "SELECT " << geometry_field_; +@@ -521,10 +538,8 @@ featureset_ptr sqlite_datasource::features(query const& q) const + geometry_table_, + intersects_token_); + } +- else +- { +- query = populate_tokens(table_); +- } ++ ++ query = populate_tokens(table_,px_gw,px_gh); + + s << query ; + +@@ -601,10 +616,7 @@ featureset_ptr sqlite_datasource::features_at_point(coord2d const& pt, double to + geometry_table_, + intersects_token_); + } +- else +- { +- query = populate_tokens(table_); +- } ++ query = populate_tokens(table_,0,0); + + s << query ; + +diff --git a/plugins/input/sqlite/sqlite_datasource.hpp b/plugins/input/sqlite/sqlite_datasource.hpp +index eab71e9..be35f37 100644 +--- a/plugins/input/sqlite/sqlite_datasource.hpp ++++ b/plugins/input/sqlite/sqlite_datasource.hpp +@@ -62,10 +62,10 @@ private: + // Fill init_statements with any statements + // needed to attach auxillary databases + void parse_attachdb(std::string const& attachdb) const; +- std::string populate_tokens(std::string const& sql) const; ++ std::string populate_tokens(std::string const& sql, double pixel_width, double pixel_height) const; + + mapnik::box2d extent_; +- bool extent_initialized_; ++ bool extent_initialized_; + mapnik::datasource::datasource_t type_; + std::string dataset_name_; + std::shared_ptr dataset_; +@@ -80,6 +80,8 @@ private: + mapnik::value_integer row_limit_; + // TODO - also add to postgis.input + const std::string intersects_token_; ++ const std::string pixel_width_token_; ++ const std::string pixel_height_token_; + mapnik::layer_descriptor desc_; + mapnik::wkbFormat format_; + bool use_spatial_index_; diff --git a/ports/mapnik/CONTROL b/ports/mapnik/CONTROL new file mode 100644 index 00000000000000..f3a2dffdc4f92c --- /dev/null +++ b/ports/mapnik/CONTROL @@ -0,0 +1,58 @@ +Source: mapnik +Version: 3.0.22 +Homepage: https://github.com/mapnik/mapnik +Description: Mapnik is an open source toolkit for developing mapping applications. +Build-Depends: libjpeg-turbo, tiff, libpng, libwebp, freetype[bzip2,png], icu, libxml2, harfbuzz[icu], boost-locale[icu], boost-regex[icu], boost-gil, boost-geometry, boost-property-tree, boost-filesystem, boost-system, boost-spirit, boost-program-options, boost-assign, boost-bimap, mapbox-variant, zlib + +Feature: cairo +Description: Cairo renderer +Build-Depends: cairo,cairomm + +Feature: proj4 +Description: PROJ4 Functionalities +Build-Depends: proj4[database] + +Feature: input_csv +Description: CSV input plugin + +Feature: input_gdal +Description: GDAL input plugin +Build-Depends: gdal + +Feature: input_geobuf +Description: GEOBUF input plugin +Build-Depends: protozero + +Feature: input_geojson +Description: GEOJSON input plugin + +Feature: input_ogr +Description: OGR input plugin +Build-Depends: gdal + +Feature: input_pgraster +Description: PGRASTER input plugin +Build-Depends: libpq, libodb-pgsql + +Feature: input_postgis +Description: POSTGIS input plugin +Build-Depends: libpq, libodb-pgsql + +Feature: input_raster +Description: RASTER input plugin + +Feature: input_shape +Description: SHAPE input plugin + +Feature: input_sqlite +Description: SQLITE input plugin +Build-Depends: sqlite3 + +Feature: input_topojson +Description: TOPOJSON input plugin + +Feature: demo +Description: Make Demo Application + +Feature: utils +Description: Make utilities Application including mapnik-rendrer and shapeindex diff --git a/ports/mapnik/portfile.cmake b/ports/mapnik/portfile.cmake new file mode 100644 index 00000000000000..b43359898faf4d --- /dev/null +++ b/ports/mapnik/portfile.cmake @@ -0,0 +1,84 @@ +find_program(GIT git) + +set(GIT_URL "https://github.com/am2222/mapnik-windows.git") +set(GIT_REV "cfa268fa6ab438568b9b5320f6fce4317f0e3d8e") + +set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${PORT}) + + +if(NOT EXISTS "${SOURCE_PATH}/.git") + message(STATUS "Cloning and fetching submodules") + vcpkg_execute_required_process( + COMMAND ${GIT} clone --recurse-submodules ${GIT_URL} ${SOURCE_PATH} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME clone + ) + + message(STATUS "Checkout revision ${GIT_REV}") + vcpkg_execute_required_process( + COMMAND ${GIT} checkout ${GIT_REV} + WORKING_DIRECTORY ${SOURCE_PATH} + LOGNAME checkout + ) +endif() + + +vcpkg_find_acquire_program(PYTHON2) +get_filename_component(PYTHON2_DIR "${PYTHON2}" DIRECTORY) +vcpkg_add_to_path(${PYTHON2_DIR}) + +if (VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(MAPNIK_STATIC_LIB OFF) +elseif (VCPKG_LIBRARY_LINKAGE STREQUAL static) + set(MAPNIK_STATIC_LIB ON) +endif() + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + cairo WITH_CAIRO + demo WITH_DEMO + input_csv WITH_INPUT_CSV + input_gdal WITH_INPUT_GDAL + input_geobuf WITH_INPUT_GEOBUF + input_geojson WITH_INPUT_GEOJSON + input_ogr WITH_INPUT_OGR + input_pgraster WITH_INPUT_PGRASTER + input_postgis WITH_INPUT_POSTGIS + input_raster WITH_INPUT_RASTER + input_shape WITH_INPUT_SHAPE + input_sqlite WITH_INPUT_SQLITE + input_topojson WITH_INPUT_TOPOJSON + proj4 WITH_PROJ4 + utils WITH_UTILS +) + +vcpkg_configure_cmake( + SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/${PORT} + PREFER_NINJA # Disable this option if project cannot be built with Ninja + OPTIONS + ${FEATURE_OPTIONS} + -DMAPNIK_STATIC_LIB=${MAPNIK_STATIC_LIB} + -DBOOST_PREFIX=${CURRENT_INSTALLED_DIR}/include + -DFREE_TYPE_INCLUDE=${CURRENT_INSTALLED_DIR}/include/freetype2 +) + +vcpkg_install_cmake() + +file(COPY ${SOURCE_PATH}/include/${PORT} DESTINATION ${CURRENT_PACKAGES_DIR}/include) + +vcpkg_copy_pdbs() + +if ("utils" IN_LIST FEATURES) + vcpkg_copy_tools( + TOOL_NAMES mapnik-demo mapnik-render shapeindex + AUTO_CLEAN + ) + + file(COPY ${SOURCE_PATH}/demo/data DESTINATION ${CURRENT_PACKAGES_DIR}/tools/mapnik/demo) + file(COPY ${SOURCE_PATH}/fonts DESTINATION ${CURRENT_PACKAGES_DIR}/tools/mapnik) + file(COPY ${CURRENT_PACKAGES_DIR}/bin/plugins DESTINATION ${CURRENT_PACKAGES_DIR}/tools/mapnik) + + file(REMOVE ${CURRENT_PACKAGES_DIR}/debug/bin/mapnik-demo ${CURRENT_PACKAGES_DIR}/debug/bin/mapnik-render ${CURRENT_PACKAGES_DIR}/debug/bin/shapeindex) +endif() + +file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright) +file(INSTALL ${SOURCE_PATH}/fonts/unifont_license.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME fonts_copyright) diff --git a/scripts/ci.baseline.txt b/scripts/ci.baseline.txt index 3d16487a491cfd..111d94374ef1c9 100644 --- a/scripts/ci.baseline.txt +++ b/scripts/ci.baseline.txt @@ -1663,8 +1663,8 @@ ctp:x64-uwp=skip ctp:x64-windows=skip ctp:x64-windows-static=skip ctp:x86-windows=skip -protozero:arm-uwp=fail protozero:x64-uwp=fail +protozero:arm-uwp=fail # clapack is replaced by lapack-reference on the platforms lapack-reference supports clapack:x64-linux=skip