From: DongHun Kwak Date: Tue, 7 Feb 2023 05:47:16 +0000 (+0900) Subject: Bump to rust-proc-macro2 1.0.51 X-Git-Tag: accepted/tizen/rust/20231016.021715~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ca42e30ada1cd3914fc6ebb051987e799bc6a377;p=platform%2Fupstream%2Frust-proc-macro2.git Bump to rust-proc-macro2 1.0.51 --- diff --git a/packaging/extern_core-unicode_ident.patch b/packaging/extern_core-unicode_ident.patch new file mode 100644 index 0000000..279831c --- /dev/null +++ b/packaging/extern_core-unicode_ident.patch @@ -0,0 +1,14 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 261c167..3a763a3 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -121,6 +121,9 @@ compile_error! {"\ + #[cfg(use_proc_macro)] + extern crate proc_macro; + ++extern crate core; ++extern crate unicode_ident; ++ + mod marker; + mod parse; + mod rcvec; diff --git a/packaging/rust-proc-macro2.manifest b/packaging/rust-proc-macro2.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-proc-macro2.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-proc-macro2.spec b/packaging/rust-proc-macro2.spec new file mode 100644 index 0000000..2e9fdeb --- /dev/null +++ b/packaging/rust-proc-macro2.spec @@ -0,0 +1,68 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate proc-macro2 +%global real_crate_name proc_macro2 + +Name: rust-proc-macro2 +Version: 1.0.51 +Release: 1%{?dist} +Summary: Substitute implementation of the compiler's `proc_macro` API to decouple token-based libraries from the procedural macro use case + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/proc-macro2 +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern_core-unicode_ident.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-unicode-ident + + +%description +Substitute implementation of the compiler's `proc_macro` API to decouple token- +based libraries from the procedural macro use case. + +%prep +%setup -q +cp %{SOURCE1} . +%{__patch} -p1 < %{SOURCE2} + +# ========================================================== +# build section +# ========================================================== +%build +rust_std=$(find %{_libdir} -maxdepth 1 -name "libstd-*\.so") +rustc -C prefer-dynamic \ + --crate-type=dylib \ + --crate-name="%{real_crate_name}" \ + --extern std=${rust_std} \ + -L%{_libdir} -lunicode_ident \ + ./src/lib.rs + +# ========================================================== +# install section +# ========================================================== +%install +install -d -m 0755 %{buildroot}%{_libdir} +install -m 0644 lib%{real_crate_name}.so %{buildroot}/%{_libdir}/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 +%{_libdir}/lib%{real_crate_name}.so