git: 9db632065e45 - main - www/ungoogled-chromium: Fix build with rust 1.86.0

From: Mikael Urankar <mikael_at_FreeBSD.org>
Date: Tue, 08 Apr 2025 08:41:32 UTC
The branch main has been updated by mikael:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9db632065e455eaa9317fa515fd8feb07cb8182e

commit 9db632065e455eaa9317fa515fd8feb07cb8182e
Author:     Mikael Urankar <mikael@FreeBSD.org>
AuthorDate: 2025-04-08 08:22:13 +0000
Commit:     Mikael Urankar <mikael@FreeBSD.org>
CommitDate: 2025-04-08 08:41:12 +0000

    www/ungoogled-chromium: Fix build with rust 1.86.0
    
    PR:             285840
    Approved by:    portmgr (build fix blanket)
---
 .../files/patch-build_rust_std_BUILD.gn             | 21 +++++++++++++++++----
 1 file changed, 17 insertions(+), 4 deletions(-)

diff --git a/www/ungoogled-chromium/files/patch-build_rust_std_BUILD.gn b/www/ungoogled-chromium/files/patch-build_rust_std_BUILD.gn
index 5511da1a1708..0a5335d58d48 100644
--- a/www/ungoogled-chromium/files/patch-build_rust_std_BUILD.gn
+++ b/www/ungoogled-chromium/files/patch-build_rust_std_BUILD.gn
@@ -1,15 +1,28 @@
---- build/rust/std/BUILD.gn.orig	2025-03-09 21:38:10 UTC
+--- build/rust/std/BUILD.gn.orig	2025-04-05 13:54:50 UTC
 +++ build/rust/std/BUILD.gn
-@@ -89,7 +89,7 @@ if (toolchain_has_rust) {
+@@ -89,13 +89,20 @@ if (toolchain_has_rust) {
      # These are no longer present in the Windows toolchain.
      stdlib_files += [
        "addr2line",
 -      "adler2",
-+      "adler",
        "gimli",
        "libc",
        "memchr",
-@@ -115,7 +115,6 @@ if (toolchain_has_rust) {
+       "miniz_oxide",
+       "object",
+     ]
++
++    rust_revision_pieces = string_split(rustc_revision, " ")
++    rust_version_pieces = string_split(rust_revision_pieces[1], ".")
++    if (rust_version_pieces[1] == "85") {
++      stdlib_files += [ "adler" ]
++    } else {
++      stdlib_files += [ "adler2" ]
++    }
+   }
+ 
+   if (toolchain_for_rust_host_build_tools) {
+@@ -115,7 +122,6 @@ if (toolchain_has_rust) {
    # don't need to pass to the C++ linker because they're used for specialized
    # purposes.
    skip_stdlib_files = [