diff --git a/.gitignore b/.gitignore index 1baae1e..e939384 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ /fastrand-1.7.0.crate /fastrand-1.8.0.crate /fastrand-1.9.0.crate +/fastrand-2.0.0.crate diff --git a/README.md b/README.md deleted file mode 100644 index 35ea434..0000000 --- a/README.md +++ /dev/null @@ -1,3 +0,0 @@ -# rust-fastrand - -The rust-fastrand package diff --git a/fastrand-fix-metadata-auto.diff b/fastrand-fix-metadata-auto.diff index 1c14a02..1e1d38e 100644 --- a/fastrand-fix-metadata-auto.diff +++ b/fastrand-fix-metadata-auto.diff @@ -1,19 +1,21 @@ ---- fastrand-1.9.0/Cargo.toml 1970-01-01T00:00:01+00:00 -+++ fastrand-1.9.0/Cargo.toml 2023-02-19T21:24:20.133936+00:00 -@@ -38,16 +38,3 @@ - [dev-dependencies.wyhash] - version = "0.5" +--- fastrand-2.0.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ fastrand-2.0.0/Cargo.toml 2023-07-03T15:55:29.100944+00:00 +@@ -50,18 +50,6 @@ + default = ["std"] + js = [ + "std", +- "getrandom", + ] + std = ["alloc"] --[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dependencies.instant] --version = "0.1" -- --[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dev-dependencies.getrandom] +-[target."cfg(all(any(target_arch = \"wasm32\", target_arch = \"wasm64\"), target_os = \"unknown\"))".dependencies.getrandom] -version = "0.2" -features = ["js"] +-optional = true - --[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dev-dependencies.instant] --version = "0.1" --features = ["wasm-bindgen"] +-[target."cfg(all(any(target_arch = \"wasm32\", target_arch = \"wasm64\"), target_os = \"unknown\"))".dev-dependencies.getrandom] +-version = "0.2" +-features = ["js"] - --[target."cfg(all(target_arch = \"wasm32\", not(target_os = \"wasi\")))".dev-dependencies.wasm-bindgen-test] +-[target."cfg(all(any(target_arch = \"wasm32\", target_arch = \"wasm64\"), target_os = \"unknown\"))".dev-dependencies.wasm-bindgen-test] -version = "0.3" diff --git a/fastrand-fix-metadata.diff b/fastrand-fix-metadata.diff new file mode 100644 index 0000000..09a22c3 --- /dev/null +++ b/fastrand-fix-metadata.diff @@ -0,0 +1,11 @@ +--- fastrand-2.0.0/Cargo.toml 1970-01-01T00:00:01+00:00 ++++ fastrand-2.0.0/Cargo.toml 2023-07-03T15:55:50.019045+00:00 +@@ -48,8 +48,5 @@ + [features] + alloc = [] + default = ["std"] +-js = [ +- "std", +-] + std = ["alloc"] + diff --git a/rust-fastrand.spec b/rust-fastrand.spec index dadc9ab..be7b953 100644 --- a/rust-fastrand.spec +++ b/rust-fastrand.spec @@ -6,7 +6,7 @@ %global crate fastrand Name: rust-fastrand -Version: 1.9.0 +Version: 2.0.0 Release: %autorelease Summary: Simple and fast random number generator @@ -15,6 +15,9 @@ URL: https://crates.io/crates/fastrand Source: %{crates_source} # Automatically generated patch to strip foreign dependencies Patch: fastrand-fix-metadata-auto.diff +# Manually created patch for downstream crate metadata changes +# * remove WASM-specific "js" feature +Patch: fastrand-fix-metadata.diff BuildRequires: rust-packaging >= 21 @@ -51,6 +54,30 @@ use the "default" feature of the "%{crate}" crate. %files -n %{name}+default-devel %ghost %{crate_instdir}/Cargo.toml +%package -n %{name}+alloc-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+alloc-devel %{_description} + +This package contains library source intended for building other packages which +use the "alloc" feature of the "%{crate}" crate. + +%files -n %{name}+alloc-devel +%ghost %{crate_instdir}/Cargo.toml + +%package -n %{name}+std-devel +Summary: %{summary} +BuildArch: noarch + +%description -n %{name}+std-devel %{_description} + +This package contains library source intended for building other packages which +use the "std" feature of the "%{crate}" crate. + +%files -n %{name}+std-devel +%ghost %{crate_instdir}/Cargo.toml + %prep %autosetup -n %{crate}-%{version_no_tilde} -p1 %cargo_prep diff --git a/sources b/sources index 5c24acf..740e7a8 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (fastrand-1.9.0.crate) = 321567b5fad8552c0efc4393b1e77d1bce288b0a88c475d432f79e91b3457ee6eb5db9e4d65ac6381b9990c9916f4651b6a76250df44d51ea3e25bd8184bdc52 +SHA512 (fastrand-2.0.0.crate) = 9449dd52e4b722d5747f68f127843c0d1a402765c2b6186b9526f8ae23293cb1f6b50adcbf18a8ea768292642184cb0eb42b1801d20f6815397903f9977f3cbc