From nobody Mon Oct 25 08:57:32 2021 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id DEC4018113EC; Mon, 25 Oct 2021 08:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Hd83k1cKDz4mMZ; Mon, 25 Oct 2021 08:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AE0F825BFC; Mon, 25 Oct 2021 08:57:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19P8vWeD099652; Mon, 25 Oct 2021 08:57:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19P8vW7F099651; Mon, 25 Oct 2021 08:57:32 GMT (envelope-from git) Date: Mon, 25 Oct 2021 08:57:32 GMT Message-Id: <202110250857.19P8vW7F099651@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Tobias Kortkamp Subject: git: 83810086906d - main - devel/cargo-c: Backport patch-in-config stabilization in Rust 1.56.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tobik X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 83810086906d648ffc380fd351dd43481f946666 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by tobik: URL: https://cgit.FreeBSD.org/ports/commit/?id=83810086906d648ffc380fd351dd43481f946666 commit 83810086906d648ffc380fd351dd43481f946666 Author: Tobias Kortkamp AuthorDate: 2021-10-18 20:35:01 +0000 Commit: Tobias Kortkamp CommitDate: 2021-10-25 08:49:18 +0000 devel/cargo-c: Backport patch-in-config stabilization in Rust 1.56.0 Unbreaks multimedia/gstreamer1-plugins-rust PR: 256581 --- devel/cargo-c/Makefile | 1 + devel/cargo-c/files/patch-rust-1.56.0 | 51 +++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/devel/cargo-c/Makefile b/devel/cargo-c/Makefile index a72719d0206c..1194f0493233 100644 --- a/devel/cargo-c/Makefile +++ b/devel/cargo-c/Makefile @@ -1,6 +1,7 @@ PORTNAME= cargo-c DISTVERSION= 0.9.4 DISTVERSIONSUFFIX= +cargo-0.56 +PORTREVISION= 1 CATEGORIES= devel MASTER_SITES= CRATESIO # XXX Teach USES=cargo to have proper default diff --git a/devel/cargo-c/files/patch-rust-1.56.0 b/devel/cargo-c/files/patch-rust-1.56.0 new file mode 100644 index 000000000000..054f0e6756d0 --- /dev/null +++ b/devel/cargo-c/files/patch-rust-1.56.0 @@ -0,0 +1,51 @@ +https://github.com/rust-lang/cargo/commit/1e0d564ff01f + +--- cargo-crates/cargo-0.56.0/src/cargo/core/features.rs.orig 1970-01-01 00:00:00 UTC ++++ cargo-crates/cargo-0.56.0/src/cargo/core/features.rs +@@ -645,7 +645,6 @@ unstable_cli_options!( + panic_abort_tests: bool = ("Enable support to run tests with -Cpanic=abort"), + host_config: bool = ("Enable the [host] section in the .cargo/config.toml file"), + target_applies_to_host: bool = ("Enable the `target-applies-to-host` key in the .cargo/config.toml file"), +- patch_in_config: bool = ("Allow `[patch]` sections in .cargo/config.toml files"), + rustdoc_map: bool = ("Allow passing external documentation mappings to rustdoc"), + separate_nightlies: bool = (HIDDEN), + terminal_width: Option> = ("Provide a terminal width to rustc for error truncation"), +@@ -689,6 +688,8 @@ const STABILIZED_FEATURES: &str = "The new feature res + See https://doc.rust-lang.org/nightly/cargo/reference/features.html#feature-resolver-version-2 \ + for more information."; + ++const STABILIZED_PATCH_IN_CONFIG: &str = "The patch-in-config feature is now always enabled."; ++ + fn deserialize_build_std<'de, D>(deserializer: D) -> Result>, D::Error> + where + D: serde::Deserializer<'de>, +@@ -834,7 +835,6 @@ impl CliUnstable { + "configurable-env" => self.configurable_env = parse_empty(k, v)?, + "host-config" => self.host_config = parse_empty(k, v)?, + "target-applies-to-host" => self.target_applies_to_host = parse_empty(k, v)?, +- "patch-in-config" => self.patch_in_config = parse_empty(k, v)?, + "features" => { + // For now this is still allowed (there are still some + // unstable options like "compare"). This should be removed at +@@ -869,6 +869,7 @@ impl CliUnstable { + "config-profile" => stabilized_warn(k, "1.43", STABILIZED_CONFIG_PROFILE), + "crate-versions" => stabilized_warn(k, "1.47", STABILIZED_CRATE_VERSIONS), + "package-features" => stabilized_warn(k, "1.51", STABILIZED_PACKAGE_FEATURES), ++ "patch-in-config" => stabilized_warn(k, "1.56", STABILIZED_PATCH_IN_CONFIG), + "future-incompat-report" => self.future_incompat_report = parse_empty(k, v)?, + _ => bail!("unknown `-Z` flag specified: {}", k), + } +--- cargo-crates/cargo-0.56.0/src/cargo/core/workspace.rs.orig 1970-01-01 00:00:00 UTC ++++ cargo-crates/cargo-0.56.0/src/cargo/core/workspace.rs +@@ -362,11 +362,6 @@ impl<'cfg> Workspace<'cfg> { + BTreeMap>>, + > = self.config.get("patch")?; + +- if config_patch.is_some() && !self.config.cli_unstable().patch_in_config { +- self.config.shell().warn("`[patch]` in cargo config was ignored, the -Zpatch-in-config command-line flag is required".to_owned())?; +- return Ok(HashMap::new()); +- } +- + let source = SourceId::for_path(self.root())?; + + let mut warnings = Vec::new();