From 18e3600d95d1fea715484e8df4e02da769177784 Mon Sep 17 00:00:00 2001 From: Jean-Michel Picod Date: Fri, 20 Sep 2024 17:01:52 +0200 Subject: [PATCH] Update build and CI scripts to LUA 5.4 --- .github/workflows/codeql-analysis.yml | 2 +- .github/workflows/ubuntu.yml | 6 +++--- client/Makefile | 8 ++++---- client/deps/lua.cmake | 6 +++--- client/experimental_lib/example_lua/02run_test.sh | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 85a06f0b3a..f7961bfab0 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -41,7 +41,7 @@ jobs: run: sudo apt-get update - name: Install dependencies - run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.2-dev liblua5.2-0 lua5.2 sed libssl-dev + run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.4-dev liblua5.4-0 lua5.4 sed libssl-dev - name: Install Python dependencies run: | diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index dd0d5d57b7..cee57b83a7 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -30,7 +30,7 @@ jobs: run: sudo apt-get update - name: Install dependencies - run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.2-dev liblua5.2-0 lua5.2 sed libssl-dev libgd-dev + run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.4-dev liblua5.4-0 lua5.4 sed libssl-dev libgd-dev - name: Install Python dependencies run: pip install -r tools/requirements.txt @@ -60,7 +60,7 @@ jobs: run: sudo apt-get update - name: Install dependencies - run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.2-dev liblua5.2-0 lua5.2 sed libssl-dev libgd-dev + run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.4-dev liblua5.4-0 lua5.4 sed libssl-dev libgd-dev - name: Install Python dependencies run: pip install -r tools/requirements.txt @@ -91,7 +91,7 @@ jobs: run: sudo apt-get update - name: Install dependencies - run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.2-dev liblua5.2-0 lua5.2 sed libssl-dev libgd-dev + run: sudo apt-get install -yqq make autoconf build-essential ca-certificates pkg-config libreadline-dev gcc-arm-none-eabi libnewlib-dev qtbase5-dev libbz2-dev liblz4-dev libbluetooth-dev libpython3-dev python3 python3-dev libpython3-all-dev liblua5.4-dev liblua5.4-0 lua5.4 sed libssl-dev libgd-dev - name: Install Python dependencies run: pip install -r tools/requirements.txt diff --git a/client/Makefile b/client/Makefile index 2da13c683c..d977ff5221 100644 --- a/client/Makefile +++ b/client/Makefile @@ -175,11 +175,11 @@ PM3INCLUDES += $(ID48LIBINC) ## Lua ifneq ($(SKIPLUASYSTEM),1) ifdef MACPORTS_PREFIX - LUAINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags lua-5.2 2>/dev/null) - LUALDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs lua-5.2 2>/dev/null) + LUAINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags lua-5.4 2>/dev/null) + LUALDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs lua-5.4 2>/dev/null) else - LUAINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags lua5.2 2>/dev/null) - LUALDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs lua5.2 2>/dev/null) + LUAINCLUDES = $(shell $(PKG_CONFIG_ENV) pkg-config --cflags lua5.4 2>/dev/null) + LUALDLIBS = $(shell $(PKG_CONFIG_ENV) pkg-config --libs lua5.4 2>/dev/null) endif ifneq ($(LUALDLIBS),) LUALIB = diff --git a/client/deps/lua.cmake b/client/deps/lua.cmake index 12870342e7..d89275be67 100644 --- a/client/deps/lua.cmake +++ b/client/deps/lua.cmake @@ -7,6 +7,7 @@ add_library(pm3rrg_rdv4_lua STATIC liblua/ldump.c liblua/lfunc.c liblua/lgc.c + liblua/linit.c liblua/llex.c liblua/lmem.c liblua/lobject.c @@ -21,16 +22,15 @@ add_library(pm3rrg_rdv4_lua STATIC liblua/lzio.c liblua/lauxlib.c liblua/lbaselib.c - liblua/lbitlib.c liblua/lcorolib.c liblua/ldblib.c liblua/liolib.c liblua/lmathlib.c + liblua/loadlib.c liblua/loslib.c liblua/lstrlib.c liblua/ltablib.c - liblua/loadlib.c - liblua/linit.c + liblua/lutf8lib.c ) target_compile_definitions(pm3rrg_rdv4_lua PRIVATE LUA_COMPAT_ALL) diff --git a/client/experimental_lib/example_lua/02run_test.sh b/client/experimental_lib/example_lua/02run_test.sh index 32fb1ae556..ad07163c42 100755 --- a/client/experimental_lib/example_lua/02run_test.sh +++ b/client/experimental_lib/example_lua/02run_test.sh @@ -1,8 +1,8 @@ #!/bin/bash # pm3.so somewhere in default LUA_CPATH : -# /usr/local/lib/lua/5.2/pm3.so -# /usr/lib/lua/5.2/pm3.so +# /usr/local/lib/lua/5.4/pm3.so +# /usr/lib/lua/5.4/pm3.so # ./pm3.so ./test.lua