git: 10aecf3b195e - main - games/zdoom: fix the build with llvm16 in base

From: Kyle Evans <kevans_at_FreeBSD.org>
Date: Mon, 26 Jun 2023 02:31:49 UTC
The branch main has been updated by kevans:

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

commit 10aecf3b195e51a5ee140d4dac8b28ae6cf3198a
Author:     Kyle Evans <kevans@FreeBSD.org>
AuthorDate: 2023-06-26 02:28:07 +0000
Commit:     Kyle Evans <kevans@FreeBSD.org>
CommitDate: 2023-06-26 02:28:44 +0000

    games/zdoom: fix the build with llvm16 in base
    
    The 'register' keyword now raises an error, so patch out those parts.
    Patch generally taken from gzdoom commit 3c044ebd5eae343.  No functional
    change as a result of this.
---
 games/zdoom/files/patch-src_am__map.cpp | 15 +++++++++++++++
 games/zdoom/files/patch-src_md5.cpp     | 11 +++++++++++
 games/zdoom/files/patch-src_p__spec.cpp | 18 ++++++++++++++++++
 3 files changed, 44 insertions(+)

diff --git a/games/zdoom/files/patch-src_am__map.cpp b/games/zdoom/files/patch-src_am__map.cpp
new file mode 100644
index 000000000000..fe4a67031a35
--- /dev/null
+++ b/games/zdoom/files/patch-src_am__map.cpp
@@ -0,0 +1,15 @@
+--- src/am_map.cpp.orig	2016-02-22 02:11:13 UTC
++++ src/am_map.cpp
+@@ -1692,9 +1692,9 @@ bool AM_clipMline (mline_t *ml, fline_t *fl)
+ 		TOP		=8
+ 	};
+ 
+-	register int outcode1 = 0;
+-	register int outcode2 = 0;
+-	register int outside;
++	int outcode1 = 0;
++	int outcode2 = 0;
++	int outside;
+ 
+ 	fpoint_t tmp = { 0, 0 };
+ 	int dx;
diff --git a/games/zdoom/files/patch-src_md5.cpp b/games/zdoom/files/patch-src_md5.cpp
new file mode 100644
index 000000000000..e25f2660b9ca
--- /dev/null
+++ b/games/zdoom/files/patch-src_md5.cpp
@@ -0,0 +1,11 @@
+--- src/md5.cpp.orig	2016-02-22 02:11:13 UTC
++++ src/md5.cpp
+@@ -166,7 +166,7 @@ MD5Transform(DWORD buf[4], const DWORD in[16])
+ void
+ MD5Transform(DWORD buf[4], const DWORD in[16])
+ {
+-	register DWORD a, b, c, d;
++	DWORD a, b, c, d;
+ 
+ 	a = buf[0];
+ 	b = buf[1];
diff --git a/games/zdoom/files/patch-src_p__spec.cpp b/games/zdoom/files/patch-src_p__spec.cpp
index d2d1d93d7e48..2dcc9ac98429 100644
--- a/games/zdoom/files/patch-src_p__spec.cpp
+++ b/games/zdoom/files/patch-src_p__spec.cpp
@@ -9,3 +9,21 @@
  			{
  				{  0,  1 }, {  0,  2 }, {  0,  4 },
  				{ -1,  0 }, { -2,  0 }, { -4,  0 },
+@@ -1826,7 +1826,7 @@ static void P_SpawnScrollers(void)
+ 
+ 		switch (special)
+ 		{
+-			register int s;
++			int s;
+ 
+ 		case Scroll_Ceiling:
+ 		{
+@@ -2357,7 +2357,7 @@ static void P_SpawnPushers ()
+ {
+ 	int i;
+ 	line_t *l = lines;
+-	register int s;
++	int s;
+ 
+ 	for (i = 0; i < numlines; i++, l++)
+ 	{