mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
audio/shortwave: Add missing patches from last commit
This commit is contained in:
parent
996a1055df
commit
b60be1185c
3 changed files with 65 additions and 0 deletions
10
audio/shortwave/files/patch-Cargo.toml
Normal file
10
audio/shortwave/files/patch-Cargo.toml
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
--- Cargo.toml.orig 2025-02-05 10:44:30 UTC
|
||||||
|
+++ Cargo.toml
|
||||||
|
@@ -17,7 +17,6 @@ futures-util = "0.3"
|
||||||
|
diesel = { version = "2.2", features = ["sqlite", "r2d2"] }
|
||||||
|
diesel_migrations = "2.2"
|
||||||
|
futures-util = "0.3"
|
||||||
|
-glycin = { version = "2.0", features = ["gdk4"] }
|
||||||
|
indexmap = "2.7"
|
||||||
|
Inflector = "0.11"
|
||||||
|
language-tags = "0.3"
|
15
audio/shortwave/files/patch-meson.build
Normal file
15
audio/shortwave/files/patch-meson.build
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
--- meson.build.orig 2025-02-05 10:44:30 UTC
|
||||||
|
+++ meson.build
|
||||||
|
@@ -19,8 +19,10 @@ dependency('shumate-1.0', version: '>= 1.3')
|
||||||
|
dependency('shumate-1.0', version: '>= 1.3')
|
||||||
|
|
||||||
|
# Required by glycin crate
|
||||||
|
-dependency('lcms2', version: '>= 2.12.0')
|
||||||
|
-dependency('libseccomp', version: '>= 2.5.0')
|
||||||
|
+if host_machine.system() == 'linux'
|
||||||
|
+ dependency('lcms2', version: '>= 2.12.0')
|
||||||
|
+ dependency('libseccomp', version: '>= 2.5.0')
|
||||||
|
+endif
|
||||||
|
|
||||||
|
dependency('gstreamer-1.0', version: '>= 1.16')
|
||||||
|
dependency('gstreamer-base-1.0', version: '>= 1.16')
|
40
audio/shortwave/files/patch-src_api_cover__loader.rs
Normal file
40
audio/shortwave/files/patch-src_api_cover__loader.rs
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
--- src/api/cover_loader.rs.orig 2025-02-05 10:44:30 UTC
|
||||||
|
+++ src/api/cover_loader.rs
|
||||||
|
@@ -22,7 +22,6 @@ use gdk::RGBA;
|
||||||
|
use async_compat::CompatExt;
|
||||||
|
use futures_util::StreamExt;
|
||||||
|
use gdk::RGBA;
|
||||||
|
-use glycin::Loader;
|
||||||
|
use gtk::gio::{Cancelled, File};
|
||||||
|
use gtk::graphene::Rect;
|
||||||
|
use gtk::prelude::TextureExt;
|
||||||
|
@@ -88,9 +87,7 @@ impl CoverRequest {
|
||||||
|
async fn cover_bytes(&self) -> Result<(gdk::Texture, Vec<u8>)> {
|
||||||
|
self.download_tmp_file().compat().await?;
|
||||||
|
|
||||||
|
- let loader = Loader::new(self.tmp_file.clone());
|
||||||
|
- let image = loader.load().await?;
|
||||||
|
- let texture = image.next_frame().await?.texture();
|
||||||
|
+ let texture = Self::load_texture(&self.tmp_file).await?;
|
||||||
|
|
||||||
|
let snapshot = gtk::Snapshot::new();
|
||||||
|
snapshot_thumbnail(&snapshot, texture, self.size as f32);
|
||||||
|
@@ -106,6 +103,18 @@ impl CoverRequest {
|
||||||
|
|
||||||
|
let png_bytes = texture.save_to_png_bytes().to_vec();
|
||||||
|
Ok((texture, png_bytes))
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ #[cfg(target_os = "linux")]
|
||||||
|
+ async fn load_texture(file: &gio::File) -> Result<gdk::Texture> {
|
||||||
|
+ let loader = glycin::Loader::new(file.clone());
|
||||||
|
+ let image = loader.load().await?;
|
||||||
|
+ Ok(image.next_frame().await?.texture())
|
||||||
|
+ }
|
||||||
|
+
|
||||||
|
+ #[cfg(target_os = "freebsd")]
|
||||||
|
+ async fn load_texture(file: &gio::File) -> Result<gdk::Texture> {
|
||||||
|
+ Ok(gdk::Texture::from_file(file)?)
|
||||||
|
}
|
||||||
|
|
||||||
|
async fn download_tmp_file(&self) -> Result<()> {
|
Loading…
Add table
Reference in a new issue