summaryrefslogtreecommitdiff
path: root/games-emulation/fceux/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-09-24 23:23:49 +0100
committerV3n3RiX <venerix@koprulu.sector>2023-09-24 23:23:49 +0100
commitb914cf9afa036a8ab23e8cb4cf7df1acd4a1bd44 (patch)
treea85a260f723a492575b1676e3f6cf0e031edba7e /games-emulation/fceux/files
parent6ec91ab7ea6f7b0b84e3006f7136ad8d67bd6ef0 (diff)
gentoo auto-resync : 24:09:2023 - 23:23:49
Diffstat (limited to 'games-emulation/fceux/files')
-rw-r--r--games-emulation/fceux/files/fceux-2.6.6-luajit.patch23
-rw-r--r--games-emulation/fceux/files/fceux-2.6.6-no-glx.patch9
2 files changed, 32 insertions, 0 deletions
diff --git a/games-emulation/fceux/files/fceux-2.6.6-luajit.patch b/games-emulation/fceux/files/fceux-2.6.6-luajit.patch
new file mode 100644
index 000000000000..7d9720bd5277
--- /dev/null
+++ b/games-emulation/fceux/files/fceux-2.6.6-luajit.patch
@@ -0,0 +1,23 @@
+LuaJIT is 5.1-compatible and is maintained unlike lua5.1 itself, so
+try to allow it.
+
+Use the eclass' created unversioned lua.pc, and define the compat
+macro that is normally defined in 5.1's lauxlib.h but not luajit.
+
+TODO: an upstreamable fix involve find_package for lua (can manipulate
+preferences with cmake args), and no longer using luaL_reg at all.
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -186,3 +186,3 @@
+ # Check for LUA
+- pkg_search_module( LUA lua5.1 lua-5.1 )
++ pkg_search_module( LUA lua )
+
+--- a/src/lua-engine.cpp
++++ b/src/lua-engine.cpp
+@@ -124,2 +124,5 @@
+ #include <lauxlib.h>
++#ifndef luaL_reg
++#define luaL_reg luaL_Reg
++#endif
+ #include <lualib.h>
diff --git a/games-emulation/fceux/files/fceux-2.6.6-no-glx.patch b/games-emulation/fceux/files/fceux-2.6.6-no-glx.patch
new file mode 100644
index 000000000000..6f2ae359c80c
--- /dev/null
+++ b/games-emulation/fceux/files/fceux-2.6.6-no-glx.patch
@@ -0,0 +1,9 @@
+Allow linking on a GLX-less system.
+--- a/src/CMakeLists.txt
++++ b/src/CMakeLists.txt
+@@ -87 +87 @@
+- find_package(OpenGL REQUIRED)
++ find_package(OpenGL REQUIRED COMPONENTS OpenGL )
+@@ -195 +195 @@
+- set( OPENGL_LDFLAGS ${OPENGL_LIBRARIES} )
++ set( OPENGL_LDFLAGS OpenGL::OpenGL )