early-access version 2853
This commit is contained in:
13
externals/vcpkg/ports/geos/disable-warning-4996.patch
vendored
Executable file
13
externals/vcpkg/ports/geos/disable-warning-4996.patch
vendored
Executable 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)
|
||||
76
externals/vcpkg/ports/geos/fix-exported-config.patch
vendored
Executable file
76
externals/vcpkg/ports/geos/fix-exported-config.patch
vendored
Executable 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}
|
||||
63
externals/vcpkg/ports/geos/portfile.cmake
vendored
Executable file
63
externals/vcpkg/ports/geos/portfile.cmake
vendored
Executable file
@@ -0,0 +1,63 @@
|
||||
set(GEOS_VERSION 3.10.2)
|
||||
|
||||
vcpkg_download_distfile(ARCHIVE
|
||||
URLS "https://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
|
||||
FILENAME "geos-${GEOS_VERSION}.tar.bz2"
|
||||
SHA512 390381711ccf56b862c2736cf6329200822f121de1c49df52b8b85cabea8c7787b199df2196acacc2e5c677ff3ebe042d93d70e89deadbc19d754499edb65126
|
||||
)
|
||||
vcpkg_extract_source_archive_ex(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
ARCHIVE "${ARCHIVE}"
|
||||
REF "${GEOS_VERSION}"
|
||||
PATCHES
|
||||
disable-warning-4996.patch
|
||||
fix-exported-config.patch
|
||||
)
|
||||
|
||||
vcpkg_list(SET EXTRA_OPTIONS)
|
||||
if(VCPKG_TARGET_IS_MINGW)
|
||||
vcpkg_list(APPEND EXTRA_OPTIONS "-DDISABLE_GEOS_INLINE=ON")
|
||||
endif()
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_ASTYLE=OFF
|
||||
-DBUILD_DOCUMENTATION=OFF
|
||||
-DBUILD_GEOSOP=OFF
|
||||
-DBUILD_TESTING=OFF
|
||||
-DBUILD_BENCHMARKS=OFF
|
||||
${EXTRA_OPTIONS}
|
||||
)
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/GEOS)
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
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
|
||||
)
|
||||
if(NOT VCPKG_BUILD_TYPE)
|
||||
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")
|
||||
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")
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
||||
endif()
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
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)
|
||||
10
externals/vcpkg/ports/geos/usage
vendored
Executable file
10
externals/vcpkg/ports/geos/usage
vendored
Executable file
@@ -0,0 +1,10 @@
|
||||
The package geos provides CMake targets:
|
||||
|
||||
# C API (provides long-term ABI stability)
|
||||
find_package(GEOS CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE GEOS::geos_c)
|
||||
|
||||
# C++ API (will likely change across versions)
|
||||
find_package(GEOS CONFIG REQUIRED)
|
||||
target_link_libraries(main PRIVATE GEOS::geos)
|
||||
|
||||
17
externals/vcpkg/ports/geos/vcpkg.json
vendored
Executable file
17
externals/vcpkg/ports/geos/vcpkg.json
vendored
Executable file
@@ -0,0 +1,17 @@
|
||||
{
|
||||
"name": "geos",
|
||||
"version": "3.10.2",
|
||||
"description": "Geometry Engine Open Source",
|
||||
"homepage": "https://libgeos.org/",
|
||||
"license": "LGPL-2.1-only",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user