helvum: clean up patch/template

upstream released pipewire-rs v0.5.0 that fixes the underlying issue,
but the Cargo.toml version requirement didn't allow it to be updated.
This commit is contained in:
classabbyamp 2022-03-22 11:44:40 -04:00 committed by Echo
parent 8d25f3eee3
commit fcc70b9cff
2 changed files with 13 additions and 43 deletions

View file

@ -1,24 +1,11 @@
From e8703de1c76f50553cedb7a1601e5b808a227604 Mon Sep 17 00:00:00 2001 --- a/Cargo.toml
From: "Gabor Kecskemeti (sh)" <gabor@simple-help.com> +++ b/Cargo.toml
Date: Thu, 11 Nov 2021 11:41:09 +0000 @@ -14,7 +14,7 @@
Subject: A possible fix for issue #27 # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
--- [dependencies]
pipewire/src/loop_.rs | 2 +- -pipewire = "0.4"
1 file changed, 1 insertion(+), 1 deletion(-) +pipewire = "0.5"
gtk = { version = "0.4.1", package = "gtk4" }
diff --git a/helvum-0.3.4/pipewire/src/loop_.rs b/helvum-0.3.4/pipewire/src/loop_.rs glib = { version = "0.15.1", features = ["log"] }
index 3e0d9bd..353025f 100644
--- a/helvum-0.3.4/pipewire/src/loop_.rs
+++ b/helvum-0.3.4/pipewire/src/loop_.rs
@@ -411,7 +411,7 @@ where
fn duration_to_timespec(duration: Duration) -> spa_sys::timespec {
spa_sys::timespec {
tv_sec: duration.as_secs().try_into().expect("Duration too long"),
- tv_nsec: duration.subsec_nanos().into(),
+ tv_nsec: duration.subsec_nanos().try_into().unwrap(),
}
}
--

View file

@ -1,12 +1,8 @@
# Template file for 'helvum' # Template file for 'helvum'
pkgname=helvum pkgname=helvum
version=0.3.4 version=0.3.4
revision=1 revision=2
create_wrksrc=yes
build_wrksrc="${pkgname}-${version}"
_pipewire_rs_version=0.4.1
build_style=cargo build_style=cargo
build_helper=rust
hostmakedepends="pkg-config clang libclang" hostmakedepends="pkg-config clang libclang"
makedepends="gtk4-devel pipewire-devel glib-devel" makedepends="gtk4-devel pipewire-devel glib-devel"
depends="pipewire" depends="pipewire"
@ -14,21 +10,8 @@ short_desc="GTK patchbay for pipewire"
maintainer="classabbyamp <dev@kb6.ee>" maintainer="classabbyamp <dev@kb6.ee>"
license="GPL-3.0-only" license="GPL-3.0-only"
homepage="https://gitlab.freedesktop.org/pipewire/helvum" homepage="https://gitlab.freedesktop.org/pipewire/helvum"
distfiles="https://gitlab.freedesktop.org/pipewire/helvum/-/archive/${version}/helvum-${version}.tar.gz distfiles="https://gitlab.freedesktop.org/pipewire/helvum/-/archive/${version}/helvum-${version}.tar.gz"
https://gitlab.freedesktop.org/pipewire/pipewire-rs/-/archive/v${_pipewire_rs_version}/pipewire-rs-v${_pipewire_rs_version}.tar.gz" checksum="e19054f3bcd1ba234c451134fe7f4c6afee35f108c122642c1d502fc16785c02"
checksum="e19054f3bcd1ba234c451134fe7f4c6afee35f108c122642c1d502fc16785c02
7df384c2a98154ae2cea8e14693db92e269437ea60fbcdfb6adb589226d12629"
# XXX: this should not be necessary once the next version of the pipewire crate has been released
post_extract() {
pushd $build_wrksrc
echo "[patch.crates-io]" >> Cargo.toml
for crate in pipewire pipewire-sys libspa libspa-sys; do
mv ../pipewire-rs-*/$crate $crate
echo "$crate = { path = './$crate' }" >> Cargo.toml
done
popd
}
post_install() { post_install() {
# Normally, meson would do this, but it's simpler to use the cargo build style and do this manually # Normally, meson would do this, but it's simpler to use the cargo build style and do this manually