Skip to content

Commit

Permalink
Merge pull request #868 from koordinates/upgrade-libgit2
Browse files Browse the repository at this point in the history
Update libgit2 to v1.6.4 plus kx changes,
  • Loading branch information
olsen232 committed Jun 13, 2023
2 parents 4fbaba8 + 10ddebb commit 037d2bf
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions vcpkg-vendor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 "<SOURCE_DIR>/build"
CONFIGURE_COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/pygit2-prefix/setup.cfg
Expand Down
24 changes: 12 additions & 12 deletions vcpkg-vendor/vcpkg-overlay-ports/libgit2/fix-configcmake.patch
Original file line number Diff line number Diff line change
Expand Up @@ -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::
Expand All @@ -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
4 changes: 2 additions & 2 deletions vcpkg-vendor/vcpkg-overlay-ports/libgit2/portfile.cmake
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 037d2bf

Please sign in to comment.