git: df57f1fbe76c - main - devel/undead: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 24 Sep 2026 12:54:30 UTC
The branch main has been updated by pkubaj:

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

commit df57f1fbe76c93deffb76647a9863fbdc435145c
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-09-19 10:07:03 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-09-24 12:53:49 +0000

    devel/undead: fix build on powerpc64*
    
    Doesn't change API, but avoids using musttail, which is broken on
    LLVM on powerpc*.
---
 devel/undead/files/patch-src_undead_stream.d | 84 ++++++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/devel/undead/files/patch-src_undead_stream.d b/devel/undead/files/patch-src_undead_stream.d
new file mode 100644
index 000000000000..c128453b4213
--- /dev/null
+++ b/devel/undead/files/patch-src_undead_stream.d
@@ -0,0 +1,84 @@
+--- src/undead/stream.d.orig	2026-09-19 09:27:35 UTC
++++ src/undead/stream.d
+@@ -230,7 +230,9 @@ interface InputStream {
+    * --------------------------
+    */
+   int vreadf(TypeInfo[] arguments, va_list args);
+-  int readf(...); /// ditto
++  final int readf(...) { /// ditto
++    return vreadf(_arguments, _argptr);
++  }
+ 
+   /// Retrieve the number of bytes available for immediate reading.
+   @property size_t available();
+@@ -333,15 +335,25 @@ interface OutputStream {
+    * returning the number of bytes written.
+    */
+   size_t vprintf(const(char)[] format, va_list args);
+-  size_t printf(const(char)[] format, ...);    /// ditto
++  final size_t printf(const(char)[] format, ...) {    /// ditto
++    va_list ap;
++    va_start(ap, format);
++    auto result = vprintf(format, ap);
++    va_end(ap);
++    return result;
++  }
+ 
+   /***
+    * Print a formatted string into the stream using writef-style syntax.
+    * References: <a href="std_format.html">std.format</a>.
+    * Returns: self to chain with other stream commands like flush.
+    */
+-  OutputStream writef(...);
+-  OutputStream writefln(...); /// ditto
++  final OutputStream writef(...) {
++    return writefx(_arguments,_argptr,0);
++  }
++  final OutputStream writefln(...) { /// ditto
++    return writefx(_arguments,_argptr,1);
++  }
+   OutputStream writefx(TypeInfo[] arguments, va_list argptr, int newline = false);  /// ditto
+ 
+   void flush(); /// Flush pending output if appropriate.
+@@ -1048,10 +1060,6 @@ class Stream : InputStream, OutputStream {
+     return count;
+   }
+ 
+-  int readf(...) {
+-    return vreadf(_arguments, _argptr);
+-  }
+-
+   // returns estimated number of bytes available for immediate reading
+   @property size_t available() { return 0; }
+ 
+@@ -1178,30 +1186,10 @@ class Stream : InputStream, OutputStream {
+     return count;
+   }
+ 
+-  // writes data to stream using printf() syntax,
+-  // returns number of bytes written
+-  size_t printf(const(char)[] format, ...) {
+-    va_list ap;
+-    va_start(ap, format);
+-    auto result = vprintf(format, ap);
+-    va_end(ap);
+-    return result;
+-  }
+-
+   private void doFormatCallback(dchar c) {
+     char[4] buf;
+     auto b = undead.utf.toUTF8(buf, c);
+     writeString(b);
+-  }
+-
+-  // writes data to stream using writef() syntax,
+-  OutputStream writef(...) {
+-    return writefx(_arguments,_argptr,0);
+-  }
+-
+-  // writes data with trailing newline
+-  OutputStream writefln(...) {
+-    return writefx(_arguments,_argptr,1);
+   }
+ 
+   // writes data with optional trailing newline