mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-18 00:10:04 +00:00
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
This commit is contained in:
parent
841f9af017
commit
30a12533e7
@ -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
|
||||
|
11
games/retroarch/files/patch-gfx_common_wayland__common.c
Normal file
11
games/retroarch/files/patch-gfx_common_wayland__common.c
Normal file
@ -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);
|
20
games/retroarch/files/patch-input_input__keymaps.c
Normal file
20
games/retroarch/files/patch-input_input__keymaps.c
Normal file
@ -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 <linux/input.h>
|
||||
#include <linux/kd.h>
|
||||
@@ -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
|
Loading…
Reference in New Issue
Block a user