git: ca77dc193eb1 - main - games/hyperrogue: fix build on powerpc

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Tue, 09 May 2023 20:00:53 UTC
The branch main has been updated by pkubaj:

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

commit ca77dc193eb1d9bee82da08024fb7dfce07fc802
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-05-09 19:54:41 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-05-09 19:54:41 +0000

    games/hyperrogue: fix build on powerpc
    
    Works around libc++ issue where a wrong string is passed to strlen:
    strlen (str=0x596f7520 <error: Cannot access memory at address 0x596f7520>) at /usr/src/lib/libc/string/strlen.c:101
    101             va = (*lp - mask01);
---
 games/hyperrogue/Makefile | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/games/hyperrogue/Makefile b/games/hyperrogue/Makefile
index 363922313513..3849e76034ca 100644
--- a/games/hyperrogue/Makefile
+++ b/games/hyperrogue/Makefile
@@ -38,6 +38,12 @@ DESKTOP_ENTRIES="HyperRogue" \
 
 OPTIONS_DEFINE=	DOCS
 
+.include <bsd.port.options.mk>
+
+.if ${ARCH} == powerpc
+USE_GCC=	yes
+.endif
+
 do-install:
 	${INSTALL_PROGRAM} ${WRKSRC}/hyperrogue ${STAGEDIR}${PREFIX}/bin/
 	${INSTALL_DATA} ${WRKSRC}/hr-icon.ico ${STAGEDIR}${PREFIX}/share/pixmaps/${PORTNAME}.ico