mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-06-07 13:48:02 +08:00
[geos] Update to 3.10.0 (#21051)
* Update geos to 3.10.0 * Enable geos on uwp * Update versions * Fix mingw build * Fix deinstallation * Update versions
This commit is contained in:
parent
4df8c6d7f0
commit
ce73eebf08
13
ports/geos/disable-warning-4996.patch
Normal file
13
ports/geos/disable-warning-4996.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index accc1a2..34d2055 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -174,7 +174,7 @@ target_compile_features(geos_cxx_flags INTERFACE cxx_std_11)
|
||||
target_compile_options(geos_cxx_flags INTERFACE
|
||||
"$<$<OR:$<CXX_COMPILER_ID:Clang>,$<CXX_COMPILER_ID:AppleClang>>:-ffp-contract=off>"
|
||||
"$<$<CXX_COMPILER_ID:GNU>:-ffp-contract=off>"
|
||||
- "$<$<CXX_COMPILER_ID:MSVC>:/fp:precise>"
|
||||
+ $<$<CXX_COMPILER_ID:MSVC>:/fp:precise /wd4996>
|
||||
)
|
||||
|
||||
# Use -ffloat-store for 32-bit builds (needed to make some tests pass)
|
@ -1,12 +0,0 @@
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index f0f616e..8a81a2a 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -40,7 +40,6 @@ if(NOT MSVC)
|
||||
|
||||
endif()
|
||||
|
||||
-add_subdirectory(astyle)
|
||||
|
||||
# if(UNIX OR MINGW)
|
||||
|
@ -1,12 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index b78ca54b..507df2af 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -264,7 +264,6 @@ add_subdirectory(benchmarks)
|
||||
#-----------------------------------------------------------------------------
|
||||
# Documentation/Examples
|
||||
#-----------------------------------------------------------------------------
|
||||
-add_subdirectory(doc)
|
||||
|
||||
#-----------------------------------------------------------------------------
|
||||
# Install and export targets - support 'make install' or equivalent
|
76
ports/geos/fix-exported-config.patch
Normal file
76
ports/geos/fix-exported-config.patch
Normal file
@ -0,0 +1,76 @@
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index bc0e774..e3ca0bd 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -45,11 +45,18 @@ function(configure_install_geos_pc)
|
||||
set(includedir "$\{prefix\}/${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
set(libdir "$\{exec_prefix\}/${CMAKE_INSTALL_LIBDIR}")
|
||||
set(VERSION ${GEOS_VERSION})
|
||||
- set(EXTRA_LIBS "-lstdc++")
|
||||
+ if(APPLE OR CMAKE_ANDROID_STL_TYPE MATCHES "^c\\+\\+")
|
||||
+ set(EXTRA_LIBS "-lc++")
|
||||
+ elseif(UNIX OR MINGW)
|
||||
+ set(EXTRA_LIBS "-lstdc++")
|
||||
+ else()
|
||||
+ set(EXTRA_LIBS "")
|
||||
+ endif()
|
||||
if(HAVE_LIBM)
|
||||
list(APPEND EXTRA_LIBS "-lm")
|
||||
endif()
|
||||
list(JOIN EXTRA_LIBS " " EXTRA_LIBS)
|
||||
+ set(EXTRA_LIBS "${EXTRA_LIBS}" PARENT_SCOPE) # for geos-config
|
||||
|
||||
configure_file(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/geos.pc.in
|
||||
@@ -61,9 +68,9 @@ function(configure_install_geos_pc)
|
||||
DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
|
||||
endfunction()
|
||||
|
||||
+configure_install_geos_pc()
|
||||
if(NOT MSVC)
|
||||
configure_install_geos_config()
|
||||
- configure_install_geos_pc()
|
||||
endif()
|
||||
|
||||
option(BUILD_ASTYLE "Build astyle (Artistic Style) tool" OFF)
|
||||
diff --git a/tools/geos-config.in b/tools/geos-config.in
|
||||
index 6eff1eb..8827f6a 100644
|
||||
--- a/tools/geos-config.in
|
||||
+++ b/tools/geos-config.in
|
||||
@@ -1,9 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
-prefix=@prefix@
|
||||
-exec_prefix=@exec_prefix@
|
||||
-includedir=@includedir@
|
||||
-libdir=@libdir@
|
||||
+DIRNAME=$(dirname $0)
|
||||
+TOOLS=$(dirname $DIRNAME)
|
||||
+prefix=$(CDPATH= cd -- "${DIRNAME%/tools/geos/*}" && pwd -P)
|
||||
+exec_prefix=${prefix}
|
||||
+includedir=${prefix}/include
|
||||
+libdir=${prefix}${TOOLS##*/geos}/lib
|
||||
|
||||
usage()
|
||||
{
|
||||
@@ -47,16 +49,16 @@ while test $# -gt 0; do
|
||||
echo -L${libdir} -lgeos-@VERSION_RELEASE@
|
||||
;;
|
||||
--clibs)
|
||||
- echo -L${libdir} -lgeos_c
|
||||
+ echo -L${libdir} -lgeos_c $(if test "@BUILD_SHARED_LIBS@" != "ON"; then echo "-lgeos @EXTRA_LIBS@"; fi)
|
||||
;;
|
||||
--cclibs)
|
||||
- echo -L${libdir} -lgeos
|
||||
+ echo -L${libdir} -lgeos $(if test "@BUILD_SHARED_LIBS@" != "ON"; then echo "@EXTRA_LIBS@"; fi)
|
||||
;;
|
||||
--static-clibs)
|
||||
- echo -L${libdir} -lgeos_c -lgeos -lm
|
||||
+ echo -L${libdir} -lgeos_c -lgeos @EXTRA_LIBS@
|
||||
;;
|
||||
--static-cclibs)
|
||||
- echo -L${libdir} -lgeos -lm
|
||||
+ echo -L${libdir} -lgeos @EXTRA_LIBS@
|
||||
;;
|
||||
--cflags)
|
||||
echo -I${includedir}
|
@ -1,68 +0,0 @@
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index 8a81a2a..724a68c 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -13,6 +13,15 @@
|
||||
|
||||
|
||||
if(NOT MSVC)
|
||||
+ # C++ libraries needed even for the C API, for geos-config and geos.pc.
|
||||
+ set(cxx_libs "")
|
||||
+ foreach(lib IN ITEMS stdc++ c++)
|
||||
+ if(lib IN_LIST CMAKE_CXX_IMPLICIT_LINK_LIBRARIES)
|
||||
+ string(APPEND cxx_libs "-l${lib} ")
|
||||
+ break()
|
||||
+ endif()
|
||||
+ endforeach()
|
||||
+
|
||||
# Consider CMAKE_INSTALL_PREFIX with spaces
|
||||
string(REPLACE " " "\\ " ESCAPED_INSTALL_PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
configure_file(
|
||||
diff --git a/tools/geos-config.cmake b/tools/geos-config.cmake
|
||||
index 4c546b5..4bdbc47 100644
|
||||
--- a/tools/geos-config.cmake
|
||||
+++ b/tools/geos-config.cmake
|
||||
@@ -29,6 +29,12 @@ if test $# -eq 0; then
|
||||
usage 1 1>&2
|
||||
fi
|
||||
|
||||
+if test "@BUILD_SHARED_LIBS@" = "ON"; then
|
||||
+ extra_libs=
|
||||
+else
|
||||
+ extra_libs="-lgeos -lm @cxx_libs@"
|
||||
+fi
|
||||
+
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
|
||||
@@ -47,16 +53,16 @@ while test $# -gt 0; do
|
||||
echo -L${libdir} -lgeos-@GEOS_VERSION_MAJOR@
|
||||
;;
|
||||
--clibs)
|
||||
- echo -L${libdir} -lgeos_c
|
||||
+ echo -L${libdir} -lgeos_c ${extra_libs}
|
||||
;;
|
||||
--cclibs)
|
||||
- echo -L${libdir} -lgeos
|
||||
+ echo -L${libdir} -lgeos ${extra_libs#-lgeos }
|
||||
;;
|
||||
--static-clibs)
|
||||
- echo -L${libdir} -lgeos_c -lgeos -lm
|
||||
+ echo -L${libdir} -lgeos_c -lgeos -lm @cxx_libs@
|
||||
;;
|
||||
--static-cclibs)
|
||||
- echo -L${libdir} -lgeos -lm
|
||||
+ echo -L${libdir} -lgeos -lm @cxx_libs@
|
||||
;;
|
||||
--cflags)
|
||||
echo -I${prefix}/include
|
||||
diff --git a/tools/geos.pc.cmake b/tools/geos.pc.cmake
|
||||
index 53f43d9..0ebd4d5 100644
|
||||
--- a/tools/geos.pc.cmake
|
||||
+++ b/tools/geos.pc.cmake
|
||||
@@ -9,4 +9,4 @@ Requires:
|
||||
Version: @GEOS_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lgeos_c
|
||||
-Libs.private: -lgeos
|
||||
+Libs.private: -lgeos @cxx_libs@
|
13
ports/geos/install-hpp-files.patch
Normal file
13
ports/geos/install-hpp-files.patch
Normal file
@ -0,0 +1,13 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 20c8907..accc1a2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -367,7 +367,7 @@ install(DIRECTORY
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/geos"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/include/geos"
|
||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
|
||||
- FILES_MATCHING PATTERN "*.h")
|
||||
+ FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp")
|
||||
if(NOT DISABLE_GEOS_INLINE)
|
||||
install(DIRECTORY
|
||||
"${CMAKE_CURRENT_LIST_DIR}/include/geos"
|
@ -1,16 +0,0 @@
|
||||
diff --git a/tools/geos-config.cmake b/tools/geos-config.cmake
|
||||
index 6730e215..4c546b5c 100644
|
||||
--- a/tools/geos-config.cmake
|
||||
+++ b/tools/geos-config.cmake
|
||||
@@ -1,7 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
-prefix=@ESCAPED_INSTALL_PREFIX@
|
||||
-libdir=${prefix}/lib
|
||||
+DIRNAME=$(dirname $0)
|
||||
+TOOLS=$(dirname $DIRNAME)
|
||||
+prefix=$(CDPATH= cd -- "${DIRNAME%/tools/geos/*}" && pwd -P)
|
||||
+libdir=${prefix}${TOOLS##*/geos}/lib
|
||||
|
||||
usage()
|
||||
{
|
@ -1,15 +0,0 @@
|
||||
diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
|
||||
index d9267e8..26713f9 100644
|
||||
--- a/tools/CMakeLists.txt
|
||||
+++ b/tools/CMakeLists.txt
|
||||
@@ -36,6 +36,10 @@ if(NOT MSVC)
|
||||
OWNER_READ OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE)
|
||||
+else()
|
||||
+ set(cxx_libs "")
|
||||
+endif()
|
||||
+if(1)
|
||||
|
||||
# pkg-config support
|
||||
configure_file(
|
@ -1,12 +0,0 @@
|
||||
diff --git a/tools/geos.pc.cmake b/tools/geos.pc.cmake
|
||||
index 0a9df7fb..53f43d90 100644
|
||||
--- a/tools/geos.pc.cmake
|
||||
+++ b/tools/geos.pc.cmake
|
||||
@@ -9,3 +9,4 @@ Requires:
|
||||
Version: @GEOS_VERSION@
|
||||
Cflags: -I${includedir}
|
||||
Libs: -L${libdir} -lgeos_c
|
||||
+Libs.private: -lgeos
|
||||
--
|
||||
2.17.1
|
||||
|
@ -1,26 +1,20 @@
|
||||
set(GEOS_VERSION 3.9.1)
|
||||
set(GEOS_VERSION 3.10.0)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
|
||||
URLS "https://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
|
||||
FILENAME "geos-${GEOS_VERSION}.tar.bz2"
|
||||
SHA512 7ea131685cd110ec5e0cb7c214b52b75397371e75f011e1410b6770b6a48ca492a02337d86a7be35c852ef94604fe9d6f49634c79d4946df611aaa4f5cbaee28
|
||||
SHA512 12657c6649bfbf6efa3232a054969c6229bb23fc16a7c72d6ca5fdb662e0d08e14bbcaa6944a17de8972b6c236608d94c870ead0b04fada2d2af3d42c238058e
|
||||
)
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
REF ${GEOS_VERSION}
|
||||
PATCHES
|
||||
dont-build-docs.patch
|
||||
dont-build-astyle.patch
|
||||
pc-file-libs-private.patch
|
||||
pc-file-for-msvc.patch
|
||||
make-geos-config-relocatable.patch
|
||||
fix-static-deps.patch
|
||||
disable-warning-4996.patch
|
||||
fix-exported-config.patch
|
||||
install-hpp-files.patch
|
||||
)
|
||||
|
||||
# NOTE: GEOS provides CMake as optional build configuration, it might not be actively
|
||||
# maintained, so CMake build issues may happen between releases.
|
||||
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
set(_CMAKE_EXTRA_OPTIONS "-DDISABLE_GEOS_INLINE=ON")
|
||||
else()
|
||||
@ -30,6 +24,9 @@ endif()
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_ASTYLE=OFF
|
||||
-DBUILD_DOCUMENTATION=OFF
|
||||
-DBUILD_GEOSOP=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
${_CMAKE_EXTRA_OPTIONS}
|
||||
@ -45,17 +42,29 @@ function(geos_add_debug_postfix config_file)
|
||||
string(REGEX REPLACE "(-lgeos(_c)?)d?([^-_d])" "\\1d\\3" fixed_contents "${contents}")
|
||||
file(WRITE "${config_file}" "${fixed_contents}")
|
||||
endfunction()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/geos.pc")
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config")
|
||||
file(CHMOD "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config" FILE_PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
|
||||
geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/geos.pc")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/geos-config")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/geos-config")
|
||||
endif()
|
||||
if(EXISTS "${CURRENT_PACKAGES_DIR}/debug/bin/geos-config")
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config")
|
||||
geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config")
|
||||
if(NOT VCPKG_TARGET_IS_WINDOWS OR VCPKG_TARGET_IS_MINGW)
|
||||
file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin")
|
||||
file(RENAME "${CURRENT_PACKAGES_DIR}/debug/bin/geos-config" "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config")
|
||||
geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config")
|
||||
file(CHMOD "${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/geos-config" FILE_PERMISSIONS
|
||||
OWNER_READ OWNER_WRITE OWNER_EXECUTE
|
||||
GROUP_READ GROUP_EXECUTE
|
||||
WORLD_READ WORLD_EXECUTE
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
@ -1,7 +1,6 @@
|
||||
{
|
||||
"name": "geos",
|
||||
"version": "3.9.1",
|
||||
"port-version": 3,
|
||||
"version": "3.10.0",
|
||||
"description": "Geometry Engine Open Source",
|
||||
"homepage": "https://www.osgeo.org/projects/geos/",
|
||||
"dependencies": [
|
||||
|
@ -336,8 +336,6 @@ gainput:x64-uwp=fail
|
||||
gasol:arm64-windows=fail
|
||||
gasol:arm-uwp=fail
|
||||
gasol:x64-uwp=fail
|
||||
geos:arm-uwp=fail
|
||||
geos:x64-uwp=fail
|
||||
|
||||
# gsoap does not offer stable public source downloads
|
||||
gsoap:x64-windows = skip
|
||||
@ -691,6 +689,8 @@ libressl:x86-windows = skip
|
||||
libsoundio:arm64-windows=fail
|
||||
libsoundio:arm-uwp=fail
|
||||
libsoundio:x64-uwp=fail
|
||||
libspatialite:arm-uwp=fail
|
||||
libspatialite:x64-uwp=fail
|
||||
libsrt:arm-uwp=fail
|
||||
libsrt:x64-uwp=fail
|
||||
libssh:arm64-windows=fail
|
||||
|
@ -2381,8 +2381,8 @@
|
||||
"port-version": 1
|
||||
},
|
||||
"geos": {
|
||||
"baseline": "3.9.1",
|
||||
"port-version": 3
|
||||
"baseline": "3.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
"geotrans": {
|
||||
"baseline": "3.8",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "852bf7181cbec88161abfe3cf4db2887f80ab2d4",
|
||||
"version": "3.10.0",
|
||||
"port-version": 0
|
||||
},
|
||||
{
|
||||
"git-tree": "9a0a3db2edc588598505038b452c9c7c91c1be6e",
|
||||
"version": "3.9.1",
|
||||
|
Loading…
Reference in New Issue
Block a user