Use bundled rust deps

Use bundled deps as we don't ship the exact right versions for all the
required rust libraries. This makes it possible to e.g. ship librsvg2
security updates for F28 whereas previously we were version locked
because F28 didn't have the correct rust library versions.

If you're updating the package in the future and notice that we have
all the deps available in Fedora, feel free to change it back to non
bundled deps.
This commit is contained in:
Kalev Lember 2018-08-08 11:06:25 +02:00
parent 049ea76fe7
commit 202e5f0cb8

View File

@ -4,6 +4,10 @@
# We want verbose builds
%global _configure_disable_silent_rules 1
# Use bundled deps as we don't ship the exact right versions for all the
# required rust libraries
%global bundled_rust_deps 1
Name: librsvg2
Summary: An SVG library based on cairo
Version: 2.43.4
@ -30,6 +34,10 @@ BuildRequires: gobject-introspection-devel
BuildRequires: %{_bindir}/vapigen
BuildRequires: pkgconfig(fontconfig)
BuildRequires: chrpath
%if 0%{?bundled_rust_deps}
BuildRequires: cargo
BuildRequires: rust
%else
BuildRequires: rust-packaging
# [dependencies]
BuildRequires: (crate(cairo-rs) >= 0.4.0 with crate(cairo-rs) < 0.5.0)
@ -50,6 +58,7 @@ BuildRequires: (crate(phf) >= 0.7.21 with crate(phf) < 0.8.0)
BuildRequires: (crate(regex) >= 1.0.0 with crate(regex) < 2.0.0)
# [build-dependencies]
BuildRequires: (crate(phf_codegen) >= 0.7.21 with crate(phf_codegen) < 0.8.0)
%endif
# for file triggers
Requires: gdk-pixbuf2%{?_isa} >= 2.31.5-2.fc24
@ -74,9 +83,14 @@ This package provides extra utilities based on the librsvg library.
%prep
%autosetup -n librsvg-%{version} -p1
%if 0%{?bundled_rust_deps}
# Use the bundled deps, and enable release debuginfo
sed -i -e '/profile.release/a debug = true' Cargo.toml
%else
# No bundled deps
rm -vrf vendor
%cargo_prep
%endif
%build
%configure --disable-static \
@ -130,6 +144,7 @@ rm -vrf %{buildroot}%{_datadir}/doc
%changelog
* Wed Aug 08 2018 Kalev Lember <klember@redhat.com> - 2.43.4-1
- Update to 2.43.4
- Use bundled rust deps
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 2.43.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild