From 247dbb16e91b3cb5e37cdc049f68b96605acff14 Mon Sep 17 00:00:00 2001 From: Maksim Bondarenkov <119937608+ognevny@users.noreply.github.com> Date: Tue, 12 Nov 2024 08:32:58 +0300 Subject: [PATCH] rebuild rust-based packages for libgit2 update --- mingw-w64-bat/.gitignore | 1 + mingw-w64-bat/PKGBUILD | 15 ++++++---- mingw-w64-bat/update-git2-crate.patch | 41 +++++++++++++++++++++++++++ mingw-w64-cargo-c/PKGBUILD | 9 +++--- mingw-w64-eza/PKGBUILD | 7 +++-- mingw-w64-gitui/.gitignore | 1 + mingw-w64-gitui/PKGBUILD | 20 +++++++------ mingw-w64-jj/PKGBUILD | 6 ++-- mingw-w64-zed/PKGBUILD | 6 ++-- 9 files changed, 77 insertions(+), 29 deletions(-) create mode 100644 mingw-w64-bat/.gitignore create mode 100644 mingw-w64-bat/update-git2-crate.patch create mode 100644 mingw-w64-gitui/.gitignore diff --git a/mingw-w64-bat/.gitignore b/mingw-w64-bat/.gitignore new file mode 100644 index 0000000000000..55b7f3ebfbe21 --- /dev/null +++ b/mingw-w64-bat/.gitignore @@ -0,0 +1 @@ +/bat diff --git a/mingw-w64-bat/PKGBUILD b/mingw-w64-bat/PKGBUILD index 2f931aac64f04..038dbb06afc93 100644 --- a/mingw-w64-bat/PKGBUILD +++ b/mingw-w64-bat/PKGBUILD @@ -4,7 +4,7 @@ _realname=bat pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.24.0 -pkgrel=5 +pkgrel=6 pkgdesc="Cat clone with syntax highlighting and git integration (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') @@ -18,6 +18,7 @@ license=('spdx:MIT OR Apache-2.0') depends=( "${MINGW_PACKAGE_PREFIX}-oniguruma" "${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-libgit2" ) makedepends=( "${MINGW_PACKAGE_PREFIX}-rust" @@ -25,12 +26,16 @@ makedepends=( 'git' ) options=('!strip' '!lto') -source=("git+${url}.git#tag=v${pkgver}") -sha256sums=('ccfd1400fba47dbdd839c378fc59b978573b2d651c0b12a8f6b053843ae1012b') +source=("git+${url}.git#tag=v${pkgver}" + "update-git2-crate.patch") +sha256sums=('ccfd1400fba47dbdd839c378fc59b978573b2d651c0b12a8f6b053843ae1012b' + 'a5daacba88dbe1a327dbd1b6a14c0bf8839279473a8b8dd03bf3fb059ae8844d') prepare() { cd "${_realname}" + # bump git2 crate for libgit2 1.8+ support + git apply ../update-git2-crate.patch # update windows-targets to fix windows-gnullvm dependency specification cargo update -p windows-targets@0.48.0 --precise 0.48.1 @@ -40,9 +45,7 @@ prepare() { build() { cd "${_realname}" - # Not compatible with libgit2 1.8+ - # export LIBGIT2_NO_VENDOR=1 - + LIBGIT2_NO_VENDOR=1 \ RUSTONIG_DYNAMIC_LIBONIG=1 \ cargo build --release --frozen } diff --git a/mingw-w64-bat/update-git2-crate.patch b/mingw-w64-bat/update-git2-crate.patch new file mode 100644 index 0000000000000..3bfed477fa752 --- /dev/null +++ b/mingw-w64-bat/update-git2-crate.patch @@ -0,0 +1,41 @@ +diff --git a/Cargo.lock b/Cargo.lock +index d51c98a4..90367a0f 100644 +--- a/Cargo.lock ++++ b/Cargo.lock +@@ -523,9 +523,9 @@ dependencies = [ + + [[package]] + name = "git2" +-version = "0.18.0" ++version = "0.19.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "12ef350ba88a33b4d524b1d1c79096c9ade5ef8c59395df0e60d1e1889414c0e" ++checksum = "b903b73e45dc0c6c596f2d37eccece7c1c8bb6e4407b001096387c63d0d93724" + dependencies = [ + "bitflags 2.4.0", + "libc", +@@ -658,9 +658,9 @@ checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" + + [[package]] + name = "libgit2-sys" +-version = "0.16.1+1.7.1" ++version = "0.17.0+1.8.1" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "f2a2bb3680b094add03bb3732ec520ece34da31a8cd2d633d1389d0f0fb60d0c" ++checksum = "10472326a8a6477c3c20a64547b0059e4b0d086869eee31e6d7da728a8eb7224" + dependencies = [ + "cc", + "libc", +diff --git a/Cargo.toml b/Cargo.toml +index e31fbc31..5fb32c82 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -69,7 +69,7 @@ os_str_bytes = { version = "~6.4", optional = true } + run_script = { version = "^0.10.0", optional = true} + + [dependencies.git2] +-version = "0.18" ++version = "0.19" + optional = true + default-features = false + diff --git a/mingw-w64-cargo-c/PKGBUILD b/mingw-w64-cargo-c/PKGBUILD index 4a0d56a71e30e..65718c35cd017 100644 --- a/mingw-w64-cargo-c/PKGBUILD +++ b/mingw-w64-cargo-c/PKGBUILD @@ -4,7 +4,7 @@ _realname=cargo-c pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.10.5 -pkgrel=1 +pkgrel=2 pkgdesc='A cargo subcommand to build and install C-ABI compatibile dynamic and static libraries (mingw-w64)' arch=('any') mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64') @@ -15,8 +15,8 @@ msys2_references=( ) license=('spdx:MIT') depends=("${MINGW_PACKAGE_PREFIX}-sqlite3" - "${MINGW_PACKAGE_PREFIX}-libssh2") - #"${MINGW_PACKAGE_PREFIX}-libgit2") uncomment after `git2` will be updated + "${MINGW_PACKAGE_PREFIX}-libssh2" + "${MINGW_PACKAGE_PREFIX}-libgit2") makedepends=("${MINGW_PACKAGE_PREFIX}-rust" "${MINGW_PACKAGE_PREFIX}-pkgconf" "${MINGW_PACKAGE_PREFIX}-openssl") @@ -34,12 +34,11 @@ prepare() { patch -p1 -i "${srcdir}"/001-add-lib-prefix-on-windows-gnu.patch - # cargo update -p git2 --precise 0.19.0 cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } _env() { - # export LIBGIT2_NO_VENDOR=1 + export LIBGIT2_NO_VENDOR=1 export OPENSSL_NO_VENDOR=1 export LIBSSH2_SYS_USE_PKG_CONFIG=1 export LIBSQLITE3_SYS_USE_PKG_CONFIG=1 diff --git a/mingw-w64-eza/PKGBUILD b/mingw-w64-eza/PKGBUILD index c57db259f238f..d14a1781c5e43 100644 --- a/mingw-w64-eza/PKGBUILD +++ b/mingw-w64-eza/PKGBUILD @@ -4,14 +4,15 @@ _realname=eza pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.20.7 -pkgrel=1 +pkgrel=2 pkgdesc="A modern, maintained replacement for ls (mingw-w64)" arch=('any') mingw_arch=('ucrt64' 'clang64' 'clangarm64' 'mingw64') url='https://eza.rocks' msys2_repository_url='https://github.com/eza-community/eza' license=('spdx:EUPL-1.2') -depends=("${MINGW_PACKAGE_PREFIX}-zlib") +depends=("${MINGW_PACKAGE_PREFIX}-zlib" + "${MINGW_PACKAGE_PREFIX}-libgit2") makedepends=("${MINGW_PACKAGE_PREFIX}-rust" "${MINGW_PACKAGE_PREFIX}-pkgconf" "${MINGW_PACKAGE_PREFIX}-openssl" @@ -22,7 +23,7 @@ source=("${_realname}::git+${msys2_repository_url}.git#tag=v${pkgver}") sha256sums=('5419c1489ab08a09d8dab0faefa3a74d7670ce42a19e94dcf784f7e518b6ee3e') _env() { - #export LIBGIT2_NO_VENDOR=1 + export LIBGIT2_NO_VENDOR=1 export OPENSSL_NO_VENDOR=1 export WINAPI_NO_BUNDLED_LIBRARIES=1 } diff --git a/mingw-w64-gitui/.gitignore b/mingw-w64-gitui/.gitignore new file mode 100644 index 0000000000000..9e5d887150439 --- /dev/null +++ b/mingw-w64-gitui/.gitignore @@ -0,0 +1 @@ +/gitui diff --git a/mingw-w64-gitui/PKGBUILD b/mingw-w64-gitui/PKGBUILD index 63eede8aa214b..bbe60ad7800fd 100644 --- a/mingw-w64-gitui/PKGBUILD +++ b/mingw-w64-gitui/PKGBUILD @@ -4,7 +4,7 @@ _realname=gitui pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.26.3 -pkgrel=2 +pkgrel=3 pkgdesc='Blazing fast terminal-ui for git written in Rust (mingw-w64)' msys2_references=( 'anitya: 187553' @@ -15,31 +15,33 @@ url='https://github.com/extrawurst/gitui' arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') license=('spdx:MIT') -depends=("${MINGW_PACKAGE_PREFIX}-libssh2") +depends=("${MINGW_PACKAGE_PREFIX}-libssh2" + "${MINGW_PACKAGE_PREFIX}-libgit2") makedepends=("${MINGW_PACKAGE_PREFIX}-rust" "${MINGW_PACKAGE_PREFIX}-python" "${MINGW_PACKAGE_PREFIX}-pkgconf" "${MINGW_PACKAGE_PREFIX}-openssl" 'git') -source=("${_realname}::git+https://github.com/extrawurst/gitui.git#tag=v${pkgver}") +source=("git+https://github.com/extrawurst/gitui.git#tag=v${pkgver}") sha256sums=('b149059b08ce83ad35df027d9a98582a4a2da8b4690caf10690a3999176af8b2') _env() { export OPENSSL_NO_VENDOR=1 - # Not compatible with libgit2 1.8+ - # export LIBGIT2_NO_VENDOR=1 + export LIBGIT2_NO_VENDOR=1 export PKG_CONFIG_ALL_DYNAMIC=1 export LIBSSH2_SYS_USE_PKG_CONFIG=1 } prepare() { - cd "${srcdir}/${_realname}" + cd "${_realname}" + # bump git2 crate for libgit2 1.8+ support + git cherry-pick -n 423b5ff3d13c30dba7ac3045fe31cb2e60a87a60 cargo fetch --locked --target "$(rustc -vV | sed -n 's/host: //p')" } build() { - cd "${srcdir}/${_realname}" + cd "${_realname}" _env cargo build \ @@ -50,7 +52,7 @@ build() { } check() { - cd "${srcdir}/${_realname}" + cd "${_realname}" _env cargo test \ @@ -61,7 +63,7 @@ check() { } package() { - cd "${srcdir}/${_realname}" + cd "${_realname}" _env cargo install \ diff --git a/mingw-w64-jj/PKGBUILD b/mingw-w64-jj/PKGBUILD index f5c10d441e50a..fc7cc1c1f1d11 100644 --- a/mingw-w64-jj/PKGBUILD +++ b/mingw-w64-jj/PKGBUILD @@ -5,7 +5,7 @@ pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-${_realname}-docs") pkgver=0.23.0 -pkgrel=1 +pkgrel=2 pkgdesc="Jujutsu (an experimental VCS) (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64') @@ -20,7 +20,7 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-rust" "${MINGW_PACKAGE_PREFIX}-pkgconf" "${MINGW_PACKAGE_PREFIX}-openssl" 'git') -depends=(#"${MINGW_PACKAGE_PREFIX}-libgit2" +depends=("${MINGW_PACKAGE_PREFIX}-libgit2" "${MINGW_PACKAGE_PREFIX}-libssh2" "${MINGW_PACKAGE_PREFIX}-zstd") source=("git+${url}.git#tag=v${pkgver}" @@ -34,7 +34,7 @@ sha256sums=('7cd4978edc2dfb9615ece6d7419e36110171e44c3ac572731d6175a5eb955b06' _env() { export OPENSSL_NO_VENDOR=1 - #export LIBGIT2_NO_VENDOR=1 + export LIBGIT2_NO_VENDOR=1 export PKG_CONFIG_ALL_DYNAMIC=1 export ZSTD_SYS_USE_PKG_CONFIG=1 export LIBSSH2_SYS_USE_PKG_CONFIG=1 diff --git a/mingw-w64-zed/PKGBUILD b/mingw-w64-zed/PKGBUILD index 9081d6d2268cc..c1e0f07c12a0d 100644 --- a/mingw-w64-zed/PKGBUILD +++ b/mingw-w64-zed/PKGBUILD @@ -4,7 +4,7 @@ _realname=zed pkgbase=mingw-w64-${_realname} pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}" pkgver=0.160.7 -pkgrel=1 +pkgrel=2 pkgdesc="A high-performance, multiplayer code editor (mingw-w64)" arch=('any') mingw_arch=('mingw64' 'ucrt64' 'clang64') @@ -18,7 +18,7 @@ msys2_references=( 'aur' 'gentoo: app-editors/zed' ) -depends=(#"${MINGW_PACKAGE_PREFIX}-libgit2" +depends=("${MINGW_PACKAGE_PREFIX}-libgit2" "${MINGW_PACKAGE_PREFIX}-zstd" "${MINGW_PACKAGE_PREFIX}-nodejs") makedepends=("${MINGW_PACKAGE_PREFIX}-rust" @@ -83,7 +83,7 @@ build() { export PROTOC="${MINGW_PREFIX}/bin/protoc.exe" export PROTOC_INCLUDE="${MINGW_PREFIX}/include" export OPENSSL_NO_VENDOR=1 - #export LIBGIT2_NO_VENDOR=1 + export LIBGIT2_NO_VENDOR=1 export PKG_CONFIG_ALL_DYNAMIC=1 export ZSTD_SYS_USE_PKG_CONFIG=1 export WINAPI_NO_BUNDLED_LIBRARIES=1