summarylogtreecommitdiffstats
path: root/lua52.patch
blob: a1b97478b66d0144a265b8e25e8a9e723febbe2b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
--- qosmic-1.5.0/src/lua/lunar.h	2011-10-22 01:58:08.000000000 +0200
+++ qosmic-1.5.0-new/src/lua/lunar.h	2015-09-04 18:36:01.547010872 +0200
@@ -9,15 +9,22 @@
 
 extern "C"
 {
-#include "lua.h"
-#include "lualib.h"
-#include "lauxlib.h"
+#include "lua5.2/lua.h"
+#include "lua5.2/lualib.h"
+#include "lua5.2/lauxlib.h"
 }
 
 #include "logger.h"
 
 namespace Lua
 {
+
+inline LUALIB_API int luaL_typerror (lua_State *L, int narg, const char *tname) {
+  const char *msg = lua_pushfstring(L, "%s expected, got %s",
+                                    tname, luaL_typename(L, narg));
+  return luaL_argerror(L, narg, msg);
+}
+
 template <typename T> class Lunar
 {
 		typedef struct { T* pT; } userdataType;
@@ -37,7 +44,7 @@
 			// store method table in globals so that
 			// scripts can add functions written in Lua.
 			lua_pushvalue(L, methods);
-			set(L, LUA_GLOBALSINDEX, T::className);
+			lua_setglobal(L, T::className);
 
 			// hide metatable from Lua getmetatable()
 			lua_pushvalue(L, methods);
--- qosmic-1.5.0/qosmic.pro	2011-10-25 03:14:24.000000000 +0200
+++ qosmic-1.5.0-new/qosmic.pro	2015-09-04 18:54:42.077293629 +0200
@@ -49,7 +49,7 @@
 
 link_pkgconfig {
 	message("Config using pkg-config version "$$system(pkg-config --version))
-	PKGCONFIG = flam3 lua
+	PKGCONFIG = flam3 lua52
 
 	## The directory that contains flam3-palettes.xml must be set here.  If
 	## your system has pkg-config, this should find the flam3 palettes.
@@ -62,7 +62,7 @@
 	## flam3-palettes.xml file installed by the flam3 package.
 	PALETTESDIR = /usr/share/flam3
 	INCLUDEPATH += /usr/include/libxml2
-	LIBS += -L/usr/lib/libxml2 -lflam3 -lm -ljpeg -lxml2 -llua
+	LIBS += -L/usr/lib/libxml2 -lflam3 -lm -ljpeg -lxml2 -llua5.2
 }