%general-entities; ]> $Date$ Lua-&lua52-version; Lua Introduction to Lua 5.2 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. This is an older verion of Lua needed only for compatibility with other programs such as . &lfs101_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: User Notes: Installation of Lua 5.2 Some packages check for the pkg-config file for Lua, which is created with: cat > lua.pc << "EOF" V=5.2 R=&lua52-version; prefix=/usr INSTALL_BIN=${prefix}/bin INSTALL_INC=${prefix}/include/lua5.2 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/lua5.2 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-&lua52-version;-shared_library-1.patch && sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h && sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.2/' \ -e '/^LUAC_T=/ s/luac/luac5.2/' \ -i src/Makefile && make MYCFLAGS="-fPIC" linux The installation of this package is complex, so we will use the DESTDIR method of installation: make TO_BIN='lua5.2 luac5.2' \ TO_LIB="liblua5.2.so liblua5.2.so.5.2 liblua5.2.so.&lua52-version;" \ INSTALL_DATA="cp -d" \ INSTALL_TOP=$PWD/install/usr \ INSTALL_INC=$PWD/install/usr/include/lua5.2 \ INSTALL_MAN=$PWD/install/usr/share/man/man1 \ install && install -Dm644 lua.pc install/usr/lib/pkgconfig/lua52.pc && mkdir -pv install/usr/share/doc/lua-&lua52-version; && cp -v doc/*.{html,css,gif,png} install/usr/share/doc/lua-&lua52-version; && ln -s liblua5.2.so install/usr/lib/liblua.so.5.2 && ln -s liblua5.2.so install/usr/lib/liblua.so.&lua52-version; && mv install/usr/share/man/man1/{lua.1,lua5.2.1} && mv install/usr/share/man/man1/{luac.1,luac5.2.1} Now, as the root user: chown -R root:root install && cp -a install/* / Command Explanations sed -i ... src/luaconf.h: This command changes the Lua search path to match the install path. sed -i ... src/Makefile: This command deconflicts this installation with the latest version of lua. Contents Installed Programs Installed Library Installed Directories lua5.2 and luac5.2 liblua5.2.so /usr/include/lua5.2, /usr/lib/lua/5.2, /usr/share/doc/lua-&lua52-version;, and /usr/share/lua/5.2 Short Descriptions lua5.2 is the standalone Lua version 5.2 interpreter lua5.2 luac5.2 is the Lua version 5.2 compiler luac5.2 liblua5.2.so contains the Lua version 5.2 API functions liblua5.2.so