Use %cargo_generate_buildrequires for unbundled Rust

Signed-off-by: Igor Raits <ignatenkobrain@fedoraproject.org>
This commit is contained in:
Igor Raits 2020-02-23 08:32:32 +01:00
parent 00f3b10ed9
commit 0bbf8c867c
No known key found for this signature in database
GPG Key ID: 695714BD1BBC5F4C

View File

@ -42,41 +42,6 @@ BuildRequires: cargo
BuildRequires: rust
%else
BuildRequires: rust-packaging
BuildRequires: (crate(cairo-rs/default) >= 0.5.0 with crate(cairo-rs/default) < 0.6.0)
BuildRequires: (crate(cairo-sys-rs/default) >= 0.7.0 with crate(cairo-sys-rs/default) < 0.8.0)
BuildRequires: (crate(cssparser/default) >= 0.25.1 with crate(cssparser/default) < 0.26.0)
BuildRequires: (crate(data-url/default) >= 0.1.0 with crate(data-url/default) < 0.2.0)
BuildRequires: (crate(downcast-rs/default) >= 1.0.0 with crate(downcast-rs/default) < 2.0.0)
BuildRequires: (crate(encoding/default) >= 0.2.33 with crate(encoding/default) < 0.3.0)
BuildRequires: (crate(float-cmp/default) >= 0.4.0 with crate(float-cmp/default) < 0.5.0)
BuildRequires: (crate(gdk-pixbuf-sys/default) >= 0.7.0 with crate(gdk-pixbuf-sys/default) < 0.8.0)
BuildRequires: (crate(gdk-pixbuf/default) >= 0.5.0 with crate(gdk-pixbuf/default) < 0.6.0)
BuildRequires: (crate(gio-sys/default) >= 0.7.0 with crate(gio-sys/default) < 0.8.0)
BuildRequires: (crate(gio/default) >= 0.5.1 with crate(gio/default) < 0.6.0)
BuildRequires: (crate(gio/v2_48) >= 0.5.1 with crate(gio/v2_48) < 0.6.0)
BuildRequires: (crate(glib-sys/default) >= 0.7.0 with crate(glib-sys/default) < 0.8.0)
BuildRequires: (crate(glib/default) >= 0.6.0 with crate(glib/default) < 0.7.0)
BuildRequires: (crate(gobject-sys/default) >= 0.7.0 with crate(gobject-sys/default) < 0.8.0)
BuildRequires: (crate(itertools/default) >= 0.8.0 with crate(itertools/default) < 0.9.0)
BuildRequires: (crate(language-tags/default) >= 0.2.2 with crate(language-tags/default) < 0.3.0)
BuildRequires: (crate(lazy_static/default) >= 1.0.0 with crate(lazy_static/default) < 2.0.0)
BuildRequires: (crate(libc/default) >= 0.2.0 with crate(libc/default) < 0.3.0)
BuildRequires: (crate(nalgebra/default) >= 0.17.0 with crate(nalgebra/default) < 0.18.0)
BuildRequires: (crate(num-traits/default) >= 0.2.0 with crate(num-traits/default) < 0.3.0)
BuildRequires: (crate(owning_ref/default) >= 0.4.0 with crate(owning_ref/default) < 0.5.0)
BuildRequires: (crate(pango-sys/default) >= 0.7.0 with crate(pango-sys/default) < 0.8.0)
BuildRequires: (crate(pango/default) >= 0.5.0 with crate(pango/default) < 0.6.0)
BuildRequires: (crate(pangocairo/default) >= 0.6.0 with crate(pangocairo/default) < 0.7.0)
BuildRequires: (crate(phf/default) >= 0.7.21 with crate(phf/default) < 0.8.0)
BuildRequires: (crate(phf_codegen/default) >= 0.7.21 with crate(phf_codegen/default) < 0.8.0)
BuildRequires: (crate(rayon/default) >= 1.0.0 with crate(rayon/default) < 2.0.0)
BuildRequires: (crate(regex/default) >= 1.0.0 with crate(regex/default) < 2.0.0)
BuildRequires: (crate(url/default) >= 1.7.2 with crate(url/default) < 2.0.0)
BuildRequires: (crate(xml-rs/default) >= 0.8.0 with crate(xml-rs/default) < 0.9.0)
BuildRequires: crate(locale_config/default)
%if %{with check}
BuildRequires: (crate(criterion/default) >= 0.2.0 with crate(criterion/default) < 0.3.0)
%endif
%endif
Requires: cairo%{?_isa} >= %{cairo_version}
@ -115,6 +80,13 @@ pushd rsvg_internals
popd
%endif
%if ! 0%{?bundled_rust_deps}
%generate_buildrequires
pushd rsvg_internals >/dev/null
%cargo_generate_buildrequires
popd >/dev/null
%endif
%build
%configure --disable-static \
--disable-gtk-doc \