From 92d6aa26116057188df71774ba87febf8e758a9f Mon Sep 17 00:00:00 2001 From: Jeroen Ooms Date: Fri, 5 Sep 2025 20:28:42 +0200 Subject: [PATCH] Windows: update to libgit2 1.9.1 --- NEWS | 3 +++ src/Makevars.win | 6 +++++- tools/winlibs.R | 6 +++--- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index 95338c80..d1fbd731 100644 --- a/NEWS +++ b/NEWS @@ -1,3 +1,6 @@ +2.2.0 + - Windows: update to libgit2 1.9.1 + 2.1.4 - Fix for libgit2 1.8.2 reverting their API change from 1.8.0 - New parameter 'force' in git_branch_create() see #239 diff --git a/src/Makevars.win b/src/Makevars.win index 9c7729a5..6c86060e 100644 --- a/src/Makevars.win +++ b/src/Makevars.win @@ -1,13 +1,17 @@ RWINLIB = ../.deps/libgit2 TARGET = lib$(subst gcc,,$(COMPILED_BY))$(R_ARCH) +ifneq ($(R_COMPILED_BY),gcc 8.3.0) +PCRE=-lpcre2-8 +endif + PKG_CPPFLAGS = -I$(RWINLIB)/include \ -DR_NO_REMAP -DSTRICT_R_HEADERS PKG_LIBS = \ -L$(RWINLIB)/$(TARGET) \ -L$(RWINLIB)/lib \ - -lgit2 -lssh2 -lssl -lcrypto -lz -liconv \ + -lgit2 -lssh2 -lssl -lcrypto $(PCRE) -lz -liconv \ -lwinhttp -lws2_32 -lcrypt32 -lole32 -lrpcrt4 -lsecur32 all: $(SHLIB) cleanup diff --git a/tools/winlibs.R b/tools/winlibs.R index 35f7c0df..fe924020 100644 --- a/tools/winlibs.R +++ b/tools/winlibs.R @@ -1,11 +1,11 @@ if(!file.exists('clone.o') && !file.exists("../.deps/libgit2/include/git2.h")){ unlink("../.deps", recursive = TRUE) url <- if(grepl("aarch", R.version$platform)){ - "https://github.com/r-windows/bundles/releases/download/libgit2-1.7.2/libgit2-1.7.2-clang-aarch64.tar.xz" + "https://github.com/r-windows/bundles/releases/download/libgit2-1.9.1/libgit2-1.9.1-clang-aarch64.tar.xz" } else if(grepl("clang", Sys.getenv('R_COMPILED_BY'))){ - "https://github.com/r-windows/bundles/releases/download/libgit2-1.7.2/libgit2-1.7.2-clang-x86_64.tar.xz" + "https://github.com/r-windows/bundles/releases/download/libgit2-1.9.1/libgit2-1.9.1-clang-x86_64.tar.xz" } else if(getRversion() >= "4.2") { - "https://github.com/r-windows/bundles/releases/download/libgit2-1.7.2/libgit2-1.7.2-ucrt-x86_64.tar.xz" + "https://github.com/r-windows/bundles/releases/download/libgit2-1.9.1/libgit2-1.9.1-ucrt-x86_64.tar.xz" } else { "https://github.com/rwinlib/libgit2/archive/v1.7.1.tar.gz" }