%general-entities; ]> $LastChangedBy$ $Date$ Lua-&lua-version; Lua Introduction to Lua Lua is a powerful light-weight programming language designed for extending applications. It is also frequently used as a general-purpose, stand-alone language. Lua is implemented as a small library of C functions, written in ANSI C, and compiles unmodified in all known platforms. The implementation goals are simplicity, efficiency, portability, and low embedding cost. The result is a fast language engine with small footprint, making it ideal in embedded systems too. &lfs90_checked; Package Information Download (HTTP): Download (FTP): Download MD5 sum: &lua-md5sum; Download size: &lua-size; Estimated disk space required: &lua-buildsize; Estimated build time: &lua-time; Additional Downloads Required patch: Optional Test Suite Download (HTTP): Optional Test Suite Download (FTP): Optional Test Suite Download MD5 sum: &lua-tests-md5sum; Optional Test Suite Download size: &lua-tests-size; User Notes: Installation of Lua Some packages check for the pkg-config file for Lua, which is created with: cat > lua.pc << "EOF" V=5.3 R=&lua-version; prefix=/usr INSTALL_BIN=${prefix}/bin INSTALL_INC=${prefix}/include INSTALL_LIB=${prefix}/lib INSTALL_MAN=${prefix}/share/man/man1 INSTALL_LMOD=${prefix}/share/lua/${V} INSTALL_CMOD=${prefix}/lib/lua/${V} exec_prefix=${prefix} libdir=${exec_prefix}/lib includedir=${prefix}/include Name: Lua Description: An Extensible Extension Language Version: ${R} Requires: Libs: -L${libdir} -llua -lm -ldl Cflags: -I${includedir} EOF Install Lua by running the following commands: patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch && sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h && make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux To test the results, issue: make test. This will run the interpreter and print its version.. More comprehensive tests can be performed if you downloaded the "Test suite" tarball. Those tests need to be executed after the package is installed, thus we defer to the description below. Now, as the root user: make INSTALL_TOP=/usr \ INSTALL_DATA="cp -d" \ INSTALL_MAN=/usr/share/man/man1 \ TO_LIB="liblua.so liblua.so.5.3 liblua.so.5.3.4" \ install && mkdir -pv /usr/share/doc/lua-&lua-version; && cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version; && install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc Here we describe only the "Basic tests". Untar the tarball and change to the lua-&lua-version;-tests directory, then issue lua -e "_U=true" all.lua. If the tests finish without error, you will see a message containing the string "final OK". Command Explanations sed -i ... src/luaconf.h: This command changes the Lua search path to match the install path. MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1": This environment variable includes compatibility layers with Lua 5.1 and 5.2 in the build. Contents Installed Programs Installed Library Installed Directories lua and luac liblua.so /usr/{lib,share}/lua and /usr/share/doc/lua-&lua-version; Short Descriptions lua is the standalone Lua interpreter. lua luac is the Lua compiler. luac liblua.so contains the Lua API functions. liblua.so