git: 5461083bf83a - main - audio/spotify-tui: Fix build with rust 1.76.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Mon, 19 Feb 2024 11:59:48 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5461083bf83ad9f5eb0572aa3a4f09c2c3cdd341

commit 5461083bf83ad9f5eb0572aa3a4f09c2c3cdd341
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2024-02-10 12:43:40 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2024-02-19 11:59:02 +0000

    audio/spotify-tui: Fix build with rust 1.76.0
    
    Import upstream patch [1] to fix the following error:
    
    error[E0310]: the parameter type `T` may not live long enough
        --> /wrkdirs/usr/ports/audio/spotify-tui/work/spotify-tui-0.25.0/cargo-crates/rustc-serialize-0.3.24/src/serialize.rs:1155:5
    
    [1] https://github.com/rust-lang-deprecated/rustc-serialize/commit/75ce92452a5f7c25a58fdea81e5f6f888630a2c9
    
    PR:             276920
    Approved by:    portmgr (build fix blanket)
---
 ...tch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/audio/spotify-tui/files/patch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs b/audio/spotify-tui/files/patch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs
new file mode 100644
index 000000000000..2ec700f0bcf5
--- /dev/null
+++ b/audio/spotify-tui/files/patch-cargo-crates_rustc-serialize-0.3.24_src_serialize.rs
@@ -0,0 +1,13 @@
+https://github.com/rust-lang-deprecated/rustc-serialize/commit/75ce92452a5f7c25a58fdea81e5f6f888630a2c9
+
+--- cargo-crates/rustc-serialize-0.3.24/src/serialize.rs.orig	2024-02-10 11:58:37 UTC
++++ cargo-crates/rustc-serialize-0.3.24/src/serialize.rs
+@@ -1152,7 +1152,7 @@ impl<'a, T: ?Sized> Decodable for Cow<'a, T>
+     where T: ToOwned, T::Owned: Decodable
+ {
+     #[inline]
+-    fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'static, T>, D::Error> {
++    fn decode<D: Decoder>(d: &mut D) -> Result<Cow<'a, T>, D::Error> {
+         Ok(Cow::Owned(try!(Decodable::decode(d))))
+     }
+ }