mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-08-03 16:37:43 +00:00
lua: split and rename patches
Signed-off-by: Francois Perrad <fperrad@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
e4cbe2c33b
commit
2c7e9c50e9
@ -1,3 +1,5 @@
|
|||||||
|
Adjust installation location to /usr.
|
||||||
|
|
||||||
Index: b/src/luaconf.h
|
Index: b/src/luaconf.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- a/src/luaconf.h
|
--- a/src/luaconf.h
|
49
package/lua/lua-02-shared-libs-for-lua.patch
Normal file
49
package/lua/lua-02-shared-libs-for-lua.patch
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
Add the compilation of a shared library.
|
||||||
|
Compile the lua binary with the shared library.
|
||||||
|
|
||||||
|
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
||||||
|
|
||||||
|
Index: b/src/Makefile
|
||||||
|
===================================================================
|
||||||
|
--- a/src/Makefile
|
||||||
|
+++ b/src/Makefile
|
||||||
|
@@ -23,6 +23,7 @@
|
||||||
|
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
||||||
|
|
||||||
|
LUA_A= liblua.a
|
||||||
|
+LUA_SO= liblua.so
|
||||||
|
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
|
||||||
|
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
|
||||||
|
lundump.o lvm.o lzio.o
|
||||||
|
@@ -36,8 +37,9 @@
|
||||||
|
LUAC_O= luac.o print.o
|
||||||
|
|
||||||
|
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
|
||||||
|
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
||||||
|
+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
|
||||||
|
ALL_A= $(LUA_A)
|
||||||
|
+ALL_SO= $(LUA_SO)
|
||||||
|
|
||||||
|
default: $(PLAT)
|
||||||
|
|
||||||
|
@@ -47,12 +49,18 @@
|
||||||
|
|
||||||
|
a: $(ALL_A)
|
||||||
|
|
||||||
|
+so: $(ALL_SO)
|
||||||
|
+
|
||||||
|
$(LUA_A): $(CORE_O) $(LIB_O)
|
||||||
|
$(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
|
||||||
|
$(RANLIB) $@
|
||||||
|
|
||||||
|
-$(LUA_T): $(LUA_O) $(LUA_A)
|
||||||
|
- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
||||||
|
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
||||||
|
+ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? -nostdlib -lgcc
|
||||||
|
+ ln -fs $@.$(PKG_VERSION) $@
|
||||||
|
+
|
||||||
|
+$(LUA_T): $(LUA_O) $(LUA_SO)
|
||||||
|
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS)
|
||||||
|
|
||||||
|
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||||
|
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
@ -1,24 +1,8 @@
|
|||||||
Index: b/Makefile
|
Compile the luac binary with the shared library.
|
||||||
===================================================================
|
Many internal functions (LUAI_FUNC) must be exported (LUA_API).
|
||||||
--- a/Makefile
|
|
||||||
+++ b/Makefile
|
Signed-off-by: Francois Perrad <francois.perrad@gadz.org>
|
||||||
@@ -43,7 +43,7 @@
|
|
||||||
# What to install.
|
|
||||||
TO_BIN= lua luac
|
|
||||||
TO_INC= lua.h luaconf.h lualib.h lauxlib.h ../etc/lua.hpp
|
|
||||||
-TO_LIB= liblua.a
|
|
||||||
+TO_LIB= liblua.a liblua.so.$R
|
|
||||||
TO_MAN= lua.1 luac.1
|
|
||||||
|
|
||||||
# Lua version and release.
|
|
||||||
@@ -63,6 +63,7 @@
|
|
||||||
cd src && $(INSTALL_EXEC) $(TO_BIN) $(INSTALL_BIN)
|
|
||||||
cd src && $(INSTALL_DATA) $(TO_INC) $(INSTALL_INC)
|
|
||||||
cd src && $(INSTALL_DATA) $(TO_LIB) $(INSTALL_LIB)
|
|
||||||
+ ln -sf liblua.so.$R $(INSTALL_LIB)/liblua.so
|
|
||||||
cd doc && $(INSTALL_DATA) $(TO_MAN) $(INSTALL_MAN)
|
|
||||||
|
|
||||||
ranlib:
|
|
||||||
Index: b/src/ldo.h
|
Index: b/src/ldo.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- a/src/ldo.h
|
--- a/src/ldo.h
|
||||||
@ -91,15 +75,7 @@ Index: b/src/Makefile
|
|||||||
===================================================================
|
===================================================================
|
||||||
--- a/src/Makefile
|
--- a/src/Makefile
|
||||||
+++ b/src/Makefile
|
+++ b/src/Makefile
|
||||||
@@ -23,6 +23,7 @@
|
@@ -34,7 +34,7 @@
|
||||||
PLATS= aix ansi bsd freebsd generic linux macosx mingw posix solaris
|
|
||||||
|
|
||||||
LUA_A= liblua.a
|
|
||||||
+LUA_SO= liblua.so
|
|
||||||
CORE_O= lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
|
|
||||||
lobject.o lopcodes.o lparser.o lstate.o lstring.o ltable.o ltm.o \
|
|
||||||
lundump.o lvm.o lzio.o
|
|
||||||
@@ -33,11 +34,12 @@
|
|
||||||
LUA_O= lua.o
|
LUA_O= lua.o
|
||||||
|
|
||||||
LUAC_T= luac
|
LUAC_T= luac
|
||||||
@ -107,44 +83,15 @@ Index: b/src/Makefile
|
|||||||
+LUAC_O= luac.o print.o lopcodes.o
|
+LUAC_O= luac.o print.o lopcodes.o
|
||||||
|
|
||||||
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
|
ALL_O= $(CORE_O) $(LIB_O) $(LUA_O) $(LUAC_O)
|
||||||
-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T)
|
ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
|
||||||
+ALL_T= $(LUA_A) $(LUA_SO) $(LUA_T) $(LUAC_T)
|
@@ -62,8 +62,8 @@
|
||||||
ALL_A= $(LUA_A)
|
$(LUA_T): $(LUA_O) $(LUA_SO)
|
||||||
+ALL_SO= $(LUA_SO)
|
$(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LIBS)
|
||||||
|
|
||||||
default: $(PLAT)
|
-$(LUAC_T): $(LUAC_O) $(LUA_A)
|
||||||
|
- $(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
||||||
@@ -47,14 +49,23 @@
|
+$(LUAC_T): $(LUAC_O) $(LUA_SO)
|
||||||
|
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LIBS)
|
||||||
a: $(ALL_A)
|
|
||||||
|
|
||||||
+so: $(ALL_SO)
|
|
||||||
+
|
|
||||||
$(LUA_A): $(CORE_O) $(LIB_O)
|
|
||||||
$(AR) $@ $(CORE_O) $(LIB_O) # DLL needs all object files
|
|
||||||
$(RANLIB) $@
|
|
||||||
|
|
||||||
+$(LUA_SO): $(CORE_O) $(LIB_O)
|
|
||||||
+ $(CC) -o $@.$(PKG_VERSION) -shared -Wl,-soname="$@.$(PKG_VERSION)" $? -nostdlib -lgcc
|
|
||||||
+ ln -fs $@.$(PKG_VERSION) $@
|
|
||||||
+
|
|
||||||
$(LUA_T): $(LUA_O) $(LUA_A)
|
|
||||||
- $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
|
||||||
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS)
|
|
||||||
|
|
||||||
$(LUAC_T): $(LUAC_O) $(LUA_A)
|
|
||||||
+ $(CC) -o $@ -L. -llua $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
|
||||||
+
|
|
||||||
+$(LUAC_T)-host: $(LUAC_O) $(LUA_A)
|
|
||||||
$(CC) -o $@ $(MYLDFLAGS) $(LUAC_O) $(LUA_A) $(LIBS)
|
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@@ -96,7 +107,7 @@
|
$(RM) $(ALL_T) $(ALL_O)
|
||||||
$(MAKE) all MYCFLAGS=
|
|
||||||
|
|
||||||
linux:
|
|
||||||
- $(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
|
|
||||||
+ $(MAKE) all MYCFLAGS+=-DLUA_USE_LINUX MYLIBS="-Wl,-E -ldl -lreadline -lhistory -lncurses"
|
|
||||||
|
|
||||||
macosx:
|
|
||||||
$(MAKE) all MYCFLAGS=-DLUA_USE_LINUX MYLIBS="-lreadline"
|
|
Loading…
x
Reference in New Issue
Block a user