void-packages/srcpkgs/blobby2/patches/02_use_system_lua.patch
2019-12-29 19:34:50 +01:00

60 lines
1.9 KiB
Diff

Description: Use system lua library instead of building a local copy
Author: Felix Geyer <fgeyer@debian.org>
---
src/CMakeLists.txt | 5 ++---
src/GameLogic.cpp | 6 +++---
src/ScriptedInputSource.cpp | 6 +++---
3 files changed, 8 insertions(+), 9 deletions(-)
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -1,4 +1,3 @@
-add_subdirectory(lua)
add_subdirectory(tinyxml)
ADD_DEFINITIONS(-std=c++11)
add_subdirectory(raknet)
@@ -101,11 +101,11 @@ else (CMAKE_SYSTEM_NAME STREQUAL Windows)
endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
add_executable(blobby ${blobby_SRC})
-target_link_libraries(blobby lua raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} pthread)
+target_link_libraries(blobby lua5.2 raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${OPENGL_LIBRARIES} ${SDL2_LIBRARIES} pthread)
if (UNIX)
add_executable(blobby-server ${blobby-server_SRC})
- target_link_libraries(blobby-server lua raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
+ target_link_libraries(blobby-server lua5.2 raknet blobnet tinyxml ${RAKNET_LIBRARIES} ${PHYSFS_LIBRARY} ${SDL2_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT})
endif (UNIX)
if (CMAKE_SYSTEM_NAME STREQUAL Windows)
--- a/src/ScriptedInputSource.cpp
+++ b/src/ScriptedInputSource.cpp
@@ -30,9 +30,9 @@ Foundation, Inc., 59 Temple Place, Suite
extern "C"
{
-#include "lua/lua.h"
-#include "lua/lauxlib.h"
-#include "lua/lualib.h"
+#include <lua5.2/lua.h>
+#include <lua5.2/lauxlib.h>
+#include <lua5.2/lualib.h>
}
#include "DuelMatch.h"
--- a/src/GameLogic.cpp
+++ b/src/GameLogic.cpp
@@ -28,9 +28,9 @@ Foundation, Inc., 59 Temple Place, Suite
extern "C"
{
-#include "lua/lua.h"
-#include "lua/lauxlib.h"
-#include "lua/lualib.h"
+#include <lua5.2/lua.h>
+#include <lua5.2/lauxlib.h>
+#include <lua5.2/lualib.h>
}
#include "FileRead.h"