git: 9377490ef0f5 - main - chinese/gcin: fix build on powerpc64*

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Thu, 15 Oct 2026 10:45:47 UTC
The branch main has been updated by pkubaj:

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

commit 9377490ef0f5894708890d04d4839376f4e06f2d
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2026-10-15 10:33:06 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2026-10-15 10:45:23 +0000

    chinese/gcin: fix build on powerpc64*
    
    Build with -fsigned-char: the phrase tables flag mixed-case English
    words with a negative length stored in plain char. Also fix the hash
    index of 1-byte keys in tsa2d32 on big-endian.
---
 chinese/gcin/Makefile                |  2 --
 chinese/gcin/files/patch-configure   |  9 +++++++++
 chinese/gcin/files/patch-tsa2d32.cpp | 12 ++++++++++++
 3 files changed, 21 insertions(+), 2 deletions(-)

diff --git a/chinese/gcin/Makefile b/chinese/gcin/Makefile
index 66754f27aeaf..bc3c3c48e1f1 100644
--- a/chinese/gcin/Makefile
+++ b/chinese/gcin/Makefile
@@ -11,8 +11,6 @@ WWW=		https://hyperrate.com/dir.php?eid=67
 
 LICENSE=	LGPL21
 
-BROKEN_powerpc64=	fails to build: gmake[3]: *** [Makefile:30: en-american] Error 255
-
 LIB_DEPENDS=	libcurl.so:ftp/curl
 
 USES=		gmake gnome pkgconfig tar:xz xorg
diff --git a/chinese/gcin/files/patch-configure b/chinese/gcin/files/patch-configure
index b695f7f0a88a..650eda4dcec0 100644
--- a/chinese/gcin/files/patch-configure
+++ b/chinese/gcin/files/patch-configure
@@ -78,6 +78,15 @@
    BUILD_MODULE='Y'
  fi
  
+@@ -378,7 +378,7 @@ fi
+   BUILD_MODULE='Y'
+ fi
+ 
+-OPTFLAGS="-g -O"
++OPTFLAGS="-g -O -fsigned-char"
+ 
+ if [ -z $CC ]; then
+   CC=gcc
 @@ -388,7 +388,7 @@ echo "includedir=\$(DESTDIR)$includedir" >> config.mak
  echo "libdir=\$(DESTDIR)$libdir" >> config.mak
  echo "gcinlibdir=\$(DESTDIR)$gcinlibdir" >> config.mak
diff --git a/chinese/gcin/files/patch-tsa2d32.cpp b/chinese/gcin/files/patch-tsa2d32.cpp
new file mode 100644
index 000000000000..927919ec73af
--- /dev/null
+++ b/chinese/gcin/files/patch-tsa2d32.cpp
@@ -0,0 +1,12 @@
+--- tsa2d32.cpp.orig	2026-10-15 10:19:29 UTC
++++ tsa2d32.cpp
+@@ -707,8 +707,7 @@ int main(int argc, char **argv)
+     int v;
+ 
+	if (phsz==1) {
+-	  v = 0;
+-	  memcpy(&v, &sf[idx], phsz);
++	  v = sf[idx];
+	} else if (phsz==2) {
+       phokey_t kk;
+       memcpy(&kk, &sf[idx], phsz);