Skip to content

Commit

Permalink
libgit2: backport a feature for nix
Browse files Browse the repository at this point in the history
  • Loading branch information
lazka committed Nov 11, 2024
1 parent a65c50b commit 51ec486
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions mingw-w64-libgit2/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
"${MINGW_PACKAGE_PREFIX}-${_realname}-winhttp")
pkgver=1.8.4
pkgrel=1
pkgrel=2
pkgdesc='A linkable library for Git (mingw-w64)'
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -30,18 +30,25 @@ makedepends=(
)
source=("${msys2_repository_url}/archive/v${pkgver}/${_realname}-${pkgver}.tar.gz"
"0001-libgit2-1.4.2-rc-filename.patch"
"0003-libgit2-cmake-fix-pkgconfig.patch")
"0003-libgit2-cmake-fix-pkgconfig.patch"
"https://github.com/libgit2/libgit2/commit/9ddd72f22a1c02938dcfb60981b7b8856e63be9a.patch")
noextract=(${_realname}-${pkgver}.tar.gz)
sha256sums=('49d0fc50ab931816f6bfc1ac68f8d74b760450eebdb5374e803ee36550f26774'
'1a217eddf7daa549b12ccf88e275782ac7a7fa385d5afb59aac0351ee5b97a44'
'0d7cff6db9a7d3f0ed63540a3a91365afeb43217787b0db8519c34fe73bc9757')
'0d7cff6db9a7d3f0ed63540a3a91365afeb43217787b0db8519c34fe73bc9757'
'c0bfa0742cedcdec5b8d65c49b106d817bdfdd55097cda003d08d9e69d5cb48f')

prepare() {
tar --exclude tests/resources/testrepo-worktree/link_to_new.txt -zxf ${_realname}-${pkgver}.tar.gz
cd ${_realname}-${pkgver}

patch -Np1 -i "${srcdir}/0001-libgit2-1.4.2-rc-filename.patch"
patch -Np1 -i "${srcdir}/0003-libgit2-cmake-fix-pkgconfig.patch"

# Backport for nix: https://github.com/msys2/MINGW-packages/issues/22459
# https://github.com/libgit2/libgit2/pull/6875
# Adds ABI, so make sure to check on the next update if rebuilds are needed
patch -Np1 -i "${srcdir}/9ddd72f22a1c02938dcfb60981b7b8856e63be9a.patch"
}

do_build() {
Expand Down

0 comments on commit 51ec486

Please sign in to comment.