[COPY] --- T2-COPYRIGHT-BEGIN --- [COPY] t2/package/*/lua/lua.desc [COPY] Copyright (C) 2004 - 2026 The T2 SDE Project [COPY] SPDX-License-Identifier: GPL-2.0 [COPY] --- T2-COPYRIGHT-END --- [I] A lightweight, extensible programming language [T] Lua is a powerful light-weight programming language designed for [T] extending applications. Lua is also frequently used as a general-purpose, [T] stand-alone language. [T] [T] Lua combines simple procedural syntax with powerful data description [T] constructs based on associative arrays and extensible semantics. Lua is [T] dynamically typed, interpreted from bytecodes, and has automatic memory [T] management with garbage collection, making it ideal for configuration, [T] scripting, and rapid prototyping. [U] https://www.lua.org/ [A] PUC-Rio, Brazil [M] René Rebe [C] extra/development [F] CROSS DIETLIBC FPIC NO-LTO [L] MIT [V] 5.5.1 [P] X -----5---9 138.000 [CV-URL] https://www.lua.org/ftp/ [D] 557b4003cbcb7b7755682788ca7e8b0cf18f57f11c3d5f456aa8cf84 lua-5.5.1.tar.gz https://www.lua.org/ftp/ # inherit variables like myCFLAGS, myLIBS . $base/package/*/*/lua-conf.in # adjust installation path var_append makeopt ' ' "INSTALL_TOP=/$prefix INSTALL_LIB=$libdir" var_append makeinstopt ' ' "INSTALL_TOP=$root/$prefix INSTALL_LIB=$root$libdir" # guess aix bsd c89 freebsd linux-readline mingw posix solaris case $SDECFG_KERNEL in linux) var_append makeopt ' ' 'linux' ;; darwin) var_append makeopt ' ' 'macosx' ;; *) var_append makeopt ' ' 'generic' ;; esac # configure: # -enable dynamic module loading # -enable CLI with readline var_append makeopt ' ' "MYCFLAGS=\"$myCFLAGS\"" #[ $SDECFG_KERNEL = linux ] && var_insert myLIBS ' ' '-Wl,-E' var_append makeopt ' ' "MYLIBS=\"$myLIBS\"" # adjust luaconf.h header lua_conf() { if ! atstage toolchain; then LUA_ROOT="/$prefix" else LUA_ROOT="$root/$prefix" fi sed -i "s,^#define LUA_ROOT.*,#define LUA_ROOT \"$LUA_ROOT/\"," src/luaconf.h sed -i "s,^\(#define LUA_CDIR.*\)lib\(/.*\),\1${libdir##*/}\2," src/luaconf.h } hook_add premake 3 lua_conf # create a lua-config script lua_config_postmake() { sde_substitute $confdir/lua-config | sed -e "s,@LIBS@,$myLIBS," \ -e "s,@CFLAGS@,$myCFLAGS," \ -e "s,@pkglibdir@,$pkglibdir," \ -e "s,@pkgdatadir@,$pkgdatadir," \ -e "s,//,/,g" > $root$bindir/lua-config chmod 0755 $root$bindir/lua-config } hook_add postmake 3 lua_config_postmake # create a lua.pc pkgconfig file if pkginstalled pkgconfig; then lua_pc_postmake() { sde_substitute $confdir/lua.pc | sed -e "s,@LIBS@,$myLIBS," \ -e "s,@CFLAGS@,$myCFLAGS," \ -e "s,@pkglibdir@,$pkglibdir," \ -e "s,@pkgdatadir@,$pkgdatadir," \ -e "s,//,/,g" > $root$libdir/pkgconfig/lua.pc } hook_add postmake 3 lua_pc_postmake fi # create missing directories and copy documentation lua_postmake() { mkdir -p $root$pkglibdir $root$pkgdatadir $root$docdir cp -v doc/* $root$docdir } hook_add postmake 3 lua_postmake # shared object [ "$SDECFG_STATIC" != 1 ] && var_append patchfiles ' ' "$confdir/shared-object.diff" && var_append GCC_WRAPPER_APPEND ' ' -c?:-lm # cross build var_append AR ' ' rc