From 8a8a23e26a49b405a42ce577bfd2fc0bf859558b Mon Sep 17 00:00:00 2001 From: Igor Gnatenko Date: Sat, 26 Jan 2019 11:01:02 +0100 Subject: [PATCH] Add unicase feature back Signed-off-by: Igor Gnatenko --- 0001-Remove-unicase-support.patch | 47 ----------------------------- phf_shared-0.7.22-fix-metadata.diff | 12 -------- rust-phf_shared.spec | 29 ++++++++++++------ 3 files changed, 19 insertions(+), 69 deletions(-) delete mode 100644 0001-Remove-unicase-support.patch delete mode 100644 phf_shared-0.7.22-fix-metadata.diff diff --git a/0001-Remove-unicase-support.patch b/0001-Remove-unicase-support.patch deleted file mode 100644 index b6246c8..0000000 --- a/0001-Remove-unicase-support.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 6c30f50f02209070090849e9f0d996353280361b Mon Sep 17 00:00:00 2001 -From: Steven Fackler -Date: Sat, 13 Jan 2018 15:41:15 -0800 -Subject: [PATCH] Remove unicase support - -It's out of date, and was only added for Servo which no longer uses it. - -Closes #113 -Closes #109 -Closes #114 ---- - phf_shared/src/lib.rs | 12 ------------ - 1 file changed, 12 deletions(-) - -diff --git a/phf_shared/src/lib.rs b/phf_shared/src/lib.rs -index 7656c69..43074fd 100644 ---- a/phf_shared/src/lib.rs -+++ b/phf_shared/src/lib.rs -@@ -6,9 +6,6 @@ extern crate std as core; - - extern crate siphasher; - --#[cfg(feature = "unicase")] --extern crate unicase; -- - use core::hash::{Hasher, Hash}; - use siphasher::sip::SipHasher13; - -@@ -110,15 +107,6 @@ impl PhfHash for [u8] { - } - } - --#[cfg(feature = "unicase")] --impl PhfHash for unicase::UniCase --where unicase::UniCase: Hash { -- #[inline] -- fn phf_hash(&self, state: &mut H) { -- self.hash(state) -- } --} -- - macro_rules! sip_impl( - (le $t:ty) => ( - impl PhfHash for $t { --- -2.16.1 - diff --git a/phf_shared-0.7.22-fix-metadata.diff b/phf_shared-0.7.22-fix-metadata.diff deleted file mode 100644 index 7e03864..0000000 --- a/phf_shared-0.7.22-fix-metadata.diff +++ /dev/null @@ -1,12 +0,0 @@ ---- phf_shared-0.7.22/Cargo.toml 1969-12-31T16:00:00-08:00 -+++ phf_shared-0.7.22/Cargo.toml 2018-05-02T14:15:06.534053-07:00 -@@ -26,9 +26,5 @@ - [dependencies.siphasher] - version = "0.2" - --[dependencies.unicase] --version = "1.4" --optional = true -- - [features] - core = [] diff --git a/rust-phf_shared.spec b/rust-phf_shared.spec index 1b42f3f..7966147 100644 --- a/rust-phf_shared.spec +++ b/rust-phf_shared.spec @@ -6,23 +6,19 @@ Name: rust-%{crate} Version: 0.7.24 -Release: 1%{?dist} +Release: 2%{?dist} Summary: Support code shared by PHF libraries # https://github.com/sfackler/rust-phf/pull/118 License: MIT URL: https://crates.io/crates/phf_shared -Source0: https://crates.io/api/v1/crates/%{crate}/%{version}/download#/%{crate}-%{version}.crate -# Initial patched metadata -# * Remove unicase dependency, https://github.com/sfackler/rust-phf/pull/117 -Patch0: phf_shared-0.7.22-fix-metadata.diff -# Really remove unicase -Patch1: 0001-Remove-unicase-support.patch +Source: %{crates_source} ExclusiveArch: %{rust_arches} BuildRequires: rust-packaging BuildRequires: (crate(siphasher/default) >= 0.2.0 with crate(siphasher/default) < 0.3.0) +BuildRequires: (crate(unicase/default) >= 1.4.0 with crate(unicase/default) < 2.0.0) %global _description \ Support code shared by PHF libraries. @@ -65,10 +61,20 @@ which use "core" feature of "%{crate}" crate. %files -n %{name}+core-devel %ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml +%package -n %{name}+unicase-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+unicase-devel %{_description} + +This package contains library source intended for building other packages +which use "unicase" feature of "%{crate}" crate. + +%files -n %{name}+unicase-devel +%ghost %{cargo_registry}/%{crate}-%{version}/Cargo.toml + %prep -%autosetup -n %{crate}-%{version} -N -%patch0 -p1 -%patch1 -p2 +%autosetup -n %{crate}-%{version} -p1 %cargo_prep %build @@ -83,6 +89,9 @@ which use "core" feature of "%{crate}" crate. %endif %changelog +* Sat Jan 26 2019 Igor Gnatenko - 0.7.24-2 +- Add unicase feature back + * Tue Jan 08 2019 Josh Stone - 0.7.24-1 - Update to 0.7.24