lua.recipe (1010B)
1 # test/ecosystem/recipes/lua.recipe — real-world C build gate for Lua. 2 # Contract documented in sqlite.recipe. 3 # 4 # Lua is the strongest single gate here: ~30 TUs archived into a static lib and 5 # linked into the stock interpreter, which then runs a script exercising the GC, 6 # string formatting (host snprintf), tables, closures, coroutines, and math. 7 8 ECO_VERSION=5.4.7 9 ECO_URL="https://www.lua.org/ftp/lua-5.4.7.tar.gz" 10 ECO_SHA256=9fbf5e28ef86c69858f6d3d34eccc32e911c1a28b4120ff3e84aaa70cfbf1e30 11 ECO_SRCDIR=lua-5.4.7/src 12 ECO_INCLUDES="." 13 # Plain ANSI build (no LUA_USE_*): no dynamic loading, fully portable across the 14 # hosted support set. os/io/string/math all still work. 15 ECO_DEFINES="" 16 ECO_LIBS="-lm" 17 ECO_DRIVER=lua.c 18 19 # The library is every src/*.c except the two main()-bearing tools (the 20 # interpreter lua.c, which is our driver, and the compiler luac.c). 21 eco_lib_srcs() { 22 find "$ECO_SRC" -maxdepth 1 -name '*.c' ! -name 'lua.c' ! -name 'luac.c' 23 } 24 25 eco_run() { "$1" "$ECO_DIR/scripts/hello.lua"; }