git: 7b2e0e300cb0 - main - emulators/yuzu: unbreak with kern.elf64.allow_wx=0

From: Jan Beich <jbeich_at_FreeBSD.org>
Date: Fri, 01 Apr 2022 18:40:03 UTC
The branch main has been updated by jbeich:

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

commit 7b2e0e300cb06a624ad5e52064954681b4ac5489
Author:     Jan Beich <jbeich@FreeBSD.org>
AuthorDate: 2022-04-01 17:28:56 +0000
Commit:     Jan Beich <jbeich@FreeBSD.org>
CommitDate: 2022-04-01 18:39:29 +0000

    emulators/yuzu: unbreak with kern.elf64.allow_wx=0
    
    $ yuzu
    terminate called after throwing an instance of 'Xbyak::Error'
      what():  can't protect
    Abort trap
---
 emulators/yuzu/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/emulators/yuzu/Makefile b/emulators/yuzu/Makefile
index 0f2d1c797025..fe3d8edb19d1 100644
--- a/emulators/yuzu/Makefile
+++ b/emulators/yuzu/Makefile
@@ -56,7 +56,7 @@ GH_TUPLE=	yuzu-emu:mbedtls:v2.16.9-115-g8c88150ca:mbedtls/externals/mbedtls \
 		kinetiknz:cubeb:cubeb-0.2-1350-gf79e0cf:cubeb/externals/cubeb \
 		yhirose:cpp-httplib:v0.9.0-5-g9648f95:cpp_httplib/externals/cpp-httplib
 
-USES=		cmake:testing compiler:c++17-lang localbase:ldflags pkgconfig sdl ssl
+USES=		cmake:testing compiler:c++17-lang elfctl localbase:ldflags pkgconfig sdl ssl
 USE_GCC=	yes:build # libc++ lacks std::atomic_ref, std::ranges
 USE_SDL=	sdl2
 CMAKE_ON=	Boost_USE_STATIC_LIBS
@@ -66,6 +66,7 @@ CMAKE_OFF+=	${CMAKE_TESTING_ON}
 CMAKE_TESTING_ON=	YUZU_TESTS
 LDFLAGS+=	-static-libstdc++ # avoid libc++ conflict, requires files/patch-fmt
 LDFLAGS+=	-Wl,--as-needed # Qt5Network
+ELF_FEATURES=	${PLIST_FILES:Mbin/*:S/^/+wxneeded:/}
 PLIST_FILES=	bin/${PORTNAME}-cmd
 
 OPTIONS_DEFINE=	ALSA PULSEAUDIO JACK NLS QT5 SNDIO VAAPI VULKAN WEBENGINE