2022-03-13 21:45:57 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv)
|
|
|
|
|
2022-11-01 10:04:06 +00:00
|
|
|
PKG_NAME="lua54"
|
2023-08-24 09:53:35 +00:00
|
|
|
PKG_VERSION="5.4.6"
|
2022-03-13 21:45:57 +00:00
|
|
|
PKG_LICENSE="MIT"
|
|
|
|
PKG_SITE="https://www.lua.org"
|
2022-11-01 10:04:06 +00:00
|
|
|
PKG_URL="http://www.lua.org/ftp/lua-${PKG_VERSION}.tar.gz"
|
2022-03-13 21:45:57 +00:00
|
|
|
PKG_DEPENDS_TARGET="toolchain"
|
2022-11-01 10:04:06 +00:00
|
|
|
PKG_LONGDESC="Lua is a powerful, efficient, lightweight, embeddable scripting language."
|
2022-03-13 21:45:57 +00:00
|
|
|
|
|
|
|
make_target() {
|
2022-11-01 10:04:06 +00:00
|
|
|
make CC=${CC} AR="${AR} rcu" MYCFLAGS="-fPIC" posix
|
2022-03-13 21:45:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
makeinstall_target() {
|
|
|
|
mkdir -p ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min)
|
2023-03-27 00:11:39 +00:00
|
|
|
cp src/lua.hpp src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min)
|
2022-03-13 21:45:57 +00:00
|
|
|
|
|
|
|
mkdir -p ${SYSROOT_PREFIX}/usr/lib
|
|
|
|
cp src/liblua.a ${SYSROOT_PREFIX}/usr/lib/liblua$(get_pkg_version_maj_min).a
|
|
|
|
|
|
|
|
mkdir -p ${SYSROOT_PREFIX}/usr/lib/pkgconfig
|
2022-11-01 10:04:06 +00:00
|
|
|
cp ${PKG_DIR}/config/lua54.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig
|
2022-03-13 21:45:57 +00:00
|
|
|
sed -e "s/@@VERSION@@/${PKG_VERSION}/g" \
|
|
|
|
-e "s/@@VERSION_MM@@/$(get_pkg_version_maj_min)/g" \
|
2022-11-01 10:04:06 +00:00
|
|
|
-i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/lua54.pc
|
2022-03-13 21:45:57 +00:00
|
|
|
}
|