git: 56ffc8d9704d - main - audio/spotify-tui: Fix build with rust 1.64.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Sun, 30 Oct 2022 12:07:50 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=56ffc8d9704dab8eb43b90c0a705bd603d63dc23

commit 56ffc8d9704dab8eb43b90c0a705bd603d63dc23
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2022-10-14 13:23:31 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2022-10-30 12:07:08 +0000

    audio/spotify-tui: Fix build with rust 1.64.0
    
    Update socket2 crate to 0.3.19
    
    PR:             267173
---
 audio/spotify-tui/Makefile                |  2 +-
 audio/spotify-tui/distinfo                |  6 +++---
 audio/spotify-tui/files/patch-rust-1.64.0 | 32 +++++++++++++++++++++++++++++++
 3 files changed, 36 insertions(+), 4 deletions(-)

diff --git a/audio/spotify-tui/Makefile b/audio/spotify-tui/Makefile
index 8018c71812e7..0f3d6dd6e40b 100644
--- a/audio/spotify-tui/Makefile
+++ b/audio/spotify-tui/Makefile
@@ -214,7 +214,7 @@ CARGO_CRATES=	addr2line-0.14.1 \
 		signal-hook-registry-1.4.0 \
 		slab-0.4.2 \
 		smallvec-1.4.1 \
-		socket2-0.3.12 \
+		socket2-0.3.19 \
 		str-buf-1.0.5 \
 		strsim-0.7.0 \
 		strsim-0.8.0 \
diff --git a/audio/spotify-tui/distinfo b/audio/spotify-tui/distinfo
index 35d684582ec1..a2f8588930a6 100644
--- a/audio/spotify-tui/distinfo
+++ b/audio/spotify-tui/distinfo
@@ -1,4 +1,4 @@
-TIMESTAMP = 1630018006
+TIMESTAMP = 1665751658
 SHA256 (rust/crates/addr2line-0.14.1.crate) = a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7
 SIZE (rust/crates/addr2line-0.14.1.crate) = 31201
 SHA256 (rust/crates/adler-0.2.3.crate) = ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e
@@ -395,8 +395,8 @@ SHA256 (rust/crates/slab-0.4.2.crate) = c111b5bd5695e56cffe5129854aa230b39c93a30
 SIZE (rust/crates/slab-0.4.2.crate) = 10136
 SHA256 (rust/crates/smallvec-1.4.1.crate) = 3757cb9d89161a2f24e1cf78efa0c1fcff485d18e3f55e0aa3480824ddaa0f3f
 SIZE (rust/crates/smallvec-1.4.1.crate) = 25818
-SHA256 (rust/crates/socket2-0.3.12.crate) = 03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918
-SIZE (rust/crates/socket2-0.3.12.crate) = 29253
+SHA256 (rust/crates/socket2-0.3.19.crate) = 122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e
+SIZE (rust/crates/socket2-0.3.19.crate) = 33782
 SHA256 (rust/crates/str-buf-1.0.5.crate) = d44a3643b4ff9caf57abcee9c2c621d6c03d9135e0d8b589bd9afb5992cb176a
 SIZE (rust/crates/str-buf-1.0.5.crate) = 3852
 SHA256 (rust/crates/strsim-0.7.0.crate) = bb4f380125926a99e52bc279241539c018323fab05ad6368b56f93d9369ff550
diff --git a/audio/spotify-tui/files/patch-rust-1.64.0 b/audio/spotify-tui/files/patch-rust-1.64.0
new file mode 100644
index 000000000000..29bb49ed198c
--- /dev/null
+++ b/audio/spotify-tui/files/patch-rust-1.64.0
@@ -0,0 +1,32 @@
+error[E0512]: cannot transmute between types of different sizes, or dependently-sized types
+   --> socket2-0.3.XX/src/sockaddr.rs:176:9
+    |
+176 |         mem::transmute::<SocketAddrV4, sockaddr_in>(v4);
+    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+    |
+    = note: source type: `SocketAddrV4` (48 bits)
+    = note: target type: `sockaddr_in` (128 bits)
+
+For more information about this error, try `rustc --explain E0512`.
+error: could not compile `socket2` due to previous error
+
+
+--- Cargo.lock.orig	2022-10-14 14:47:57 UTC
++++ Cargo.lock
+@@ -1913,13 +1913,12 @@ name = "socket2"
+ 
+ [[package]]
+ name = "socket2"
+-version = "0.3.12"
++version = "0.3.19"
+ source = "registry+https://github.com/rust-lang/crates.io-index"
+-checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918"
++checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e"
+ dependencies = [
+- "cfg-if 0.1.10",
++ "cfg-if 1.0.0",
+  "libc",
+- "redox_syscall",
+  "winapi 0.3.9",
+ ]
+