commit 6a76543398ef6a024071faab63da3d79be145d02 Author: tigro Date: Mon Nov 20 00:52:42 2023 +0300 import rust-bitflags1-1.3.2-1.el9 diff --git a/.rust-bitflags1.metadata b/.rust-bitflags1.metadata new file mode 100644 index 0000000..e69de29 diff --git a/SOURCES/44c7063.patch b/SOURCES/44c7063.patch new file mode 100644 index 0000000..be60d82 --- /dev/null +++ b/SOURCES/44c7063.patch @@ -0,0 +1,23 @@ +From 44c7063fe4c40ffed0d7e5d0dbae4a32ed91022b Mon Sep 17 00:00:00 2001 +From: Arturo Castro +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; diff --git a/SOURCES/bitflags-1.3.2.crate b/SOURCES/bitflags-1.3.2.crate new file mode 100644 index 0000000..45b429b Binary files /dev/null and b/SOURCES/bitflags-1.3.2.crate differ diff --git a/SOURCES/bitflags-fix-metadata.diff b/SOURCES/bitflags-fix-metadata.diff new file mode 100644 index 0000000..ffc6f68 --- /dev/null +++ b/SOURCES/bitflags-fix-metadata.diff @@ -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"] diff --git a/SPECS/rust-bitflags1.spec b/SPECS/rust-bitflags1.spec new file mode 100644 index 0000000..0f73a12 --- /dev/null +++ b/SPECS/rust-bitflags1.spec @@ -0,0 +1,104 @@ +## START: Set by rpmautospec +## (rpmautospec version 0.3.5) +## RPMAUTOSPEC: autorelease, autochangelog +%define autorelease(e:s:pb:n) %{?-p:0.}%{lua: + release_number = 1; + base_release_number = tonumber(rpm.expand("%{?-b*}%{!?-b:1}")); + print(release_number + base_release_number - 1); +}%{?-e:.%{-e*}}%{?-s:.%{-s*}}%{!?-n:%{?dist}} +## END: Set by rpmautospec + +# 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 +* Mon Nov 20 2023 Arkady L. Shane - 1.3.2-1 +- Rebuilt for MSVSphere 9.2 + +* Thu Jul 06 2023 Fabio Valentini - 1.3.2-1 +- Initial import (bitflags 1 compat package)