--- Makefile +++ Makefile @@ -22,20 +22,29 @@ LICENSE_COMB= dual LICENSE_FILE_APACHE20= ${WRKSRC}/LICENSE-APACHE LICENSE_FILE_MIT= ${WRKSRC}/LICENSE-MIT +EXTRACT_AFTER_ARGS= --exclude libssh2 --exclude libgit2 \ + --exclude nghttp2 --exclude curl-sys/curl \ + --exclude include/curl --exclude "curl-sys-*/curl" \ + --exclude openssl-src/openssl \ + --exclude "libz-sys/src/libz*" + IGNORE_FreeBSD_12_powerpc= is missing a bootstrap for FreeBSD 12.x powerpc ONLY_FOR_ARCHS?= aarch64 amd64 armv7 i386 powerpc64 powerpc64le powerpc \ riscv64 ONLY_FOR_ARCHS_REASON?= requires prebuilt bootstrap compiler BUILD_DEPENDS= cmake:devel/cmake-core -LIB_DEPENDS= libcurl.so:ftp/curl +LIB_DEPENDS= libcurl.so:ftp/curl \ + libgit2.so:devel/libgit2 \ + libssh2.so:security/libssh2 -USES= cpe ninja:build pkgconfig python:build ssl tar:xz +USES= cpe localbase ninja:build pkgconfig python:build ssl tar:xz CPE_VENDOR= rust-lang MAKE_ENV= DESTDIR=${STAGEDIR} \ - LIBGIT2_NO_PKG_CONFIG=1 \ + LIBSSH2_SYS_USE_PKG_CONFIG=yes \ + LIBGIT2_NO_VENDOR=1 \ OPENSSL_DIR="${OPENSSLBASE}" TEST_ENV= ${MAKE_ENV} \ ALLOW_NONZERO_RLIMIT_CORE=1 @@ -100,9 +109,14 @@ _COMPONENTS+= cargo-${_PACKAGE_VERS}-${_RUST_TARGET} \ IGNORE= is only for FreeBSD .endif +.if ${PORT_OPTIONS:MPORT_LLVM} +# We still must have llvm-project/libunwind at this time: +EXTRACT_AFTER_ARGS+= --exclude llvm-project/ll* --exclude llvm-project/c* --exclude llvm-project/r* +.endif + .if ${ARCH} == powerpc LIB_DEPENDS+= libatomic.so:lang/gcc${GCC_DEFAULT} -MAKE_ENV+= RUSTFLAGS="-L/usr/local/lib/gcc${GCC_DEFAULT}" +MAKE_ENV+= RUSTFLAGS="-L${LOCALBASE}/lib/gcc${GCC_DEFAULT}" .else MAKE_ENV+= RUST_BACKTRACE=1 .endif --- /dev/null 2023-12-12 17:28:29.929064000 -0500 +++ files/patch-sys-lzma 2023-12-11 22:47:34.423980000 -0500 @@ -0,0 +1,15 @@ +Whether to use the already installd lzma is determined based +on pkg-config. On FreeBSD that detection fails, because lzma +is part of the base OS. Use system -llzma unconditionally... + + -mi + +--- vendor/lzma-sys/build.rs 2023-12-04 16:32:19.000000000 -0500 ++++ vendor/lzma-sys/build.rs 2023-12-11 18:09:40.320258000 -0500 +@@ -19,5 +19,5 @@ + // Otherwise check the system to see if it has an lzma library already + // installed that we can use. +- if !want_static && !msvc && pkg_config::probe_library("liblzma").is_ok() { ++ if !want_static && !msvc { + return; + } --- /dev/null 2023-12-12 17:28:40.505045000 -0500 +++ files/patch-sys-nghttp2 2023-12-12 15:19:17.984498000 -0500 @@ -0,0 +1,8 @@ +--- vendor/libnghttp2-sys/build.rs 2023-12-04 16:32:19.000000000 -0500 ++++ vendor/libnghttp2-sys/build.rs 2023-12-12 15:18:42.431611000 -0500 +@@ -6,4 +6,5 @@ + + fn main() { ++ return; + let target = env::var("TARGET").unwrap(); + let out_dir = PathBuf::from(env::var_os("OUT_DIR").unwrap());