From: Woohyun Jung Date: Tue, 14 Mar 2023 05:04:23 +0000 (+0900) Subject: Bump to rust-regex 1.7.1 X-Git-Tag: accepted/tizen/rust/20231016.021752~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c312ddb617b8b888126322f64a3da7579a472ba0;p=platform%2Fupstream%2Frust-regex.git Bump to rust-regex 1.7.1 --- diff --git a/packaging/extern.patch b/packaging/extern.patch new file mode 100644 index 0000000..3be94be --- /dev/null +++ b/packaging/extern.patch @@ -0,0 +1,10 @@ +diff --git a/src/lib.rs b/src/lib.rs +index 6b95739..bc7541c 100644 +--- a/src/lib.rs ++++ b/src/lib.rs +@@ -767,3 +767,5 @@ pub mod internal { + pub use crate::literal::LiteralSearcher; + pub use crate::prog::{EmptyLook, Inst, InstRanges, Program}; + } ++ ++extern crate regex_syntax; diff --git a/packaging/rust-regex.manifest b/packaging/rust-regex.manifest new file mode 100644 index 0000000..017d22d --- /dev/null +++ b/packaging/rust-regex.manifest @@ -0,0 +1,5 @@ + + + + + diff --git a/packaging/rust-regex.spec b/packaging/rust-regex.spec new file mode 100644 index 0000000..a89e6ee --- /dev/null +++ b/packaging/rust-regex.spec @@ -0,0 +1,80 @@ +# Generated by rust2rpm 23 +%global _rpm_strip_disable 1 +%global debug_package %{nil} + +%global crate regex +%global real_crate_name regex +%global rustc_edition 2018 + +Name: rust-regex +Version: 1.7.1 +Release: 1 +Summary: Implementation of regular expressions for Rust + +License: MIT OR Apache-2.0 +URL: https://crates.io/crates/regex +Source: %{crate}-%{version}.tar.gz +Source1: %{name}.manifest +Source2: extern.patch + +# ========================================================== +# BuildRequires +# specifies build-time dependencies for the package +# ========================================================== +BuildRequires: rust +BuildRequires: rust-aho-corasick +BuildRequires: rust-memchr +BuildRequires: rust-regex-syntax + +# ========================================================== +# dev-dependencies +# ========================================================== +# BuildRequires: rust-lazy_static +# BuildRequires: rust-quickcheck +# BuildRequires: rust-rand + + +%description +Implementation of regular expressions for Rust. This implementation uses finite +automata and guarantees linear time matching on all inputs. + +%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}} \ + --cfg='feature="std"' \ + --cfg='feature="perf"' \ + --cfg='feature="unicode"' \ + --cfg='feature="regex-syntax/default"' \ + ./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