aboutsummaryrefslogtreecommitdiff
path: root/ports/geos
diff options
context:
space:
mode:
Diffstat (limited to 'ports/geos')
-rw-r--r--ports/geos/CONTROL2
-rw-r--r--ports/geos/dont-build-astyle.patch12
-rw-r--r--ports/geos/dont-build-docs.patch12
-rw-r--r--ports/geos/geos_c-static-support.patch114
-rw-r--r--ports/geos/portfile.cmake11
5 files changed, 32 insertions, 119 deletions
diff --git a/ports/geos/CONTROL b/ports/geos/CONTROL
index 356c93269..c5d99f6f6 100644
--- a/ports/geos/CONTROL
+++ b/ports/geos/CONTROL
@@ -1,4 +1,4 @@
Source: geos
-Version: 3.6.4
+Version: 3.8.1
Homepage: https://www.osgeo.org/projects/geos/
Description: Geometry Engine Open Source
diff --git a/ports/geos/dont-build-astyle.patch b/ports/geos/dont-build-astyle.patch
new file mode 100644
index 000000000..6d48cabfb
--- /dev/null
+++ b/ports/geos/dont-build-astyle.patch
@@ -0,0 +1,12 @@
+diff --git a/tools/CMakeLists.txt b/tools/CMakeLists.txt
+index 1f27b802..ecf836b4 100644
+--- a/tools/CMakeLists.txt
++++ b/tools/CMakeLists.txt
+@@ -21,7 +21,6 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/geos-config
+ PERMISSIONS
+ OWNER_READ OWNER_EXECUTE GROUP_READ GROUP_EXECUTE WORLD_READ WORLD_EXECUTE)
+
+-add_subdirectory(astyle)
+
+ # if(UNIX OR MINGW)
+
diff --git a/ports/geos/dont-build-docs.patch b/ports/geos/dont-build-docs.patch
new file mode 100644
index 000000000..fcd2742c8
--- /dev/null
+++ b/ports/geos/dont-build-docs.patch
@@ -0,0 +1,12 @@
+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
diff --git a/ports/geos/geos_c-static-support.patch b/ports/geos/geos_c-static-support.patch
deleted file mode 100644
index 8cc49520c..000000000
--- a/ports/geos/geos_c-static-support.patch
+++ /dev/null
@@ -1,114 +0,0 @@
-diff --git a/CMakeLists.txt b/CMakeLists.txt
-index e7d2451..f8cc1ba 100644
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -66,11 +66,7 @@ if(NOT MSVC)
- "Set to ON|OFF (default) to build GEOS with assert() macro enabled" OFF)
- endif()
-
--option(GEOS_BUILD_STATIC
-- "Set to OFF|ON (default) to build GEOS static libraries" ON)
--
--option(GEOS_BUILD_SHARED
-- "Set to OFF|ON (default) to build GEOS shared libraries" ON)
-+option(BUILD_SHARED_LIBS "Build GEOS as a shared library" ON)
-
- if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
- option(GEOS_ENABLE_FLOATSTORE
-diff --git a/capi/CMakeLists.txt b/capi/CMakeLists.txt
-index 0607b16..877d611 100644
---- a/capi/CMakeLists.txt
-+++ b/capi/CMakeLists.txt
-@@ -21,17 +21,25 @@ set(geos_c_SOURCES
-
- file(GLOB geos_capi_HEADERS ${CMAKE_BINARY_DIR}/capi/*.h) # fix source_group issue
-
--if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK AND GEOS_BUILD_SHARED)
-+if(NOT GEOS_ENABLE_MACOSX_FRAMEWORK)
- # if building OS X framework or only building static libs, CAPI built into C++ library)
-- add_library(geos_c SHARED ${geos_c_SOURCES})
-+ add_library(geos_c ${geos_c_SOURCES})
-
- target_link_libraries(geos_c geos)
-
- if (WIN32)
-- set_target_properties(geos_c
-- PROPERTIES
-- VERSION ${CAPI_VERSION}
-- CLEAN_DIRECT_OUTPUT 1)
-+ if(BUILD_SHARED_LIBS)
-+ set_target_properties(geos_c
-+ PROPERTIES
-+ VERSION ${CAPI_VERSION}
-+ CLEAN_DIRECT_OUTPUT 1)
-+ else()
-+ set_target_properties(geos_c
-+ PROPERTIES
-+ OUTPUT_NAME "geos_c"
-+ PREFIX "lib"
-+ CLEAN_DIRECT_OUTPUT 1)
-+ endif()
- else()
- set_target_properties(geos_c
- PROPERTIES
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 3894a56..f86d823 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -24,7 +24,7 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK)
- # also 1 binary, so include CAPI here
- # and, make name all caps
-
-- add_library(GEOS SHARED ${geos_SOURCES} ${geos_c_SOURCES})
-+ add_library(GEOS ${geos_SOURCES} ${geos_c_SOURCES})
-
- math(EXPR CVERSION "${VERSION_MAJOR} + 1")
- # VERSION = current version, SOVERSION = compatibility version
-@@ -62,38 +62,27 @@ if(GEOS_ENABLE_MACOSX_FRAMEWORK)
-
- else()
-
-- if(GEOS_BUILD_SHARED)
-- add_library(geos SHARED ${geos_SOURCES} ${geos_ALL_HEADERS})
-+ add_library(geos ${geos_SOURCES} ${geos_ALL_HEADERS})
-
-+ if(BUILD_SHARED_LIBS)
- set_target_properties(geos
- PROPERTIES
- DEFINE_SYMBOL GEOS_DLL_EXPORT
- VERSION ${VERSION}
- CLEAN_DIRECT_OUTPUT 1)
--
-- install(TARGETS geos
-- RUNTIME DESTINATION bin
-- LIBRARY DESTINATION lib
-- ARCHIVE DESTINATION lib)
-- endif()
--
-- if(GEOS_BUILD_STATIC)
-- file(GLOB geos_capi_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/../capi/*.h) # fix source_group issue
-- add_library(geos-static STATIC ${geos_SOURCES} ${geos_c_SOURCES} ${geos_ALL_HEADERS} ${geos_capi_HEADERS})
--
-- set_target_properties(geos-static
-+ else()
-+ set_target_properties(geos
- PROPERTIES
- OUTPUT_NAME "geos"
- PREFIX "lib"
- CLEAN_DIRECT_OUTPUT 1)
--
-- install(TARGETS geos-static
-- RUNTIME DESTINATION bin
-- LIBRARY DESTINATION lib
-- ARCHIVE DESTINATION lib)
--
- endif()
-
-+ install(TARGETS geos
-+ RUNTIME DESTINATION bin
-+ LIBRARY DESTINATION lib
-+ ARCHIVE DESTINATION lib)
-+
- endif() # (GEOS_ENABLE_MACOSX_FRAMEWORK)
-
- # if(APPLE)
diff --git a/ports/geos/portfile.cmake b/ports/geos/portfile.cmake
index 82a4e6276..d6b4e0830 100644
--- a/ports/geos/portfile.cmake
+++ b/ports/geos/portfile.cmake
@@ -1,15 +1,17 @@
-set(GEOS_VERSION 3.6.4)
+set(GEOS_VERSION 3.8.1)
vcpkg_download_distfile(ARCHIVE
URLS "http://download.osgeo.org/geos/geos-${GEOS_VERSION}.tar.bz2"
FILENAME "geos-${GEOS_VERSION}.tar.bz2"
- SHA512 860513d86ee1294814ff3b3240373ee3a9ce88be9508b45f61ccc982bb698d0a1916e9458c37853ce8d69a977db6f12483745859f86617d704a688cfeb83b1e9
+ SHA512 1d8d8b3ece70eb388ea128f4135c7455899f01828223b23890ad3a2401e27104efce03987676794273a9b9d4907c0add2be381ff14b8420aaa9a858cc5941056
)
vcpkg_extract_source_archive_ex(
OUT_SOURCE_PATH SOURCE_PATH
ARCHIVE ${ARCHIVE}
REF ${GEOS_VERSION}
- PATCHES geos_c-static-support.patch
+ PATCHES
+ dont-build-docs.patch
+ dont-build-astyle.patch
)
# NOTE: GEOS provides CMake as optional build configuration, it might not be actively
@@ -20,9 +22,10 @@ vcpkg_configure_cmake(
PREFER_NINJA
OPTIONS
-DCMAKE_DEBUG_POSTFIX=d
- -DGEOS_ENABLE_TESTS=False
+ -DBUILD_TESTING=OFF
)
vcpkg_install_cmake()
+vcpkg_fixup_cmake_targets(CONFIG_PATH lib/cmake/GEOS)
if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)