aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/mapnik
diff options
context:
space:
mode:
authorEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
committerEthan Morgan <ethan@gweithio.com>2026-02-14 16:44:06 +0000
commit54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch)
treed915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/mapnik
move to own git serverHEADmaster
Diffstat (limited to 'vcpkg/ports/mapnik')
-rw-r--r--vcpkg/ports/mapnik/portfile.cmake120
-rw-r--r--vcpkg/ports/mapnik/usage7
-rw-r--r--vcpkg/ports/mapnik/vcpkg.json231
3 files changed, 358 insertions, 0 deletions
diff --git a/vcpkg/ports/mapnik/portfile.cmake b/vcpkg/ports/mapnik/portfile.cmake
new file mode 100644
index 0000000..7e4f560
--- /dev/null
+++ b/vcpkg/ports/mapnik/portfile.cmake
@@ -0,0 +1,120 @@
+# test application for this port: https://github.com/mathisloge/mapnik-vcpkg-test
+
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO mapnik/mapnik
+ REF v${VERSION}
+ SHA512 ac3cda35240eca404fedc77e6c36d9b3d0596a077857fb7c41e8d4d5dce2a292f425ce0c134ac6e8577b50c6a126ba56e5de1103e63c752ebe9f6fa3db62dd3d
+ HEAD_REF master
+)
+
+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
+ "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
+)
+
+if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
+ set(BUILD_SHARED_CRT ON)
+else()
+ set(BUILD_SHARED_CRT OFF)
+endif()
+vcpkg_find_acquire_program(PKGCONFIG)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}"
+ OPTIONS
+ ${FEATURE_OPTIONS}
+ -DBUILD_SHARED_CRT=${BUILD_SHARED_CRT}
+ -DINSTALL_DEPENDENCIES=OFF
+ -DBUILD_TESTING=OFF
+ -DBUILD_BENCHMARK=OFF
+ -DBUILD_DEMO_CPP=OFF
+ -DUSE_EXTERNAL_MAPBOX_GEOMETRY=ON
+ -DUSE_EXTERNAL_MAPBOX_POLYLABEL=ON
+ -DUSE_EXTERNAL_MAPBOX_PROTOZERO=ON
+ -DUSE_EXTERNAL_MAPBOX_VARIANT=ON
+ -DBOOST_REGEX_HAS_ICU=ON
+ -DMAPNIK_CMAKE_DIR=share/mapnik/cmake
+ -DFONTS_INSTALL_DIR=share/mapnik/fonts
+ -DMAPNIK_PKGCONF_DIR=lib/pkgconfig
+ -DPKG_CONFIG_EXECUTABLE="${PKGCONFIG}"
+)
+
+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()
+
+set(_tool_names "")
+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}")
+ list(APPEND _tool_names mapnik-viewer)
+endif()
+
+if("utility-geometry-to-wkb" IN_LIST FEATURES)
+ list(APPEND _tool_names geometry_to_wkb)
+endif()
+
+if("utility-mapnik-index" IN_LIST FEATURES)
+ list(APPEND _tool_names mapnik-index)
+endif()
+if("utility-mapnik-render" IN_LIST FEATURES)
+ list(APPEND _tool_names mapnik-render)
+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)
+ list(APPEND _tool_names pgsql2sqlite)
+endif()
+if("utility-shapeindex" IN_LIST FEATURES)
+ list(APPEND _tool_names shapeindex)
+endif()
+if("utility-svg2png" IN_LIST FEATURES)
+ list(APPEND _tool_names svg2png)
+endif()
+if(_tool_names)
+ vcpkg_copy_tools(TOOL_NAMES ${_tool_names} AUTO_CLEAN)
+endif()
+vcpkg_cmake_config_fixup(CONFIG_PATH share/mapnik/cmake)
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(WRITE "${CURRENT_PACKAGES_DIR}/share/mapnik/mapnikPlugins-debug.cmake" "set(MAPNIK_PLUGINS_DIR_DEBUG \"\${PACKAGE_PREFIX_DIR}/debug/bin/mapnik/input\" CACHE STRING \"\")")
+
+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}")
diff --git a/vcpkg/ports/mapnik/usage b/vcpkg/ports/mapnik/usage
new file mode 100644
index 0000000..4058304
--- /dev/null
+++ b/vcpkg/ports/mapnik/usage
@@ -0,0 +1,7 @@
+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, call the function `mapnik_find_plugin_dir(MAPNIK_PLUGIN_DIR)` to get the plugin installation folder for the currently used configuration. See the docs for more information.
diff --git a/vcpkg/ports/mapnik/vcpkg.json b/vcpkg/ports/mapnik/vcpkg.json
new file mode 100644
index 0000000..38e06a3
--- /dev/null
+++ b/vcpkg/ports/mapnik/vcpkg.json
@@ -0,0 +1,231 @@
+{
+ "name": "mapnik",
+ "version": "4.0.7",
+ "description": "Mapnik is an open source toolkit for developing mapping applications.",
+ "homepage": "https://github.com/mapnik/mapnik",
+ "license": "LGPL-2.1-only",
+ "supports": "!xbox",
+ "dependencies": [
+ "boost-assign",
+ "boost-bimap",
+ "boost-filesystem",
+ "boost-format",
+ "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"
+ ]
+ },
+ {
+ "name": "harfbuzz",
+ "features": [
+ "coretext"
+ ],
+ "platform": "osx"
+ },
+ "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"
+ ]
+ },
+ "grid-renderer": {
+ "description": "Grid renderer"
+ },
+ "input-csv": {
+ "description": "CSV input plugin",
+ "dependencies": [
+ "boost-algorithm"
+ ]
+ },
+ "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": [
+ "libpq"
+ ]
+ },
+ "input-postgis": {
+ "description": "POSTGIS input plugin",
+ "dependencies": [
+ "libpq"
+ ]
+ },
+ "input-raster": {
+ "description": "RASTER input plugin",
+ "dependencies": [
+ "boost-format"
+ ]
+ },
+ "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": [
+ "proj"
+ ]
+ },
+ "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",
+ "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": [
+ "qtbase"
+ ]
+ },
+ "webp": {
+ "description": "add webp support",
+ "dependencies": [
+ "libwebp"
+ ]
+ }
+ }
+}