Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions ports/geos/disable-warning-4996.patch
Original file line number Diff line number Diff line change
@@ -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)
12 changes: 0 additions & 12 deletions ports/geos/dont-build-astyle.patch

This file was deleted.

12 changes: 0 additions & 12 deletions ports/geos/dont-build-docs.patch

This file was deleted.

76 changes: 76 additions & 0 deletions ports/geos/fix-exported-config.patch
Original file line number Diff line number Diff line change
@@ -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}
68 changes: 0 additions & 68 deletions ports/geos/fix-static-deps.patch

This file was deleted.

13 changes: 13 additions & 0 deletions ports/geos/install-hpp-files.patch
Original file line number Diff line number Diff line change
@@ -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"
16 changes: 0 additions & 16 deletions ports/geos/make-geos-config-relocatable.patch

This file was deleted.

15 changes: 0 additions & 15 deletions ports/geos/pc-file-for-msvc.patch

This file was deleted.

12 changes: 0 additions & 12 deletions ports/geos/pc-file-libs-private.patch

This file was deleted.

53 changes: 31 additions & 22 deletions ports/geos/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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()
Expand All @@ -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}
Expand All @@ -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")
geos_add_debug_postfix("${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(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 DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
geos_add_debug_postfix("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/geos.pc")
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")
Expand Down
3 changes: 1 addition & 2 deletions ports/geos/vcpkg.json
Original file line number Diff line number Diff line change
@@ -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": [
Expand Down
4 changes: 2 additions & 2 deletions scripts/ci.baseline.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
5 changes: 5 additions & 0 deletions versions/g-/geos.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "852bf7181cbec88161abfe3cf4db2887f80ab2d4",
"version": "3.10.0",
"port-version": 0
},
{
"git-tree": "9a0a3db2edc588598505038b452c9c7c91c1be6e",
"version": "3.9.1",
Expand Down