2016-10-17 08:22:00 +08:00
|
|
|
vcpkg_download_distfile(ARCHIVE
|
2022-11-23 04:20:12 +08:00
|
|
|
URLS "https://download.osgeo.org/geos/geos-${VERSION}.tar.bz2"
|
|
|
|
FILENAME "geos-${VERSION}.tar.bz2"
|
2024-10-08 03:12:03 +08:00
|
|
|
SHA512 8ffaa3f49a8365db693ac948e9d66cf55321eb12151734c7da2775070b7804ffa607de2474b7019d6ea2a99d5e037fb1e8561bf9025e65ddd4bd1ba049382b28
|
2016-10-17 08:22:00 +08:00
|
|
|
)
|
2024-10-24 10:39:29 +08:00
|
|
|
vcpkg_download_distfile(msvc_2017_patch
|
|
|
|
URLS https://github.com/libgeos/geos/commit/46e9f158073ebf0d4ec8b7dde37c155d097bc0d7.diff?full_index=1
|
|
|
|
SHA512 9fa1ccc4c66e8268c59bcac218015c2b10ee594bece837e6d0fc78fe700233abd1b2df7aa396c00786ffb170fbfbb0ab530f5007ba10376a2366ee3472d8b02a
|
|
|
|
FILENAME geos-${VERSION}-msvc-2017.diff
|
|
|
|
)
|
2022-11-23 04:20:12 +08:00
|
|
|
vcpkg_extract_source_archive(SOURCE_PATH
|
2021-05-27 04:29:02 +08:00
|
|
|
ARCHIVE "${ARCHIVE}"
|
2022-11-23 04:20:12 +08:00
|
|
|
SOURCE_BASE "v${VERSION}"
|
2020-09-01 08:45:58 +08:00
|
|
|
PATCHES
|
2021-11-10 02:10:08 +08:00
|
|
|
fix-exported-config.patch
|
2024-10-24 10:39:29 +08:00
|
|
|
"${msvc_2017_patch}"
|
2017-10-04 02:37:23 +08:00
|
|
|
)
|
2016-10-17 08:22:00 +08:00
|
|
|
|
2021-05-27 04:29:02 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-05-01 16:14:18 +08:00
|
|
|
OPTIONS
|
2021-11-10 02:10:08 +08:00
|
|
|
-DBUILD_ASTYLE=OFF
|
|
|
|
-DBUILD_DOCUMENTATION=OFF
|
|
|
|
-DBUILD_GEOSOP=OFF
|
2020-09-01 08:45:58 +08:00
|
|
|
-DBUILD_TESTING=OFF
|
2021-05-27 04:29:02 +08:00
|
|
|
-DBUILD_BENCHMARKS=OFF
|
2016-10-17 08:22:00 +08:00
|
|
|
)
|
2021-05-27 04:29:02 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/GEOS)
|
|
|
|
vcpkg_fixup_pkgconfig()
|
2018-10-16 09:56:14 +08:00
|
|
|
|
2022-04-26 08:17:07 +08:00
|
|
|
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)
|
2021-11-10 02:10:08 +08:00
|
|
|
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()
|
2018-12-13 20:06:27 +08:00
|
|
|
endif()
|
|
|
|
|
2021-05-27 04:29:02 +08:00
|
|
|
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")
|
2016-11-01 03:34:04 +08:00
|
|
|
endif()
|
|
|
|
|
2017-10-04 20:36:30 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-04-26 08:17:07 +08:00
|
|
|
|
2021-05-27 04:29:02 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2024-08-01 03:29:24 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|