From e1785a470eb77b5bef3f6c2574c10e9e0b8f9459 Mon Sep 17 00:00:00 2001 From: Fabio Valentini Date: Tue, 5 Dec 2023 12:34:24 +0100 Subject: [PATCH] Compatibility fixes for cargo-c v0.9.26 and newer --- ...ersion_suffix_components-for-recent-.patch | 25 +++++++++++++++++++ rust-imagequant-sys.spec | 4 +++ 2 files changed, 29 insertions(+) create mode 100644 0001-explicitly-set-version_suffix_components-for-recent-.patch diff --git a/0001-explicitly-set-version_suffix_components-for-recent-.patch b/0001-explicitly-set-version_suffix_components-for-recent-.patch new file mode 100644 index 0000000..2ac9547 --- /dev/null +++ b/0001-explicitly-set-version_suffix_components-for-recent-.patch @@ -0,0 +1,25 @@ +From c4bfd7479fbbfac1915eedbdbbace2bb36abf3bd Mon Sep 17 00:00:00 2001 +From: Fabio Valentini +Date: Tue, 5 Dec 2023 12:32:48 +0100 +Subject: [PATCH] explicitly set version_suffix_components for recent cargo-c + versions + +--- + Cargo.toml | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/Cargo.toml b/Cargo.toml +index 55ffb97..c854871 100644 +--- a/Cargo.toml ++++ b/Cargo.toml +@@ -55,6 +55,7 @@ from = "libimagequant.h" + [package.metadata.capi.library] + name = "imagequant" + version = "0.0.4" ++version_suffix_components = 1 + + [package.metadata.capi.pkg_config] + description = "Convert 24/32-bit images to 8-bit palette with alpha channel." +-- +2.43.0 + diff --git a/rust-imagequant-sys.spec b/rust-imagequant-sys.spec index b8aa389..33ec315 100644 --- a/rust-imagequant-sys.spec +++ b/rust-imagequant-sys.spec @@ -13,6 +13,10 @@ Summary: Convert 24/32-bit images to 8-bit palette with alpha channel License: GPL-3.0-or-later URL: https://crates.io/crates/imagequant-sys Source: %{crates_source} +# * compatibility fixes for cargo-c v0.9.26 and newer: +# https://github.com/lu-zero/cargo-c/pull/346 +# https://github.com/lu-zero/cargo-c/pull/352 +Patch: 0001-explicitly-set-version_suffix_components-for-recent-.patch BuildRequires: cargo-rpm-macros >= 24