git: bbd5b6c7dc5e - 2023Q1 - emulators/xsystem35: unbreak build with clang 15

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Mon, 27 Feb 2023 18:19:06 UTC
The branch 2023Q1 has been updated by jbeich:

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

commit bbd5b6c7dc5e9f6ce9c9ccfdb742c1de78a5e560
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2023-02-11 11:57:32 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2023-02-27 18:18:27 +0000

    emulators/xsystem35: unbreak build with clang 15
    
    nDEMO.c:22:6: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'int *'; dereference with * [-Wint-conversion]
            int p1 = getCaliVariable();
                ^    ~~~~~~~~~~~~~~~~~
                     *
    nDEMO.c:28:6: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'int *'; dereference with * [-Wint-conversion]
            int p1 = getCaliVariable();
                ^    ~~~~~~~~~~~~~~~~~
                     *
    nt_msg.c:189:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
                    char *b = sjis2euc(msg);
                          ^   ~~~~~~~~~~~~~
    nt_msg.c:261:10: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
                            char *b = sjis2euc(mbuf);
                                  ^   ~~~~~~~~~~~~~~
    sactcg.c:211:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
                    char *b = sjis2euc(cText);
                          ^   ~~~~~~~~~~~~~~~
    
    Reported by:    pkg-fallout
    
    (cherry picked from commit 3968779d8b3bc78928f508f2d90a9f30eb633f32)
---
 emulators/xsystem35/Makefile            |  2 +-
 emulators/xsystem35/files/patch-clang15 | 61 +++++++++++++++++++++++++++++++++
 2 files changed, 62 insertions(+), 1 deletion(-)

diff --git a/emulators/xsystem35/Makefile b/emulators/xsystem35/Makefile
index a4c83ce19edf..45cf6222a739 100644
--- a/emulators/xsystem35/Makefile
+++ b/emulators/xsystem35/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xsystem35
 DISTVERSION=	1.7.3-pre5
-PORTREVISION=	4
+PORTREVISION=	5
 CATEGORIES=	emulators games
 MASTER_SITES=	DEBIAN
 DISTFILES=	${DISTNAME:S/-/_/}.orig${EXTRACT_SUFX}
diff --git a/emulators/xsystem35/files/patch-clang15 b/emulators/xsystem35/files/patch-clang15
new file mode 100644
index 000000000000..6e167ce3e9ac
--- /dev/null
+++ b/emulators/xsystem35/files/patch-clang15
@@ -0,0 +1,61 @@
+Get value instead of pointer in Set*Flag() like other modules
+
+nDEMO.c:22:6: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'int *'; dereference with * [-Wint-conversion]
+        int p1 = getCaliVariable();
+            ^    ~~~~~~~~~~~~~~~~~
+                 *
+nDEMO.c:28:6: error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'int *'; dereference with * [-Wint-conversion]
+        int p1 = getCaliVariable();
+            ^    ~~~~~~~~~~~~~~~~~
+                 *
+
+Avoid implicit function declaration for sjis2euc()
+
+nt_msg.c:189:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
+                char *b = sjis2euc(msg);
+                      ^   ~~~~~~~~~~~~~
+nt_msg.c:261:10: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
+                        char *b = sjis2euc(mbuf);
+                              ^   ~~~~~~~~~~~~~~
+sactcg.c:211:9: error: incompatible integer to pointer conversion initializing 'char *' with an expression of type 'int' [-Wint-conversion]
+                char *b = sjis2euc(cText);
+                      ^   ~~~~~~~~~~~~~~~
+
+--- modules/NIGHTDLL/nt_msg.c.orig	2003-11-09 15:06:12 UTC
++++ modules/NIGHTDLL/nt_msg.c
+@@ -18,6 +18,7 @@
+ #include "sactcg.h"
+ #include "sjisname.h"
+ #include "sactstring.h"
++#include "eucsjis.h"
+ 
+ 
+ extern int ntsel_dosel(void);
+--- modules/NIGHTDLL/sactcg.c.orig	2003-11-16 15:29:52 UTC
++++ modules/NIGHTDLL/sactcg.c
+@@ -34,6 +34,7 @@
+ #include "ags.h"
+ #include "surface.h"
+ #include "ngraph.h"
++#include "eucsjis.h"
+ #include "sactcg.h"
+ 
+ #define CGMAX 65536
+--- modules/nDEMO/nDEMO.c.orig	2001-07-30 22:58:40 UTC
++++ modules/nDEMO/nDEMO.c
+@@ -19,13 +19,13 @@ void SetKeyCancelFlag() {
+ }
+ 
+ void SetKeyCancelFlag() {
+-	int p1 = getCaliVariable();
++	int p1 = getCaliValue();
+ 	
+ 	DEBUG_COMMAND_YET("nDEMO.SetKeyCancelFlag %d:\n", p1);
+ }
+ 
+ void SetLoopFlag() {
+-	int p1 = getCaliVariable();
++	int p1 = getCaliValue();
+ 	
+ 	DEBUG_COMMAND_YET("nDEMO.SetLoopFlag %d:\n", p1);
+ }