head 1.36; access; symbols pkgsrc-2023Q4:1.36.0.2 pkgsrc-2023Q4-base:1.36 pkgsrc-2023Q3:1.35.0.4 pkgsrc-2023Q3-base:1.35 pkgsrc-2023Q2:1.35.0.2 pkgsrc-2023Q2-base:1.35 pkgsrc-2023Q1:1.33.0.2 pkgsrc-2023Q1-base:1.33 pkgsrc-2022Q4:1.31.0.2 pkgsrc-2022Q4-base:1.31 pkgsrc-2022Q3:1.30.0.4 pkgsrc-2022Q3-base:1.30 pkgsrc-2022Q2:1.30.0.2 pkgsrc-2022Q2-base:1.30 pkgsrc-2022Q1:1.29.0.4 pkgsrc-2022Q1-base:1.29 pkgsrc-2021Q4:1.29.0.2 pkgsrc-2021Q4-base:1.29 pkgsrc-2021Q3:1.27.0.2 pkgsrc-2021Q3-base:1.27 pkgsrc-2021Q2:1.26.0.2 pkgsrc-2021Q2-base:1.26 pkgsrc-2021Q1:1.24.0.2 pkgsrc-2021Q1-base:1.24 pkgsrc-2020Q4:1.23.0.2 pkgsrc-2020Q4-base:1.23 pkgsrc-2020Q3:1.22.0.2 pkgsrc-2020Q3-base:1.22 pkgsrc-2020Q2:1.17.0.2 pkgsrc-2020Q2-base:1.17 pkgsrc-2020Q1:1.11.0.2 pkgsrc-2020Q1-base:1.11 pkgsrc-2019Q4:1.10.0.4 pkgsrc-2019Q4-base:1.10 pkgsrc-2019Q3:1.7.0.2 pkgsrc-2019Q3-base:1.7 pkgsrc-2019Q2:1.6.0.6 pkgsrc-2019Q2-base:1.6 pkgsrc-2019Q1:1.6.0.4 pkgsrc-2019Q1-base:1.6 pkgsrc-2018Q4:1.6.0.2 pkgsrc-2018Q4-base:1.6 pkgsrc-2018Q3:1.3.0.2 pkgsrc-2018Q3-base:1.3 pkgsrc-2018Q2:1.2.0.2 pkgsrc-2018Q2-base:1.2 pkgsrc-2018Q1:1.1.0.4 pkgsrc-2018Q1-base:1.1 pkgsrc-2017Q4:1.1.0.2 pkgsrc-2017Q4-base:1.1; locks; strict; comment @# @; 1.36 date 2023.12.13.17.39.06; author schmonz; state Exp; branches; next 1.35; commitid ok4r2yyfjEzQukQE; 1.35 date 2023.05.16.06.10.52; author wiz; state Exp; branches; next 1.34; commitid eHctP8ZmOrivt9pE; 1.34 date 2023.05.15.20.07.36; author wiz; state Exp; branches; next 1.33; commitid SSAIRRfRt45E86pE; 1.33 date 2023.03.21.19.53.25; author nikita; state Exp; branches; next 1.32; commitid jThov22HzQEhP1iE; 1.32 date 2023.01.23.18.49.03; author he; state Exp; branches; next 1.31; commitid iHEi3Slf9XUSiHaE; 1.31 date 2022.12.15.21.47.46; author jperkin; state Exp; branches; next 1.30; commitid P5wyF1JQmUSuxH5E; 1.30 date 2022.05.24.09.51.51; author nia; state Exp; branches; next 1.29; commitid kQ503Vr75u4SaiFD; 1.29 date 2021.10.06.10.25.32; author jperkin; state Exp; branches; next 1.28; commitid DRfjETsaXkMVJJbD; 1.28 date 2021.10.06.10.20.24; author jperkin; state Exp; branches; next 1.27; commitid 8fOc3OBhOypUHJbD; 1.27 date 2021.07.22.16.09.46; author tnn; state Exp; branches; next 1.26; commitid 4RdbHdCKZucn502D; 1.26 date 2021.05.31.14.33.02; author ryoon; state Exp; branches; next 1.25; commitid zZYjo7pMuLNNejVC; 1.25 date 2021.05.31.10.17.53; author he; state Exp; branches; next 1.24; commitid mFNkvCO0puqtOhVC; 1.24 date 2021.01.12.15.37.32; author jperkin; state Exp; branches; next 1.23; commitid 2ZqoUsLJ4trS3sDC; 1.23 date 2020.10.20.19.03.07; author tnn; state Exp; branches; next 1.22; commitid WXhAAmjWQ7jvSFsC; 1.22 date 2020.08.14.21.19.22; author tnn; state Exp; branches; next 1.21; commitid oQTnkB7H7QFLN4kC; 1.21 date 2020.08.14.21.12.03; author tnn; state Exp; branches; next 1.20; commitid VbOMuyRQmQDzL4kC; 1.20 date 2020.08.14.20.44.16; author tnn; state Exp; branches; next 1.19; commitid QUWu9SwvFDf1C4kC; 1.19 date 2020.08.14.11.05.00; author tnn; state Exp; branches; next 1.18; commitid WeF4n1oSHoflp1kC; 1.18 date 2020.08.06.11.42.56; author jperkin; state Exp; branches; next 1.17; commitid JMSHAfpPcJ5MRZiC; 1.17 date 2020.06.14.15.33.27; author nia; state Exp; branches; next 1.16; commitid lG7PET5MuCjRQccC; 1.16 date 2020.06.14.11.19.34; author rillig; state Exp; branches; next 1.15; commitid npW6YCz7NBLjqbcC; 1.15 date 2020.06.08.22.37.28; author he; state Exp; branches; next 1.14; commitid Dkr1PafGCvDgotbC; 1.14 date 2020.06.08.17.13.39; author he; state Exp; branches; next 1.13; commitid ROQyjKNlS9BMArbC; 1.13 date 2020.05.21.21.03.44; author nia; state Exp; branches; next 1.12; commitid r7Xnb6JnoZUcs99C; 1.12 date 2020.05.18.16.17.20; author nia; state Exp; branches; next 1.11; commitid qTyqVW1vGCobWJ8C; 1.11 date 2020.01.19.16.53.10; author maya; state Exp; branches; next 1.10; commitid nTrKB8urN0tj1kTB; 1.10 date 2019.12.03.16.29.39; author minskim; state Exp; branches; next 1.9; commitid 5QtVqN1Ca4DRohNB; 1.9 date 2019.12.03.02.09.06; author minskim; state Exp; branches; next 1.8; commitid asV8bqrbnRYrCcNB; 1.8 date 2019.11.03.19.04.07; author rillig; state Exp; branches; next 1.7; commitid puQpdVbj8afCdrJB; 1.7 date 2019.07.17.11.04.45; author fox; state Exp; branches; next 1.6; commitid uFYkE4WlcKn84ovB; 1.6 date 2018.11.27.15.45.23; author adam; state Exp; branches; next 1.5; commitid JtvMpE4WFW3k2B1B; 1.5 date 2018.11.27.14.02.11; author maya; state Exp; branches; next 1.4; commitid 8nDohPWG5I2uvA1B; 1.4 date 2018.10.23.16.39.29; author minskim; state Exp; branches; next 1.3; commitid 8AOFw8rLMCQbv6XA; 1.3 date 2018.09.21.21.26.33; author minskim; state Exp; branches; next 1.2; commitid v4tkvFBWQ8Lq71TA; 1.2 date 2018.05.06.01.59.36; author maya; state Exp; branches; next 1.1; commitid GkXoaBsjPpKg6bBA; 1.1 date 2017.11.08.13.40.10; author tnn; state Exp; branches; next ; commitid JxPCRIx2XtcPIeeA; desc @@ 1.36 log @cargo.mk: centralize Darwin -install_name workaround. @ text @# $NetBSD: cargo.mk,v 1.35 2023/05/16 06:10:52 wiz Exp $ # # Common logic that can be used by packages that depend on cargo crates # from crates.io. This lets existing pkgsrc infrastructure fetch and verify # cargo crates instead of using the rust package manager in the build phase. # Inspired by cargo.mk from FreeBSD ports. # # Usage example: # # CARGO_CRATE_DEPENDS+= sha1-0.20 # .include "../../lang/rust/cargo.mk" # # If modifying the list of dependencies, re-run the build once without # --offline in CARGO_ARGS to generate a new valid Cargo.lock. # e.g: make CARGO_ARGS="build --release" build # # a list of CARGO_CRATE_DEPENDS can be generated via # make print-cargo-depends > cargo-depends.mk # # See also www/geckodriver for a full example. MASTER_SITES?= -${MASTER_SITE_CRATESIO}${PKGBASE}/${PKGVERSION_NOREV}/download CHECK_SSP_SUPPORTED= no .include "../../lang/rust/rust.mk" USE_TOOLS+= bsdtar CARGO_VENDOR_DIR= ${WRKDIR}/vendor CARGO_WRKSRC?= ${WRKSRC} # TODO: some Cargo.lock files include git+https sources which need to be fetched from the URL (not necessarily resolving to a crate.io url) DISTFILES?= ${DEFAULT_DISTFILES} .for crate in ${CARGO_CRATE_DEPENDS} DISTFILES+= ${crate}.crate SITES.${crate}.crate+= -${MASTER_SITE_CRATESIO}${crate:C/-[0-9]+\.[0-9.]+.*$//}/${crate:C/^.*-([0-9]+\.[0-9.]+.*)$/\1/}/download EXTRACT_DIR.${crate}.crate?= ${CARGO_VENDOR_DIR} .endfor .include "../../mk/bsd.prefs.mk" # Triggers NetBSD ld.so bug (PR toolchain/54192) # See Makefile for further information. .if ${OPSYS} == "NetBSD" && ${OPSYS_VERSION} < 099957 MAKE_JOBS_SAFE= no .endif post-extract: cargo-vendor-crates .PHONY: cargo-vendor-crates cargo-vendor-crates: @@${STEP_MSG} "Extracting local cargo crates" ${RUN}${MKDIR} ${CARGO_WRKSRC}/.cargo ${RUN}${PRINTF} "[source.crates-io]\nreplace-with = \"vendored-sources\"\n[source.vendored-sources]\ndirectory = \"${CARGO_VENDOR_DIR}\"\n" > ${CARGO_WRKSRC}/.cargo/config ${RUN}${MKDIR} ${CARGO_VENDOR_DIR} .for crate in ${CARGO_CRATE_DEPENDS} ${RUN}${PRINTF} '{"package":"%s","files":{}}' \ `${DIGEST} sha256 < ${_DISTDIR}/${crate}.crate` \ > ${CARGO_VENDOR_DIR}/${crate}/.cargo-checksum.json .endfor # Legacy name .PHONY: show-cargo-depends show-cargo-depends: print-cargo-depends .PHONY: print-cargo-depends print-cargo-depends: ${RUN}${AWK} 'BEGIN {print "# $$Net" "BSD$$"; print;} \ /^name = / { split($$3, a, "\""); name=a[2]; } \ /^version = / { split($$3, a, "\""); vers=a[2]; } \ /^source = / { \ print "CARGO_CRATE_DEPENDS+=\t" name "-" vers; \ }' ${CARGO_WRKSRC}/Cargo.lock DEFAULT_CARGO_ARGS= --offline -j${_MAKE_JOBS_N} \ ${CARGO_NO_DEFAULT_FEATURES:M[yY][eE][sS]:C/[yY][eE][sS]/--no-default-features/} \ ${CARGO_FEATURES:C/.*/--features/W} \ ${CARGO_FEATURES:S/ /,/Wg} CARGO_ARGS?= build --release ${DEFAULT_CARGO_ARGS} CARGO_INSTALL_ARGS?= install --path . --root ${DESTDIR}${PREFIX} ${DEFAULT_CARGO_ARGS} MAKE_ENV+= RUSTFLAGS=${RUSTFLAGS:Q} .if !target(do-build) do-build: do-cargo-build .endif .PHONY: do-cargo-build do-cargo-build: ${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_ARGS} .if !target(do-install) && ${GNU_CONFIGURE:Uno:tl} == no do-install: do-cargo-install .endif .PHONY: do-cargo-install do-cargo-install: ${RUN} cd ${CARGO_WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_INSTALL_ARGS} # remove files cargo uses for tracking installations ${RM} -f ${DESTDIR}${PREFIX}/.crates.toml ${RM} -f ${DESTDIR}${PREFIX}/.crates2.json .if ${OPSYS} == "Darwin" .PHONY: do-cargo-post-install-darwin-fix-rpath post-install: do-cargo-post-install-darwin-fix-rpath do-cargo-post-install-darwin-fix-rpath: ${RUN} cd ${DESTDIR}; \ for i in $$(${FIND} .${PREFIX}/lib -name '*.so' | ${SED} -e 's|^\./||'); do \ install_name_tool -id /$$i $$i; \ done .endif @ 1.35 log @rust/cargo.mk: do not use cargo-install if GNU_CONFIGURE is set Fixes installation of librsvg @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.34 2023/05/15 20:07:36 wiz Exp $ d100 10 @ 1.34 log @rust/cargo.mk: add default install target @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.33 2023/03/21 19:53:25 nikita Exp $ d90 1 a90 1 .if !target(do-install) @ 1.33 log @cargo.mk: TODO: support git+https sources. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.32 2023/01/23 18:49:03 he Exp $ d73 1 a73 1 DEFAULT_CARGO_ARGS= build --offline --release -j${_MAKE_JOBS_N} \ d77 2 a78 1 CARGO_ARGS?= ${DEFAULT_CARGO_ARGS} d89 11 @ 1.32 log @rust: Upgrade to version 1.66.1. Pkgsrc changes: * pkglint cleanups, bump bootstrap kits to 1.65.0. * New target: mipsel-unknown-netbsd, for cpu=mips32 with soft-float. * Managed to retain the build of aarch64_be, llvm needed a patch to avoid use of neon instructions in the BE case (llvm doesn't support use of neon in BE mode). Ref. patch to src/llvm-project/llvm/lib/Support/BLAKE3/blake3_impl.h. Also submitted upstream of LLVM to the BLAKE3 maintainers. * The minimum gcc version is now 7.x, and that includes the cross-compiler for the targets. For i386 this also needs to /usr/include/gcc-7 include files in the target root, because immintrin.h from gcc 5 is not compatible with gcc 7.x. This applies for the targets where we build against a root from netbsd-8 (sparc64, powerpc, i386), and files/gcc-wrap gets a hack for this. * Pick up tweak for -latomic inclusion from https://github.com/rust-lang/rust/issues/104220 and https://github.com/rust-lang/rust/pull/104572 * Retain ability to do 32-bit NetBSD, by changing from 64 to 32 bit types in library/std/src/sys/unix/thread_parker/netbsd.rs. * I've tried to get the "openssl-src" build with -latomic where it's needed. I've introduced the "NetBSD-generic32" system type and use it for the NetBSD mipsel target. There is another attempt to do the same in the patch to vendor/openssl-sys/build/main.rs. Upstream changes: Version 1.66.1 (2023-01-10) =========================== - Added validation of SSH host keys for git URLs in Cargo ([CVE-2022-46176](https://www.cve.org/CVERecord?id=CVE-2022-46176)) Version 1.66.0 (2022-12-15) =========================== Language -------- - [Permit specifying explicit discriminants on all `repr(Int)` enums](https://github.com/rust-lang/rust/pull/95710/) ```rust #[repr(u8)] enum Foo { A(u8) = 0, B(i8) = 1, C(bool) = 42, } ``` - [Allow transmutes between the same type differing only in lifetimes](https://github.com/rust-lang/rust/pull/101520/) - [Change constant evaluation errors from a deny-by-default lint to a hard error](https://github.com/rust-lang/rust/pull/102091/) - [Trigger `must_use` on `impl Trait` for supertraits](https://github.com/rust-lang/rust/pull/102287/) This makes `impl ExactSizeIterator` respect the existing `#[must_use]` annotation on `Iterator`. - [Allow `..X` and `..=X` in patterns](https://github.com/rust-lang/rust/pull/102275/) - [Uplift `clippy::for_loops_over_fallibles` lint into rustc](https://github.com/rust-lang/rust/pull/99696/) - [Stabilize `sym` operands in inline assembly](https://github.com/rust-lang/rust/pull/103168/) - [Update to Unicode 15](https://github.com/rust-lang/rust/pull/101912/) - [Opaque types no longer imply lifetime bounds](https://github.com/rust-lang/rust/pull/95474/) This is a soundness fix which may break code that was erroneously relying on this behavior. Compiler -------- - [Add armv5te-none-eabi and thumbv5te-none-eabi tier 3 targets](https://github.com/rust-lang/rust/pull/101329/) - Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. - [Add support for linking against macOS universal libraries](https://github.com/rust-lang/rust/pull/98736) Libraries --------- - [Fix `#[derive(Default)]` on a generic `#[default]` enum adding unnecessary `Default` bounds](https://github.com/rust-lang/rust/pull/101040/) - [Update to Unicode 15](https://github.com/rust-lang/rust/pull/101821/) Stabilized APIs --------------- - [`proc_macro::Span::source_text`](https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.source_text) - [`uX::{checked_add_signed, overflowing_add_signed, saturating_add_signed, wrapping_add_signed}`](https://doc.rust-lang.org/stable/std/primitive.u8.html#method.checked_add_signed) - [`iX::{checked_add_unsigned, overflowing_add_unsigned, saturating_add_unsigned, wrapping_add_unsigned}`](https://doc.rust-lang.org/stable/std/primitive.i8.html#method.checked_add_unsigned) - [`iX::{checked_sub_unsigned, overflowing_sub_unsigned, saturating_sub_unsigned, wrapping_sub_unsigned}`](https://doc.rust-lang.org/stable/std/primitive.i8.html#method.checked_sub_unsigned) - [`BTreeSet::{first, last, pop_first, pop_last}`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeSet.html#method.first) - [`BTreeMap::{first_key_value, last_key_value, first_entry, last_entry, pop_first, pop_last}`](https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.first_key_value) - [Add `AsFd` implementations for stdio lock types on WASI.](https://github.com/rust-lang/rust/pull/101768/) - [`impl TryFrom> for Box<[T; N]>`](https://doc.rust-lang.org/stable/std/boxed/struct.Box.html#impl-TryFrom%3CVec%3CT%2C%20Global%3E%3E-for-Box%3C%5BT%3B%20N%5D%2C%20Global%3E) - [`core::hint::black_box`](https://doc.rust-lang.org/stable/std/hint/fn.black_box.html) - [`Duration::try_from_secs_{f32,f64}`](https://doc.rust-lang.org/stable/std/time/struct.Duration.html#method.try_from_secs_f32) - [`Option::unzip`](https://doc.rust-lang.org/stable/std/option/enum.Option.html#method.unzip) - [`std::os::fd`](https://doc.rust-lang.org/stable/std/os/fd/index.html) Rustdoc ------- - [Add Rustdoc warning for invalid HTML tags in the documentation](https://github.com/rust-lang/rust/pull/101720/) Cargo ----- - [Added `cargo remove` to remove dependencies from Cargo.toml](https://doc.rust-lang.org/nightly/cargo/commands/cargo-remove.html) - [`cargo publish` now waits for the new version to be downloadable before exiting](https://github.com/rust-lang/cargo/pull/11062) See [detailed release notes](https://github.com/rust-lang/cargo/blob/master/CHANGELOG.md#cargo-166-2022-12-15) for more. Compatibility Notes ------------------- - [Only apply `ProceduralMasquerade` hack to older versions of `rental`](https://github.com/rust-lang/rust/pull/94063/) - [Don't export `__heap_base` and `__data_end` on wasm32-wasi.](https://github.com/rust-lang/rust/pull/102385/) - [Don't export `__wasm_init_memory` on WebAssembly.](https://github.com/rust-lang/rust/pull/102426/) - [Only export `__tls_*` on wasm32-unknown-unknown.](https://github.com/rust-lang/rust/pull/102440/) - [Don't link to `libresolv` in libstd on Darwin](https://github.com/rust-lang/rust/pull/102766/) - [Update libstd's libc to 0.2.135 (to make `libstd` no longer pull in `libiconv.dylib` on Darwin)](https://github.com/rust-lang/rust/pull/103277/) - [Opaque types no longer imply lifetime bounds](https://github.com/rust-lang/rust/pull/95474/) This is a soundness fix which may break code that was erroneously relying on this behavior. - [Make `order_dependent_trait_objects` show up in future-breakage reports](https://github.com/rust-lang/rust/pull/102635/) - [Change std::process::Command spawning to default to inheriting the parent's signal mask](https://github.com/rust-lang/rust/pull/101077/) Internal Changes ---------------- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools. - [Enable BOLT for LLVM compilation](https://github.com/rust-lang/rust/pull/94381/) - [Enable LTO for rustc_driver.so](https://github.com/rust-lang/rust/pull/101403/) Version 1.65.0 (2022-11-03) ========================== Language -------- - [Error on `as` casts of enums with `#[non_exhaustive]` variants] (https://github.com/rust-lang/rust/pull/92744/) - [Stabilize `let else`](https://github.com/rust-lang/rust/pull/93628/) - [Stabilize generic associated types (GATs)] (https://github.com/rust-lang/rust/pull/96709/) - [Add lints `let_underscore_drop`, `let_underscore_lock`, and `let_underscore_must_use` from Clippy] (https://github.com/rust-lang/rust/pull/97739/) - [Stabilize `break`ing from arbitrary labeled blocks ("label-break-value")] (https://github.com/rust-lang/rust/pull/99332/) - [Uninitialized integers, floats, and raw pointers are now considered immediate UB](https://github.com/rust-lang/rust/pull/98919/). Usage of `MaybeUninit` is the correct way to work with uninitialized memory. - [Stabilize raw-dylib for Windows x86_64, aarch64, and thumbv7a] (https://github.com/rust-lang/rust/pull/99916/) - [Do not allow `Drop` impl on foreign ADTs] (https://github.com/rust-lang/rust/pull/99576/) Compiler -------- - [Stabilize -Csplit-debuginfo on Linux] (https://github.com/rust-lang/rust/pull/98051/) - [Use niche-filling optimization even when multiple variants have data] (https://github.com/rust-lang/rust/pull/94075/) - [Associated type projections are now verified to be well-formed prior to resolving the underlying type] (https://github.com/rust-lang/rust/pull/99217/#issuecomment-1209365630) - [Stringify non-shorthand visibility correctly] (https://github.com/rust-lang/rust/pull/100350/) - [Normalize struct field types when unsizing] (https://github.com/rust-lang/rust/pull/101831/) - [Update to LLVM 15](https://github.com/rust-lang/rust/pull/99464/) - [Fix aarch64 call abi to correctly zeroext when needed] (https://github.com/rust-lang/rust/pull/97800/) - [debuginfo: Generalize C++-like encoding for enums] (https://github.com/rust-lang/rust/pull/98393/) - [Add `special_module_name` lint] (https://github.com/rust-lang/rust/pull/94467/) - [Add support for generating unique profraw files by default when using `-C instrument-coverage`] (https://github.com/rust-lang/rust/pull/100384/) - [Allow dynamic linking for iOS/tvOS targets] (https://github.com/rust-lang/rust/pull/100636/) New targets: - [Add armv4t-none-eabi as a tier 3 target] (https://github.com/rust-lang/rust/pull/100244/) - [Add powerpc64-unknown-openbsd and riscv64-unknown-openbsd as tier 3 targets] (https://github.com/rust-lang/rust/pull/101025/) - Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries --------- - [Don't generate `PartialEq::ne` in derive(PartialEq)] (https://github.com/rust-lang/rust/pull/98655/) - [Windows RNG: Use `BCRYPT_RNG_ALG_HANDLE` by default] (https://github.com/rust-lang/rust/pull/101325/) - [Forbid mixing `System` with direct system allocator calls] (https://github.com/rust-lang/rust/pull/101394/) - [Document no support for writing to non-blocking stdio/stderr] (https://github.com/rust-lang/rust/pull/101416/) - [`std::layout::Layout` size must not overflow `isize::MAX` when rounded up to `align`](https://github.com/rust-lang/rust/pull/95295) This also changes the safety conditions on `Layout::from_size_align_unchecked`. Stabilized APIs --------------- - [`std::backtrace::Backtrace`] (https://doc.rust-lang.org/stable/std/backtrace/struct.Backtrace.html) - [`Bound::as_ref`] (https://doc.rust-lang.org/stable/std/ops/enum.Bound.html#method.as_ref) - [`std::io::read_to_string`] (https://doc.rust-lang.org/stable/std/io/fn.read_to_string.html) - [`<*const T>::cast_mut`] (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.cast_mut) - [`<*mut T>::cast_const`] (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.cast_const) These APIs are now stable in const contexts: - [`<*const T>::offset_from`] (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from) - [`<*mut T>::offset_from`] (https://doc.rust-lang.org/stable/std/primitive.pointer.html#method.offset_from) Cargo ----- - [Apply GitHub fast path even for partial hashes] (https://github.com/rust-lang/cargo/pull/10807/) - [Do not add home bin path to PATH if it's already there] (https://github.com/rust-lang/cargo/pull/11023/) - [Take priority into account within the pending queue] (https://github.com/rust-lang/cargo/pull/11032/). This slightly optimizes job scheduling by Cargo, with typically small improvements on larger crate graph builds. Compatibility Notes ------------------- - [`std::layout::Layout` size must not overflow `isize::MAX` when rounded up to `align`] (https://github.com/rust-lang/rust/pull/95295). This also changes the safety conditions on `Layout::from_size_align_unchecked`. - [`PollFn` now only implements `Unpin` if the closure is `Unpin`] (https://github.com/rust-lang/rust/pull/102737). This is a possible breaking change if users were relying on the blanket unpin implementation. See discussion on the PR for details of why this change was made. - [Drop ExactSizeIterator impl from std::char::EscapeAscii] (https://github.com/rust-lang/rust/pull/99880) This is a backwards-incompatible change to the standard library's surface area, but is unlikely to affect real world usage. - [Do not consider a single repeated lifetime eligible for elision in the return type] (https://github.com/rust-lang/rust/pull/103450) This behavior was unintentionally changed in 1.64.0, and this release reverts that change by making this an error again. - [Reenable disabled early syntax gates as future-incompatibility lints] (https://github.com/rust-lang/rust/pull/99935/) - [Update the minimum external LLVM to 13] (https://github.com/rust-lang/rust/pull/100460/) - [Don't duplicate file descriptors into stdio fds] (https://github.com/rust-lang/rust/pull/101426/) - [Sunset RLS](https://github.com/rust-lang/rust/pull/100863/) - [Deny usage of `#![cfg_attr(..., crate_type = ...)]` to set the crate type] (https://github.com/rust-lang/rust/pull/99784/) This strengthens the forward compatibility lint deprecated_cfg_attr_crate_type_name to deny. - [`llvm-has-rust-patches` allows setting the build system to treat the LLVM as having Rust-specific patches] (https://github.com/rust-lang/rust/pull/101072) This option may need to be set for distributions that are building Rust with a patched LLVM via `llvm-config`, not the built-in LLVM. Internal Changes ---------------- These changes do not affect any public interfaces of Rust, but they represent significant improvements to the performance or internals of rustc and related tools. - [Add `x.sh` and `x.ps1` shell scripts] (https://github.com/rust-lang/rust/pull/99992/) - [compiletest: use target cfg instead of hard-coded tables] (https://github.com/rust-lang/rust/pull/100260/) - [Use object instead of LLVM for reading bitcode from rlibs] (https://github.com/rust-lang/rust/pull/98100/) - [Enable MIR inlining for optimized compilations] (https://github.com/rust-lang/rust/pull/91743) This provides a 3-10% improvement in compiletimes for real world crates. See [perf results] (https://perf.rust-lang.org/compare.html?start=aedf78e56b2279cc869962feac5153b6ba7001ed&end=0075bb4fad68e64b6d1be06bf2db366c30bc75e1&stat=instructions:u). @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.24 2021/01/12 15:37:32 jperkin Exp $ d32 1 @ 1.31 log @rust: Remove -Wl,--strip-all on SunOS. pkgsrc has its own strip handling, and we need to ensure objects aren't stripped before we optionally generate CTF data for them. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.30 2022/05/24 09:51:51 nia Exp $ a38 3 # pkgsrc handles stripping and we might need to generate CTF data. BUILDLINK_TRANSFORM.SunOS+= rm:-Wl,--strip-all @ 1.30 log @cargo.mk: use OPSYS_VERSION @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.29 2021/10/06 10:25:32 jperkin Exp $ d39 3 @ 1.29 log @rust: Add support for CARGO_WRKSRC. This defaults to WRKSRC and allows packages that aren't primarily written in rust, but have a rust component that needs to be built, to support the correct operation of cargo within their source tree. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.28 2021/10/06 10:20:24 jperkin Exp $ d42 1 a42 1 .if ${MACHINE_PLATFORM:MNetBSD-[1-9].*} && !${MACHINE_PLATFORM:MNetBSD-9.99.*} @ 1.28 log @rust: Drop digest from USE_TOOLS. It's already added to bootstrap tools by mk, and adding it here actually has the opposite effect of what's intended. It seems to confuse the tools infrastructure and defer its dependency, i.e. until it's too late, causing "digest: not found" errors if it's not already installed. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.27 2021/07/22 16:09:46 tnn Exp $ d30 1 d50 2 a51 2 ${RUN}${MKDIR} ${WRKSRC}/.cargo ${RUN}${PRINTF} "[source.crates-io]\nreplace-with = \"vendored-sources\"\n[source.vendored-sources]\ndirectory = \"${CARGO_VENDOR_DIR}\"\n" > ${WRKSRC}/.cargo/config d70 1 a70 1 }' ${WRKSRC}/Cargo.lock d86 1 a86 1 ${RUN} cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${PREFIX}/bin/cargo ${CARGO_ARGS} @ 1.27 log @rust/cargo.mk: always pass RUSTFLAGS into MAKE_ENV This will allow to clean up a number of package Makefiles. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.26 2021/05/31 14:33:02 ryoon Exp $ d28 1 a28 1 USE_TOOLS+= bsdtar digest @ 1.26 log @rust: Fix cargo module build @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.25 2021/05/31 10:17:53 he Exp $ d77 2 @ 1.25 log @Update lang/rust to version 1.52.1. Pkgsrc changes: * Bump bootstrap kit version to 1.51.0. * Adjust patches as needed. * Update checksum adjustments. * Fix syntax error in commands adjusting libserde_derive for Darwin Upstream changes: Version 1.52.1 (2021-05-10) ============================ This release disables incremental compilation, unless the user has explicitly opted in via the newly added RUSTC_FORCE_INCREMENTAL=1 environment variable. This is due to the widespread, and frequently occuring, breakage encountered by Rust users due to newly enabled incremental verification in 1.52.0. Notably, Rust users **should** upgrade to 1.52.0 or 1.52.1: the bugs that are detected by newly added incremental verification are still present in past stable versions, and are not yet fixed on any channel. These bugs can lead to miscompilation of Rust binaries. These problems only affect incremental builds, so release builds with Cargo should not be affected unless the user has explicitly opted into incremental. Debug and check builds are affected. See [84970] for more details. [84970]: https://github.com/rust-lang/rust/issues/84970 Version 1.52.0 (2021-05-06) ============================ Language -------- - [Added the `unsafe_op_in_unsafe_fn` lint, which checks whether the unsafe code in an `unsafe fn` is wrapped in a `unsafe` block.][79208] This lint is allowed by default, and may become a warning or hard error in a future edition. - [You can now cast mutable references to arrays to a pointer of the same type as the element.][81479] Compiler -------- - [Upgraded the default LLVM to LLVM 12.][81451] Added tier 3\* support for the following targets. - [`s390x-unknown-linux-musl`][82166] - [`riscv32gc-unknown-linux-musl` & `riscv64gc-unknown-linux-musl`][82202] - [`powerpc-unknown-openbsd`][82733] \* Refer to Rust's [platform support page][platform-support-doc] for more information on Rust's tiered platform support. Libraries --------- - [`OsString` now implements `Extend` and `FromIterator`.][82121] - [`cmp::Reverse` now has `#[repr(transparent)]` representation.][81879] - [`Arc` now implements `error::Error`.][80553] - [All integer division and remainder operations are now `const`.][80962] Stabilised APIs ------------- - [`Arguments::as_str`] - [`char::MAX`] - [`char::REPLACEMENT_CHARACTER`] - [`char::UNICODE_VERSION`] - [`char::decode_utf16`] - [`char::from_digit`] - [`char::from_u32_unchecked`] - [`char::from_u32`] - [`slice::partition_point`] - [`str::rsplit_once`] - [`str::split_once`] The following previously stable APIs are now `const`. - [`char::len_utf8`] - [`char::len_utf16`] - [`char::to_ascii_uppercase`] - [`char::to_ascii_lowercase`] - [`char::eq_ignore_ascii_case`] - [`u8::to_ascii_uppercase`] - [`u8::to_ascii_lowercase`] - [`u8::eq_ignore_ascii_case`] Rustdoc ------- - [Rustdoc lints are now treated as a tool lint, meaning that lints are now prefixed with `rustdoc::` (e.g. `#[warn(rustdoc::non_autolinks)]`).][80527] Using the old style is still allowed, and will become a warning in a future release. - [Rustdoc now supports argument files.][82261] - [Rustdoc now generates smart punctuation for documentation.][79423] - [You can now use "task lists" in Rustdoc Markdown.][81766] E.g. ```markdown - [x] Complete - [ ] Todo ``` Misc ---- - [You can now pass multiple filters to tests.][81356] E.g. `cargo test -- foo bar` will run all tests that match `foo` and `bar`. - [Rustup now distributes PDB symbols for the `std` library on Windows, allowing you to see `std` symbols when debugging.][82218] Internal Only ------------- These changes provide no direct user facing benefits, but represent significant improvements to the internals and overall performance of rustc and related tools. - [Check the result cache before the DepGraph when ensuring queries][81855] - [Try fast_reject::simplify_type in coherence before doing full check][81744] - [Only store a LocalDefId in some HIR nodes][81611] - [Store HIR attributes in a side table][79519] Compatibility Notes ------------------- - [Cargo build scripts are now forbidden from setting `RUSTC_BOOTSTRAP`.][cargo/9181] - [Removed support for the `x86_64-rumprun-netbsd` target.][82594] - [Deprecated the `x86_64-sun-solaris` target in favor of `x86_64-pc-solaris`.][82216] - [Rustdoc now only accepts `,`, ` `, and `\t` as delimiters for specifying languages in code blocks.][78429] - [Rustc now catches more cases of `pub_use_of_private_extern_crate`][80763] - [Changes in how proc macros handle whitespace may lead to panics when used with older `proc-macro-hack` versions. A `cargo update` should be sufficient to fix this in all cases.][84136] [84136]: https://github.com/rust-lang/rust/issues/84136 [80763]: https://github.com/rust-lang/rust/pull/80763 [82166]: https://github.com/rust-lang/rust/pull/82166 [82121]: https://github.com/rust-lang/rust/pull/82121 [81879]: https://github.com/rust-lang/rust/pull/81879 [82261]: https://github.com/rust-lang/rust/pull/82261 [82218]: https://github.com/rust-lang/rust/pull/82218 [82216]: https://github.com/rust-lang/rust/pull/82216 [82202]: https://github.com/rust-lang/rust/pull/82202 [81855]: https://github.com/rust-lang/rust/pull/81855 [81766]: https://github.com/rust-lang/rust/pull/81766 [81744]: https://github.com/rust-lang/rust/pull/81744 [81611]: https://github.com/rust-lang/rust/pull/81611 [81479]: https://github.com/rust-lang/rust/pull/81479 [81451]: https://github.com/rust-lang/rust/pull/81451 [81356]: https://github.com/rust-lang/rust/pull/81356 [80962]: https://github.com/rust-lang/rust/pull/80962 [80553]: https://github.com/rust-lang/rust/pull/80553 [80527]: https://github.com/rust-lang/rust/pull/80527 [79519]: https://github.com/rust-lang/rust/pull/79519 [79423]: https://github.com/rust-lang/rust/pull/79423 [79208]: https://github.com/rust-lang/rust/pull/79208 [78429]: https://github.com/rust-lang/rust/pull/78429 [82733]: https://github.com/rust-lang/rust/pull/82733 [82594]: https://github.com/rust-lang/rust/pull/82594 [cargo/9181]: https://github.com/rust-lang/cargo/pull/9181 [`char::MAX`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.MAX [`char::REPLACEMENT_CHARACTER`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.REPLACEMENT_CHARACTER [`char::UNICODE_VERSION`]: https://doc.rust-lang.org/std/primitive.char.html#associatedconstant.UNICODE_VERSION [`char::decode_utf16`]: https://doc.rust-lang.org/std/primitive.char.html#method.decode_utf16 [`char::from_u32`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32 [`char::from_u32_unchecked`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_u32_unchecked [`char::from_digit`]: https://doc.rust-lang.org/std/primitive.char.html#method.from_digit [`Peekable::next_if`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if [`Peekable::next_if_eq`]: https://doc.rust-lang.org/stable/std/iter/struct.Peekable.html#method.next_if_eq [`Arguments::as_str`]: https://doc.rust-lang.org/stable/std/fmt/struct.Arguments.html#method.as_str [`str::split_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.split_once [`str::rsplit_once`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.rsplit_once [`slice::partition_point`]: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.partition_point [`char::len_utf8`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf8 [`char::len_utf16`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.len_utf16 [`char::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_uppercase [`char::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.to_ascii_lowercase [`char::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.char.html#method.eq_ignore_ascii_case [`u8::to_ascii_uppercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_uppercase [`u8::to_ascii_lowercase`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.to_ascii_lowercase [`u8::eq_ignore_ascii_case`]: https://doc.rust-lang.org/stable/std/primitive.u8.html#method.eq_ignore_ascii_case @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.24 2021/01/12 15:37:32 jperkin Exp $ d54 1 a54 1 `$(${DIGEST} sha256 < ${_DISTDIR}/${crate}.crate` \ @ 1.24 log @rust: Disable SSP checks which will always fail. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.23 2020/10/20 19:03:07 tnn Exp $ d54 1 a54 1 $$(${DIGEST} sha256 < ${_DISTDIR}/${crate}.crate) \ @ 1.23 log @cargo.mk: move CARGO_FEATURES from lang/ncspot to here It seems to be a generally useful feature. If a package supports optional cargo dependencies then you may now (instead of messing with CARGO_ARGS directly) set in your Makefile for example: CARGO_NO_DEFAULT_FEATURES= YES CARGO_FEATURES+= dbus pulseaudio @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.22 2020/08/14 21:19:22 tnn Exp $ d24 2 @ 1.22 log @rust/cargo.mk: update documentation @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.21 2020/08/14 21:12:03 tnn Exp $ d69 4 a72 1 DEFAULT_CARGO_ARGS= build --offline --release -j${_MAKE_JOBS_N} @ 1.21 log @cargo.mk: some improvements - rename show-cargo-depends to print-cargo-depends (but keep a compat alias) - make it print an RCS id preamble with a comment This allows one to do "make print-cargo-depends > cargo-depends.mk" and reference cargo-depends.mk from the packages main Makefile. Makes updating packages easier. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.20 2020/08/14 20:44:16 tnn Exp $ d15 1 d17 2 a18 1 # a list of CARGO_CRATE_DEPENDS can be generated via "make show-cargo-depends". @ 1.20 log @rust/cargo.mk: add a default do-build target to reduce copypasta @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.19 2020/08/14 11:05:00 tnn Exp $ d54 1 d56 9 a64 5 show-cargo-depends: ${RUN}${AWK} '/^name = / { split($$3, a, "\""); name=a[2]; } \ /^version = / { split($$3, a, "\""); vers=a[2]; } \ /^source = / { \ print "CARGO_CRATE_DEPENDS+=\t" name "-" vers; \ @ 1.19 log @rust/cargo: replace "--frozen --locked" with "--offline" in various places The intent of "--frozen --locked" was to not use the network, but the new "--offline" option is better suited for this purpose. It for example allows us to patch Cargo.toml if necessary without having to regen checksums. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.18 2020/08/06 11:42:56 jperkin Exp $ a11 3 # do-build: # cargo build --offline # d14 1 a14 1 # --offline to generate a new valid Cargo.lock. d61 11 @ 1.18 log @rust: Update to version 1.45.2. While here clean up all pkglint warnings. Changes since 1.44.1: Version 1.45.2 (2020-08-03) ========================== * [Fix bindings in tuple struct patterns][74954] * [Fix track_caller integration with trait objects][74784] [74954]: https://github.com/rust-lang/rust/issues/74954 [74784]: https://github.com/rust-lang/rust/issues/74784 Version 1.45.1 (2020-07-30) ========================== * [Fix const propagation with references.][73613] * [rustfmt accepts rustfmt_skip in cfg_attr again.][73078] * [Avoid spurious implicit region bound.][74509] * [Install clippy on x.py install][74457] [73613]: https://github.com/rust-lang/rust/pull/73613 [73078]: https://github.com/rust-lang/rust/issues/73078 [74509]: https://github.com/rust-lang/rust/pull/74509 [74457]: https://github.com/rust-lang/rust/pull/74457 Version 1.45.0 (2020-07-16) ========================== Language -------- - [Out of range float to int conversions using `as` has been defined as a saturating conversion.][71269] This was previously undefined behaviour, but you can use the `{f64, f32}::to_int_unchecked` methods to continue using the current behaviour, which may be desirable in rare performance sensitive situations. - [`mem::Discriminant` now uses `T`'s discriminant type instead of always using `u64`.][70705] - [Function like procedural macros can now be used in expression, pattern, and statement positions.][68717] This means you can now use a function-like procedural macro anywhere you can use a declarative (`macro_rules!`) macro. Compiler -------- - [You can now override individual target features through the `target-feature` flag.][72094] E.g. `-C target-feature=+avx2 -C target-feature=+fma` is now equivalent to `-C target-feature=+avx2,+fma`. - [Added the `force-unwind-tables` flag.][69984] This option allows rustc to always generate unwind tables regardless of panic strategy. - [Added the `embed-bitcode` flag.][71716] This codegen flag allows rustc to include LLVM bitcode into generated `rlib`s (this is on by default). - [Added the `tiny` value to the `code-model` codegen flag.][72397] - [Added tier 3 support\* for the `mipsel-sony-psp` target.][72062] - [Added tier 3 support for the `thumbv7a-uwp-windows-msvc` target.][72133] \* Refer to Rust's [platform support page][forge-platform-support] for more information on Rust's tiered platform support. Libraries --------- - [`net::{SocketAddr, SocketAddrV4, SocketAddrV6}` now implements `PartialOrd` and `Ord`.][72239] - [`proc_macro::TokenStream` now implements `Default`.][72234] - [You can now use `char` with `ops::{Range, RangeFrom, RangeFull, RangeInclusive, RangeTo}` to iterate over a range of codepoints.][72413] E.g. you can now write the following; ```rust for ch in 'a'..='z' { print!("{}", ch); } println!(); // Prints "abcdefghijklmnopqrstuvwxyz" ``` - [`OsString` now implements `FromStr`.][71662] - [The `saturating_neg` method as been added to all signed integer primitive types, and the `saturating_abs` method has been added for all integer primitive types.][71886] - [`Arc`, `Rc` now implement `From>`, and `Box` now implements `From` when `T` is `[T: Copy]`, `str`, `CStr`, `OsStr`, or `Path`.][71447] - [`Box<[T]>` now implements `From<[T; N]>`.][71095] - [`BitOr` and `BitOrAssign` are implemented for all `NonZero` integer types.][69813] - [The `fetch_min`, and `fetch_max` methods have been added to all atomic integer types.][72324] - [The `fetch_update` method has been added to all atomic integer types.][71843] Stabilized APIs --------------- - [`Arc::as_ptr`] - [`BTreeMap::remove_entry`] - [`Rc::as_ptr`] - [`rc::Weak::as_ptr`] - [`rc::Weak::from_raw`] - [`rc::Weak::into_raw`] - [`str::strip_prefix`] - [`str::strip_suffix`] - [`sync::Weak::as_ptr`] - [`sync::Weak::from_raw`] - [`sync::Weak::into_raw`] - [`char::UNICODE_VERSION`] - [`Span::resolved_at`] - [`Span::located_at`] - [`Span::mixed_site`] - [`unix::process::CommandExt::arg0`] Cargo ----- Misc ---- - [Rustdoc now supports strikethrough text in Markdown.][71928] E.g. `~~outdated information~~` becomes "~~outdated information~~". - [Added an emoji to Rustdoc's deprecated API message.][72014] Compatibility Notes ------------------- - [Trying to self initialize a static value (that is creating a value using itself) is unsound and now causes a compile error.][71140] - [`{f32, f64}::powi` now returns a slightly different value on Windows.][73420] This is due to changes in LLVM's intrinsics which `{f32, f64}::powi` uses. - [Rustdoc's CLI's extra error exit codes have been removed.][71900] These were previously undocumented and not intended for public use. Rustdoc still provides a non-zero exit code on errors. Internals Only -------------- - [Make clippy a git subtree instead of a git submodule][70655] - [Unify the undo log of all snapshot types][69464] [73420]: https://github.com/rust-lang/rust/issues/73420/ [72324]: https://github.com/rust-lang/rust/pull/72324/ [71843]: https://github.com/rust-lang/rust/pull/71843/ [71886]: https://github.com/rust-lang/rust/pull/71886/ [72234]: https://github.com/rust-lang/rust/pull/72234/ [72239]: https://github.com/rust-lang/rust/pull/72239/ [72397]: https://github.com/rust-lang/rust/pull/72397/ [72413]: https://github.com/rust-lang/rust/pull/72413/ [72014]: https://github.com/rust-lang/rust/pull/72014/ [72062]: https://github.com/rust-lang/rust/pull/72062/ [72094]: https://github.com/rust-lang/rust/pull/72094/ [72133]: https://github.com/rust-lang/rust/pull/72133/ [71900]: https://github.com/rust-lang/rust/pull/71900/ [71928]: https://github.com/rust-lang/rust/pull/71928/ [71662]: https://github.com/rust-lang/rust/pull/71662/ [71716]: https://github.com/rust-lang/rust/pull/71716/ [71447]: https://github.com/rust-lang/rust/pull/71447/ [71269]: https://github.com/rust-lang/rust/pull/71269/ [71095]: https://github.com/rust-lang/rust/pull/71095/ [71140]: https://github.com/rust-lang/rust/pull/71140/ [70655]: https://github.com/rust-lang/rust/pull/70655/ [70705]: https://github.com/rust-lang/rust/pull/70705/ [69984]: https://github.com/rust-lang/rust/pull/69984/ [69813]: https://github.com/rust-lang/rust/pull/69813/ [69464]: https://github.com/rust-lang/rust/pull/69464/ [68717]: https://github.com/rust-lang/rust/pull/68717/ [`Arc::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Arc.html#method.as_ptr [`BTreeMap::remove_entry`]: https://doc.rust-lang.org/stable/std/collections/struct.BTreeMap.html#method.remove_entry [`Rc::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Rc.html#method.as_ptr [`rc::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.as_ptr [`rc::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.from_raw [`rc::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/rc/struct.Weak.html#method.into_raw [`sync::Weak::as_ptr`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.as_ptr [`sync::Weak::from_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.from_raw [`sync::Weak::into_raw`]: https://doc.rust-lang.org/stable/std/sync/struct.Weak.html#method.into_raw [`str::strip_prefix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_prefix [`str::strip_suffix`]: https://doc.rust-lang.org/stable/std/primitive.str.html#method.strip_suffix [`char::UNICODE_VERSION`]: https://doc.rust-lang.org/stable/std/char/constant.UNICODE_VERSION.html [`Span::resolved_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.resolved_at [`Span::located_at`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.located_at [`Span::mixed_site`]: https://doc.rust-lang.org/stable/proc_macro/struct.Span.html#method.mixed_site [`unix::process::CommandExt::arg0`]: https://doc.rust-lang.org/std/os/unix/process/trait.CommandExt.html#tymethod.arg0 @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.17 2020/06/14 15:33:27 nia Exp $ d13 1 a13 1 # cargo build --locked --frozen d17 1 a17 1 # --locked --frozen to generate a new valid Cargo.lock. @ 1.17 log @Rename rust-bin's PKGNAME to rust-bin. Add rust.mk for rust packages. This allows rust-bin and rust to coexist in bulk builds (for testing, etc), but the packages still may not be installed at the same time. rust.mk as a solution for picking the correct rust variant was suggested by gdt@@. It is intended to be included directly by packages that do not use cargo.mk, and indirectly by packages that do use cargo.mk. rust.mk provides one user-settable variable: RUST_TYPE as before, whether to bootstrap rust from source or use official binaries. may be "src" or "bin" And two package-settable variables: RUST_REQ the minimum version of Rust required by the package. defaults to "1.20.0" RUST_RUNTIME whether Rust is a runtime dependency, may be "yes" or "no" @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.16 2020/06/14 11:19:34 rillig Exp $ d31 4 a34 4 .for _crate in ${CARGO_CRATE_DEPENDS} DISTFILES+= ${_crate}.crate SITES.${_crate}.crate+= -${MASTER_SITE_CRATESIO}${_crate:C/-[0-9]+\.[0-9.]+.*$//}/${_crate:C/^.*-([0-9]+\.[0-9.]+.*)$/\1/}/download EXTRACT_DIR.${_crate}.crate?= ${CARGO_VENDOR_DIR} d51 1 a51 1 .for _crate in ${CARGO_CRATE_DEPENDS} d53 2 a54 2 $$(${DIGEST} sha256 < ${_DISTDIR}/${_crate}.crate) \ > ${CARGO_VENDOR_DIR}/${_crate}/.cargo-checksum.json @ 1.16 log @lang/rust: fix unsatisfiable condition in cargo.mk The condition had been the same as in Makefile before 1.174. Testing for OPSYS was unnecessary since that is included in MACHINE_PLATFORM as well. The ${VAR} syntax is easier readable since the number of exclamation marks matches the number of negations, contrary to !empty, which is effectively a positive test. Swapped the order of the conditions since it is easier to read "generally, but not" than "not this and the general case". @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.15 2020/06/08 22:37:28 he Exp $ d25 1 a25 7 .include "type.mk" .if ${RUST_TYPE} != "bin" BUILD_DEPENDS+= rust-[0-9]*:../../lang/rust .else BUILD_DEPENDS+= rust-[0-9]*:../../lang/rust-bin .endif @ 1.15 log @It looks like "checksum" is optional, and "source" isn't for "external" packages, so use the latter. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.14 2020/06/08 17:13:39 he Exp $ d45 2 a46 2 .if ${OPSYS} == "NetBSD" && !empty(MACHINE_PLATFORM:MNetBSD-9.99.*) && \ !empty(MACHINE_PLATFORM:MNetBSD-[1-9][0-9].*) @ 1.14 log @Provide a new show-cargo-depends script which works with the coming version of www/zola where the Cargo.lock file has no [metadata] section. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.13 2020/05/21 21:03:44 nia Exp $ d67 1 a67 1 /^checksum = / { \ @ 1.13 log @rust: cargo cult netbsd version check for MAKE_JOBS_SAFE @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.12 2020/05/18 16:17:20 nia Exp $ d65 5 a69 1 ${RUN}${AWK} '/^\"checksum/ { print "CARGO_CRATE_DEPENDS+=\t" $$2 "-" $$3""; next } ' ${WRKSRC}/Cargo.lock @ 1.12 log @lang: Add rust-bin. Dumb package that selects and installs a binary rust distribution based on its guess of your platform (FreeBSD, NetBSD, Linux x86_64 are all supported). These binaries are the official ones provided by rust upstream and are the same as those provided by the `rustup` tool. You can choose to use a binary rust distribution by setting: RUST_TYPE=bin in mk.conf (or source distribution with RUST_TYPE=src). Currently, RUST_TYPE=bin by default ONLY for NetBSD-x86_64. This is because TNF has been shown to _repeatedly_ be unable and _unwilling_ to ensure that rust-dependent packages build properly on their infrastructure, and NetBSD users are all suffering for it. This was based on minskim's work in pkgsrc-wip. It was tested by building librsvg and firefox-esr with the resulting binaries. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.11 2020/01/19 16:53:10 maya Exp $ d45 2 a46 1 .if ${OPSYS} == "NetBSD" @ 1.11 log @Mark all cargo-using packages as MAKE_JOBS_SAFE=no on netbsd. It triggers an rtld issue. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.10 2019/12/03 16:29:39 minskim Exp $ d25 3 d29 3 @ 1.10 log @lang/rust/cargo.mk: Remove default DIST_SUBDIR Some packages using cargo.mk have distfiles not from crates.io. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.9 2019/12/03 02:09:06 minskim Exp $ d37 6 @ 1.9 log @lang/rust/cargo.mk: Set default values for cargo package variables With these values, a Rust package downloads its own distfile from crates.io by default, and shares dependancy crate distfiles with other Rust packages to avoid multiple downloads. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.8 2019/11/03 19:04:07 rillig Exp $ a23 1 DIST_SUBDIR?= crates.io @ 1.8 log @lang: align variable assignments pkglint -Wall -F --only aligned --only indent -r No manual corrections. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.7 2019/07/17 11:04:45 fox Exp $ d23 3 @ 1.7 log @rust: Modifies the regular expression to follow semver specification used by crates. Previously, crates with a '-' outside the version and version with semver pre-release version and semver build metadata were not properly handled. Improvement suggestion by leot@@ Tested all cargo.mk users in pkgsrc. This also addresses PR/54316. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.6 2018/11/27 15:45:23 adam Exp $ d28 1 a28 1 DISTFILES?= ${DEFAULT_DISTFILES} d30 2 a31 2 DISTFILES+= ${_crate}.crate SITES.${_crate}.crate+= -${MASTER_SITE_CRATESIO}${_crate:C/-[0-9]+\.[0-9.]+.*$//}/${_crate:C/^.*-([0-9]+\.[0-9.]+.*)$/\1/}/download @ 1.6 log @rust: speed-up building; clean-ups - use 'build' target for building, not 'dist' - set jobs also for install target - do not generate tarballs; we don't need them, but they take a lot of disk-space - do not install 'src' - do not generate 'install.log' nor 'uninstall.sh' - on Darwin, use headerpad_max_install_names to be able to fix all dylibs - make optimized bootstrap - pkglint fixes - get ready to depend on lang/llvm and devel/jemalloc @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.5 2018/11/27 14:02:11 maya Exp $ d31 1 a31 1 SITES.${_crate}.crate+= -${MASTER_SITE_CRATESIO}${_crate:C/-[0-9.]+$//}/${_crate:C/^.*-([0-9.]+)$/\1/}/download @ 1.5 log @Replace, not append to WRKSRC/.cargo/config. This may cause problems if there's already one. Needed by rust librsvg. Tested all cargo.mk users in pkgsrc. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.4 2018/10/23 16:39:29 minskim Exp $ d31 1 a31 1 SITES.${_crate}.crate+= -${MASTER_SITE_CRATESIO}${_crate:C/-[0-9.]+$//}/${_crate:C/^.*-([0-9.]+)$/\1/}/download @ 1.4 log @lang/rust: Extract .cargo without making a copy in ${WRKDIR} @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.3 2018/09/21 21:26:33 minskim Exp $ d40 1 a40 1 ${RUN}${PRINTF} "[source.crates-io]\nreplace-with = \"vendored-sources\"\n[source.vendored-sources]\ndirectory = \"${CARGO_VENDOR_DIR}\"\n" >> ${WRKSRC}/.cargo/config @ 1.3 log @lang/rust: Move common BUILD_DEPENDS in rust packages to cargo.mk @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.2 2018/05/06 01:59:36 maya Exp $ d32 1 a42 1 ${RUN}${TOOLS_PATH.bsdtar} -C ${CARGO_VENDOR_DIR} -xzf ${WRKDIR}/${_crate}.crate d44 1 a44 1 $$(${DIGEST} sha256 < ${WRKDIR}/${_crate}.crate) \ @ 1.2 log @Add a show-cargo-depends target, sparing the effort of listing cargo dependencies manually. Document a bit and give some helpful tips. @ text @d1 1 a1 1 # $NetBSD: cargo.mk,v 1.1 2017/11/08 13:40:10 tnn Exp $ d23 2 @ 1.1 log @rust: cargo.mk: crates.io helper Makefile snippet Common logic that can be used by packages that depend on cargo crates from crates.io. This lets existing pkgsrc infrastructure fetch and verify cargo crates instead of using the rust package manager in the build phase. Inspired by cargo.mk from FreeBSD ports. @ text @d1 1 a1 1 # $NetBSD$ d15 6 d45 4 @