summaryrefslogtreecommitdiffstats
path: root/rust
diff options
context:
space:
mode:
authorMichel Alexandre Salim <salimma@fedoraproject.org>2022-04-10 11:54:01 -0700
committerMichel Alexandre Salim <salimma@fedoraproject.org>2022-04-10 11:54:01 -0700
commit3235b9ddf4c34b93e2adf106d83f78e1da484599 (patch)
tree63f5d3f119e027a9b8fb1e9b89362b16614ff4c4 /rust
parentfe1e80ad84a7465f2a8f75ddc5af4effca4fa0e1 (diff)
downloadspecs-3235b9ddf4c34b93e2adf106d83f78e1da484599.tar.gz
specs-3235b9ddf4c34b93e2adf106d83f78e1da484599.tar.xz
specs-3235b9ddf4c34b93e2adf106d83f78e1da484599.zip
+ rust-im
Diffstat (limited to 'rust')
-rw-r--r--rust/im-fix-metadata.diff29
-rw-r--r--rust/im-fix_for_rand_xoshiro_060.patch29
-rw-r--r--rust/rust-im.spec162
3 files changed, 220 insertions, 0 deletions
diff --git a/rust/im-fix-metadata.diff b/rust/im-fix-metadata.diff
new file mode 100644
index 0000000..1c1c3fa
--- /dev/null
+++ b/rust/im-fix-metadata.diff
@@ -0,0 +1,29 @@
+--- im-15.0.0/Cargo.toml 2020-05-15T18:59:42+00:00
++++ im-15.0.0/Cargo.toml 2022-04-10T17:40:13.690989+00:00
+@@ -49,7 +49,7 @@
+ version = "0.5.1"
+
+ [dependencies.rand_xoshiro]
+-version = "0.4"
++version = "0.6"
+
+ [dependencies.rayon]
+ version = "1"
+@@ -68,17 +68,9 @@
+
+ [dependencies.typenum]
+ version = "1.12"
+-[dev-dependencies.metrohash]
+-version = "1"
+
+ [dev-dependencies.pretty_assertions]
+ version = "0.6"
+-
+-[dev-dependencies.proptest]
+-version = "0.9"
+-
+-[dev-dependencies.proptest-derive]
+-version = "0.1"
+
+ [dev-dependencies.rand]
+ version = "0.7"
diff --git a/rust/im-fix_for_rand_xoshiro_060.patch b/rust/im-fix_for_rand_xoshiro_060.patch
new file mode 100644
index 0000000..2837c56
--- /dev/null
+++ b/rust/im-fix_for_rand_xoshiro_060.patch
@@ -0,0 +1,29 @@
+From 3866763ea30822c43ccec4853d2378e085b7bc08 Mon Sep 17 00:00:00 2001
+From: Michel Alexandre Salim <salimma@fedoraproject.org>
+Date: Sun, 10 Apr 2022 11:05:34 -0700
+Subject: [PATCH] Fix compilation with rand_xoshiro 0.6.0
+
+Need to use `rand_xoshiro::rand_core::SeedableRng` instead of
+`rand_core::SeedableRng`.
+
+Signed-off-by: Michel Alexandre Salim <salimma@fedoraproject.org>
+---
+ src/sort.rs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/sort.rs b/src/sort.rs
+index 6c98001..1126a2a 100644
+--- a/src/sort.rs
++++ b/src/sort.rs
+@@ -3,7 +3,7 @@
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+ use crate::vector::FocusMut;
+-use rand_core::{RngCore, SeedableRng};
++use rand_xoshiro::rand_core::{RngCore, SeedableRng};
+ use std::cmp::Ordering;
+ use std::mem;
+
+--
+2.35.1
+
diff --git a/rust/rust-im.spec b/rust/rust-im.spec
new file mode 100644
index 0000000..dfd80e2
--- /dev/null
+++ b/rust/rust-im.spec
@@ -0,0 +1,162 @@
+# Generated by rust2rpm 21
+# Test dependencies still missing
+%bcond_with check
+%global debug_package %{nil}
+
+%global crate im
+
+Name: rust-%{crate}
+Version: 15.0.0
+Release: %autorelease
+Summary: Immutable collection datatypes
+
+# Upstream license specification: MPL-2.0+
+License: MPLv2.0
+URL: https://crates.io/crates/im
+Source: %{crates_source}
+# Drop unpackaged dev dependencies, bump up rand_xoshiro
+Patch0: im-fix-metadata.diff
+# https://github.com/bodil/im-rs/pull/197
+Patch1: im-fix_for_rand_xoshiro_060.patch
+
+ExclusiveArch: %{rust_arches}
+
+BuildRequires: rust-packaging >= 21
+
+%global _description %{expand:
+Immutable collection datatypes.}
+
+%description %{_description}
+
+%package devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "%{crate}" crate.
+
+%files devel
+%license %{crate_instdir}/LICENCE.md
+%doc %{crate_instdir}/CHANGELOG.md
+%doc %{crate_instdir}/CODE_OF_CONDUCT.md
+%doc %{crate_instdir}/README.md
+%{crate_instdir}/
+
+%package -n %{name}+default-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+default-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "default" feature of the "%{crate}" crate.
+
+%files -n %{name}+default-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+arbitrary-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+arbitrary-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "arbitrary" feature of the "%{crate}" crate.
+
+%files -n %{name}+arbitrary-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+debug-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+debug-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "debug" feature of the "%{crate}" crate.
+
+%files -n %{name}+debug-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+proptest-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+proptest-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "proptest" feature of the "%{crate}" crate.
+
+%files -n %{name}+proptest-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+quickcheck-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+quickcheck-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "quickcheck" feature of the "%{crate}" crate.
+
+%files -n %{name}+quickcheck-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+rayon-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+rayon-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "rayon" feature of the "%{crate}" crate.
+
+%files -n %{name}+rayon-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+refpool-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+refpool-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "refpool" feature of the "%{crate}" crate.
+
+%files -n %{name}+refpool-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%package -n %{name}+serde-devel
+Summary: %{summary}
+BuildArch: noarch
+
+%description -n %{name}+serde-devel %{_description}
+
+This package contains library source intended for building other packages which
+use the "serde" feature of the "%{crate}" crate.
+
+%files -n %{name}+serde-devel
+%ghost %{crate_instdir}/Cargo.toml
+
+%prep
+%autosetup -n %{crate}-%{version_no_tilde} -p1
+%cargo_prep
+
+%generate_buildrequires
+%cargo_generate_buildrequires
+
+%build
+%cargo_build
+
+%install
+%cargo_install
+
+%if %{with check}
+%check
+%cargo_test
+%endif
+
+%changelog
+%autochangelog