Remove unused dependencies on wasm-bindgen and hawktracer

epel9
Fabio Valentini 3 years ago
parent e7ab0986d4
commit 551f68dbfa
No known key found for this signature in database
GPG Key ID: 5AC5F572E5D410AF

@ -0,0 +1,52 @@
From e106ded8e5e29ee464bddc6a321fe67a8e5884c1 Mon Sep 17 00:00:00 2001
From: Fabio Valentini <decathorpe@gmail.com>
Date: Mon, 8 Aug 2022 20:15:48 +0200
Subject: [PATCH] remove unused hawktracer usage
---
src/lib.rs | 8 +-------
src/plane.rs | 2 --
2 files changed, 1 insertion(+), 9 deletions(-)
diff --git a/src/lib.rs b/src/lib.rs
index 298dc01..b4bc59a 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -23,13 +23,7 @@ mod serialize {
}
mod wasm_bindgen {
- cfg_if::cfg_if! {
- if #[cfg(feature="wasm")] {
- pub use wasm_bindgen::prelude::*;
- } else {
- pub use noop_proc_macro::wasm_bindgen;
- }
- }
+ pub use noop_proc_macro::wasm_bindgen;
}
pub mod prelude {
diff --git a/src/plane.rs b/src/plane.rs
index 7723d89..a09a708 100644
--- a/src/plane.rs
+++ b/src/plane.rs
@@ -10,7 +10,6 @@
use rayon::current_num_threads;
use rayon::iter::ParallelIterator;
use rayon::prelude::*;
-use rust_hawktracer::*;
use std::cmp;
use std::marker::PhantomData;
use std::mem;
@@ -559,7 +558,6 @@ impl<T: Pixel> Plane<T> {
/// Downscales the source plane by a factor of `scale`, writing the result to `in_plane` (not padded)
///
/// `in_plane`'s width and height must be sufficient for `scale`.
- #[hawktracer(downscale)]
pub fn downscale_in_place(&self, scale: usize, in_plane: &mut Plane<T>) {
let src = self;
let box_pixels = scale * scale;
--
2.37.1

@ -1,25 +1,27 @@
# Generated by rust2rpm 18
# Generated by rust2rpm 22
%bcond_without check
%global debug_package %{nil}
%global crate v_frame
Name: rust-%{crate}
Name: rust-v_frame
Version: 0.2.5
Release: %autorelease
Summary: Video Frame data structures, part of rav1e
# Upstream license specification: BSD-2-Clause
License: BSD
License: BSD-2-Clause
URL: https://crates.io/crates/v_frame
Source: %{crates_source}
# Manually created patch for downstream crate metadata changes
# * remove unused WASM support / wasm-bindgen dependency
# * remove hawktracer dependency
Patch: v_frame-fix-metadata.diff
# * remove useless / no-op hawktracer macros
Patch: 0001-remove-unused-hawktracer-usage.patch
ExclusiveArch: %{rust_arches}
%if %{__cargo_skip_build}
BuildArch: noarch
%endif
BuildRequires: rust-packaging
BuildRequires: rust-packaging >= 21
%global _description %{expand:
Video Frame data structures, part of rav1e.}
@ -32,12 +34,12 @@ BuildArch: noarch
%description devel %{_description}
This package contains library source intended for building other packages
which use "%{crate}" crate.
This package contains library source intended for building other packages which
use the "%{crate}" crate.
%files devel
%license LICENSE
%{cargo_registry}/%{crate}-%{version_no_tilde}/
%license %{crate_instdir}/LICENSE
%{crate_instdir}/
%package -n %{name}+default-devel
Summary: %{summary}
@ -45,11 +47,11 @@ BuildArch: noarch
%description -n %{name}+default-devel %{_description}
This package contains library source intended for building other packages
which use "default" feature of "%{crate}" crate.
This package contains library source intended for building other packages which
use the "default" feature of the "%{crate}" crate.
%files -n %{name}+default-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+serde-devel
Summary: %{summary}
@ -57,11 +59,11 @@ BuildArch: noarch
%description -n %{name}+serde-devel %{_description}
This package contains library source intended for building other packages
which use "serde" feature of "%{crate}" crate.
This package contains library source intended for building other packages which
use the "serde" feature of the "%{crate}" crate.
%files -n %{name}+serde-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%package -n %{name}+serialize-devel
Summary: %{summary}
@ -69,47 +71,11 @@ BuildArch: noarch
%description -n %{name}+serialize-devel %{_description}
This package contains library source intended for building other packages
which use "serialize" feature of "%{crate}" crate.
This package contains library source intended for building other packages which
use the "serialize" feature of the "%{crate}" crate.
%files -n %{name}+serialize-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+tracing-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+tracing-devel %{_description}
This package contains library source intended for building other packages
which use "tracing" feature of "%{crate}" crate.
%files -n %{name}+tracing-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+wasm-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+wasm-devel %{_description}
This package contains library source intended for building other packages
which use "wasm" feature of "%{crate}" crate.
%files -n %{name}+wasm-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%package -n %{name}+wasm-bindgen-devel
Summary: %{summary}
BuildArch: noarch
%description -n %{name}+wasm-bindgen-devel %{_description}
This package contains library source intended for building other packages
which use "wasm-bindgen" feature of "%{crate}" crate.
%files -n %{name}+wasm-bindgen-devel
%ghost %{cargo_registry}/%{crate}-%{version_no_tilde}/Cargo.toml
%ghost %{crate_instdir}/Cargo.toml
%prep
%autosetup -n %{crate}-%{version_no_tilde} -p1

@ -0,0 +1,22 @@
--- v_frame-0.2.5/Cargo.toml 1970-01-01T00:00:01+00:00
+++ v_frame-0.2.5/Cargo.toml 2022-08-08T18:09:30.047054+00:00
@@ -32,19 +32,10 @@
[dependencies.rayon]
version = "1.0"
-[dependencies.rust_hawktracer]
-version = "0.7.0"
-
[dependencies.serde]
version = "1.0"
features = ["derive"]
optional = true
-[dependencies.wasm-bindgen]
-version = "0.2.63"
-optional = true
-
[features]
serialize = ["serde"]
-tracing = ["rust_hawktracer/profiling_enabled"]
-wasm = ["wasm-bindgen"]
Loading…
Cancel
Save