Lua-5.2.4

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 Wireshark-3.2.6.

本パッケージは LFS-10.0 において正しくビルドでき動作することが確認されています。

パッケージ情報

  • ダウンロード (HTTP): http://www.lua.org/ftp/lua-5.2.4.tar.gz

  • ダウンロード MD5 sum: 913fdb32207046b273fdb17aad70be13

  • ダウンロードサイズ: 248 KB

  • 必要ディスク容量: 3.6 MB

  • 概算ビルド時間: 0.1 SBU 以下

追加のダウンロード

ユーザー情報: http://wiki.linuxfromscratch.org/blfs/wiki/lua

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=5.2.4

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

以下のコマンドを実行して Lua をビルドします。

patch -Np1 -i ../lua-5.2.4-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.5.2.4" \
     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-5.2.4 &&
cp -v doc/*.{html,css,gif,png} install/usr/share/doc/lua-5.2.4 &&

ln -s liblua5.2.so install/usr/lib/liblua.so.5.2   &&
ln -s liblua5.2.so install/usr/lib/liblua.so.5.2.4 &&

mv install/usr/share/man/man1/{lua.1,lua5.2.1} &&
mv install/usr/share/man/man1/{luac.1,luac5.2.1}

root ユーザーになって以下を実行します。

chown -R root:root install  &&
cp -a install/* /

コマンド説明

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.

パッケージ構成

インストールプログラム: lua5.2, luac5.2
インストールライブラリ: liblua5.2.so
インストールディレクトリ: /usr/include/lua5.2, /usr/lib/lua/5.2, /usr/share/doc/lua-5.2.4, /usr/share/lua/5.2

概略説明

lua5.2

is the standalone Lua version 5.2 interpreter.

luac5.2

is the Lua version 5.2 compiler.

liblua5.2.so

contains the Lua version 5.2 API functions.

最終更新日: 2020-08-24 05:15:52 +0900