glfs/general/prog/lua.xml
Igor Živković 9b29b78e38 Graphviz doesn't compile with Lua 5.2
git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@11308 af4574ff-66df-0310-9fd7-8a98e5e911e0
2013-06-19 21:09:30 +00:00

235 lines
7.4 KiB
XML

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
"http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
<!ENTITY % general-entities SYSTEM "../../general.ent">
%general-entities;
<!ENTITY lua-download-http "http://www.lua.org/ftp/lua-&lua-version;.tar.gz">
<!ENTITY lua-download-ftp " ">
<!ENTITY lua-md5sum "efbb645e897eae37cad4344ce8b0a614">
<!ENTITY lua-size "246 KB">
<!ENTITY lua-buildsize "3.5 MB">
<!ENTITY lua-time "0.1 SBU">
]>
<sect1 id="lua" xreflabel="Lua-&lua-version;">
<?dbhtml filename="lua.html"?>
<sect1info>
<othername>$LastChangedBy$</othername>
<date>$Date$</date>
</sect1info>
<title>Lua-&lua-version;</title>
<indexterm zone="lua">
<primary sortas="a-Lua">Lua</primary>
</indexterm>
<sect2 role="package">
<title>Introduction to Lua</title>
<para>
<application>Lua</application> is a powerful light-weight programming
language designed for extending applications. It is also frequently used
as a general-purpose, stand-alone language. <application>Lua</application>
combines simple procedural syntax with powerful data description
constructs based on associative arrays and extensible semantics. It is
dynamically typed, interpreted from bytecodes, and has automatic memory
management with garbage collection, making it ideal for configuration,
scripting, and rapid prototyping. A fundamental concept in the design of
<application>Lua</application> is to provide meta-mechanisms for
implementing features, instead of providing a host of features directly in
the language. For example, although <application>Lua</application> is not
a pure object-oriented language, it does provide meta-mechanisms for
implementing classes and inheritance. <application>Lua</application>'s
meta-mechanisms bring an economy of concepts and keep the language small,
while allowing the semantics to be extended in unconventional ways.
Extensible semantics is a distinguishing feature of
<application>Lua</application>. <application>Lua</application> is a
language engine that you can embed into your application. This means that,
besides syntax and semantics, it has an API that allows the application to
exchange data with <application>Lua</application> programs and also to
extend <application>Lua</application> with C functions. In this sense, it
can be regarded as a language framework for building domain-specific
languages. <application>Lua</application> 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.
</para>
&lfs73_checked;
<bridgehead renderas="sect3">Package Information</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Download (HTTP): <ulink url="&lua-download-http;"/>
</para>
</listitem>
<listitem>
<para>
Download (FTP): <ulink url="&lua-download-ftp;"/>
</para>
</listitem>
<listitem>
<para>
Download MD5 sum: &lua-md5sum;
</para>
</listitem>
<listitem>
<para>
Download size: &lua-size;
</para>
</listitem>
<listitem>
<para>
Estimated disk space required: &lua-buildsize;
</para>
</listitem>
<listitem>
<para>
Estimated build time: &lua-time;
</para>
</listitem>
</itemizedlist>
<bridgehead renderas="sect3">Additional Downloads</bridgehead>
<itemizedlist spacing="compact">
<listitem>
<para>
Required patch:
<ulink url="&patch-root;/lua-&lua-version;-shared_library-1.patch"/>
</para>
</listitem>
</itemizedlist>
<para condition="html" role="usernotes">User Notes:
<ulink url="&blfs-wiki;/lua"/>
</para>
</sect2>
<sect2 role="installation">
<title>Installation of Lua</title>
<para>
Install <application>Lua</application> by running the following
commands:
</para>
<screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &amp;&amp;
make linux</userinput></screen>
<para>
To test the results, issue: <command>make test</command>.
</para>
<para>
Now, as the <systemitem class="username">root</systemitem> user:
</para>
<screen role="root"><userinput>make INSTALL_TOP=/usr TO_LIB="liblua.so liblua.so.5.2 liblua.so.5.2.1" \
INSTALL_DATA="cp -d" INSTALL_MAN=/usr/share/man/man1 install &amp;&amp;
mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version;</userinput></screen>
<para>Some packages check for the <application>pkg-config</application> file
for <application>Lua</application>. As the
<systemitem class="username">root</systemitem> user:</para>
<screen role="root"><userinput>cat &gt; /usr/lib/pkgconfig/lua.pc &lt;&lt; "EOF"
<literal>V=5.2
R=&lua-version;
prefix=/usr
INSTALL_BIN=${prefix}/bin
INSTALL_INC=${prefix}/include
INSTALL_LIB=${prefix}/lib
INSTALL_MAN=${prefix}/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
Cflags: -I${includedir}</literal>
EOF</userinput></screen>
</sect2>
<sect2 role="content">
<title>Contents</title>
<segmentedlist>
<segtitle>Installed Programs</segtitle>
<segtitle>Installed Library</segtitle>
<segtitle>Installed Directories</segtitle>
<seglistitem>
<seg>
lua and luac
</seg>
<seg>
liblua.so
</seg>
<seg>
/usr/lib/lua,
/usr/share/lua and
/usr/share/doc/lua-&lua-version;
</seg>
</seglistitem>
</segmentedlist>
<variablelist>
<bridgehead renderas="sect3">Short Descriptions</bridgehead>
<?dbfo list-presentation="list"?>
<?dbhtml list-presentation="table"?>
<varlistentry id="lua-prog">
<term><command>lua</command></term>
<listitem>
<para>
is the standalone Lua interpreter.
</para>
<indexterm zone="lua lua-prog">
<primary sortas="b-lua">lua</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="luac">
<term><command>luac</command></term>
<listitem>
<para>
is the Lua compiler.
</para>
<indexterm zone="lua luac">
<primary sortas="b-luac">luac</primary>
</indexterm>
</listitem>
</varlistentry>
<varlistentry id="liblua">
<term><filename class="libraryfile">liblua.so</filename></term>
<listitem>
<para>
contains the <application>Lua</application> API functions.
</para>
<indexterm zone="lua liblua">
<primary sortas="b-liblua">liblua.so</primary>
</indexterm>
</listitem>
</varlistentry>
</variablelist>
</sect2>
</sect1>