From 33dc6e48239260260f01a7348092a03d52ddd30e Mon Sep 17 00:00:00 2001
From: Ionen Wolkens <ionen@gentoo.org>
Date: Thu, 21 Mar 2024 03:19:01 -0400
Subject: sys-apps/eza: fix build with >=libgit2-1.8.0

libgit2-sys crate has a upper bound for <1.8.0 and refuses
to build otherwise, but not seeing(?) any issues with it.

Just a quick emergency fix, will likely be fixed next libgit2-sys
version. Kept full version in the sed's path rather than a glob
to force re-checking this when the crate is bumped.

Alternatively could drop LIBGIT2_NO_VENDOR or set an upper bound
in RDEPEND, but does not seem necessary.

Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
---
 sys-apps/eza/eza-0.18.6.ebuild | 6 ++++++
 1 file changed, 6 insertions(+)

(limited to 'sys-apps/eza')

diff --git a/sys-apps/eza/eza-0.18.6.ebuild b/sys-apps/eza/eza-0.18.6.ebuild
index 2e5c5ec4a7ec..0bd577b67434 100644
--- a/sys-apps/eza/eza-0.18.6.ebuild
+++ b/sys-apps/eza/eza-0.18.6.ebuild
@@ -223,6 +223,12 @@ src_prepare() {
 	rm tests/cmd/absolute{,_recurse}_unix.toml
 
 	sed -i -e 's/^strip = true$/strip = false/g' Cargo.toml || die "failed to disable stripping"
+
+	if use git; then
+		# libgit2-sys unnecessarily(?) requests <libgit2-1.8.0, bump to 2 for now
+		sed -e '/range_version/s/1\.8\.0/2/' \
+			-i "${ECARGO_VENDOR}"/libgit2-sys-0.16.2+1.7.2/build.rs || die
+	fi
 }
 
 src_configure() {
-- 
cgit v1.2.3-65-gdbad