From b41bc7cfed6d6c07358595974eeb5f1f79a42896 Mon Sep 17 00:00:00 2001 From: Tobias Funk <65156839+TobiasFunk@users.noreply.github.com> Date: Wed, 1 Mar 2023 19:41:21 +0100 Subject: [PATCH] [lua] Fix compiler error of lua[tools] (#29897) * Fix linux tools can't compile with undefined reference to `sin' * update port version * update baseline.json * fix duplicate FIND_LIBRARY (LIB_MATH NAMES m) & fix linking of luac is missing math libs * update lua port version in version database --------- Co-authored-by: tobias.funk --- ports/lua/CMakeLists.txt | 6 +++++- ports/lua/vcpkg.json | 2 +- versions/baseline.json | 2 +- versions/l-/lua.json | 5 +++++ 4 files changed, 12 insertions(+), 3 deletions(-) diff --git a/ports/lua/CMakeLists.txt b/ports/lua/CMakeLists.txt index 32993f63cf..c88b600eb5 100644 --- a/ports/lua/CMakeLists.txt +++ b/ports/lua/CMakeLists.txt @@ -28,6 +28,7 @@ ENDIF () IF (UNIX) ADD_DEFINITIONS (-DLUA_USE_POSIX) + FIND_LIBRARY (LIB_MATH NAMES m) ENDIF () # C library @@ -51,7 +52,6 @@ IF (UNIX) TARGET_COMPILE_DEFINITIONS (lua PUBLIC -DLUA_USE_DLOPEN) TARGET_LINK_LIBRARIES (lua ${CMAKE_DL_LIBS}) ENDIF () - FIND_LIBRARY (LIB_MATH NAMES m) IF (LIB_MATH) TARGET_LINK_LIBRARIES (lua m) ENDIF () @@ -94,6 +94,10 @@ IF (INSTALL_TOOLS) TARGET_INCLUDE_DIRECTORIES (luai PUBLIC /usr/include/edit) ENDIF () ENDIF () + + IF (LIB_MATH) + TARGET_LINK_LIBRARIES (luac m) + ENDIF () ENDIF () INSTALL ( TARGETS luai luac RUNTIME DESTINATION tools/lua ) ENDIF () diff --git a/ports/lua/vcpkg.json b/ports/lua/vcpkg.json index c328e5f1a1..282bb43779 100644 --- a/ports/lua/vcpkg.json +++ b/ports/lua/vcpkg.json @@ -1,7 +1,7 @@ { "name": "lua", "version": "5.4.4", - "port-version": 4, + "port-version": 5, "description": "A powerful, fast, lightweight, embeddable scripting language", "homepage": "https://www.lua.org", "license": null, diff --git a/versions/baseline.json b/versions/baseline.json index c508de5217..624c372b4f 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -4798,7 +4798,7 @@ }, "lua": { "baseline": "5.4.4", - "port-version": 4 + "port-version": 5 }, "lua-compat53": { "baseline": "0.10", diff --git a/versions/l-/lua.json b/versions/l-/lua.json index d8b1afb618..7c151ed695 100644 --- a/versions/l-/lua.json +++ b/versions/l-/lua.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "0a579d274fbb147e35fc45578cc446cad2c76079", + "version": "5.4.4", + "port-version": 5 + }, { "git-tree": "8c9fa7041bab78ab01bc8774e6f7dcc46439a978", "version": "5.4.4",