parent
da5bfa9ba4
commit
32564a348e
@ -0,0 +1 @@
|
|||||||
|
/phf_shared-0.7.21.crate
|
@ -0,0 +1,47 @@
|
|||||||
|
From 6c30f50f02209070090849e9f0d996353280361b Mon Sep 17 00:00:00 2001
|
||||||
|
From: Steven Fackler <sfackler@gmail.com>
|
||||||
|
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<S> PhfHash for unicase::UniCase<S>
|
||||||
|
-where unicase::UniCase<S>: Hash {
|
||||||
|
- #[inline]
|
||||||
|
- fn phf_hash<H: Hasher>(&self, state: &mut H) {
|
||||||
|
- self.hash(state)
|
||||||
|
- }
|
||||||
|
-}
|
||||||
|
-
|
||||||
|
macro_rules! sip_impl(
|
||||||
|
(le $t:ty) => (
|
||||||
|
impl PhfHash for $t {
|
||||||
|
--
|
||||||
|
2.16.1
|
||||||
|
|
@ -0,0 +1,7 @@
|
|||||||
|
--- phf_shared-0.7.21/Cargo.toml 2017-01-19T09:16:46+01:00
|
||||||
|
+++ phf_shared-0.7.21/Cargo.toml 2018-01-24T14:32:56.215941+01:00
|
||||||
|
@@ -17,4 +17,3 @@
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
siphasher = "0.2"
|
||||||
|
-unicase = { version = "1.4", optional = true }
|
@ -0,0 +1,63 @@
|
|||||||
|
# Generated by rust2rpm
|
||||||
|
%bcond_without check
|
||||||
|
%global debug_package %{nil}
|
||||||
|
|
||||||
|
%global crate phf_shared
|
||||||
|
|
||||||
|
Name: rust-%{crate}
|
||||||
|
Version: 0.7.21
|
||||||
|
Release: 1%{?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 unihash dependency, https://github.com/sfackler/rust-phf/pull/117
|
||||||
|
Patch0: phf_shared-0.7.21-fix-metadata.diff
|
||||||
|
# Really remove unihash
|
||||||
|
Patch1: 0001-Remove-unicase-support.patch
|
||||||
|
|
||||||
|
ExclusiveArch: %{rust_arches}
|
||||||
|
|
||||||
|
BuildRequires: rust-packaging
|
||||||
|
# [dependencies]
|
||||||
|
BuildRequires: (crate(siphasher) >= 0.2.0 with crate(siphasher) < 0.3.0)
|
||||||
|
|
||||||
|
%description
|
||||||
|
%{summary}.
|
||||||
|
|
||||||
|
%package devel
|
||||||
|
Summary: %{summary}
|
||||||
|
BuildArch: noarch
|
||||||
|
|
||||||
|
%description devel
|
||||||
|
Support code shared by PHF libraries.
|
||||||
|
|
||||||
|
This package contains library source intended for building other packages
|
||||||
|
which use %{crate} from crates.io.
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{crate}-%{version} -N
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p2
|
||||||
|
%cargo_prep
|
||||||
|
|
||||||
|
%build
|
||||||
|
%cargo_build
|
||||||
|
|
||||||
|
%install
|
||||||
|
%cargo_install
|
||||||
|
|
||||||
|
%if %{with check}
|
||||||
|
%check
|
||||||
|
%cargo_test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files devel
|
||||||
|
%{cargo_registry}/%{crate}-%{version}/
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Jan 24 2018 Igor Gnatenko <ignatenkobrain@fedoraproject.org> - 0.7.21-1
|
||||||
|
- Initial package
|
Loading…
Reference in new issue