Skip to content

Commit

Permalink
rebuild rust-based packages for libgit2 update
Browse files Browse the repository at this point in the history
  • Loading branch information
ognevny authored Nov 12, 2024
1 parent d69cf6a commit 247dbb1
Show file tree
Hide file tree
Showing 9 changed files with 77 additions and 29 deletions.
1 change: 1 addition & 0 deletions mingw-w64-bat/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/bat
15 changes: 9 additions & 6 deletions mingw-w64-bat/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -18,19 +18,24 @@ 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"
"${MINGW_PACKAGE_PREFIX}-pkgconf"
'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 [email protected] --precise 0.48.1

Expand All @@ -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
}
Expand Down
41 changes: 41 additions & 0 deletions mingw-w64-bat/update-git2-crate.patch
Original file line number Diff line number Diff line change
@@ -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

9 changes: 4 additions & 5 deletions mingw-w64-cargo-c/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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")
Expand All @@ -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
Expand Down
7 changes: 4 additions & 3 deletions mingw-w64-eza/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}
Expand Down
1 change: 1 addition & 0 deletions mingw-w64-gitui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/gitui
20 changes: 11 additions & 9 deletions mingw-w64-gitui/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand All @@ -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 \
Expand All @@ -50,7 +52,7 @@ build() {
}

check() {
cd "${srcdir}/${_realname}"
cd "${_realname}"

_env
cargo test \
Expand All @@ -61,7 +63,7 @@ check() {
}

package() {
cd "${srcdir}/${_realname}"
cd "${_realname}"

_env
cargo install \
Expand Down
6 changes: 3 additions & 3 deletions mingw-w64-jj/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}-docs")
pkgver=0.23.0
pkgrel=1
pkgrel=2
pkgdesc="Jujutsu (an experimental VCS) (mingw-w64)"
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
Expand All @@ -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}"
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions mingw-w64-zed/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -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')
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 247dbb1

Please sign in to comment.