Initial import (bitflags 1 compat package)

epel9 imports/e9/rust-bitflags1-1.3.2-1.el9
Fabio Valentini 2 years ago
parent 1d957f517d
commit f4b451afc4
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

1
.gitignore vendored

@ -0,0 +1 @@
/bitflags-1.3.2.crate

@ -0,0 +1,23 @@
From 44c7063fe4c40ffed0d7e5d0dbae4a32ed91022b Mon Sep 17 00:00:00 2001
From: Arturo Castro <arturo@rin.rs>
Date: Tue, 19 Apr 2022 12:36:35 +0200
Subject: [PATCH] serde::Serialize -> serde_derive::Serialize
serde:: doesn't work on tests on CI
---
src/lib.rs | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/lib.rs b/src/lib.rs
index 46542b05..a5cbf53f 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -1812,7 +1812,7 @@ mod tests {
}
bitflags! {
- #[derive(serde::Serialize, serde::Deserialize)]
+ #[derive(serde_derive::Serialize, serde_derive::Deserialize)]
struct SerdeFlags: u32 {
const A = 1;
const B = 2;

@ -1,3 +0,0 @@
# rust-bitflags1
The rust-bitflags1 package

@ -0,0 +1,22 @@
--- bitflags-1.3.2/Cargo.toml 1970-01-01T00:00:00+00:00
+++ bitflags-1.3.2/Cargo.toml 2023-07-05T17:35:22.158498+00:00
@@ -26,14 +26,6 @@
repository = "https://github.com/bitflags/bitflags"
[package.metadata.docs.rs]
features = ["example_generated"]
-[dependencies.compiler_builtins]
-version = "0.1.2"
-optional = true
-
-[dependencies.core]
-version = "1.0.0"
-optional = true
-package = "rustc-std-workspace-core"
[dev-dependencies.rustversion]
version = "1.0"
@@ -55,4 +47,3 @@
[features]
default = []
example_generated = []
-rustc-dep-of-std = ["core", "compiler_builtins"]

@ -0,0 +1,90 @@
# Generated by rust2rpm 24
%bcond_without check
%global debug_package %{nil}
%global crate bitflags
Name: rust-bitflags1
Version: 1.3.2
Release: %autorelease
Summary: Macro to generate structures which behave like bitflags
# Upstream license specification: MIT/Apache-2.0
License: MIT OR Apache-2.0
URL: https://crates.io/crates/bitflags
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * drop dependencies on compiler internals
Patch: bitflags-fix-metadata.diff
# * upstream patch to fix building tests with trybuild >= 1.0.57
Patch: https://github.com/bitflags/bitflags/commit/44c7063.patch
BuildRequires: rust-packaging >= 21
%global _description %{expand:
A macro to generate structures which behave like bitflags.}
%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}/LICENSE-APACHE
%license %{crate_instdir}/LICENSE-MIT
%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}+example_generated-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+example_generated-devel %{_description}
This package contains library source intended for building other packages which
use the "example_generated" feature of the "%{crate}" crate.
%files -n %{name}+example_generated-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
# * skip trybuild tests that are broken due to cosmetic string differences
%cargo_test -- -- --skip fail
%endif
%changelog
%autochangelog

@ -0,0 +1 @@
SHA512 (bitflags-1.3.2.crate) = 3c698f757b5cc62f815f9a1cce365c3d2dd88e4db71f331dff8bba86c2865f755b81cb4c9bfc59bd86b7643b0943f9e09a7c4f8ad75eb2ab0e714803d0129f62
Loading…
Cancel
Save