diff --git a/0001-build.rs-Simplify-check-for-version.patch b/0001-build.rs-Simplify-check-for-version.patch new file mode 100644 index 0000000..f0d4bed --- /dev/null +++ b/0001-build.rs-Simplify-check-for-version.patch @@ -0,0 +1,29 @@ +From e7626a25471d2db29e7cdee81308ee4604b41544 Mon Sep 17 00:00:00 2001 +From: Igor Raits +Date: Mon, 2 Mar 2020 12:14:11 +0100 +Subject: [PATCH] build.rs: Simplify check for version + +This also fixes build with rustc shipped by distributions. + +Fixes: https://gitlab.com/CreepySkeleton/proc-macro-error/issues/8 +Signed-off-by: Igor Raits +--- + build.rs | 4 +--- + 1 file changed, 1 insertion(+), 3 deletions(-) + +diff --git a/build.rs b/build.rs +index fb4384c..f2ac6a7 100644 +--- a/build.rs ++++ b/build.rs +@@ -1,7 +1,5 @@ + fn main() { +- let (version, _, _) = version_check::triple().unwrap(); +- +- if version.at_most("1.36.0") { ++ if version_check::is_max_version("1.36.0").unwrap_or(false) { + println!("cargo:rustc-cfg=always_assert_unwind"); + } + } +-- +2.25.1 + diff --git a/rust-proc-macro-error-attr.spec b/rust-proc-macro-error-attr.spec index f43286d..f8ad90f 100644 --- a/rust-proc-macro-error-attr.spec +++ b/rust-proc-macro-error-attr.spec @@ -13,6 +13,8 @@ Summary: Attribute macro for proc-macro-error crate License: MIT or ASL 2.0 URL: https://crates.io/crates/proc-macro-error-attr Source: %{crates_source} +# https://gitlab.com/CreepySkeleton/proc-macro-error/-/merge_requests/25 +Patch0001: 0001-build.rs-Simplify-check-for-version.patch ExclusiveArch: %{rust_arches} %if %{__cargo_skip_build}