Skip to content

Commit 16aa9c6

Browse files
committed
lua: Fix the value of LUA_ROOT
Fixes #434
1 parent 90a0ed0 commit 16aa9c6

File tree

4 files changed

+14
-10
lines changed

4 files changed

+14
-10
lines changed

lua5.3/lua-5.3.5.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "lua-5.3",
33
"buildsystem": "simple",
44
"build-commands": [
5-
"make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX\" linux",
5+
"make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX -DLUA_ROOT=\\\\\\\"$FLATPAK_DEST/\\\\\\\"\" linux",
66
"make TO_LIB=liblua.so.5.3.5 INSTALL_TOP=$FLATPAK_DEST install",
77
"ln -sf liblua.so.5.3.5 $FLATPAK_DEST/lib/liblua.so",
88
"ln -sf liblua.so.5.3.5 $FLATPAK_DEST/lib/liblua.so.5.3",

lua5.3/luaconf.patch

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ index 119110d..22b1f31 100644
1212
# Targets start here.
1313
all: $(PLAT)
1414
diff --git a/src/luaconf.h b/src/luaconf.h
15-
index 9eeeea6..95250da 100644
15+
index 9eeeea6..a44219f 100644
1616
--- a/src/luaconf.h
1717
+++ b/src/luaconf.h
1818
@@ -11,6 +11,9 @@
@@ -25,16 +25,18 @@ index 9eeeea6..95250da 100644
2525

2626
/*
2727
** ===================================================================
28-
@@ -200,7 +203,7 @@
28+
@@ -200,7 +203,9 @@
2929

3030
#else /* }{ */
3131

3232
-#define LUA_ROOT "/usr/local/"
33-
+#define LUA_ROOT "$FLATPAK_DEST/"
33+
+#ifndef LUA_ROOT
34+
+#define LUA_ROOT "/usr/local/"
35+
+#endif
3436
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
3537
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
3638
#define LUA_PATH_DEFAULT \
37-
@@ -745,7 +748,7 @@
39+
@@ -745,7 +750,7 @@
3840
@@ of a function in debug information.
3941
** CHANGE it if you want a different size.
4042
*/

lua5.4/lua-5.4.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "lua-5.4",
33
"buildsystem": "simple",
44
"build-commands": [
5-
"make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX\" linux",
5+
"make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX -DLUA_ROOT=\\\\\\\"$FLATPAK_DEST/\\\\\\\"\" linux",
66
"make TO_LIB=liblua.so.5.4.6 INSTALL_TOP=$FLATPAK_DEST install",
77
"ln -sf liblua.so.5.4.6 $FLATPAK_DEST/lib/liblua.so",
88
"ln -sf liblua.so.5.4.6 $FLATPAK_DEST/lib/liblua.so.5.4",

lua5.4/luaconf.patch

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/src/luaconf.h b/src/luaconf.h
2-
index 137103e..fe255c4 100644
2+
index 137103e..8cd54a7 100644
33
--- a/src/luaconf.h
44
+++ b/src/luaconf.h
55
@@ -11,6 +11,9 @@
@@ -12,16 +12,18 @@ index 137103e..fe255c4 100644
1212

1313
/*
1414
** ===================================================================
15-
@@ -223,7 +226,7 @@
15+
@@ -223,7 +226,9 @@
1616

1717
#else /* }{ */
1818

1919
-#define LUA_ROOT "/usr/local/"
20-
+#define LUA_ROOT "$FLATPAK_DEST/"
20+
+#ifndef LUA_ROOT
21+
+#define LUA_ROOT "/usr/local/"
22+
+#endif
2123
#define LUA_LDIR LUA_ROOT "share/lua/" LUA_VDIR "/"
2224
#define LUA_CDIR LUA_ROOT "lib/lua/" LUA_VDIR "/"
2325

24-
@@ -756,7 +759,7 @@
26+
@@ -756,7 +761,7 @@
2527
** of a function in debug information.
2628
** CHANGE it if you want a different size.
2729
*/

0 commit comments

Comments
 (0)