summaryrefslogtreecommitdiff
path: root/Mk/Uses/cargo.mk
diff options
context:
space:
mode:
authorAlex Dupre <ale@FreeBSD.org>2019-02-15 09:33:48 +0000
committerAlex Dupre <ale@FreeBSD.org>2019-02-15 09:33:48 +0000
commitb1cc1bb18bad04a436dcfced8551401450412174 (patch)
tree51980fa1b62302a73507d146a124a1ecf67b8624 /Mk/Uses/cargo.mk
parentUpdate to 2.3d.r162 (diff)
Don't break when there are multiple libc versions in crates.
Notes
Notes: svn path=/head/; revision=492987
Diffstat (limited to 'Mk/Uses/cargo.mk')
-rw-r--r--Mk/Uses/cargo.mk8
1 files changed, 4 insertions, 4 deletions
diff --git a/Mk/Uses/cargo.mk b/Mk/Uses/cargo.mk
index 244c7b5313b4..f678c9c4b211 100644
--- a/Mk/Uses/cargo.mk
+++ b/Mk/Uses/cargo.mk
@@ -134,16 +134,16 @@ CARGO_ENV+= GETTEXT_BIN_DIR=${LOCALBASE}/bin \
GETTEXT_LIB_DIR=${LOCALBASE}/lib
.endif
-.if ${CARGO_CRATES:Mlibc-[0-9]*}
+.for libc in ${CARGO_CRATES:Mlibc-[0-9]*}
# FreeBSD 12.0 changed ABI: r318736 and r320043
# https://github.com/rust-lang/libc/commit/78f93220d70e
# https://github.com/rust-lang/libc/commit/969ad2b73cdc
-_libc_VER= ${CARGO_CRATES:Mlibc-[0-9]*:C/.*-//}
+_libc_VER= ${libc:C/.*-//}
. if ${_libc_VER:R:R} == 0 && (${_libc_VER:R:E} < 2 || ${_libc_VER:R:E} == 2 && ${_libc_VER:E} < 38)
-DEV_WARNING+= "CARGO_CRATES=libc-0.2.37 or older maybe unstable on FreeBSD 12.0. Consider updating to the latest version."
+DEV_WARNING+= "CARGO_CRATES=${libc} may be unstable on FreeBSD 12.0. Consider updating to the latest version (higher than 0.2.37)."
. endif
.undef _libc_VER
-.endif
+.endfor
.if ${CARGO_CRATES:Mlibgit2-sys-[0-9]*}
# Use the system's libgit2 instead of building the bundled version