aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLong Huan <8551701+longhuan2018@users.noreply.github.com>2020-12-02 05:59:39 +0800
committerGitHub <noreply@github.com>2020-12-01 13:59:39 -0800
commit629acdf9d12fd619ba93483c77dfbd73acc9b72c (patch)
tree8a7011a096171338a6f33662236f18bc7a718502
parent5d813f388088ab05cbc36cb304204749af6ada2f (diff)
downloadvcpkg-629acdf9d12fd619ba93483c77dfbd73acc9b72c.tar.gz
vcpkg-629acdf9d12fd619ba93483c77dfbd73acc9b72c.zip
[Proj4] Update to 7.2.0 (#14800)
* update proj4 to 7.2.0 * fix cmake find * add tiff,curl feature * fix depends * Update fix-proj4-targets-cmake.patch * fix * remove tiff and curl when static build * fix windows static build error * Update ports/proj4/portfile.cmake Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com> * change port version * use find_dependency instead of find_package * Update fix-proj4-targets-cmake.patch * Update fix-proj4-targets-cmake.patch Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
-rw-r--r--ports/libspatialite/CONTROL2
-rw-r--r--ports/libspatialite/portfile.cmake4
-rw-r--r--ports/proj4/CONTROL11
-rw-r--r--ports/proj4/disable-export-namespace.patch28
-rw-r--r--ports/proj4/disable-projdb-with-arm-uwp.patch8
-rw-r--r--ports/proj4/fix-linux-build.patch18
-rw-r--r--ports/proj4/fix-proj4-targets-cmake.patch (renamed from ports/proj4/use-sqlite3-config.patch)53
-rw-r--r--ports/proj4/fix-sqlite-dependency-export.patch13
-rw-r--r--ports/proj4/fix-win-output-name.patch8
-rw-r--r--ports/proj4/portfile.cmake42
-rw-r--r--ports/proj4/tools-cmake.patch9
-rw-r--r--ports/spatialite-tools/CONTROL2
-rw-r--r--ports/spatialite-tools/portfile.cmake4
13 files changed, 81 insertions, 121 deletions
diff --git a/ports/libspatialite/CONTROL b/ports/libspatialite/CONTROL
index 38b4041f1..9cedf5f17 100644
--- a/ports/libspatialite/CONTROL
+++ b/ports/libspatialite/CONTROL
@@ -1,6 +1,6 @@
Source: libspatialite
Version: 4.3.0a
-Port-Version: 6
+Port-Version: 7
Homepage: https://www.gaia-gis.it/gaia-sins/libspatialite-sources
Description: SpatiaLite is an open source library intended to extend the SQLite core to support fully fledged Spatial SQL capabilities.
Build-Depends: libxml2, sqlite3, geos, proj4, zlib, freexl, libiconv
diff --git a/ports/libspatialite/portfile.cmake b/ports/libspatialite/portfile.cmake
index 9f1f3d6bd..4496656a9 100644
--- a/ports/libspatialite/portfile.cmake
+++ b/ports/libspatialite/portfile.cmake
@@ -44,7 +44,7 @@ if (VCPKG_TARGET_IS_WINDOWS)
${CURRENT_INSTALLED_DIR}/debug/lib/zlibd.lib \
${LIBXML2_LIBS_DBG} \
${GEOS_LIBS_DBG} \
- ${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib"
+ ${CURRENT_INSTALLED_DIR}/debug/lib/proj_d.lib ole32.lib shell32.lib"
)
set(LIBS_ALL_REL
"${CURRENT_INSTALLED_DIR}/lib/iconv.lib \
@@ -54,7 +54,7 @@ if (VCPKG_TARGET_IS_WINDOWS)
${CURRENT_INSTALLED_DIR}/lib/zlib.lib \
${LIBXML2_LIBS_REL} \
${GEOS_LIBS_REL} \
- ${CURRENT_INSTALLED_DIR}/lib/proj.lib"
+ ${CURRENT_INSTALLED_DIR}/lib/proj.lib ole32.lib shell32.lib"
)
################
diff --git a/ports/proj4/CONTROL b/ports/proj4/CONTROL
index d7965472d..6a5133f10 100644
--- a/ports/proj4/CONTROL
+++ b/ports/proj4/CONTROL
@@ -1,15 +1,18 @@
Source: proj4
-Version: 6.3.1
-Port-Version: 3
+Version: 7.2.0
Homepage: https://github.com/OSGeo/PROJ
Description: PROJ.4 library for cartographic projections
Build-Depends: sqlite3[core]
-Default-Features: database
+Default-Features: database,tiff
+
+Feature: tiff
+Build-Depends: tiff
+Description: Enable TIFF support to read some grids
Feature: database
Build-Depends: sqlite3[tool] (!uwp&!arm)
Description: generate database
Feature: tools
-Build-Depends:
+Build-Depends: curl
Description: generate tools
diff --git a/ports/proj4/disable-export-namespace.patch b/ports/proj4/disable-export-namespace.patch
deleted file mode 100644
index 87646fe3d..000000000
--- a/ports/proj4/disable-export-namespace.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 61c69f7..777b5d8 100644
---- a/cmake/CMakeLists.txt
-+++ b/cmake/CMakeLists.txt
-@@ -28,7 +28,3 @@ install(FILES
- install(EXPORT targets
- FILE ${PROJECT_NAME_LOWER}-targets.cmake
- DESTINATION "${CMAKECONFIGDIR}")
--install(EXPORT targets
-- NAMESPACE ${PROJECT_NAME}::
-- FILE ${PROJECT_NAME_LOWER}-namespace-targets.cmake
-- DESTINATION "${CMAKECONFIGDIR}")
-diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
-index c62ecb4..9a52b3b 100644
---- a/cmake/project-config.cmake.in
-+++ b/cmake/project-config.cmake.in
-@@ -20,10 +20,9 @@ set (@PROJECT_NAME@_INCLUDE_DIRS "${_ROOT}/@INCLUDEDIR@")
- set (@PROJECT_NAME@_LIBRARY_DIRS "${_ROOT}/@LIBDIR@")
- set (@PROJECT_NAME@_BINARY_DIRS "${_ROOT}/@BINDIR@")
-
--set (@PROJECT_NAME@_LIBRARIES @PROJECT_NAME@::proj)
-+set (@PROJECT_NAME@_LIBRARIES proj)
- # Read in the exported definition of the library
- include ("${_DIR}/@PROJECT_NAME_LOWER@-targets.cmake")
--include ("${_DIR}/@PROJECT_NAME_LOWER@-namespace-targets.cmake")
-
- unset (_ROOT)
- unset (_DIR)
diff --git a/ports/proj4/disable-projdb-with-arm-uwp.patch b/ports/proj4/disable-projdb-with-arm-uwp.patch
index 218a35335..411a39860 100644
--- a/ports/proj4/disable-projdb-with-arm-uwp.patch
+++ b/ports/proj4/disable-projdb-with-arm-uwp.patch
@@ -1,11 +1,11 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index 9213990..f51cc5e 100644
+index 7d736d129..93d7801dd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -224,7 +224,9 @@ set(CMAKECONFIGDIR "${DEFAULT_CMAKEDIR}"
- include_directories(${PROJ4_SOURCE_DIR}/src)
+@@ -269,7 +269,9 @@ endif()
+ ################################################################################
+ include_directories(${PROJ_SOURCE_DIR}/src)
- message(STATUS "")
-add_subdirectory(data)
+if(BUILD_PROJ_DATABASE)
+ add_subdirectory(data)
diff --git a/ports/proj4/fix-linux-build.patch b/ports/proj4/fix-linux-build.patch
deleted file mode 100644
index 0d81ef35d..000000000
--- a/ports/proj4/fix-linux-build.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
-index cf7533b..236581f 100644
---- a/src/lib_proj.cmake
-+++ b/src/lib_proj.cmake
-@@ -431,11 +431,11 @@ set(PROJ_LIBRARIES ${PROJ_LIBRARIES} PARENT_SCOPE)
- if(UNIX)
- find_library(M_LIB m)
- if(M_LIB)
-- target_link_libraries(${PROJ_CORE_TARGET} -lm)
-+ target_link_libraries(${PROJ_CORE_TARGET} PRIVATE -lm)
- endif()
- endif()
- if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
-- target_link_libraries(${PROJ_CORE_TARGET} ${CMAKE_THREAD_LIBS_INIT})
-+ target_link_libraries(${PROJ_CORE_TARGET} PRIVATE ${CMAKE_THREAD_LIBS_INIT})
- endif()
-
- include_directories(${SQLITE3_INCLUDE_DIR})
diff --git a/ports/proj4/use-sqlite3-config.patch b/ports/proj4/fix-proj4-targets-cmake.patch
index 050a88415..73fa76e50 100644
--- a/ports/proj4/use-sqlite3-config.patch
+++ b/ports/proj4/fix-proj4-targets-cmake.patch
@@ -1,13 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
-index c617912..bed0428 100644
+index 7d736d129..2be8f8be9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
-@@ -122,7 +122,23 @@ if(NOT EXE_SQLITE3)
+@@ -129,7 +129,22 @@ if(NOT EXE_SQLITE3)
message(SEND_ERROR "sqlite3 binary not found!")
endif()
-find_package(Sqlite3 REQUIRED)
-+#find_package(Sqlite3 REQUIRED)
+find_package(unofficial-sqlite3 CONFIG REQUIRED)
+if(unofficial-sqlite3_FOUND)
+ set(SQLITE3_FOUND true)
@@ -27,31 +26,43 @@ index c617912..bed0428 100644
if(NOT SQLITE3_FOUND)
message(SEND_ERROR "sqlite3 dependency not found!")
endif()
+@@ -171,6 +186,7 @@ if(ENABLE_CURL)
+ find_package(CURL REQUIRED)
+ if(CURL_FOUND)
+ set(CURL_ENABLED TRUE)
++ set(CURL_LIBRARY CURL::libcurl)
+ else()
+ message(SEND_ERROR "curl dependency not found!")
+ endif()
+
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
-index 92197c8..ab65de7 100644
+index c790fa4a8..6653a28b9 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
-@@ -25,6 +25,10 @@ else ()
- endif ()
+@@ -95,6 +95,10 @@ endif ()
- string(TOLOWER "${PROJECT_NAME}" PROJECT_NAME_LOWER)
-+set(FIND_DEPENDENCY_SQLITE3 "")
-+if(NOT BUILD_LIBPROJ_SHARED)
-+ set(FIND_DEPENDENCY_SQLITE3 "find_package(unofficial-sqlite3 CONFIG REQUIRED)")
-+endif()
- configure_file(project-config.cmake.in project-config.cmake @ONLY)
- configure_file(project-config-version.cmake.in
- project-config-version.cmake @ONLY)
+ foreach (PROJECT_VARIANT_NAME ${PROJECT_NAME} ${PROJECT_LEGACY_NAME})
+ string (TOLOWER "${PROJECT_VARIANT_NAME}" PROJECT_VARIANT_LOWER)
++ set(FIND_DEPENDENCY_SQLITE3 "find_dependency(unofficial-sqlite3 CONFIG)")
++ if(CURL_ENABLED)
++ set(FIND_DEPENDENCY_CURL "find_dependency(CURL CONFIG)")
++ endif()
+ set (CMAKECONFIGSUBDIR "${CMAKECONFIGDIR}/${PROJECT_VARIANT_LOWER}")
+ # proj-config.cmake for the install tree. It's installed in
+ # ${CMAKECONFIGSUBDIR} and @PROJECT_ROOT_DIR@ is the relative
+
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
-index 9a52b3b..295d95d 100644
+index 23f997abd..8baef00f0 100644
--- a/cmake/project-config.cmake.in
+++ b/cmake/project-config.cmake.in
-@@ -13,6 +13,8 @@ message (STATUS "Reading ${CMAKE_CURRENT_LIST_FILE}")
- message (STATUS
- "@PROJECT_NAME@ configuration, version ${@PROJECT_NAME@_VERSION}")
-
-+@FIND_DEPENDENCY_SQLITE3@
+@@ -7,6 +7,10 @@
+ # @PROJECT_VARIANT_NAME@_LIBRARY_DIRS = /usr/local/lib
+ # @PROJECT_VARIANT_NAME@_BINARY_DIRS = /usr/local/bin
+ # @PROJECT_VARIANT_NAME@_VERSION = 4.9.1 (for example)
++include(CMakeFindDependencyMacro)
+
++@FIND_DEPENDENCY_SQLITE3@
++@FIND_DEPENDENCY_CURL@
+
# Tell the user project where to find our headers and libraries
get_filename_component (_DIR ${CMAKE_CURRENT_LIST_FILE} PATH)
- get_filename_component (_ROOT "${_DIR}/@PROJECT_ROOT_DIR@" ABSOLUTE)
diff --git a/ports/proj4/fix-sqlite-dependency-export.patch b/ports/proj4/fix-sqlite-dependency-export.patch
deleted file mode 100644
index 06ea71c79..000000000
--- a/ports/proj4/fix-sqlite-dependency-export.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/lib_proj.cmake b/src/lib_proj.cmake
-index 2e90f98f..dc171e91 100644
---- a/src/lib_proj.cmake
-+++ b/src/lib_proj.cmake
-@@ -441,7 +441,7 @@ if(USE_THREAD AND Threads_FOUND AND CMAKE_USE_PTHREADS_INIT)
- endif()
-
- include_directories(${SQLITE3_INCLUDE_DIR})
--target_link_libraries(${PROJ_CORE_TARGET} ${SQLITE3_LIBRARY})
-+target_link_libraries(${PROJ_CORE_TARGET} PRIVATE ${SQLITE3_LIBRARY})
-
- if(MSVC AND BUILD_LIBPROJ_SHARED)
- target_compile_definitions(${PROJ_CORE_TARGET}
diff --git a/ports/proj4/fix-win-output-name.patch b/ports/proj4/fix-win-output-name.patch
index 5964d11be..092561441 100644
--- a/ports/proj4/fix-win-output-name.patch
+++ b/ports/proj4/fix-win-output-name.patch
@@ -1,13 +1,13 @@
diff --git a/cmake/ProjUtilities.cmake b/cmake/ProjUtilities.cmake
-index 1a2b605..cf62f02 100644
+index 6f43edb5c..1ed89d597 100644
--- a/cmake/ProjUtilities.cmake
+++ b/cmake/ProjUtilities.cmake
-@@ -104,7 +104,7 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME)
+@@ -51,7 +51,7 @@ function(proj_target_output_name TARGET_NAME OUTPUT_NAME)
# On Windows, ABI version is specified using binary file name suffix.
# On Unix, suffix is empty and SOVERSION is used instead.
- if(WIN32)
+ if(0)
- string(LENGTH "${${PROJECT_INTERN_NAME}_ABI_VERSION}" abilen)
+ string(LENGTH "${${PROJECT_NAME}_ABI_VERSION}" abilen)
if(abilen GREATER 0)
- set(SUFFIX "_${${PROJECT_INTERN_NAME}_ABI_VERSION}")
+ set(SUFFIX "_${${PROJECT_NAME}_ABI_VERSION}")
diff --git a/ports/proj4/portfile.cmake b/ports/proj4/portfile.cmake
index c4e5a5ad1..c28b6f2af 100644
--- a/ports/proj4/portfile.cmake
+++ b/ports/proj4/portfile.cmake
@@ -1,35 +1,42 @@
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/PROJ
- REF 6.3.1
- SHA512 ec5a2b61b12d3d3ec2456b9e742cf7be98767889c4759334e60276f609054fa8eb59f13f07af38e69e9ee7b6f2b9542e2d5d7806726ce5616062af4de626c6fa
+ REF 7.2.0
+ SHA512 65dfca92b7890a9ffa78f48da443045069a250e2974dcf564fa23ffc297f87235b669983b39906352bd8eb702714b98fd89a4c7beaad4ad70834993a6de85128
HEAD_REF master
PATCHES
fix-sqlite3-bin.patch
- disable-export-namespace.patch
disable-projdb-with-arm-uwp.patch
fix-win-output-name.patch
- fix-sqlite-dependency-export.patch
- fix-linux-build.patch
- use-sqlite3-config.patch
+ fix-proj4-targets-cmake.patch
tools-cmake.patch
)
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
set(VCPKG_BUILD_SHARED_LIBS ON)
+ set(EXTRA_FEATURES tiff ENABLE_TIFF tools BUILD_PROJSYNC tools ENABLE_CURL)
+ set(TOOL_NAMES cct cs2cs geod gie proj projinfo projsync)
else()
set(VCPKG_BUILD_SHARED_LIBS OFF)
+ set(TOOL_NAMES cct cs2cs geod gie proj projinfo)
endif()
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
- database BUILD_PROJ_DATABASE
- tools BUILD_CCT
- tools BUILD_CS2CS
- tools BUILD_GEOD
- tools BUILD_GIE
- tools BUILD_PROJ
- tools BUILD_PROJINFO
+ database BUILD_PROJ_DATABASE
+ tools BUILD_CCT
+ tools BUILD_CS2CS
+ tools BUILD_GEOD
+ tools BUILD_GIE
+ tools BUILD_PROJ
+ tools BUILD_PROJINFO
+ ${EXTRA_FEATURES}
)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ message(WARNING "ENABLE_TIFF ENABLE_CURL and BUILD_PROJSYNC will be off when building static")
+ set(FEATURE_OPTIONS ${FEATURE_OPTIONS} -DENABLE_TIFF=OFF -DENABLE_CURL=OFF -DBUILD_PROJSYNC=OFF)
+endif()
+
if ("database" IN_LIST FEATURES)
if (VCPKG_TARGET_IS_WINDOWS)
set(BIN_SUFFIX .exe)
@@ -56,18 +63,17 @@ vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
OPTIONS ${FEATURE_OPTIONS}
- -DBUILD_LIBPROJ_SHARED=${VCPKG_BUILD_SHARED_LIBS}
-DPROJ_LIB_SUBDIR=lib
-DPROJ_INCLUDE_SUBDIR=include
- -DPROJ_DATA_SUBDIR=share/proj4
- -DPROJ_TESTS=OFF
+ -DPROJ_DATA_SUBDIR=share/${PORT}
+ -DBUILD_TESTING=OFF
-DEXE_SQLITE3=${SQLITE3_BIN_PATH}/sqlite3${BIN_SUFFIX}
)
vcpkg_install_cmake()
-vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/proj4)
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/${PORT})
if ("tools" IN_LIST FEATURES)
- vcpkg_copy_tools(TOOL_NAMES cct cs2cs geod gie proj projinfo AUTO_CLEAN)
+ vcpkg_copy_tools(TOOL_NAMES ${TOOL_NAMES} AUTO_CLEAN)
endif ()
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
diff --git a/ports/proj4/tools-cmake.patch b/ports/proj4/tools-cmake.patch
index 4e487e6f1..514a15ad1 100644
--- a/ports/proj4/tools-cmake.patch
+++ b/ports/proj4/tools-cmake.patch
@@ -1,12 +1,11 @@
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 48c785a..e2b5485 100644
+index 534bc311b..f9fb0f1bb 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
-@@ -69,11 +69,3 @@ if(BUILD_GIE)
- include(bin_gie.cmake)
- set(BIN_TARGETS ${BIN_TARGETS} gie)
+@@ -83,10 +83,3 @@ if(BUILD_PROJSYNC)
endif()
--
+
+
-if(MSVC OR CMAKE_CONFIGURATION_TYPES)
- if(BIN_TARGETS)
- # Add _d suffix for your debug versions of the tools
diff --git a/ports/spatialite-tools/CONTROL b/ports/spatialite-tools/CONTROL
index fbbad4d41..99ab33c17 100644
--- a/ports/spatialite-tools/CONTROL
+++ b/ports/spatialite-tools/CONTROL
@@ -1,6 +1,6 @@
Source: spatialite-tools
Version: 4.3.0
-Port-Version: 5
+Port-Version: 6
Homepage: https://www.gaia-gis.it/fossil/spatialite-tools/index
Description: Contains spatialite.exe and other command line tools to work with SpatiaLite databases (import, export, SQL queries)
Build-Depends: sqlite3, libspatialite, geos, readosm, proj4, zlib, libiconv, expat
diff --git a/ports/spatialite-tools/portfile.cmake b/ports/spatialite-tools/portfile.cmake
index 540e29b18..111dc0c43 100644
--- a/ports/spatialite-tools/portfile.cmake
+++ b/ports/spatialite-tools/portfile.cmake
@@ -54,7 +54,7 @@ set(LIBS_ALL_DBG
${EXPAT_LIBS_DBG} \
${LDIR}/debug/lib/readosm.lib \
${LDIR}/debug/lib/zlibd.lib \
- ${LDIR}/debug/lib/proj_d.lib"
+ ${LDIR}/debug/lib/proj_d.lib ole32.lib shell32.lib"
)
set(LIBS_ALL_REL
"${ICONV_LIBS_REL} \
@@ -65,7 +65,7 @@ set(LIBS_ALL_REL
${EXPAT_LIBS_REL} \
${LDIR}/lib/readosm.lib \
${LDIR}/lib/zlib.lib \
- ${LDIR}/lib/proj.lib"
+ ${LDIR}/lib/proj.lib ole32.lib shell32.lib"
)
if(BUILD_DEBUG_TOOLS)