From 5d913f0acba6ec80ff29aed8f2003a2caf42c313 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Thu, 16 Jan 2025 09:36:39 +0000 Subject: [PATCH 1/4] [libgit2] Update version to 1.9.0 --- ports/libgit2/c-standard.diff | 33 ++++++------------- ports/libgit2/fix-arm64-windows.patch | 17 ---------- ports/libgit2/portfile.cmake | 13 ++------ ports/libgit2/unofficial-config-export.diff | 21 ------------ ports/libgit2/unofficial-git2-config.cmake | 6 ---- ports/libgit2/unofficial-libgit2-config.cmake | 3 -- ports/libgit2/usage | 11 ------- ports/libgit2/vcpkg.json | 3 +- 8 files changed, 14 insertions(+), 93 deletions(-) delete mode 100644 ports/libgit2/fix-arm64-windows.patch delete mode 100644 ports/libgit2/unofficial-config-export.diff delete mode 100644 ports/libgit2/unofficial-git2-config.cmake delete mode 100644 ports/libgit2/unofficial-libgit2-config.cmake delete mode 100644 ports/libgit2/usage diff --git a/ports/libgit2/c-standard.diff b/ports/libgit2/c-standard.diff index 8775f77243f0bb..94792d608c4705 100644 --- a/ports/libgit2/c-standard.diff +++ b/ports/libgit2/c-standard.diff @@ -1,26 +1,13 @@ diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt -index c2a97e1..8c5b2ea 100644 +index a7d3c7c..2a7f111 100644 --- a/src/libgit2/CMakeLists.txt +++ b/src/libgit2/CMakeLists.txt -@@ -2,7 +2,7 @@ - # git library functionality. - - add_library(libgit2 OBJECT) --set_target_properties(libgit2 PROPERTIES C_STANDARD 90) -+set_target_properties(libgit2 PROPERTIES C_STANDARD 99) - set_target_properties(libgit2 PROPERTIES C_EXTENSIONS OFF) - - include(PkgBuildConfig) -diff --git a/src/util/CMakeLists.txt b/src/util/CMakeLists.txt -index ee35eb9..158fac2 100644 ---- a/src/util/CMakeLists.txt -+++ b/src/util/CMakeLists.txt -@@ -1,7 +1,7 @@ - # util: a shared library for common utility functions for libgit2 projects - - add_library(util OBJECT) --set_target_properties(util PROPERTIES C_STANDARD 90) -+set_target_properties(util PROPERTIES C_STANDARD 99) - set_target_properties(util PROPERTIES C_EXTENSIONS OFF) - - configure_file(git2_features.h.in git2_features.h) +@@ -60,7 +60,7 @@ target_link_libraries(libgit2package ${LIBGIT2_SYSTEM_LIBS}) + target_include_directories(libgit2package SYSTEM PRIVATE ${LIBGIT2_INCLUDES}) + target_include_directories(libgit2package INTERFACE $) + +-set_target_properties(libgit2package PROPERTIES C_STANDARD 90) ++set_target_properties(libgit2package PROPERTIES C_STANDARD 99) + set_target_properties(libgit2package PROPERTIES C_EXTENSIONS OFF) + set_target_properties(libgit2package PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) + set_target_properties(libgit2package PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) diff --git a/ports/libgit2/fix-arm64-windows.patch b/ports/libgit2/fix-arm64-windows.patch deleted file mode 100644 index 65d8ad393f1ee7..00000000000000 --- a/ports/libgit2/fix-arm64-windows.patch +++ /dev/null @@ -1,17 +0,0 @@ -diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt -index f2a9943..3ce01b7 100644 ---- a/src/libgit2/CMakeLists.txt -+++ b/src/libgit2/CMakeLists.txt -@@ -65,12 +65,6 @@ set_target_properties(libgit2package PROPERTIES LIBRARY_OUTPUT_DIRECTORY ${PROJE - set_target_properties(libgit2package PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) - set_target_properties(libgit2package PROPERTIES ARCHIVE_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}) - --# Workaround for Cmake bug #0011240 (see http://public.kitware.com/Bug/view.php?id=11240) --# Win64+MSVC+static libs = linker error --if(MSVC AND GIT_ARCH_64 AND NOT BUILD_SHARED_LIBS) -- set_target_properties(libgit2package PROPERTIES STATIC_LIBRARY_FLAGS "/MACHINE:x64") --endif() -- - ide_split_sources(libgit2package) - - if(SONAME) diff --git a/ports/libgit2/portfile.cmake b/ports/libgit2/portfile.cmake index fe6fc836ab6775..4eed0eef157558 100644 --- a/ports/libgit2/portfile.cmake +++ b/ports/libgit2/portfile.cmake @@ -1,16 +1,14 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libgit2/libgit2 - REF v1.8.0 - SHA512 e5634267bd9c6a594c9a954d09c657e7b8aadf213609bf7dd83b99863d0d0c7109a5277617dd508abc2da54ea3f12c2af1908d1aeb73c000e94056e2f3653144 + REF v1.9.0 + SHA512 38547ace676b933a3146c2a00405fc6815063a7af923b9f2c09c536ec717be77d19c513b383939054913ce617d7917c100a5cbd3378d101fcdb5eacd1d14f687 HEAD_REF main PATCHES c-standard.diff # for 'inline' in system headers cli-include-dirs.diff dependencies.diff mingw-winhttp.diff - unofficial-config-export.diff - fix-arm64-windows.patch ) file(REMOVE_RECURSE "${SOURCE_PATH}/cmake/FindPCRE.cmake" @@ -95,10 +93,7 @@ vcpkg_cmake_configure( vcpkg_cmake_install() vcpkg_fixup_pkgconfig() - -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-git2-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-git2") -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/unofficial-libgit2-config.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/unofficial-libgit2") -vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libgit2 CONFIG_PATH share/unofficial-libgit2) +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") if("tools" IN_LIST FEATURES) vcpkg_copy_tools(TOOL_NAMES git2 AUTO_CLEAN) @@ -106,8 +101,6 @@ endif() file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") - set(file_list "${SOURCE_PATH}/COPYING") if(NOT VCPKG_TARGET_IS_WINDOWS) file(WRITE "${CURRENT_BUILDTREES_DIR}/Notice for ntlmclient" [[ diff --git a/ports/libgit2/unofficial-config-export.diff b/ports/libgit2/unofficial-config-export.diff deleted file mode 100644 index 084c83903755ae..00000000000000 --- a/ports/libgit2/unofficial-config-export.diff +++ /dev/null @@ -1,21 +0,0 @@ -diff --git a/src/libgit2/CMakeLists.txt b/src/libgit2/CMakeLists.txt -index dcb4279..20acdc8 100644 ---- a/src/libgit2/CMakeLists.txt -+++ b/src/libgit2/CMakeLists.txt -@@ -128,10 +128,16 @@ FILE(WRITE "${PROJECT_BINARY_DIR}/include/${LIBGIT2_FILENAME}.h" ${LIBGIT2_INCLU - - # Install - -+target_include_directories(libgit2package SYSTEM PUBLIC $) - install(TARGETS libgit2package -+ EXPORT unofficial-libgit2-targets - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} - ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) -+install(EXPORT unofficial-libgit2-targets -+ NAMESPACE unofficial::libgit2:: -+ DESTINATION share/unofficial-libgit2 -+) - 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/ports/libgit2/unofficial-git2-config.cmake b/ports/libgit2/unofficial-git2-config.cmake deleted file mode 100644 index 9f407fcc2adbc5..00000000000000 --- a/ports/libgit2/unofficial-git2-config.cmake +++ /dev/null @@ -1,6 +0,0 @@ -file(READ "${CMAKE_CURRENT_LIST_DIR}/../unofficial-libgit2/usage" usage) -message(WARNING "find_package(unofficial-git2) is deprecated.\n${usage}") -include(CMakeFindDependencyMacro) -find_dependency(unofficial-libgit2 CONFIG) -add_library(unofficial::git2::libgit2package INTERFACE IMPORTED) -set_target_properties(unofficial::git2::libgit2package PROPERTIES INTERFACE_LINK_LIBRARIES unofficial::libgit2::libgit2package) diff --git a/ports/libgit2/unofficial-libgit2-config.cmake b/ports/libgit2/unofficial-libgit2-config.cmake deleted file mode 100644 index 01ebca678ed6cf..00000000000000 --- a/ports/libgit2/unofficial-libgit2-config.cmake +++ /dev/null @@ -1,3 +0,0 @@ -include("${CMAKE_CURRENT_LIST_DIR}/unofficial-libgit2-targets.cmake") -add_library(unofficial::libgit2::libgit2 INTERFACE IMPORTED) -set_target_properties(unofficial::libgit2::libgit2 PROPERTIES INTERFACE_LINK_LIBRARIES unofficial::libgit2::libgit2package) diff --git a/ports/libgit2/usage b/ports/libgit2/usage deleted file mode 100644 index 8ed1d2efabe2d3..00000000000000 --- a/ports/libgit2/usage +++ /dev/null @@ -1,11 +0,0 @@ -libgit2 can be imported via CMake FindPkgConfig module: - - find_package(PkgConfig REQUIRED) - pkg_check_modules(LIBGIT2 REQUIRED IMPORTED_TARGET libgit2) - target_link_libraries(main PRIVATE PkgConfig::LIBGIT2) - -vcpkg provides proprietary CMake targets: - - find_package(unofficial-libgit2 CONFIG REQUIRED) - target_link_libraries(main PRIVATE unofficial::libgit2::libgit2) - diff --git a/ports/libgit2/vcpkg.json b/ports/libgit2/vcpkg.json index ccaea6853cf884..d4b8b7ef04d8ac 100644 --- a/ports/libgit2/vcpkg.json +++ b/ports/libgit2/vcpkg.json @@ -1,7 +1,6 @@ { "name": "libgit2", - "version-semver": "1.8.0", - "port-version": 1, + "version-semver": "1.9.0", "description": "A C library implementing the Git core methods with a solid API", "homepage": "https://github.com/libgit2/libgit2", "license": null, From 54de3aec07082b7dcc5d7877c5f85da853c1afef Mon Sep 17 00:00:00 2001 From: FrankXie Date: Thu, 16 Jan 2025 09:36:55 +0000 Subject: [PATCH 2/4] version --- versions/baseline.json | 4 ++-- versions/l-/libgit2.json | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/versions/baseline.json b/versions/baseline.json index 47c49ec07a1126..3413d1baf3d507 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4593,8 +4593,8 @@ "port-version": 0 }, "libgit2": { - "baseline": "1.8.0", - "port-version": 1 + "baseline": "1.9.0", + "port-version": 0 }, "libgme": { "baseline": "0.6.3", diff --git a/versions/l-/libgit2.json b/versions/l-/libgit2.json index e910d4158fe611..c0bbcb036de9b4 100644 --- a/versions/l-/libgit2.json +++ b/versions/l-/libgit2.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "89e28d2512c72f85ba3fc430b741feea38d12b99", + "version-semver": "1.9.0", + "port-version": 0 + }, { "git-tree": "2584fc140e3c1406fe30f6ad62973df7cc8c573c", "version-semver": "1.8.0", From 59843037cafa65a51b24fed0c4f2c048fe824a8a Mon Sep 17 00:00:00 2001 From: FrankXie Date: Fri, 17 Jan 2025 02:25:54 +0000 Subject: [PATCH 3/4] $VERSION --- ports/libgit2/portfile.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ports/libgit2/portfile.cmake b/ports/libgit2/portfile.cmake index 4eed0eef157558..ceffef23cc422e 100644 --- a/ports/libgit2/portfile.cmake +++ b/ports/libgit2/portfile.cmake @@ -1,7 +1,7 @@ vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO libgit2/libgit2 - REF v1.9.0 + REF "v${VERSION}" SHA512 38547ace676b933a3146c2a00405fc6815063a7af923b9f2c09c536ec717be77d19c513b383939054913ce617d7917c100a5cbd3378d101fcdb5eacd1d14f687 HEAD_REF main PATCHES From 896b9e27699aab43faf33d76b672c93a29f83559 Mon Sep 17 00:00:00 2001 From: FrankXie Date: Fri, 17 Jan 2025 02:26:21 +0000 Subject: [PATCH 4/4] version --- versions/l-/libgit2.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/versions/l-/libgit2.json b/versions/l-/libgit2.json index c0bbcb036de9b4..c454be44b50e94 100644 --- a/versions/l-/libgit2.json +++ b/versions/l-/libgit2.json @@ -1,7 +1,7 @@ { "versions": [ { - "git-tree": "89e28d2512c72f85ba3fc430b741feea38d12b99", + "git-tree": "102403456a0c59d10e9949dc2513b9176d6f02d2", "version-semver": "1.9.0", "port-version": 0 },