-
Notifications
You must be signed in to change notification settings - Fork 7.5k
[Mapnik] new port #18849
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
[Mapnik] new port #18849
Changes from 46 commits
Commits
Show all changes
50 commits
Select commit
Hold shift + click to select a range
6f1ff9c
add mapnik
mathisloge 5e7bb2a
version
mathisloge 1348c60
update to latest ref
mathisloge cd89f3a
overwrite version
mathisloge 6dbca1e
latest ref
mathisloge b32be8a
fix hash
mathisloge b7d64d9
verison
mathisloge 6fbac07
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge cb042ae
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge dff6bcd
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 042dd27
update to latest upstream
mathisloge 478f1b3
version
mathisloge 4d15711
false jpeg lib
mathisloge 033b3bb
version
mathisloge bd0c356
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 7289bfb
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge e46b87a
update to latest ref
mathisloge 5d67a86
verssion
mathisloge 7334c86
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 7a39a4f
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge a176918
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 683bea7
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 8051b7b
proj not needed
mathisloge 1bc6705
versioon
mathisloge 7b068d4
fix proj patch
mathisloge e70c947
version
mathisloge b715393
actually the linkage is already checked in `supports`. Apply latest p…
mathisloge 46eb685
version
mathisloge 64a993f
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 7adda92
update to original ref
mathisloge b575c8e
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 9f7e074
enable dynamic again
mathisloge 33540c1
version
mathisloge b226158
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 5a4f4fd
use date version
mathisloge 70a906c
update version
mathisloge ee17d93
do not add a second version
mathisloge 3279b54
fix linux installing
mathisloge 99ca106
version
mathisloge 0178522
Apply suggestions from code review
mathisloge 727272b
do not use port var
mathisloge e468a92
version
mathisloge 97c51a6
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 34ae59e
drop mapnik::core from general usage info.
mathisloge 40c2b38
version
mathisloge f358550
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge 025ae88
don't add a new version
mathisloge 4ffddec
Merge branch 'master' of https://github.com/microsoft/vcpkg into mapn…
mathisloge f131f36
add comment to trigger ci
mathisloge f193b62
version
mathisloge File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,111 @@ | ||
| vcpkg_check_linkage(ONLY_DYNAMIC_LIBRARY) | ||
| vcpkg_from_github( | ||
| OUT_SOURCE_PATH SOURCE_PATH | ||
| REPO mapnik/mapnik | ||
| REF 1ccbbf95b5e7bf254ab5b4dc21bdc373978c36a1 | ||
| SHA512 21b4fc6e64d9b53550a046c5c9bcc32524324d7df39816b74b23a7ce2a64c4eeb291ad1c1aa09a3d5d79158f889ba8b7182cd0bf3435c39d1f17f33e4ffdce05 | ||
| HEAD_REF master | ||
| PATCHES | ||
| use-proj.patch | ||
| ) | ||
|
|
||
| vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS | ||
| FEATURES | ||
| "jpeg" USE_JPEG | ||
| "png" USE_PNG | ||
| "tiff" USE_TIFF | ||
| "webp" USE_WEBP | ||
| "libxml2" USE_LIBXML2 | ||
| "cairo" USE_CAIRO | ||
| "proj" USE_PROJ | ||
| "grid-renderer" USE_GRID_RENDERER | ||
| "svg-renderer" USE_SVG_RENDERER | ||
| "input-csv" USE_PLUGIN_INPUT_CSV | ||
| "input-gdal" USE_PLUGIN_INPUT_GDAL | ||
| "input-geobuf" USE_PLUGIN_INPUT_GEOBUF | ||
| "input-geojson" USE_PLUGIN_INPUT_GEOJSON | ||
| "input-ogr" USE_PLUGIN_INPUT_OGR | ||
| "input-pgraster" USE_PLUGIN_INPUT_PGRASTER | ||
| "input-postgis" USE_PLUGIN_INPUT_POSTGIS | ||
| "input-raster" USE_PLUGIN_INPUT_RASTER | ||
| "input-shape" USE_PLUGIN_INPUT_SHAPE | ||
| "input-sqlite" USE_PLUGIN_INPUT_SQLITE | ||
| "input-topojson" USE_PLUGIN_INPUT_TOPOJSON | ||
| "viewer" BUILD_DEMO_VIEWER | ||
| "demo" BUILD_DEMO_CPP | ||
| "utility-geometry-to-wkb" BUILD_UTILITY_GEOMETRY_TO_WKB | ||
| "utility-mapnik-index" BUILD_UTILITY_MAPNIK_INDEX | ||
| "utility-mapnik-render" BUILD_UTILITY_MAPNIK_RENDER | ||
| "utility-ogrindex" BUILD_UTILITY_OGRINDEX | ||
| "utility-pgsql2sqlite" BUILD_UTILITY_PGSQL2SQLITE | ||
| "utility-shapeindex" BUILD_UTILITY_SHAPEINDEX | ||
| "utility-svg2png" BUILD_UTILITY_SVG2PNG | ||
| ) | ||
|
|
||
| vcpkg_cmake_configure( | ||
| SOURCE_PATH "${SOURCE_PATH}" | ||
| OPTIONS | ||
| ${FEATURE_OPTIONS} | ||
| -DCOPY_LIBRARIES_FOR_EXECUTABLES=OFF | ||
| -DCOPY_FONTS_AND_PLUGINS_FOR_EXECUTABLES=OFF | ||
| -DINSTALL_DEPENDENCIES=OFF | ||
| -DBUILD_TEST=OFF | ||
| -DBUILD_BENCHMARK=OFF | ||
| -DUSE_EXTERNAL_MAPBOX_GEOMETRY=ON | ||
| -DUSE_EXTERNAL_MAPBOX_POLYLABEL=ON | ||
| -DUSE_EXTERNAL_MAPBOX_PROTOZERO=ON | ||
| -DUSE_EXTERNAL_MAPBOX_VARIANT=ON | ||
| -DINSTALL_CMAKE_DIR=share/mapnik/cmake | ||
| -DFONTS_INSTALL_DIR=share/mapnik/fonts | ||
| ) | ||
|
|
||
| vcpkg_cmake_install() | ||
|
|
||
| # copy plugins into tool path, if any plugin is installed | ||
| if(IS_DIRECTORY "${CURRENT_PACKAGES_DIR}/bin/plugins") | ||
| file(COPY "${CURRENT_PACKAGES_DIR}/bin/plugins" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| endif() | ||
| vcpkg_copy_pdbs() | ||
|
|
||
| if("demo" IN_LIST FEATURES) | ||
| file(COPY "${SOURCE_PATH}/demo/data" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}/demo") | ||
| vcpkg_copy_tools(TOOL_NAMES mapnik-demo AUTO_CLEAN) | ||
| endif() | ||
|
|
||
| if("viewer" IN_LIST FEATURES) | ||
| # copy the ini file to reference the plugins correctly | ||
| file(COPY "${CURRENT_PACKAGES_DIR}/bin/viewer.ini" DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}") | ||
| vcpkg_copy_tools(TOOL_NAMES mapnik-viewer AUTO_CLEAN) | ||
| endif() | ||
|
|
||
| if("utility-geometry-to-wkb" IN_LIST FEATURES) | ||
| vcpkg_copy_tools(TOOL_NAMES geometry_to_wkb AUTO_CLEAN) | ||
| endif() | ||
|
|
||
| if("utility-mapnik-index" IN_LIST FEATURES) | ||
| vcpkg_copy_tools(TOOL_NAMES mapnik-index AUTO_CLEAN) | ||
| endif() | ||
| if("utility-mapnik-render" IN_LIST FEATURES) | ||
| vcpkg_copy_tools(TOOL_NAMES mapnik-render AUTO_CLEAN) | ||
| endif() | ||
| if("utility-ogrindex" IN_LIST FEATURES) | ||
| # build is currently not supported | ||
| # vcpkg_copy_tools(TOOL_NAMES ogrindex AUTO_CLEAN) | ||
| endif() | ||
| if("utility-pgsql2sqlite" IN_LIST FEATURES) | ||
| vcpkg_copy_tools(TOOL_NAMES pgsql2sqlite AUTO_CLEAN) | ||
| endif() | ||
| if("utility-shapeindex" IN_LIST FEATURES) | ||
| vcpkg_copy_tools(TOOL_NAMES shapeindex AUTO_CLEAN) | ||
| endif() | ||
| if("utility-svg2png" IN_LIST FEATURES) | ||
| vcpkg_copy_tools(TOOL_NAMES svg2png AUTO_CLEAN) | ||
| endif() | ||
|
|
||
| vcpkg_cmake_config_fixup(CONFIG_PATH share/mapnik/cmake) | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") | ||
| file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") | ||
|
|
||
| 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) | ||
| file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| The package mapnik provides CMake targets: | ||
|
|
||
| find_package(mapnik CONFIG REQUIRED) | ||
| target_link_libraries(main PRIVATE mapnik::mapnik mapnik::json mapnik::wkt) | ||
|
|
||
| If you only need the compile definitions without any sources, use target mapnik::core. | ||
|
|
||
| If any plugins were installed, the variable ${MAPNIK_PLUGINS_DIR} contains the plugin directory | ||
| Fonts are available with the variable ${MAPNIK_FONTS_DIR} | ||
|
mathisloge marked this conversation as resolved.
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
| index 54dda37..e82a817 100644 | ||
| --- a/CMakeLists.txt | ||
| +++ b/CMakeLists.txt | ||
| @@ -254,21 +254,21 @@ endif() | ||
|
|
||
| if(USE_PROJ) | ||
| #https://proj.org/development/cmake.html | ||
| mapnik_find_package(PROJ QUIET) | ||
| # currently the cmake files are not installed, when installing proj via apt-get. So search via pkg-config | ||
| if(NOT PROJ_FOUND) | ||
| message(STATUS "PROJ not found via FindPROJ. Searching via pkg-config...") | ||
| pkg_check_modules(PROJ REQUIRED IMPORTED_TARGET proj) | ||
| string(REGEX MATCH "([0-9]+)\.([0-9]+)\.([0-9]+)" _dummy "${PROJ_VERSION}") | ||
| set(PROJ_VERSION_MAJOR "${CMAKE_MATCH_1}") | ||
| set(PROJ_VERSION_MINOR "${CMAKE_MATCH_2}") | ||
| set(PROJ_VERSION_PATCH "${CMAKE_MATCH_3}") | ||
| endif() | ||
| math(EXPR MAPNIK_PROJ_VERSION "${PROJ_VERSION_MAJOR}*10000 + ${PROJ_VERSION_MINOR}*100 + ${PROJ_VERSION_PATCH}" OUTPUT_FORMAT DECIMAL) | ||
| message(STATUS "Using mapnik PROJ version: ${MAPNIK_PROJ_VERSION}") | ||
| list(APPEND MAPNIK_COMPILE_DEFS MAPNIK_USE_PROJ MAPNIK_PROJ_VERSION=${MAPNIK_PROJ_VERSION}) | ||
| - list(APPEND MAPNIK_OPTIONAL_LIBS ${PROJ_LIBRARIES}) | ||
| - list(APPEND MAPNIK_OPTIONAL_LIBS_INCLUDE ${PROJ_INCLUDE_DIRS}) | ||
| + list(APPEND MAPNIK_OPTIONAL_LIBS ${PROJ_LIBRARIES}) | ||
| + # list(APPEND MAPNIK_OPTIONAL_LIBS_INCLUDE ${PROJ_INCLUDE_DIRS}) # this adds some non existent directory when building with vcpgk -> commented out | ||
| endif() | ||
|
|
||
| if(USE_GRID_RENDERER) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,227 @@ | ||
| { | ||
| "name": "mapnik", | ||
| "version-date": "2021-09-15", | ||
| "description": "Mapnik is an open source toolkit for developing mapping applications.", | ||
| "homepage": "https://github.com/mapnik/mapnik", | ||
| "supports": "!(static & windows)", | ||
| "dependencies": [ | ||
| "boost-assign", | ||
| "boost-bimap", | ||
| "boost-filesystem", | ||
| "boost-geometry", | ||
| "boost-gil", | ||
| "boost-interprocess", | ||
| { | ||
| "name": "boost-locale", | ||
| "features": [ | ||
| "icu" | ||
| ] | ||
| }, | ||
| "boost-msm", | ||
| "boost-property-tree", | ||
| { | ||
| "name": "boost-regex", | ||
| "features": [ | ||
| "icu" | ||
| ] | ||
| }, | ||
| "boost-spirit", | ||
| "boost-system", | ||
| { | ||
| "name": "freetype", | ||
| "features": [ | ||
| "bzip2", | ||
| "png" | ||
| ] | ||
| }, | ||
| { | ||
| "name": "harfbuzz", | ||
| "features": [ | ||
| "icu" | ||
| ] | ||
| }, | ||
| "icu", | ||
| "mapbox-geometry", | ||
| "mapbox-polylabel", | ||
| "mapbox-variant", | ||
| "protozero", | ||
| { | ||
| "name": "vcpkg-cmake", | ||
| "host": true | ||
| }, | ||
| { | ||
| "name": "vcpkg-cmake-config", | ||
| "host": true | ||
| }, | ||
| "zlib" | ||
| ], | ||
| "default-features": [ | ||
| "grid-renderer", | ||
| "jpeg", | ||
| "png", | ||
| "proj", | ||
| "svg-renderer", | ||
| "tiff", | ||
| "webp" | ||
| ], | ||
| "features": { | ||
| "cairo": { | ||
| "description": "Cairo renderer", | ||
| "dependencies": [ | ||
| "cairo", | ||
| "cairomm" | ||
| ] | ||
| }, | ||
| "demo": { | ||
| "description": "Make demo application" | ||
| }, | ||
| "grid-renderer": { | ||
| "description": "Grid renderer" | ||
| }, | ||
| "input-csv": { | ||
| "description": "CSV input plugin" | ||
| }, | ||
| "input-gdal": { | ||
| "description": "GDAL input plugin", | ||
| "dependencies": [ | ||
| "gdal" | ||
| ] | ||
| }, | ||
| "input-geobuf": { | ||
| "description": "GEOBUF input plugin", | ||
| "dependencies": [ | ||
| "protozero" | ||
| ] | ||
| }, | ||
| "input-geojson": { | ||
| "description": "GEOJSON input plugin" | ||
| }, | ||
| "input-ogr": { | ||
| "description": "OGR input plugin", | ||
| "dependencies": [ | ||
| "gdal" | ||
| ] | ||
| }, | ||
| "input-pgraster": { | ||
| "description": "PGRASTER input plugin", | ||
| "dependencies": [ | ||
| "libodb-pgsql", | ||
| "libpq" | ||
| ] | ||
| }, | ||
| "input-postgis": { | ||
| "description": "POSTGIS input plugin", | ||
| "dependencies": [ | ||
| "libodb-pgsql", | ||
| "libpq" | ||
| ] | ||
| }, | ||
| "input-raster": { | ||
| "description": "RASTER input plugin" | ||
| }, | ||
| "input-shape": { | ||
| "description": "SHAPE input plugin" | ||
| }, | ||
| "input-sqlite": { | ||
| "description": "SQLITE input plugin", | ||
| "dependencies": [ | ||
| "sqlite3" | ||
| ] | ||
| }, | ||
| "input-topojson": { | ||
| "description": "TOPOJSON input plugin" | ||
| }, | ||
| "jpeg": { | ||
| "description": "add jpeg support", | ||
| "dependencies": [ | ||
| "libjpeg-turbo" | ||
| ] | ||
| }, | ||
| "libxml2": { | ||
| "description": "use libxml2 instead of rapidxml", | ||
| "dependencies": [ | ||
| "libxml2" | ||
| ] | ||
| }, | ||
| "png": { | ||
| "description": "add png support", | ||
| "dependencies": [ | ||
| "libpng" | ||
| ] | ||
| }, | ||
| "proj": { | ||
| "description": "PROJ Functionalities", | ||
| "dependencies": [ | ||
| { | ||
| "name": "proj4", | ||
| "features": [ | ||
| "database" | ||
| ] | ||
| } | ||
| ] | ||
| }, | ||
| "svg-renderer": { | ||
| "description": "SVG renderer" | ||
| }, | ||
| "tiff": { | ||
| "description": "add tiff support", | ||
| "dependencies": [ | ||
| "tiff" | ||
| ] | ||
| }, | ||
| "utility-geometry-to-wkb": { | ||
| "description": "utility application geometry-to-wkb", | ||
| "dependencies": [ | ||
| "boost-program-options" | ||
| ] | ||
| }, | ||
| "utility-mapnik-index": { | ||
| "description": "utility application mapnik-index", | ||
| "dependencies": [ | ||
| "boost-program-options" | ||
| ] | ||
| }, | ||
| "utility-mapnik-render": { | ||
| "description": "utility application mapnik-render", | ||
| "dependencies": [ | ||
| "boost-program-options" | ||
| ] | ||
| }, | ||
| "utility-ogrindex": { | ||
| "description": "utility application ogrindex" | ||
| }, | ||
| "utility-pgsql2sqlite": { | ||
| "description": "utility application pgsql2sqlite", | ||
| "dependencies": [ | ||
| "boost-program-options", | ||
| "libodb-pgsql", | ||
| "libpq", | ||
| "sqlite3" | ||
| ] | ||
| }, | ||
| "utility-shapeindex": { | ||
| "description": "utility application shapeindex", | ||
| "dependencies": [ | ||
| "boost-program-options" | ||
| ] | ||
| }, | ||
| "utility-svg2png": { | ||
| "description": "utility application svg2png", | ||
| "dependencies": [ | ||
| "boost-program-options" | ||
| ] | ||
| }, | ||
| "viewer": { | ||
| "description": "Make demo viewer application", | ||
| "dependencies": [ | ||
| "qt5-base" | ||
| ] | ||
| }, | ||
| "webp": { | ||
| "description": "add webp support", | ||
| "dependencies": [ | ||
| "libwebp" | ||
| ] | ||
| } | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.