git: 16f071acbac1 - main - emulators/mame: enable on arm64

From: Robert Clausecker <fuz_at_FreeBSD.org>
Date: Thu, 18 May 2023 08:20:43 UTC
The branch main has been updated by fuz:

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

commit 16f071acbac17780d645ac05e734bc49d7b443c6
Author:     Robert Clausecker <fuz@FreeBSD.org>
AuthorDate: 2023-05-17 11:44:21 +0000
Commit:     Robert Clausecker <fuz@FreeBSD.org>
CommitDate: 2023-05-18 08:19:49 +0000

    emulators/mame: enable on arm64
    
    Add a missing make target, permitting compilation on arm64.
    
    PR:             271468
    MFH:            2023Q2
    Approved by:    agh@riseup.net (maintainer)
---
 emulators/mame/Makefile             |  4 ++--
 emulators/mame/files/patch-makefile | 14 ++++++++++++++
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/emulators/mame/Makefile b/emulators/mame/Makefile
index d13f1e2cc8dd..38347752f3f6 100644
--- a/emulators/mame/Makefile
+++ b/emulators/mame/Makefile
@@ -17,8 +17,8 @@ LICENSE_FILE_MIT=	${WRKSRC}/docs/legal/MIT
 LICENSE_FILE_ZLIB=	${WRKSRC}/docs/legal/Zlib
 LICENSE_FILE=	${WRKSRC}/docs/LICENSE
 
-ONLY_FOR_ARCHS=	amd64 armv7 i386 powerpc powerpc64 powerpc64le
-ONLY_FOR_ARCHS_REASON=	not yet ported to any architecture other than armv7, x86, and powerpc*
+ONLY_FOR_ARCHS=	aarch64 amd64 armv7 i386 powerpc powerpc64 powerpc64le
+ONLY_FOR_ARCHS_REASON=	not yet ported to any architecture other than armv7, arm64, x86, and powerpc*
 
 BUILD_DEPENDS=	${PYTHON_PKGNAMEPREFIX}sphinxcontrib-svg2pdfconverter>0:textproc/py-sphinxcontrib-svg2pdfconverter@${PY_FLAVOR}
 LIB_DEPENDS=	libexpat.so:textproc/expat2 \
diff --git a/emulators/mame/files/patch-makefile b/emulators/mame/files/patch-makefile
new file mode 100644
index 000000000000..82288e63f2ca
--- /dev/null
+++ b/emulators/mame/files/patch-makefile
@@ -0,0 +1,14 @@
+--- makefile.orig	2023-05-17 11:43:34 UTC
++++ makefile
+@@ -1425,6 +1425,11 @@ $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile: make
+ 
+ .PHONY: freebsd_x64_clang
+ freebsd_x64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile
++	$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 precompile
++	$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64
++
++.PHONY: freebsd_arm64_clang
++freebsd_arm64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile
+ 	$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 precompile
+ 	$(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64
+