diff options
author | Hubert Figuière <hub@figuiere.net> | 2021-12-24 20:01:22 +0300 |
---|---|---|
committer | Patrick <tingping@tingping.se> | 2021-12-28 06:59:39 +0300 |
commit | 807ec3987636d4088c7b7696626a22a350c91229 (patch) | |
tree | 9c002bc9dd68c24109adfdea5833b318877a02bf | |
parent | 0534d3276b3966e87abacd163f757454b6fcf724 (diff) |
Added lua5.4
-rw-r--r-- | lua5.4/lua-5.4.json | 44 | ||||
-rw-r--r-- | lua5.4/lua.pc.in | 8 | ||||
-rw-r--r-- | lua5.4/makefile-add-liblua.so-rule.patch | 42 |
3 files changed, 94 insertions, 0 deletions
diff --git a/lua5.4/lua-5.4.json b/lua5.4/lua-5.4.json new file mode 100644 index 0000000..5c9e500 --- /dev/null +++ b/lua5.4/lua-5.4.json @@ -0,0 +1,44 @@ +{ + "name": "lua-5.4", + "buildsystem": "simple", + "build-commands": [ + "make -j $FLATPAK_BUILDER_N_JOBS CFLAGS=\"$CFLAGS -fPIC -DLUA_USE_LINUX\" linux", + "make TO_LIB=liblua.so.5.4.3 INSTALL_TOP=$FLATPAK_DEST install", + "ln -sf liblua.so.5.4.3 $FLATPAK_DEST/lib/liblua.so", + "ln -sf liblua.so.5.4.3 $FLATPAK_DEST/lib/liblua.so.4.3", + "make INSTALL_TOP=${FLATPAK_DEST} pc > lua.pc", + "cat lua.pc.in >> lua.pc", + "install -Dm644 lua.pc $FLATPAK_DEST/lib/pkgconfig/lua.pc", + "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua54.pc", + "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua5.4.pc", + "ln -sf lua.pc $FLATPAK_DEST/lib/pkgconfig/lua-5.4.pc" + ], + "sources": [ + { + "type": "archive", + "url": "https://www.lua.org/ftp/lua-5.4.3.tar.gz", + "sha256": "f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb" + }, + { + "type": "patch", + "path": "makefile-add-liblua.so-rule.patch" + }, + { + "type": "file", + "path": "lua.pc.in" + }, + { + "type": "shell", + "commands": [ + "sed -i \"s|/usr/local/|$FLATPAK_DEST/|;s|LUA_IDSIZE 60|LUA_IDSIZE 512|\" src/luaconf.h", + "sed -i '12 a\\\\n#define LUA_COMPAT_5_1\\n#define LUA_COMPAT_5_2' src/luaconf.h" + ] + } + ], + "cleanup": [ + "/bin", + "/include", + "/lib/pkgconfig", + "/share/man" + ] +} diff --git a/lua5.4/lua.pc.in b/lua5.4/lua.pc.in new file mode 100644 index 0000000..6698f8b --- /dev/null +++ b/lua5.4/lua.pc.in @@ -0,0 +1,8 @@ +exec_prefix=${prefix} + +Name: Lua +Description: An Extensible Extension Language +Version: ${version} +Requires: +Libs: -L${libdir} -llua -lm +Cflags: -I${includedir}
\ No newline at end of file diff --git a/lua5.4/makefile-add-liblua.so-rule.patch b/lua5.4/makefile-add-liblua.so-rule.patch new file mode 100644 index 0000000..7452f10 --- /dev/null +++ b/lua5.4/makefile-add-liblua.so-rule.patch @@ -0,0 +1,42 @@ +--- a/Makefile 2021-12-24 10:55:05.836294155 -0500 ++++ b/Makefile 2021-03-02 15:04:35.000000000 -0500 +@@ -52,7 +52,7 @@ + all: $(PLAT) + + $(PLATS) help test clean: +- @cd src && $(MAKE) $@ ++ @cd src && $(MAKE) $@ V=$(V) R=$(R) + + install: dummy + cd src && $(MKDIR) $(INSTALL_BIN) $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_MAN) $(INSTALL_LMOD) $(INSTALL_CMOD) +--- a/src/Makefile 2021-12-24 10:56:23.279935521 -0500 ++++ b/src/Makefile 2021-02-09 13:47:17.000000000 -0500 +@@ -32,6 +32,7 @@ + PLATS= guess aix bsd c89 freebsd generic linux linux-readline macosx mingw posix solaris + + LUA_A= liblua.a ++LUA_SO= liblua.so + CORE_O= lapi.o lcode.o lctype.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 + LIB_O= lauxlib.o lbaselib.o lcorolib.o ldblib.o liolib.o lmathlib.o loadlib.o loslib.o lstrlib.o ltablib.o lutf8lib.o linit.o + BASE_O= $(CORE_O) $(LIB_O) $(MYOBJS) +@@ -44,7 +44,7 @@ + LUAC_O= luac.o + + ALL_O= $(BASE_O) $(LUA_O) $(LUAC_O) +-ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) ++ALL_T= $(LUA_A) $(LUA_T) $(LUAC_T) $(LUA_SO) + ALL_A= $(LUA_A) + + # Targets start here. +@@ -60,6 +60,11 @@ + $(AR) $@ $(BASE_O) + $(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 $@ $(LDFLAGS) $(LUA_O) $(LUA_A) $(LIBS) + |