From nobody Tue Nov 07 00:22:06 2023 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SPTRy3jm1z50ps9; Tue, 7 Nov 2023 00:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SPTRy2SMDz4b6S; Tue, 7 Nov 2023 00:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699316526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cup+2DUnoaexa43b8yJ9r+wkK30hH8JjTPZbTluqIHk=; b=AUxWbjKvSDOyP62l4oR+wtaYnP63ebAngjmuA4M36A5CIBkSocBD3neyh166iJ9qcte43l LcfEzjY7C/0nqRXbFPO91z8vUn9FkcP7ItiFXiXPpjQvBlk2ei3DGW4eVcLCeCQEPpyWP7 nEa0j3AT/4l32e0hxsc8exvyq8B6CUwM2qvtFXy3SZvckYe2WOLMRo8NpIMbS2n6Ebk/JW 4B3Wau/NqWisagxZEogJBMfnnPWIzhodow3gXnB8WYG5RIj4mnFMnafWUTQHySXGpZ/aya DVXSRFyGBwAofCKeuL4GlOdbQxKYdsrM2TBnaKLnltr7CiXwN2xT3mHz0KHEkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1699316526; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cup+2DUnoaexa43b8yJ9r+wkK30hH8JjTPZbTluqIHk=; b=RsnRudvT6KcVT4OSrned+hMNr6YANFOo/ldqAjEWRWhYOcEMDwB5qFRnXMmw037JjUt8T0 T6gwoeDsRyuY950Zyd4q4Ef5L1PWZSh6JKY3kGryplc/ueMAw/QX/HI2XO1o1LVHa9ZZi4 dWaEKLtu+ujqDFETSxhrN0FHUEq0LugXhTYI0o7b5EOeWuQ4++8fDou/lJXp6MVrPrBZe8 NHTovPgt0a25QW4HVau3zk1P6kScdmK5fmg7taWI3+beIdEqNVa2P/GAYYBLuiqAQpBYXn DTbgpz31tc+u/cVLFQktL3k5X1LnDUQWUqXUMfl1hapRFJh3IammlqC+oA0HQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1699316526; a=rsa-sha256; cv=none; b=fIqURWj8dKo9r/pRTt4egKZb4YHJICHFYuPJNUZ8CMd2LKw8pIAHJT99C5sheEzyXr10Oj LZXrvMQUyU3RkDCqtiLl7FOonl3CcNVL3oa2UV7HWcsj8MDJTCEziYniIHqjXDigI31D0N qd1HYmri662BjkvWLNVwqhqqAvO17vdUqLtFvW1KUxofvR4ERcPaCEWrRiRPAhqYDLneCT RXQw7+CwES7J9e7Yq4RHWH4fKzs7VUu2fZQug3Rd/l0UlfGIjqaBa0QbskSwdJyIo/O/dS lzx9erj0UQKRPpq6lzmR1tO4FlkY2r+dOwaEJThPIhFKdweuQ377e+laHBrsdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SPTRy1XZGzTTT; Tue, 7 Nov 2023 00:22:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 3A70M6ch028709; Tue, 7 Nov 2023 00:22:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 3A70M62l028695; Tue, 7 Nov 2023 00:22:06 GMT (envelope-from git) Date: Tue, 7 Nov 2023 00:22:06 GMT Message-Id: <202311070022.3A70M62l028695@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Robert Clausecker Subject: git: 30a12533e7c4 - main - games/retroarch: fix build on all versions and enable on non-x86 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fuz X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30a12533e7c488b57fa176d3b0bd53903db28520 Auto-Submitted: auto-generated The branch main has been updated by fuz: URL: https://cgit.FreeBSD.org/ports/commit/?id=30a12533e7c488b57fa176d3b0bd53903db28520 commit 30a12533e7c488b57fa176d3b0bd53903db28520 Author: Robert Clausecker AuthorDate: 2023-11-06 19:22:04 +0000 Commit: Robert Clausecker CommitDate: 2023-11-07 00:17:29 +0000 games/retroarch: fix build on all versions and enable on non-x86 Do not depend on svgalib where svgalib is not supported. Do not enable code using memfd_create() where that is not supported. PR: 274647 --- games/retroarch/Makefile | 9 +++++++-- .../files/patch-gfx_common_wayland__common.c | 11 +++++++++++ games/retroarch/files/patch-input_input__keymaps.c | 20 ++++++++++++++++++++ 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/games/retroarch/Makefile b/games/retroarch/Makefile index b60cd355702f..18d06bac680d 100644 --- a/games/retroarch/Makefile +++ b/games/retroarch/Makefile @@ -35,8 +35,13 @@ LDFLAGS_i386= -Wl,-znotext DOCSDIR= ${PREFIX}/share/doc/${PORTNAME:tl} SUB_FILES= pkg-message -OPTIONS_DEFINE= CACA FFMPEG OSS JACK PULSEAUDIO ALSA SDL OPENGL OPENAL V4L FREETYPE WAYLAND UDEV QT X11 DOCS -OPTIONS_DEFAULT=FFMPEG OSS SDL OPENGL OPENAL V4L FREETYPE WAYLAND UDEV QT X11 +OPTIONS_DEFINE= CACA FFMPEG OSS JACK PULSEAUDIO ALSA SDL OPENGL OPENAL V4L FREETYPE UDEV QT X11 DOCS +OPTIONS_DEFINE_amd64= WAYLAND # svgalib is x86 only +OPTIONS_DEFINE_i386= WAYLAND +OPTIONS_DEFAULT=FFMPEG OSS SDL OPENGL OPENAL V4L FREETYPE UDEV QT X11 +OPTIONS_DEFAULT_amd64= WAYLAND +OPTIONS_DEFAULT_i386= WAYLAND +OPTIONS_EXCLUDE_FreeBSD_12= WAYLAND # requires memfd_create() FFMPEG_DESC= On-the-fly recording of gameplay with libavcodec WAYLAND_DESC= Wayland display support UDEV_DESC= udev device hotplug support diff --git a/games/retroarch/files/patch-gfx_common_wayland__common.c b/games/retroarch/files/patch-gfx_common_wayland__common.c new file mode 100644 index 000000000000..c964aead462b --- /dev/null +++ b/games/retroarch/files/patch-gfx_common_wayland__common.c @@ -0,0 +1,11 @@ +--- gfx/common/wayland_common.c.orig 2023-11-06 19:16:56 UTC ++++ gfx/common/wayland_common.c +@@ -419,7 +419,7 @@ bool gfx_ctx_wl_get_metrics_common(void *data, + static int create_shm_file(off_t size) + { + int fd, ret; +- if ((fd = syscall(SYS_memfd_create, SPLASH_SHM_NAME, ++ if ((fd = memfd_create(SPLASH_SHM_NAME, + MFD_CLOEXEC | MFD_ALLOW_SEALING)) >= 0) + { + fcntl(fd, F_ADD_SEALS, F_SEAL_SHRINK); diff --git a/games/retroarch/files/patch-input_input__keymaps.c b/games/retroarch/files/patch-input_input__keymaps.c new file mode 100644 index 000000000000..dae7278b7f58 --- /dev/null +++ b/games/retroarch/files/patch-input_input__keymaps.c @@ -0,0 +1,20 @@ +--- input/input_keymaps.c.orig 2023-11-06 19:58:13 UTC ++++ input/input_keymaps.c +@@ -54,7 +54,7 @@ + #include "SDL.h" + #endif + +-#if defined(__linux__) || defined(HAVE_WAYLAND) ++#if defined(__linux__) || defined(HAVE_WAYLAND) || defined(__FreeBSD__) + #if defined(__linux__) + #include + #include +@@ -1130,7 +1130,7 @@ const struct rarch_key_map rarch_key_map_x11[] = { + }; + #endif + +-#if defined(__linux__) || defined(HAVE_WAYLAND) ++#if defined(__linux__) || defined(HAVE_WAYLAND) || defined(__FreeBSD__) + /* Note: Only one input can be mapped to each + * RETROK_* key. If several physical inputs + * correspond to the same key, these inputs