From f94a51dcbb3a6386753a05f746685aa469ae6e9b Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Thu, 22 May 2025 15:13:27 +0900 Subject: [PATCH] Bump to rust-enum-iterator 2.1.0 --- packaging/extern.patch | 12 +++++ packaging/rust-enum-iterator.manifest | 5 ++ packaging/rust-enum-iterator.spec | 69 +++++++++++++++++++++++++++ 3 files changed, 86 insertions(+) create mode 100644 packaging/extern.patch create mode 100644 packaging/rust-enum-iterator.manifest create mode 100644 packaging/rust-enum-iterator.spec diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..db855ca --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,12 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 16d4726..da9e2ba 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -62,7 +62,6 @@ + + #![deny(missing_docs)] + #![deny(warnings)] +-#![no_std] + + use core::{cmp::Ordering, iter::FusedIterator, ops::ControlFlow, task::Poll}; + diff --git a/packaging/rust-enum-iterator.manifest b/packaging/rust-enum-iterator.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-enum-iterator.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-enum-iterator.spec b/packaging/rust-enum-iterator.spec new file mode 100644 index 0000000..291eb99 --- /dev/null +++ b/packaging/rust-enum-iterator.spec @@ -0,0 +1,69 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate enum-iterator +%global real_crate_name enum_iterator +%global rustc_edition 2021 + +Name: rust-enum-iterator +Version: 2.1.0 +Release: 1 +Summary: Tools to iterate over all values of a type (e.g + +License: 0BSD +URL: https://crates.io/crates/enum-iterator +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-enum-iterator-derive + +Requires: rust-enum-iterator-derive + + +%description +Tools to iterate over all values of a type (e.g. all variants of an +enumeration). + +%prep +%setup -q +cp %{SOURCE1} . +%{__patch} -p1 < %{SOURCE2} + +# ========================================================== +# build section +# crate-type : dylib, proc-macro, cdylib, bin, etc. +# ========================================================== +%build +%{rustc_std_build} --crate-type=dylib \ + --crate-name=%{real_crate_name} \ + %{?rustc_edition:--edition=%{rustc_edition}} \ + %rust_dylib_extern enum_iterator_derive \ + ./src/lib.rs + +# ========================================================== +# install section +# ========================================================== +%install +install -d -m 0755 %{buildroot}%{_rust_dylibdir} +install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_rust_dylibdir}/lib%{real_crate_name}.so + +%clean + +%post -p /sbin/ldconfig + +%postun -p /sbin/ldconfig + +# ========================================================== +# files section +# ========================================================== +%files +%manifest %{name}.manifest +%license LICENSE +%{_rust_dylibdir}/lib%{real_crate_name}.so -- 2.34.1