From 4ba68f2fe6edfee6895992e615bcf60e576b142a Mon Sep 17 00:00:00 2001 From: Roy7Kim Date: Mon, 20 Mar 2023 13:46:43 +0900 Subject: [PATCH] Bump to rust-pin-project 1.0.12 --- packaging/extern.patch | 21 ++++++++ packaging/rust-pin-project.manifest | 5 ++ packaging/rust-pin-project.spec | 75 +++++++++++++++++++++++++++++ 3 files changed, 101 insertions(+) create mode 100644 packaging/extern.patch create mode 100644 packaging/rust-pin-project.manifest create mode 100644 packaging/rust-pin-project.spec diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..a477fe8 --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,21 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 5fa9298..6d1a9cd 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -66,6 +66,7 @@ + //! [pin-projection]: core::pin#projections-and-structural-pinning + //! [struct-default-expanded]: https://github.com/taiki-e/pin-project/blob/HEAD/examples/struct-default-expanded.rs + ++ + #![no_std] + #![doc(test( + no_crate_inject, +@@ -91,6 +92,8 @@ + )] + #![allow(clippy::needless_doctest_main)] + ++extern crate std; ++ + #[doc(inline)] + pub use pin_project_internal::pin_project; + #[doc(inline)] diff --git a/packaging/rust-pin-project.manifest b/packaging/rust-pin-project.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-pin-project.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-pin-project.spec b/packaging/rust-pin-project.spec new file mode 100644 index 0000000..f83848d --- /dev/null +++ b/packaging/rust-pin-project.spec @@ -0,0 +1,75 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate pin-project +%global real_crate_name pin_project +%global rustc_edition 2018 + +Name: rust-pin-project +Version: 1.0.12 +Release: 1 +Summary: Crate for safe and ergonomic pin-projection + +License: Apache-2.0 OR MIT +URL: https://crates.io/crates/pin-project +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-pin-project-internal + +# ========================================================== +# dev-dependencies +# ========================================================== +# BuildRequires: rust-macrotest +# BuildRequires: rust-rustversion +# BuildRequires: rust-static_assertions +# BuildRequires: rust-trybuild + + +%description +Crate for safe and ergonomic pin-projection. + +%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 pin_project_internal \ + ./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-APACHE + %license LICENSE-MIT + %{_rust_dylibdir}/lib%{real_crate_name}.so -- 2.34.1