diff --git a/packages/lang/lua54/config/lua54.pc b/packages/lang/lua54/config/lua54.pc new file mode 100644 index 0000000000..6645003e62 --- /dev/null +++ b/packages/lang/lua54/config/lua54.pc @@ -0,0 +1,10 @@ +prefix=/usr +libdir=${prefix}/lib +includedir=${prefix}/include/lua@@VERSION_MM@@ + +Name: Lua +Description: An Extensible Extension Language +Version: @@VERSION@@ +Requires: +Libs: -L${libdir} -llua@@VERSION_MM@@ -lm +Cflags: -I${includedir} diff --git a/packages/lang/lua54/package.mk b/packages/lang/lua54/package.mk new file mode 100644 index 0000000000..56648a2030 --- /dev/null +++ b/packages/lang/lua54/package.mk @@ -0,0 +1,29 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (C) 2022-present Team LibreELEC (https://libreelec.tv) + +PKG_NAME="lua54" +PKG_VERSION="5.4.3" +PKG_SHA256="f8612276169e3bfcbcfb8f226195bfc6e466fe13042f1076cbde92b7ec96bbfb" +PKG_LICENSE="MIT" +PKG_SITE="https://www.lua.org" +PKG_URL="http://www.lua.org/ftp/lua-${PKG_VERSION}.tar.gz" +PKG_DEPENDS_TARGET="toolchain" +PKG_LONGDESC="Lua is a powerful, efficient, lightweight, embeddable scripting language." + +make_target() { + make CC=${CC} AR="${AR} rcu" MYCFLAGS="-fPIC" posix +} + +makeinstall_target() { + mkdir -p ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min) + cp src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h ${SYSROOT_PREFIX}/usr/include/lua$(get_pkg_version_maj_min) + + 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 + cp ${PKG_DIR}/config/lua54.pc ${SYSROOT_PREFIX}/usr/lib/pkgconfig + sed -e "s/@@VERSION@@/${PKG_VERSION}/g" \ + -e "s/@@VERSION_MM@@/$(get_pkg_version_maj_min)/g" \ + -i ${SYSROOT_PREFIX}/usr/lib/pkgconfig/lua54.pc +}