git: 001fd50e85b9 - main - devel/cargo-c: back to system libgit2/libssh2 after f11ed4160472

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 08 Sep 2023 15:44:31 UTC
The branch main has been updated by jbeich:

URL: https://cgit.FreeBSD.org/ports/commit/?id=001fd50e85b9a252a97ff7d7685530f70636fe27

commit 001fd50e85b9a252a97ff7d7685530f70636fe27
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-11-22 11:56:03 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-09-08 15:36:51 +0000

    devel/cargo-c: back to system libgit2/libssh2 after f11ed4160472
---
 devel/cargo-c/Makefile | 11 ++++-------
 1 file changed, 4 insertions(+), 7 deletions(-)

diff --git a/devel/cargo-c/Makefile b/devel/cargo-c/Makefile
index 548d998bc03e..df6d6d36d8a7 100644
--- a/devel/cargo-c/Makefile
+++ b/devel/cargo-c/Makefile
@@ -1,7 +1,7 @@
 PORTNAME=	cargo-c
 DISTVERSION=	0.9.24
 DISTVERSIONSUFFIX=	+cargo-0.73.0
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	devel
 MASTER_SITES=	CRATESIO
 # XXX Teach USES=cargo to have proper default
@@ -14,7 +14,9 @@ WWW=		https://github.com/lu-zero/cargo-c
 LICENSE=	MIT
 LICENSE_FILE=	${WRKSRC}/LICENSE
 
-LIB_DEPENDS=	libcurl.so:ftp/curl
+LIB_DEPENDS=	libgit2.so:devel/libgit2 \
+		libcurl.so:ftp/curl \
+		libssh2.so:security/libssh2
 
 USES=		cargo ssl
 PLIST_FILES=	bin/cargo-capi \
@@ -26,10 +28,5 @@ PLIST_FILES=	bin/cargo-capi \
 post-patch:
 	@${REINPLACE_CMD} -e 's,libdir.join("pkgconfig,prefix.join("libdata/pkgconfig,' \
 		${WRKSRC}/src/install.rs
-# XXX Need devel/libgit2 >= 1.6.4; libgit2 depends on libssh2, so bundle both
-	@${REINPLACE_CMD} 's/if try_to_use_system_libgit2/if false/' \
-		${WRKSRC}/cargo-crates/libgit2-sys-*/build.rs
-	@${REINPLACE_CMD} '/env::var/s/LIBSSH2.*PKG/disabled_&/' \
-		${WRKSRC}/cargo-crates/libssh2-sys-*/build.rs
 
 .include <bsd.port.mk>