From 10ddebb5ed62a681a10292935315de16325e7606 Mon Sep 17 00:00:00 2001 From: Andrew Olsen Date: Tue, 13 Jun 2023 14:37:43 +1200 Subject: [PATCH] Update libgit2 to v1.6.4 plus kx changes, and pygit2 to v1.12.1 plus kx changes. --- CHANGELOG.md | 1 + vcpkg-vendor/CMakeLists.txt | 6 ++--- .../libgit2/fix-configcmake.patch | 24 +++++++++---------- .../libgit2/portfile.cmake | 4 ++-- 4 files changed, 18 insertions(+), 17 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a0d360245..7635b783e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ _When adding new entries to the changelog, please include issue/PR numbers where - `import` now informs the user to use `add-dataset` instead if they try to import a table that is already inside the working copy. [#249](https://github.com/koordinates/kart/issues/249) - Fixes a bug where datasets with no CRS couldn't be checked out into a Geopackage working copy. [#855](https://github.com/koordinates/kart/issues/855) - Fixes a bad data-loss bug where whole-number numerics read from a Postgres database were losing trailing zeroes (eg 100 was read as 1). [#863](https://github.com/koordinates/kart/issues/863) +- Upgrade libgit2 to v1.6.4, pygit2 to v1.12.1 (plus Kart-specific changes). [#868](https://github.com/koordinates/kart/pull/868) ## 0.12.3 diff --git a/vcpkg-vendor/CMakeLists.txt b/vcpkg-vendor/CMakeLists.txt index cf69934ef..becb9705e 100644 --- a/vcpkg-vendor/CMakeLists.txt +++ b/vcpkg-vendor/CMakeLists.txt @@ -257,14 +257,14 @@ include_dirs=${BUILD_WHEEL_INCLUDE_DIRS} library_dirs=${BUILD_WHEEL_LIBRARY_DIRS} ") -set(PYGIT2_WHEEL_VER 1.9.0) +set(PYGIT2_WHEEL_VER 1.12.1) ExternalProject_Add( pygit2 GIT_REPOSITORY https://github.com/koordinates/pygit2.git - GIT_TAG kart-v0.11.1 + GIT_TAG kart-pygit-v1.12.1 GIT_SHALLOW ON BUILD_IN_SOURCE ON - DEPENDS wheelBuildEnv unofficial::git2::git2 + DEPENDS wheelBuildEnv unofficial::git2::libgit2package EXCLUDE_FROM_ALL ON BUILD_BYPRODUCTS "/build" CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/pygit2-prefix/setup.cfg diff --git a/vcpkg-vendor/vcpkg-overlay-ports/libgit2/fix-configcmake.patch b/vcpkg-vendor/vcpkg-overlay-ports/libgit2/fix-configcmake.patch index 1cc67d897..88f036f1d 100644 --- a/vcpkg-vendor/vcpkg-overlay-ports/libgit2/fix-configcmake.patch +++ b/vcpkg-vendor/vcpkg-overlay-ports/libgit2/fix-configcmake.patch @@ -19,20 +19,19 @@ index 2a3a91b8c..cbb409350 100644 list(APPEND LIBGIT2_PC_REQUIRES "libpcre") elseif(REGEX_BACKEND STREQUAL "regcomp") add_feature_info(regex ON "using system regcomp") -diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt -index e7b54d036..6b549deef 100644 ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -298,10 +298,28 @@ if(MSVC_IDE) - endif() +diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt +index dcb4279c1..9ed2cae51 100644 +--- a/src/libgit2/CMakeLists.txt ++++ b/src/libgit2/CMakeLists.txt +@@ -128,10 +128,28 @@ FILE(WRITE "${PROJECT_BINARY_DIR}/include/${LIBGIT2_FILENAME}.h" ${LIBGIT2_INCLU # Install --install(TARGETS git2 -+install(TARGETS git2 EXPORT unofficial-git2Targets + +-install(TARGETS libgit2package ++install(TARGETS libgit2package EXPORT unofficial-git2Targets RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} - ) + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) + +install(EXPORT unofficial-git2Targets + NAMESPACE unofficial::git2:: @@ -51,5 +50,6 @@ index e7b54d036..6b549deef 100644 +configure_file("${CMAKE_CURRENT_BINARY_DIR}/unofficial-git2-config.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/unofficial-git2-config.cmake" @ONLY) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/unofficial-git2-config.cmake DESTINATION share/unofficial-git2) + - install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/git2 DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) - install(FILES ${PROJECT_SOURCE_DIR}/include/git2.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) + install(DIRECTORY ${PROJECT_SOURCE_DIR}/include/git2/ + DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}/${LIBGIT2_FILENAME}") + install(FILES ${PROJECT_BINARY_DIR}/include/git2/experimental.h diff --git a/vcpkg-vendor/vcpkg-overlay-ports/libgit2/portfile.cmake b/vcpkg-vendor/vcpkg-overlay-ports/libgit2/portfile.cmake index d980868e3..3ad78317a 100644 --- a/vcpkg-vendor/vcpkg-overlay-ports/libgit2/portfile.cmake +++ b/vcpkg-vendor/vcpkg-overlay-ports/libgit2/portfile.cmake @@ -1,8 +1,8 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO koordinates/libgit2 - REF kart-v0.11.1 - SHA512 14c95cf82e13b4909c116d31d08f7f12ca3f6a07e7437d017c81ed50b7e6297f3c9bac2fcc4dc950c2ddef7fb6c7ab286bca23725c56abd1f1419e9d5e8a1c4f + REF kart-libgit-v1.6.4 + SHA512 0de7c2e0efe04d94f8116133bd167f641c51499c94e9b5a601309ab8045b276832347b7cdc75152b4f5c110c0c0c29224134e5aff32267d7a78595b4d2b5dd90 HEAD_REF kx-latest PATCHES fix-configcmake.patch