I made a little attempt to update libgit2 based on what MSYS2 did, since
it is apparently needed for cargo (and it seems like it's getting close to
possible to build cargo for Cygwin). Unfortunately, it failed to build in
scallywag:
https://github.com/cygwin/scallywag/actions/runs/15219165082/job/42811502993
Also, there are some test failures for me locally.
I'm not entirely sure I got things right in the cygport either. I pushed
to playground and attach the file here.
I don't necessarily want to adopt the package, but I would like to see it
updated so that we'll hopefully be ready once rust/cargo are.
inherit cmake
NAME="libgit2"
VERSION=1.9.0
RELEASE=1
CATEGORY="Libs"
SUMMARY="Git C library"
DESCRIPTION="libgit2 is a portable, pure C implementation of the Git core
methods provided as a re-entrant linkable library with a solid API, allowing
you to write native speed custom Git applications in any language which
supports C bindings."
HOMEPAGE="https://libgit2.org/"
LICENSE="LicenseRef-Callaway-GPLv2-with-exceptions"
SRC_URI="https://github.com/libgit2/libgit2/archive/v${VERSION}/libgit2-${VERSION}.tar.gz"
SRC_DIR="libgit2-${VERSION}"
PATCH_URI="https://raw.githubusercontent.com/msys2/MSYS2-packages/135c44822061034265d1b9d209a5f80ef1e32477/libgit2/0001-missing-alloca.patch"
BUILD_REQUIRES="libpcre2-devel libssh2-devel libssl-devel zlib-devel"
CYGCMAKE_ARGS="-DUSE_SSH=ON -DUSE_ICONV=ON -DREGEX_BACKEND=pcre2"
src_test() {
cd ${B}
ctest -V
}
PKG_NAMES="libgit2_1_9 libgit2-devel"
libgit2_1_9_CONTENTS="usr/bin/git2.exe usr/bin/cyggit2-1.9.dll usr/share/doc/"
libgit2_devel_CONTENTS="usr/include/git2* usr/lib/cmake/libgit2/
usr/lib/libgit2.dll.a usr/lib/pkgconfig/libgit2.pc"
DIFF_EXCLUDES=".clarcache clar.suite"