-DEV_ERROR+= "CARGO_CRATES=${libc} may be unstable on aarch64 or not build on armv6, armv7, powerpc64. Consider updating to the latest version \(higher than 0.2.49\)."
-. endif
-.undef _libc_VER
-.endfor
-
-.if ${CARGO_CRATES:Mlibgit2-sys-[0-9]*}
+.if ${_CARGO_CRATES:Mlibgit2-sys}
# Use the system's libgit2 instead of building the bundled version
CARGO_ENV+= LIBGIT2_SYS_USE_PKG_CONFIG=1
.endif
-.if ${CARGO_CRATES:Mlibssh2-sys-[0-9]*}
+.if ${_CARGO_CRATES:Mlibssh2-sys}
# Use the system's libssh2 instead of building the bundled version
CARGO_ENV+= LIBSSH2_SYS_USE_PKG_CONFIG=1
.endif
-.if ${CARGO_CRATES:Monig_sys-[0-9]*}
+.if ${_CARGO_CRATES:Monig_sys}
# onig_sys always prefers the system library but will try to link
# statically with it. Since devel/oniguruma doesn't provide a static
# library it'll link to libonig.so instead. Strictly speaking setting
-DEV_WARNING+= "CARGO_CRATES=openssl-0.10.3 or older do not support OpenSSL 1.1.1. Consider updating to the latest version."
-. endif
-. endif
-.undef _openssl_VER
-.endif
-
-.if ${CARGO_CRATES:Mopenssl-src-[0-9]*}
+.if ${_CARGO_CRATES:Mopenssl-src}
DEV_WARNING+= "Please make sure this port uses the system OpenSSL and consider removing CARGO_CRATES=${CARGO_CRATES:Mopenssl-src-[0-9]*} (a vendored copy of OpenSSL) from the build, e.g., by patching Cargo.toml appropriately."
.endif
-.if ${CARGO_CRATES:Mopenssl-sys-[0-9]*}
+.if ${_CARGO_CRATES:Mopenssl-sys}
# Make sure that openssl-sys can find the correct version of OpenSSL
CARGO_ENV+= OPENSSL_LIB_DIR=${OPENSSLLIB} \
OPENSSL_INCLUDE_DIR=${OPENSSLINC}
.endif
-.if ${CARGO_CRATES:Mpkg-config-[0-9]*}
+.if ${_CARGO_CRATES:Mpkg-config}
.include "${USESDIR}/pkgconfig.mk"
.endif
+.for _index _crate _name _version in ${_CARGO_CRATES}
+# Split up semantic version and try to sanitize it by removing
+# pre-release identifier (-) or build metadata (+)
+. if ${_version:S/./ /:S/./ /:C/[-+].*//:_:[#]} == 3
+DEV_ERROR+= "CARGO_CRATES=${_crate} may be unstable on aarch64 or not build on armv6, armv7, powerpc64. Consider updating to the latest version \(higher than 0.2.49\)."
# but we can build with a newer or older compiler as provided by USE_GCC=yes
BUILD_DEPENDS+= gcc9:lang/gcc9
USE_GCC= yes
+STRIP_CMD= ${LOCALBASE}/bin/strip # unsupported e_type with base strip
.endif
# remove when 11.4 is EOL
@@ -157,14 +169,31 @@
# fails to link with base ld.bfd: rustc_codegen_llvm.e2557spx-cgu.11:(.text._ZN89_$LT$rustc_target..abi..call..CastTarget$u20$as$u20$rustc_codegen_llvm..abi..LlvmType$GT$9llvm_type17h1296210ab461fc57E+0x54): relocation truncated to fit: R_ARM_CALL against symbol `__aeabi_uldivmod' defined in .text.__aeabi_uldivmod section in /tmp/rustcdnGbao/libcompiler_builtins-ee65b414e4115a8f.rlib(compiler_builtins-ee65b414e4115a8f.compiler_builtins.ay8p39ey-cgu.13.rcgu.o)