[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 <tobias.funk@nortonlifelock.com>
This commit is contained in:
Tobias Funk 2023-03-01 19:41:21 +01:00 committed by GitHub
parent 6aa4fca940
commit b41bc7cfed
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 3 deletions

View File

@ -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 ()

View File

@ -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,

View File

@ -4798,7 +4798,7 @@
},
"lua": {
"baseline": "5.4.4",
"port-version": 4
"port-version": 5
},
"lua-compat53": {
"baseline": "0.10",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "0a579d274fbb147e35fc45578cc446cad2c76079",
"version": "5.4.4",
"port-version": 5
},
{
"git-tree": "8c9fa7041bab78ab01bc8774e6f7dcc46439a978",
"version": "5.4.4",