diff options
author | Unrud <unrud@outlook.com> | 2020-06-15 19:09:50 +0300 |
---|---|---|
committer | Patrick <tingping@tingping.se> | 2020-06-17 02:01:34 +0300 |
commit | eff2364225e7ebf455c33fc86d5c84c5dfd5627c (patch) | |
tree | 8de1829b915aa2b7f2dc41162308bad13d9d36f3 /lua5.1 | |
parent | df8e2d7338cd0dc8f7de94f9686525c3c601857b (diff) |
Add lua5.1
Diffstat (limited to 'lua5.1')
-rw-r--r-- | lua5.1/lua-5.1.5-so.patch | 43 | ||||
-rw-r--r-- | lua5.1/lua-5.1.5.json | 38 |
2 files changed, 81 insertions, 0 deletions
diff --git a/lua5.1/lua-5.1.5-so.patch b/lua5.1/lua-5.1.5-so.patch new file mode 100644 index 0000000..5fc61a0 --- /dev/null +++ b/lua5.1/lua-5.1.5-so.patch @@ -0,0 +1,43 @@ +diff -ur lua-5.1.4/src/Makefile lua-5.1.4-new/src/Makefile +--- lua-5.1.4/src/Makefile 2008-01-19 20:37:58.000000000 +0100 ++++ lua-5.1.4-new/src/Makefile 2012-02-23 18:26:43.000000000 +0100 +@@ -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,7 +37,7 @@ + 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) + + default: $(PLAT) +@@ -51,6 +52,11 @@ + $(AR) $@ $? + $(RANLIB) $@ + ++$(LUA_SO): $(CORE_O) $(LIB_O) ++ $(CC) -shared -ldl -Wl,-soname,$(LUA_SO).$(V) -o $@.$(R) $? -lm $(MYLDFLAGS) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO).$(V) ++ ln -sf $(LUA_SO).$(R) $(LUA_SO) ++ + $(LUA_T): $(LUA_O) $(LUA_A) + $(CC) -o $@ $(MYLDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + +--- lua-5.1.4/Makefile 2008-08-12 02:40:48.000000000 +0200 ++++ lua-5.1.4-new/Makefile 2012-02-23 19:06:32.000000000 +0100 +@@ -53,7 +53,7 @@ + all: $(PLAT) + + $(PLATS) clean: +- cd src && $(MAKE) $@ ++ cd src && $(MAKE) $@ V=$(V) R=$(R) + + test: dummy + src/lua test/hello.lua diff --git a/lua5.1/lua-5.1.5.json b/lua5.1/lua-5.1.5.json new file mode 100644 index 0000000..69f3567 --- /dev/null +++ b/lua5.1/lua-5.1.5.json @@ -0,0 +1,38 @@ +{ + "name": "lua-5.1", + "buildsystem": "simple", + "build-commands": [ + "make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC\" linux", + "make INSTALL_TOP=$FLATPAK_DEST TO_LIB='liblua.a liblua.so.5.1.5' install", + "ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so", + "ln -sf liblua.so.5.1.5 $FLATPAK_DEST/lib/liblua.so.5.1", + "install -Dm0644 etc/lua.pc $FLATPAK_DEST/lib/pkgconfig/lua.pc", + "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua51.pc", + "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua5.1.pc", + "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua-5.1.pc" + ], + "sources": [ + { + "type": "archive", + "url": "https://www.lua.org/ftp/lua-5.1.5.tar.gz", + "sha256": "2640fc56a795f29d28ef15e13c34a47e223960b0240e8cb0a82d9b0738695333" + }, + { + "type": "patch", + "path": "lua-5.1.5-so.patch" + }, + { + "type": "shell", + "commands": [ + "sed -i \"s|/usr/local|$FLATPAK_DEST|\" etc/lua.pc src/luaconf.h" + ] + } + ], + "cleanup": [ + "*.a", + "/bin", + "/include", + "/lib/pkgconfig", + "/man" + ] +} |