From 2c40635ea4ce7eb14d067f126577a6ed40cafdad Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Thu, 14 Sep 2023 14:37:33 +0200 Subject: [PATCH] Initial import (winnow 0.4 compat package) --- .gitignore | 1 + README.md | 3 - rust-winnow0.4.spec | 122 +++++++++++++++++++++++++++++++++ sources | 1 + winnow-fix-metadata.diff | 142 +++++++++++++++++++++++++++++++++++++++ 5 files changed, 266 insertions(+), 3 deletions(-) create mode 100644 .gitignore delete mode 100644 README.md create mode 100644 rust-winnow0.4.spec create mode 100644 sources create mode 100644 winnow-fix-metadata.diff diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8b5e78 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/winnow-0.4.11.crate diff --git a/README.md b/README.md deleted file mode 100644 index 0940bef..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-winnow0.4 - -The rust-winnow0.4 package diff --git a/rust-winnow0.4.spec b/rust-winnow0.4.spec new file mode 100644 index 0000000..094b0f9 --- /dev/null +++ b/rust-winnow0.4.spec @@ -0,0 +1,122 @@ +# Generated by rust2rpm 24 +%bcond_without check +%global debug_package %{nil} + +%global crate winnow + +Name: rust-winnow0.4 +Version: 0.4.11 +Release: %autorelease +Summary: Byte-oriented, zero-copy, parser combinators library + +License: MIT +URL: https://crates.io/crates/winnow +Source: %{crates_source} +# Manually created patch for downstream crate metadata changes +# * remove references to benchmark and example binaries from Cargo.toml +# * drop unused, benchmark-only criterion dev-dependency to speed up builds +# * drop dev-dependencies which are only needed for example binaries +# * drop unused "debug" feature with outdated dependencies +Patch: winnow-fix-metadata.diff + +BuildRequires: cargo-rpm-macros >= 24 + +%global _description %{expand: +A byte-oriented, zero-copy, parser combinators library.} + +%description %{_description} + +%package devel +Summary: %{summary} +BuildArch: noarch + +%description devel %{_description} + +This package contains library source intended for building other packages which +use the "%{crate}" crate. + +%files devel +%license %{crate_instdir}/LICENSE-MIT +%doc %{crate_instdir}/README.md +%{crate_instdir}/ + +%package -n %{name}+default-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+default-devel %{_description} + +This package contains library source intended for building other packages which +use the "default" feature of the "%{crate}" crate. + +%files -n %{name}+default-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+simd-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+simd-devel %{_description} + +This package contains library source intended for building other packages which +use the "simd" feature of the "%{crate}" crate. + +%files -n %{name}+simd-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+unstable-doc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unstable-doc-devel %{_description} + +This package contains library source intended for building other packages which +use the "unstable-doc" feature of the "%{crate}" crate. + +%files -n %{name}+unstable-doc-devel +%ghost %{crate_instdir}/Cargo.toml + +%prep +%autosetup -n %{crate}-%{version_no_tilde} -p1 +%cargo_prep + +%generate_buildrequires +%cargo_generate_buildrequires + +%build +%cargo_build + +%install +%cargo_install + +%if %{with check} +%check +%cargo_test +%endif + +%changelog +%autochangelog diff --git a/sources b/sources new file mode 100644 index 0000000..68a9125 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +SHA512 (winnow-0.4.11.crate) = cdb0989a28d442b9c8b949eb19863a7fbd3197533dc0716a33df4bca5244622f5d321eac3643b705b9d265c76114872e39d43b5d2770ac6bb39d77086b4a85c6 diff --git a/winnow-fix-metadata.diff b/winnow-fix-metadata.diff new file mode 100644 index 0000000..2832746 --- /dev/null +++ b/winnow-fix-metadata.diff @@ -0,0 +1,142 @@ +--- winnow-0.4.11/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ winnow-0.4.11/Cargo.toml 2023-09-13T20:29:21.509385+00:00 +@@ -83,117 +83,10 @@ + [Unreleased]: https://github.com/winnow-rs/winnow/compare/{{tag_name}}...HEAD""" + search = "" + +-[profile.bench] +-lto = true +-codegen-units = 1 +-debug = 2 +- +-[[example]] +-name = "arithmetic" +-test = true +-required-features = ["alloc"] +- +-[[example]] +-name = "css" +-test = true +-required-features = ["alloc"] +- +-[[example]] +-name = "custom_error" +-test = true +-required-features = ["alloc"] +- +-[[example]] +-name = "http" +-required-features = ["alloc"] +- +-[[example]] +-name = "ini" +-test = true +-required-features = ["std"] +- +-[[example]] +-name = "json" +-test = true +-required-features = ["std"] +- +-[[example]] +-name = "ndjson" +-test = true +-required-features = ["std"] +- +-[[example]] +-name = "json_iterator" +-required-features = ["std"] +- +-[[example]] +-name = "iterator" +- +-[[example]] +-name = "s_expression" +-required-features = ["alloc"] +- +-[[example]] +-name = "string" +-required-features = ["alloc"] +- +-[[bench]] +-name = "arithmetic" +-path = "examples/arithmetic/bench.rs" +-harness = false +- +-[[bench]] +-name = "contains_token" +-harness = false +- +-[[bench]] +-name = "number" +-harness = false +- +-[[bench]] +-name = "http" +-path = "examples/http/bench.rs" +-harness = false +-required-features = ["alloc"] +- +-[[bench]] +-name = "ini" +-path = "examples/ini/bench.rs" +-harness = false +-required-features = ["std"] +- +-[[bench]] +-name = "json" +-path = "examples/json/bench.rs" +-harness = false +-required-features = ["std"] +- +-[dependencies.anstyle] +-version = "0.3.5" +-optional = true +- +-[dependencies.anstyle-stream] +-version = "0.2.2" +-optional = true +- +-[dependencies.is-terminal] +-version = "0.4.7" +-optional = true +- + [dependencies.memchr] + version = "2.5" + optional = true + default-features = false +- +-[dependencies.terminal_size] +-version = "0.2.6" +-optional = true +- +-[dev-dependencies.circular] +-version = "0.3.0" +- +-[dev-dependencies.criterion] +-version = "0.3.6" + + [dev-dependencies.doc-comment] + version = "0.3" +@@ -207,21 +100,8 @@ + [dev-dependencies.proptest] + version = "1.2.0" + +-[dev-dependencies.snapbox] +-version = "0.4.11" +-features = ["examples"] +- +-[dev-dependencies.term-transcript] +-version = "0.2.0" +- + [features] + alloc = [] +-debug = [ +- "dep:anstyle", +- "dep:is-terminal", +- "dep:terminal_size", +- "dep:anstyle-stream", +-] + default = ["std"] + simd = ["dep:memchr"] + std = [