summaryrefslogtreecommitdiff
path: root/devel/cargo-c/Makefile
blob: bfd2a59856d60a1a0271a21ce5f10f553563497e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
PORTNAME=	cargo-c
DISTVERSION=	0.9.21
DISTVERSIONSUFFIX=	+cargo-0.71
CATEGORIES=	devel
MASTER_SITES=	CRATESIO
# XXX Teach USES=cargo to have proper default
DISTFILES=	${CARGO_DIST_SUBDIR}/${DISTNAME}${CARGO_CRATE_EXT}

MAINTAINER=	jbeich@FreeBSD.org
COMMENT=	Cargo C-ABI helpers
WWW=		https://github.com/lu-zero/cargo-c

LICENSE=	MIT
LICENSE_FILE=	${WRKSRC}/LICENSE

LIB_DEPENDS=	libcurl.so:ftp/curl

USES=		cargo ssl
PLIST_FILES=	bin/cargo-capi \
		bin/cargo-cbuild \
		bin/cargo-cinstall \
		bin/cargo-ctest \
		${NULL}

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>