git: 0adc48d735fe - 2023Q2 - emulators/mame: enable on arm64

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

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

commit 0adc48d735fed7434332a53247176cfe0141b543
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:22:19 +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)
    
    (cherry picked from commit 16f071acbac17780d645ac05e734bc49d7b443c6)
---
 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 c2a975d1d698..6f306cf95dbc 100644
--- a/emulators/mame/Makefile
+++ b/emulators/mame/Makefile
@@ -12,8 +12,8 @@ LICENSE_FILE=	${WRKSRC}/docs/LICENSE
 LICENSE_FILE_BSD3CLAUSE=	${WRKSRC}/docs/legal/BSD-3-Clause
 LICENSE_FILE_GPLv2=	${WRKSRC}/docs/legal/GPL-2.0
 
-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
+