[proj, proj4] Update to PROJ 9.0.0 & make proj the regular port (#23186)

* Update to PROJ 9.0.0 & make proj the regular port

* Consolidate files in share, move data to subdir

* Update versions

* Update proj to 9.0.0 RC2

* Add license fields

* Update versions

* Update to PROJ 9.0.0 release

* Update versions

* Update versions
This commit is contained in:
Kai Pastor 2022-03-09 19:33:02 +01:00 committed by GitHub
parent 857bccdad0
commit fb3416466f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
24 changed files with 200 additions and 205 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "gdal", "name": "gdal",
"version-semver": "3.4.1", "version-semver": "3.4.1",
"port-version": 3, "port-version": 4,
"description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data", "description": "The Geographic Data Abstraction Library for reading and writing geospatial raster and vector data",
"homepage": "https://gdal.org", "homepage": "https://gdal.org",
"license": null, "license": null,
@ -29,7 +29,7 @@
"libwebp", "libwebp",
"libxml2", "libxml2",
"openjpeg", "openjpeg",
"proj4", "proj",
"sqlite3", "sqlite3",
"tiff", "tiff",
{ {

View File

@ -1,10 +1,12 @@
{ {
"name": "libgeotiff", "name": "libgeotiff",
"version": "1.7.0", "version": "1.7.0",
"port-version": 1,
"description": "Libgeotiff is an open source library on top of libtiff for reading and writing GeoTIFF information tags.", "description": "Libgeotiff is an open source library on top of libtiff for reading and writing GeoTIFF information tags.",
"homepage": "https://github.com/OSGeo/libgeotiff", "homepage": "https://github.com/OSGeo/libgeotiff",
"license": "MIT",
"dependencies": [ "dependencies": [
"proj4", "proj",
{ {
"name": "tiff", "name": "tiff",
"default-features": false "default-features": false

View File

@ -1,13 +1,15 @@
{ {
"name": "libosmium", "name": "libosmium",
"version-semver": "2.17.1", "version-semver": "2.17.1",
"port-version": 1,
"description": "A fast and flexible C++ library for working with OpenStreetMap data", "description": "A fast and flexible C++ library for working with OpenStreetMap data",
"homepage": "https://osmcode.org/libosmium/", "homepage": "https://osmcode.org/libosmium/",
"license": "BSL-1.0",
"dependencies": [ "dependencies": [
"boost", "boost",
"bzip2", "bzip2",
"expat", "expat",
"proj4", "proj",
"protozero", "protozero",
"utfcpp", "utfcpp",
{ {

View File

@ -1,14 +1,15 @@
{ {
"name": "libspatialite", "name": "libspatialite",
"version": "5.0.1", "version": "5.0.1",
"port-version": 3, "port-version": 4,
"description": "SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.", "description": "SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.",
"homepage": "https://www.gaia-gis.it/gaia-sins/libspatialite-sources", "homepage": "https://www.gaia-gis.it/gaia-sins/libspatialite-sources",
"license": "MPL-1.1 OR GPL-2.0-or-later OR LGPL-2.1-or-later",
"dependencies": [ "dependencies": [
"geos", "geos",
"libiconv", "libiconv",
"libxml2", "libxml2",
"proj4", "proj",
{ {
"name": "sqlite3", "name": "sqlite3",
"default-features": false, "default-features": false,

View File

@ -1,6 +1,7 @@
{ {
"name": "mapnik", "name": "mapnik",
"version-date": "2022-01-28", "version-date": "2022-01-28",
"port-version": 1,
"description": "Mapnik is an open source toolkit for developing mapping applications.", "description": "Mapnik is an open source toolkit for developing mapping applications.",
"homepage": "https://github.com/mapnik/mapnik", "homepage": "https://github.com/mapnik/mapnik",
"license": "LGPL-2.1-only", "license": "LGPL-2.1-only",
@ -157,7 +158,7 @@
"proj": { "proj": {
"description": "PROJ Functionalities", "description": "PROJ Functionalities",
"dependencies": [ "dependencies": [
"proj4" "proj"
] ]
}, },
"svg-renderer": { "svg-renderer": {

View File

@ -1 +1,69 @@
SET(VCPKG_POLICY_EMPTY_PACKAGE enabled) vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/PROJ
REF 9.0.0
SHA512 f11a20e9f9615c513755f54ac400cc2e144e40caa91f616c8f640aef9caf779487dc94927b3a4b57b15a595c17b70636b872d9a77d7baaf912b1a507004e6520
HEAD_REF master
PATCHES
fix-win-output-name.patch
fix-proj4-targets-cmake.patch
tools-cmake.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
net ENABLE_CURL
tiff ENABLE_TIFF
tools BUILD_APPS
)
vcpkg_list(SET TOOL_NAMES cct cs2cs geod gie invgeod invproj proj projinfo projsync)
if("tools" IN_LIST FEATURES AND NOT "net" IN_LIST FEATURES)
set(BUILD_PROJSYNC OFF)
vcpkg_list(APPEND FEATURE_OPTIONS -DBUILD_PROJSYNC=${BUILD_PROJSYNC})
vcpkg_list(REMOVE_ITEM TOOL_NAMES projsync)
endif()
find_program(EXE_SQLITE3 NAMES "sqlite3" PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools" NO_DEFAULT_PATH REQUIRED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DNLOHMANN_JSON=external
-DPROJ_LIB_SUBDIR=lib
-DPROJ_INCLUDE_SUBDIR=include
-DPROJ_DATA_SUBDIR=share/${PORT}/data
-DBUILD_TESTING=OFF
"-DEXE_SQLITE3=${EXE_SQLITE3}"
)
vcpkg_cmake_install()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# Enforce consistency with src/lib_proj.cmake build time configuration.
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/proj.h"
"#ifndef PROJ_DLL"
"#ifndef PROJ_DLL\n# define PROJ_DLL\n#elif 0"
)
endif()
vcpkg_cmake_config_fixup(PACKAGE_NAME proj4 CONFIG_PATH lib/cmake/proj4 DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/proj)
if ("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
endif ()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
if(NOT DEFINED VCPKG_BUILD_TYPE AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/proj.pc" " -lproj" " -lproj_d")
endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,14 +1,14 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt diff --git a/src/apps/CMakeLists.txt b/src/apps/CMakeLists.txt
index 534bc311b..f9fb0f1bb 100644 index 534bc311b..f9fb0f1bb 100644
--- a/src/CMakeLists.txt --- a/src/apps/CMakeLists.txt
+++ b/src/CMakeLists.txt +++ b/src/apps/CMakeLists.txt
@@ -83,10 +83,3 @@ if(BUILD_PROJSYNC) @@ -83,10 +83,3 @@ if(BUILD_PROJSYNC)
endif()
# global configurations for all apps
-if(MSVC OR CMAKE_CONFIGURATION_TYPES) -if(MSVC OR CMAKE_CONFIGURATION_TYPES)
- if(BIN_TARGETS) - if(BIN_TARGETS)
- # Add _d suffix for your debug versions of the tools - # Add _d suffix for debug versions of the apps
- set_target_properties(${BIN_TARGETS} PROPERTIES - set_target_properties(${BIN_TARGETS} PROPERTIES
- DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX}) - DEBUG_POSTFIX ${CMAKE_DEBUG_POSTFIX})
- endif() - endif()

View File

@ -1,4 +1,4 @@
The package proj4 provides CMake targets: The package proj provides CMake targets:
find_package(PROJ CONFIG REQUIRED) find_package(PROJ CONFIG REQUIRED)
target_link_libraries(main PRIVATE PROJ::proj) target_link_libraries(main PRIVATE PROJ::proj)

View File

@ -1,9 +1,57 @@
{ {
"name": "proj", "name": "proj",
"version-string": "0", "version": "9.0.0",
"port-version": 1, "description": "PROJ library for cartographic projections",
"description": "a stub package that pulls in proj4. Do not depend on this package.", "homepage": "https://proj.org/",
"license": "MIT",
"dependencies": [ "dependencies": [
"proj4" "nlohmann-json",
] {
"name": "sqlite3",
"default-features": false
},
{
"name": "sqlite3",
"host": true,
"features": [
"tool"
]
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
}
],
"default-features": [
"net",
"tiff"
],
"features": {
"net": {
"description": "Enable network support",
"dependencies": [
"curl"
]
},
"tiff": {
"description": "Enable TIFF support to read some grids",
"dependencies": [
{
"name": "tiff",
"default-features": false,
"features": [
"lzma",
"zip"
]
}
]
},
"tools": {
"description": "Build tools"
}
}
} }

View File

@ -1,53 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 89763d7..f648296 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -342,7 +342,7 @@ install(FILES ${docfiles}
################################################################################
# pkg-config support
################################################################################
-if(UNIX OR MINGW)
+if(1)
configure_proj_pc()
install(FILES
diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake
index 2e0db05..46e5de1 100644
--- a/cmake/ProjUtilities.cmake
+++ b/cmake/ProjUtilities.cmake
@@ -78,15 +78,21 @@ function(configure_proj_pc)
set(VERSION ${PROJ_VERSION})
# Build list for Libs.private
set(EXTRA_LIBS
- -lstdc++
- -lsqlite3
${CMAKE_THREAD_LIBS_INIT}
)
+ set(REQUIRES_PRIVATE "sqlite3")
if(TIFF_ENABLED)
- list(APPEND EXTRA_LIBS -ltiff)
+ string(APPEND REQUIRES_PRIVATE " libtiff-4")
endif()
if(CURL_ENABLED)
- list(APPEND EXTRA_LIBS -lcurl)
+ string(APPEND REQUIRES_PRIVATE " libcurl")
+ endif()
+ if(WIN32 AND NOT MINGW)
+ string(APPEND EXTRA_LIBS " -lole32 -lshell32")
+ elseif(NOT APPLE OR CMAKE_ANDROID_STL_TYPE MATCHES "^gnu")
+ string(APPEND EXTRA_LIBS " -lstdc++")
+ else()
+ string(APPEND EXTRA_LIBS " -lc++")
endif()
if(HAVE_LIBM)
list(APPEND EXTRA_LIBS -lm)
diff --git a/proj.pc.in b/proj.pc.in
index 846310d..3feac38 100644
--- a/proj.pc.in
+++ b/proj.pc.in
@@ -11,4 +11,5 @@ Requires:
Version: @VERSION@
Libs: -L${libdir} -lproj
Libs.private: @EXTRA_LIBS@
+Requires.private: @REQUIRES_PRIVATE@
Cflags: -I${includedir}

View File

@ -1,70 +1 @@
vcpkg_from_github( SET(VCPKG_POLICY_EMPTY_PACKAGE enabled)
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/PROJ
REF 8.2.1
SHA512 8af4c41320e3fd60af3bfa89a89fd1bb22461786a4288a5873d82f90c51eaef021f539b6a6bcc8e393f786a84ea3747a75d80d95e620f20ef2a353f1a90b74bc
HEAD_REF master
PATCHES
fix-win-output-name.patch
fix-proj4-targets-cmake.patch
tools-cmake.patch
pkgconfig.patch
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
net ENABLE_CURL
tiff ENABLE_TIFF
tools BUILD_APPS
)
vcpkg_list(SET TOOL_NAMES cct cs2cs geod gie invgeod invproj proj projinfo projsync)
if("tools" IN_LIST FEATURES AND NOT "net" IN_LIST FEATURES)
set(BUILD_PROJSYNC OFF)
vcpkg_list(APPEND FEATURE_OPTIONS -DBUILD_PROJSYNC=${BUILD_PROJSYNC})
vcpkg_list(REMOVE_ITEM TOOL_NAMES projsync)
endif()
find_program(EXE_SQLITE3 NAMES "sqlite3" PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools" NO_DEFAULT_PATH REQUIRED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DNLOHMANN_JSON=external
-DPROJ_LIB_SUBDIR=lib
-DPROJ_INCLUDE_SUBDIR=include
-DPROJ_DATA_SUBDIR=share/${PORT}
-DBUILD_TESTING=OFF
"-DEXE_SQLITE3=${EXE_SQLITE3}"
)
vcpkg_cmake_install()
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
# Enforce consistency with src/lib_proj.cmake build time configuration.
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/proj.h"
"#ifndef PROJ_DLL"
"#ifndef PROJ_DLL\n# define PROJ_DLL\n#elif 0"
)
endif()
vcpkg_cmake_config_fixup(PACKAGE_NAME PROJ CONFIG_PATH lib/cmake/proj DO_NOT_DELETE_PARENT_CONFIG_PATH)
vcpkg_cmake_config_fixup(PACKAGE_NAME PROJ4 CONFIG_PATH lib/cmake/proj4)
if ("tools" IN_LIST FEATURES)
vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
endif ()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
vcpkg_copy_pdbs()
vcpkg_fixup_pkgconfig()
if(NOT DEFINED VCPKG_BUILD_TYPE AND VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/proj.pc" " -lproj" " -lproj_d")
endif()
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)

View File

@ -1,57 +1,12 @@
{ {
"name": "proj4", "name": "proj4",
"version-semver": "8.2.1", "version-semver": "8.9.9",
"port-version": 1, "description": "A stub package that pulls in proj. Do not depend on this package.",
"description": "PROJ library for cartographic projections", "license": "MIT",
"homepage": "https://proj.org/",
"dependencies": [ "dependencies": [
"nlohmann-json",
{ {
"name": "sqlite3", "name": "proj",
"default-features": false "version>=": "9.0.0"
},
{
"name": "sqlite3",
"host": true,
"features": [
"tool"
]
},
{
"name": "vcpkg-cmake",
"host": true
},
{
"name": "vcpkg-cmake-config",
"host": true
} }
], ]
"default-features": [
"net",
"tiff"
],
"features": {
"net": {
"description": "Enable network support",
"dependencies": [
"curl"
]
},
"tiff": {
"description": "Enable TIFF support to read some grids",
"dependencies": [
{
"name": "tiff",
"default-features": false,
"features": [
"lzma",
"zip"
]
}
]
},
"tools": {
"description": "Build tools"
}
}
} }

View File

@ -1,7 +1,7 @@
{ {
"name": "vtk", "name": "vtk",
"version-semver": "9.0.3-pv5.9.1", "version-semver": "9.0.3-pv5.9.1",
"port-version": 8, "port-version": 9,
"description": "Software system for 3D computer graphics, image processing, and visualization", "description": "Software system for 3D computer graphics, image processing, and visualization",
"homepage": "https://github.com/Kitware/VTK", "homepage": "https://github.com/Kitware/VTK",
"license": "BSD-3-Clause", "license": "BSD-3-Clause",
@ -31,7 +31,7 @@
"lz4", "lz4",
"netcdf-c", "netcdf-c",
"pegtl-2", "pegtl-2",
"proj4", "proj",
"pugixml", "pugixml",
"sqlite3", "sqlite3",
"tiff", "tiff",

View File

@ -2386,7 +2386,7 @@
}, },
"gdal": { "gdal": {
"baseline": "3.4.1", "baseline": "3.4.1",
"port-version": 3 "port-version": 4
}, },
"gdcm": { "gdcm": {
"baseline": "3.0.7", "baseline": "3.0.7",
@ -3530,7 +3530,7 @@
}, },
"libgeotiff": { "libgeotiff": {
"baseline": "1.7.0", "baseline": "1.7.0",
"port-version": 0 "port-version": 1
}, },
"libgit2": { "libgit2": {
"baseline": "1.4.2", "baseline": "1.4.2",
@ -3806,7 +3806,7 @@
}, },
"libosmium": { "libosmium": {
"baseline": "2.17.1", "baseline": "2.17.1",
"port-version": 0 "port-version": 1
}, },
"libosmscout": { "libosmscout": {
"baseline": "1.1.1", "baseline": "1.1.1",
@ -3970,7 +3970,7 @@
}, },
"libspatialite": { "libspatialite": {
"baseline": "5.0.1", "baseline": "5.0.1",
"port-version": 3 "port-version": 4
}, },
"libspnav": { "libspnav": {
"baseline": "0.2.3", "baseline": "0.2.3",
@ -4334,7 +4334,7 @@
}, },
"mapnik": { "mapnik": {
"baseline": "2022-01-28", "baseline": "2022-01-28",
"port-version": 0 "port-version": 1
}, },
"marble": { "marble": {
"baseline": "19.08.2", "baseline": "19.08.2",
@ -5485,12 +5485,12 @@
"port-version": 1 "port-version": 1
}, },
"proj": { "proj": {
"baseline": "0", "baseline": "9.0.0",
"port-version": 1 "port-version": 0
}, },
"proj4": { "proj4": {
"baseline": "8.2.1", "baseline": "8.9.9",
"port-version": 1 "port-version": 0
}, },
"prometheus-cpp": { "prometheus-cpp": {
"baseline": "1.0.0", "baseline": "1.0.0",
@ -7286,7 +7286,7 @@
}, },
"vtk": { "vtk": {
"baseline": "9.0.3-pv5.9.1", "baseline": "9.0.3-pv5.9.1",
"port-version": 8 "port-version": 9
}, },
"vtk-dicom": { "vtk-dicom": {
"baseline": "0.8.12", "baseline": "0.8.12",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "daeafe53684ed8335d3bf77deeffa3424b26120d",
"version-semver": "3.4.1",
"port-version": 4
},
{ {
"git-tree": "a8c88697265b7f88d7576c24c57456da86500b19", "git-tree": "a8c88697265b7f88d7576c24c57456da86500b19",
"version-semver": "3.4.1", "version-semver": "3.4.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "91982f7018b13638993efc70c14bf0996105f0bc",
"version": "1.7.0",
"port-version": 1
},
{ {
"git-tree": "f68bbf7c0472548573a69d1e41801edb1179c028", "git-tree": "f68bbf7c0472548573a69d1e41801edb1179c028",
"version": "1.7.0", "version": "1.7.0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "9e9ae3d97e11dfebbba6d839add7886b4bede3b1",
"version-semver": "2.17.1",
"port-version": 1
},
{ {
"git-tree": "862e140771bed4c7e9b7bc8ffc798edbbd3daa1c", "git-tree": "862e140771bed4c7e9b7bc8ffc798edbbd3daa1c",
"version-semver": "2.17.1", "version-semver": "2.17.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "4d7f5aa6151c1285c1b6cd5b6c03ee34db4c0c98",
"version": "5.0.1",
"port-version": 4
},
{ {
"git-tree": "ad90cccc74f447ccc40309956f67092c845fe40b", "git-tree": "ad90cccc74f447ccc40309956f67092c845fe40b",
"version": "5.0.1", "version": "5.0.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "ab089220fb5ecc215804a68c2122d3e0d3ed58bc",
"version-date": "2022-01-28",
"port-version": 1
},
{ {
"git-tree": "f352e6316057a4b1751482bd75dd9793aa92771a", "git-tree": "f352e6316057a4b1751482bd75dd9793aa92771a",
"version-date": "2022-01-28", "version-date": "2022-01-28",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "1566fbbbd7d8abba35cebac6c8821339d1da1d16",
"version": "9.0.0",
"port-version": 0
},
{ {
"git-tree": "a90853a886ef1a9425ad477bc996b99c0824ff33", "git-tree": "a90853a886ef1a9425ad477bc996b99c0824ff33",
"version-string": "0", "version-string": "0",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "4ccf46b756dabd4cd841b866dcd5491d84a946e1",
"version-semver": "8.9.9",
"port-version": 0
},
{ {
"git-tree": "de72240f9bceda0263f58b734ab6de4f97632dbe", "git-tree": "de72240f9bceda0263f58b734ab6de4f97632dbe",
"version-semver": "8.2.1", "version-semver": "8.2.1",

View File

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "3fa106f1a3c80a3ad15d8db406067c5253decc8e",
"version-semver": "9.0.3-pv5.9.1",
"port-version": 9
},
{ {
"git-tree": "585d1bca8e71d950c6d12ceb6ad720825ecbd704", "git-tree": "585d1bca8e71d950c6d12ceb6ad720825ecbd704",
"version-semver": "9.0.3-pv5.9.1", "version-semver": "9.0.3-pv5.9.1",