Switch to packaged rust deps
All of the rust deps are now packaged in Fedora (with the exception of the 'criterion' crate, but that one is only required for benchmarking which we don't do during package builds) so we can stop using the bundled ones.
This commit is contained in:
parent
41735db434
commit
346ba30eeb
54
0001-Update-the-nalgebra-crate.patch
Normal file
54
0001-Update-the-nalgebra-crate.patch
Normal file
@ -0,0 +1,54 @@
|
||||
From b0c51b70ba88778bceaef6a09645d50b7c47ad4b Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Fri, 9 Sep 2022 11:53:06 +0200
|
||||
Subject: [PATCH 1/3] Update the nalgebra crate
|
||||
|
||||
---
|
||||
Cargo.lock | 8 ++++----
|
||||
Cargo.toml | 2 +-
|
||||
2 files changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 05992853..11a89191 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -1047,9 +1047,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "nalgebra"
|
||||
-version = "0.29.0"
|
||||
+version = "0.30.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "d506eb7e08d6329505faa8a3a00a5dcc6de9f76e0c77e4b75763ae3c770831ff"
|
||||
+checksum = "4fb2d0de08694bed883320212c18ee3008576bfe8c306f4c3c4a58b4876998be"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"matrixmultiply",
|
||||
@@ -1898,9 +1898,9 @@ checksum = "ae1a47186c03a32177042e55dbc5fd5aee900b8e0069a8d70fba96a9375cd012"
|
||||
|
||||
[[package]]
|
||||
name = "simba"
|
||||
-version = "0.6.0"
|
||||
+version = "0.7.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "f0b7840f121a46d63066ee7a99fc81dcabbc6105e437cae43528cea199b5a05f"
|
||||
+checksum = "c48e45e5961033db030b56ad67aef22e9c908c493a6e8348c0a0f6b93433cd77"
|
||||
dependencies = [
|
||||
"approx",
|
||||
"num-complex",
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 98ff1c20..4b7e4214 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -64,7 +64,7 @@ language-tags = "0.3.1"
|
||||
libc = "0.2"
|
||||
locale_config = "*" # recommended explicitly by locale_config's README.md
|
||||
markup5ever = "0.10"
|
||||
-nalgebra = "0.29.0"
|
||||
+nalgebra = "0.30.1"
|
||||
num-traits = "0.2"
|
||||
once_cell = "1.2.0"
|
||||
pango = { version = "0.15", features = ["v1_46"] }
|
||||
--
|
||||
2.37.3
|
||||
|
281
0002-Fedora-Drop-dependencies-required-for-benchmarking.patch
Normal file
281
0002-Fedora-Drop-dependencies-required-for-benchmarking.patch
Normal file
@ -0,0 +1,281 @@
|
||||
From 80334a27054aa3e5d813646b5068258208cca834 Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Tue, 8 Nov 2022 17:02:19 +0100
|
||||
Subject: [PATCH 2/3] Fedora: Drop dependencies required for benchmarking
|
||||
|
||||
Drop criterion that is only required for benchmarking, which we don't do
|
||||
during package builds.
|
||||
---
|
||||
Cargo.lock | 159 -----------------------------------------------------
|
||||
Cargo.toml | 1 -
|
||||
2 files changed, 160 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 11a89191..300c8758 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -123,7 +123,6 @@ dependencies = [
|
||||
"lazy_static",
|
||||
"memchr",
|
||||
"regex-automata",
|
||||
- "serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -252,42 +251,6 @@ dependencies = [
|
||||
"cfg-if",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "criterion"
|
||||
-version = "0.3.6"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "b01d6de93b2b6c65e17c634a26653a29d107b3c98c607c765bf38d041531cd8f"
|
||||
-dependencies = [
|
||||
- "atty",
|
||||
- "cast",
|
||||
- "clap",
|
||||
- "criterion-plot",
|
||||
- "csv",
|
||||
- "itertools",
|
||||
- "lazy_static",
|
||||
- "num-traits",
|
||||
- "oorandom",
|
||||
- "plotters",
|
||||
- "rayon",
|
||||
- "regex",
|
||||
- "serde",
|
||||
- "serde_cbor",
|
||||
- "serde_derive",
|
||||
- "serde_json",
|
||||
- "tinytemplate",
|
||||
- "walkdir",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
-name = "criterion-plot"
|
||||
-version = "0.4.5"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "2673cc8207403546f45f5fd319a974b1e6983ad1a3ee7e6041650013be041876"
|
||||
-dependencies = [
|
||||
- "cast",
|
||||
- "itertools",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "crossbeam-channel"
|
||||
version = "0.5.6"
|
||||
@@ -360,28 +323,6 @@ dependencies = [
|
||||
"syn 1.0.99",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "csv"
|
||||
-version = "1.1.6"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "22813a6dc45b335f9bade10bf7271dc477e81113e89eb251a0bc2a8a81c536e1"
|
||||
-dependencies = [
|
||||
- "bstr",
|
||||
- "csv-core",
|
||||
- "itoa 0.4.8",
|
||||
- "ryu",
|
||||
- "serde",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
-name = "csv-core"
|
||||
-version = "0.1.10"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90"
|
||||
-dependencies = [
|
||||
- "memchr",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "data-url"
|
||||
version = "0.1.1"
|
||||
@@ -761,12 +702,6 @@ dependencies = [
|
||||
"system-deps",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "half"
|
||||
-version = "1.8.2"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "eabb4a44450da02c90444cf74558da904edde8fb4e9035a9a6a4e15445af0bd7"
|
||||
-
|
||||
[[package]]
|
||||
name = "heck"
|
||||
version = "0.4.0"
|
||||
@@ -875,7 +810,6 @@ dependencies = [
|
||||
"cast",
|
||||
"chrono",
|
||||
"clap",
|
||||
- "criterion",
|
||||
"cssparser",
|
||||
"data-url",
|
||||
"encoding",
|
||||
@@ -1174,12 +1108,6 @@ version = "1.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2f7254b99e31cad77da24b08ebf628882739a608578bb1bcdfc1f9c21260d7c0"
|
||||
|
||||
-[[package]]
|
||||
-name = "oorandom"
|
||||
-version = "11.1.3"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575"
|
||||
-
|
||||
[[package]]
|
||||
name = "pango"
|
||||
version = "0.15.10"
|
||||
@@ -1358,34 +1286,6 @@ version = "0.3.25"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1df8c4ec4b0627e53bdf214615ad287367e482558cf84b109250b37464dc03ae"
|
||||
|
||||
-[[package]]
|
||||
-name = "plotters"
|
||||
-version = "0.3.3"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "716b4eeb6c4a1d3ecc956f75b43ec2e8e8ba80026413e70a3f41fd3313d3492b"
|
||||
-dependencies = [
|
||||
- "num-traits",
|
||||
- "plotters-backend",
|
||||
- "plotters-svg",
|
||||
- "wasm-bindgen",
|
||||
- "web-sys",
|
||||
-]
|
||||
-
|
||||
-[[package]]
|
||||
-name = "plotters-backend"
|
||||
-version = "0.3.4"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "193228616381fecdc1224c62e96946dfbc73ff4384fba576e052ff8c1bea8142"
|
||||
-
|
||||
-[[package]]
|
||||
-name = "plotters-svg"
|
||||
-version = "0.3.3"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "f9a81d2759aae1dae668f783c308bc5c8ebd191ff4184aaa1b37f65a6ae5a56f"
|
||||
-dependencies = [
|
||||
- "plotters-backend",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "png"
|
||||
version = "0.17.6"
|
||||
@@ -1776,15 +1676,6 @@ dependencies = [
|
||||
"bytemuck",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "same-file"
|
||||
-version = "1.0.6"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
|
||||
-dependencies = [
|
||||
- "winapi-util",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
@@ -1839,16 +1730,6 @@ dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "serde_cbor"
|
||||
-version = "0.11.2"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "2bef2ebfde456fb76bbcf9f59315333decc4fda0b2b44b420243c11e0f5ec1f5"
|
||||
-dependencies = [
|
||||
- "half",
|
||||
- "serde",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.144"
|
||||
@@ -2182,16 +2063,6 @@ dependencies = [
|
||||
"syn 1.0.99",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "tinytemplate"
|
||||
-version = "1.2.1"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc"
|
||||
-dependencies = [
|
||||
- "serde",
|
||||
- "serde_json",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "tinyvec"
|
||||
version = "1.6.0"
|
||||
@@ -2300,17 +2171,6 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "walkdir"
|
||||
-version = "2.3.2"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "808cf2735cd4b6866113f648b791c6adc5714537bc222d9347bb203386ffda56"
|
||||
-dependencies = [
|
||||
- "same-file",
|
||||
- "winapi",
|
||||
- "winapi-util",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "wasi"
|
||||
version = "0.9.0+wasi-snapshot-preview1"
|
||||
@@ -2383,16 +2243,6 @@ version = "0.2.82"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"
|
||||
|
||||
-[[package]]
|
||||
-name = "web-sys"
|
||||
-version = "0.3.59"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "ed055ab27f941423197eb86b2035720b1a3ce40504df082cac2ecc6ed73335a1"
|
||||
-dependencies = [
|
||||
- "js-sys",
|
||||
- "wasm-bindgen",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "wide"
|
||||
version = "0.7.4"
|
||||
@@ -2419,15 +2269,6 @@ version = "0.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
|
||||
|
||||
-[[package]]
|
||||
-name = "winapi-util"
|
||||
-version = "0.1.5"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
|
||||
-dependencies = [
|
||||
- "winapi",
|
||||
-]
|
||||
-
|
||||
[[package]]
|
||||
name = "winapi-x86_64-pc-windows-gnu"
|
||||
version = "0.4.0"
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 4b7e4214..77a412c0 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -85,7 +85,6 @@ assert_cmd = "2.0.2"
|
||||
cairo-rs = { version = "0.15", features = ["png"] }
|
||||
cast = "0.3.0"
|
||||
chrono = "0.4.0"
|
||||
-criterion = "0.3"
|
||||
glib = "0.15"
|
||||
libc = "0.2"
|
||||
lopdf = "0.26.0"
|
||||
--
|
||||
2.37.3
|
||||
|
76
0003-Update-the-lopdf-crate.patch
Normal file
76
0003-Update-the-lopdf-crate.patch
Normal file
@ -0,0 +1,76 @@
|
||||
From 056e7554857b248dda01afbbb8cb062ffe6f6d9e Mon Sep 17 00:00:00 2001
|
||||
From: Kalev Lember <klember@redhat.com>
|
||||
Date: Tue, 8 Nov 2022 17:25:01 +0100
|
||||
Subject: [PATCH 3/3] Update the lopdf crate
|
||||
|
||||
---
|
||||
Cargo.lock | 19 ++++++++++---------
|
||||
Cargo.toml | 2 +-
|
||||
2 files changed, 11 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/Cargo.lock b/Cargo.lock
|
||||
index 300c8758..3da93d02 100644
|
||||
--- a/Cargo.lock
|
||||
+++ b/Cargo.lock
|
||||
@@ -889,28 +889,23 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "lopdf"
|
||||
-version = "0.26.0"
|
||||
+version = "0.27.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "b49a0272112719d0037ab63d4bb67f73ba659e1e90bc38f235f163a457ac16f3"
|
||||
+checksum = "8146695b97752d9c66da0092c6364f8f3ca683f5ea34341db21e5550c3b8c4f4"
|
||||
dependencies = [
|
||||
"chrono",
|
||||
"dtoa",
|
||||
"encoding",
|
||||
"flate2",
|
||||
"itoa 0.4.8",
|
||||
+ "lazy_static",
|
||||
"linked-hash-map",
|
||||
"log",
|
||||
- "lzw",
|
||||
"pom",
|
||||
"time 0.2.27",
|
||||
+ "weezl",
|
||||
]
|
||||
|
||||
-[[package]]
|
||||
-name = "lzw"
|
||||
-version = "0.10.0"
|
||||
-source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
-checksum = "7d947cbb889ed21c2a84be6ffbaebf5b4e0f4340638cba0444907e38b56be084"
|
||||
-
|
||||
[[package]]
|
||||
name = "mac"
|
||||
version = "0.1.1"
|
||||
@@ -2243,6 +2238,12 @@ version = "0.2.82"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6598dd0bd3c7d51095ff6531a5b23e02acdc81804e30d8f07afb77b7215a140a"
|
||||
|
||||
+[[package]]
|
||||
+name = "weezl"
|
||||
+version = "0.1.7"
|
||||
+source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
+checksum = "9193164d4de03a926d909d3bc7c30543cecb35400c02114792c2cae20d5e2dbb"
|
||||
+
|
||||
[[package]]
|
||||
name = "wide"
|
||||
version = "0.7.4"
|
||||
diff --git a/Cargo.toml b/Cargo.toml
|
||||
index 77a412c0..d62250df 100644
|
||||
--- a/Cargo.toml
|
||||
+++ b/Cargo.toml
|
||||
@@ -87,7 +87,7 @@ cast = "0.3.0"
|
||||
chrono = "0.4.0"
|
||||
glib = "0.15"
|
||||
libc = "0.2"
|
||||
-lopdf = "0.26.0"
|
||||
+lopdf = "0.27.0"
|
||||
matches = "0.1"
|
||||
pango = "0.15"
|
||||
pangocairo = "0.15"
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,3 +1,5 @@
|
||||
%bcond_without check
|
||||
|
||||
# https://github.com/rust-lang/rust/issues/47714
|
||||
%undefine _strict_symbol_defs_build
|
||||
|
||||
@ -6,19 +8,26 @@
|
||||
|
||||
# Use bundled deps as we don't ship the exact right versions for all the
|
||||
# required rust libraries
|
||||
%global bundled_rust_deps 1
|
||||
%global bundled_rust_deps 0
|
||||
|
||||
%global cairo_version 1.16.0
|
||||
|
||||
Name: librsvg2
|
||||
Summary: An SVG library based on cairo
|
||||
Version: 2.55.1
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
|
||||
License: LGPLv2+
|
||||
URL: https://wiki.gnome.org/Projects/LibRsvg
|
||||
Source0: https://download.gnome.org/sources/librsvg/2.54/librsvg-%{version}.tar.xz
|
||||
|
||||
%if ! 0%{?bundled_rust_deps}
|
||||
# Patches to build with Fedora-packaged rust crates
|
||||
Patch: 0001-Update-the-nalgebra-crate.patch
|
||||
Patch: 0002-Fedora-Drop-dependencies-required-for-benchmarking.patch
|
||||
Patch: 0003-Update-the-lopdf-crate.patch
|
||||
%endif
|
||||
|
||||
BuildRequires: chrpath
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gi-docgen
|
||||
@ -75,6 +84,7 @@ This package provides extra utilities based on the librsvg library.
|
||||
%else
|
||||
# No bundled deps
|
||||
rm -vrf vendor .cargo Cargo.lock
|
||||
sed -i Makefile.am -e 's/$(CARGO) --locked/$(CARGO)/'
|
||||
%cargo_prep
|
||||
%endif
|
||||
|
||||
@ -84,6 +94,7 @@ rm -vrf vendor .cargo Cargo.lock
|
||||
%endif
|
||||
|
||||
%build
|
||||
export CARGO="%__cargo"
|
||||
%configure --disable-static \
|
||||
--enable-gtk-doc \
|
||||
--docdir=%{_pkgdocdir} \
|
||||
@ -128,6 +139,9 @@ rm -f %{buildroot}%{_pkgdocdir}/COMPILING.md
|
||||
%{_mandir}/man1/rsvg-convert.1*
|
||||
|
||||
%changelog
|
||||
* Mon Nov 21 2022 Kalev Lember <klember@redhat.com> - 2.55.1-2
|
||||
- Switch to packaged rust deps
|
||||
|
||||
* Tue Sep 06 2022 Kalev Lember <klember@redhat.com> - 2.55.1-1
|
||||
- Update to 2.55.1
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user