From 18b57e6c739cee33af58324005023ae6a722f9b6 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Sun, 29 Sep 2024 18:15:05 +0200 Subject: [PATCH] Drop unused, benchmark-only bencher dev-dependency --- rust-utf8-width.spec | 5 ++++- rust2rpm.toml | 3 +++ utf8-width-fix-metadata.diff | 15 +++++++++++++++ 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 utf8-width-fix-metadata.diff diff --git a/rust-utf8-width.spec b/rust-utf8-width.spec index 070d43d..525dcd3 100644 --- a/rust-utf8-width.spec +++ b/rust-utf8-width.spec @@ -1,4 +1,4 @@ -# Generated by rust2rpm 25 +# Generated by rust2rpm 26 %bcond_without check %global debug_package %{nil} @@ -12,6 +12,9 @@ Summary: Determine the width of a UTF-8 character by providing its first License: MIT URL: https://crates.io/crates/utf8-width Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * drop unused, benchmark-only bencher dev-dependency +Patch: utf8-width-fix-metadata.diff BuildRequires: cargo-rpm-macros >= 24 diff --git a/rust2rpm.toml b/rust2rpm.toml index b34fabc..08a87ff 100644 --- a/rust2rpm.toml +++ b/rust2rpm.toml @@ -1,3 +1,6 @@ [package] summary = "Determine the width of a UTF-8 character by providing its first byte" +cargo-toml-patch-comments = [ + "drop unused, benchmark-only bencher dev-dependency", +] diff --git a/utf8-width-fix-metadata.diff b/utf8-width-fix-metadata.diff new file mode 100644 index 0000000..426b86f --- /dev/null +++ b/utf8-width-fix-metadata.diff @@ -0,0 +1,15 @@ +--- utf8-width-0.1.7/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ utf8-width-0.1.7/Cargo.toml 2024-09-29T16:12:57.252893+00:00 +@@ -37,12 +37,3 @@ + ] + license = "MIT" + repository = "https://github.com/magiclen/utf8-width" +- +-[[bench]] +-name = "bench" +-harness = false +- +-[dependencies] +- +-[dev-dependencies.bencher] +-version = "0.1.5"