1 | <?xml version="1.0" encoding="ISO-8859-1"?>
|
---|
2 | <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
|
---|
3 | "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
|
---|
4 | <!ENTITY % general-entities SYSTEM "../../general.ent">
|
---|
5 | %general-entities;
|
---|
6 |
|
---|
7 | <!ENTITY lua-download-http "http://www.lua.org/ftp/lua-&lua-version;.tar.gz">
|
---|
8 | <!ENTITY lua-download-ftp " ">
|
---|
9 | <!ENTITY lua-md5sum "a1b0a7e92d0c85bbff7a8d27bf29f8af">
|
---|
10 | <!ENTITY lua-size "272 KB">
|
---|
11 | <!ENTITY lua-buildsize "4 MB">
|
---|
12 | <!ENTITY lua-time "Less than 0.1 SBU">
|
---|
13 | ]>
|
---|
14 |
|
---|
15 | <sect1 id="lua" xreflabel="Lua-&lua-version;">
|
---|
16 | <?dbhtml filename="lua.html"?>
|
---|
17 |
|
---|
18 | <sect1info>
|
---|
19 | <othername>$LastChangedBy$</othername>
|
---|
20 | <date>$Date$</date>
|
---|
21 | </sect1info>
|
---|
22 |
|
---|
23 | <title>Lua-&lua-version;</title>
|
---|
24 |
|
---|
25 | <indexterm zone="lua">
|
---|
26 | <primary sortas="a-Lua">Lua</primary>
|
---|
27 | </indexterm>
|
---|
28 |
|
---|
29 | <sect2 role="package">
|
---|
30 | <title>Introduction to Lua</title>
|
---|
31 |
|
---|
32 | <para>
|
---|
33 | <application>Lua</application> is a powerful light-weight programming
|
---|
34 | language designed for extending applications. It is also frequently used
|
---|
35 | as a general-purpose, stand-alone language. <application>Lua</application>
|
---|
36 | is implemented as a small library of C functions, written in ANSI C, and
|
---|
37 | compiles unmodified in all known platforms. The implementation goals are
|
---|
38 | simplicity, efficiency, portability, and low embedding cost. The result is
|
---|
39 | a fast language engine with small footprint, making it ideal in embedded
|
---|
40 | systems too.
|
---|
41 | </para>
|
---|
42 |
|
---|
43 | &lfs77_checked;
|
---|
44 |
|
---|
45 | <bridgehead renderas="sect3">Package Information</bridgehead>
|
---|
46 | <itemizedlist spacing="compact">
|
---|
47 | <listitem>
|
---|
48 | <para>
|
---|
49 | Download (HTTP): <ulink url="&lua-download-http;"/>
|
---|
50 | </para>
|
---|
51 | </listitem>
|
---|
52 | <listitem>
|
---|
53 | <para>
|
---|
54 | Download (FTP): <ulink url="&lua-download-ftp;"/>
|
---|
55 | </para>
|
---|
56 | </listitem>
|
---|
57 | <listitem>
|
---|
58 | <para>
|
---|
59 | Download MD5 sum: &lua-md5sum;
|
---|
60 | </para>
|
---|
61 | </listitem>
|
---|
62 | <listitem>
|
---|
63 | <para>
|
---|
64 | Download size: &lua-size;
|
---|
65 | </para>
|
---|
66 | </listitem>
|
---|
67 | <listitem>
|
---|
68 | <para>
|
---|
69 | Estimated disk space required: &lua-buildsize;
|
---|
70 | </para>
|
---|
71 | </listitem>
|
---|
72 | <listitem>
|
---|
73 | <para>
|
---|
74 | Estimated build time: &lua-time;
|
---|
75 | </para>
|
---|
76 | </listitem>
|
---|
77 | </itemizedlist>
|
---|
78 |
|
---|
79 | <bridgehead renderas="sect3">Additional Downloads</bridgehead>
|
---|
80 | <itemizedlist spacing="compact">
|
---|
81 | <listitem>
|
---|
82 | <para>
|
---|
83 | Required patch:
|
---|
84 | <ulink url="&patch-root;/lua-&lua-version;-shared_library-1.patch"/>
|
---|
85 | </para>
|
---|
86 | </listitem>
|
---|
87 | </itemizedlist>
|
---|
88 |
|
---|
89 | <para condition="html" role="usernotes">User Notes:
|
---|
90 | <ulink url="&blfs-wiki;/lua"/>
|
---|
91 | </para>
|
---|
92 | </sect2>
|
---|
93 |
|
---|
94 | <sect2 role="installation">
|
---|
95 | <title>Installation of Lua</title>
|
---|
96 |
|
---|
97 | <para>
|
---|
98 | Install <application>Lua</application> by running the following
|
---|
99 | commands:
|
---|
100 | </para>
|
---|
101 |
|
---|
102 | <screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &&
|
---|
103 | sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h &&
|
---|
104 | make linux</userinput></screen>
|
---|
105 |
|
---|
106 | <para>
|
---|
107 | To test the results, issue: <command>make test</command>.
|
---|
108 | </para>
|
---|
109 |
|
---|
110 | <para>
|
---|
111 | Now, as the <systemitem class="username">root</systemitem> user:
|
---|
112 | </para>
|
---|
113 |
|
---|
114 | <screen role="root"><userinput>make INSTALL_TOP=/usr TO_LIB="liblua.so liblua.so.5.3 liblua.so.&lua-version;" \
|
---|
115 | INSTALL_DATA="cp -d" INSTALL_MAN=/usr/share/man/man1 install &&
|
---|
116 | mkdir -pv /usr/share/doc/lua-&lua-version; &&
|
---|
117 | cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version;</userinput></screen>
|
---|
118 |
|
---|
119 | <para>Some packages check for the <application>pkg-config</application> file
|
---|
120 | for <application>Lua</application>. As the
|
---|
121 | <systemitem class="username">root</systemitem> user:</para>
|
---|
122 |
|
---|
123 | <screen role="root"><userinput>cat > /usr/lib/pkgconfig/lua.pc << "EOF"
|
---|
124 | <literal>V=5.3
|
---|
125 | R=&lua-version;
|
---|
126 |
|
---|
127 | prefix=/usr
|
---|
128 | INSTALL_BIN=${prefix}/bin
|
---|
129 | INSTALL_INC=${prefix}/include
|
---|
130 | INSTALL_LIB=${prefix}/lib
|
---|
131 | INSTALL_MAN=${prefix}/man/man1
|
---|
132 | INSTALL_LMOD=${prefix}/share/lua/${V}
|
---|
133 | INSTALL_CMOD=${prefix}/lib/lua/${V}
|
---|
134 | exec_prefix=${prefix}
|
---|
135 | libdir=${exec_prefix}/lib
|
---|
136 | includedir=${prefix}/include
|
---|
137 |
|
---|
138 | Name: Lua
|
---|
139 | Description: An Extensible Extension Language
|
---|
140 | Version: ${R}
|
---|
141 | Requires:
|
---|
142 | Libs: -L${libdir} -llua -lm
|
---|
143 | Cflags: -I${includedir}</literal>
|
---|
144 | EOF</userinput></screen>
|
---|
145 |
|
---|
146 | </sect2>
|
---|
147 |
|
---|
148 | <sect2 role="commands">
|
---|
149 | <title>Command Explanations</title>
|
---|
150 |
|
---|
151 | <para>
|
---|
152 | <command>sed -i ... src/luaconf.h</command>: This command changes
|
---|
153 | <application>Lua</application> search path to match the install paths.
|
---|
154 | </para>
|
---|
155 |
|
---|
156 | </sect2>
|
---|
157 |
|
---|
158 | <sect2 role="content">
|
---|
159 | <title>Contents</title>
|
---|
160 |
|
---|
161 | <segmentedlist>
|
---|
162 | <segtitle>Installed Programs</segtitle>
|
---|
163 | <segtitle>Installed Library</segtitle>
|
---|
164 | <segtitle>Installed Directories</segtitle>
|
---|
165 |
|
---|
166 | <seglistitem>
|
---|
167 | <seg>
|
---|
168 | lua and luac
|
---|
169 | </seg>
|
---|
170 | <seg>
|
---|
171 | liblua.so
|
---|
172 | </seg>
|
---|
173 | <seg>
|
---|
174 | /usr/lib/lua,
|
---|
175 | /usr/share/lua and
|
---|
176 | /usr/share/doc/lua-&lua-version;
|
---|
177 | </seg>
|
---|
178 | </seglistitem>
|
---|
179 | </segmentedlist>
|
---|
180 |
|
---|
181 | <variablelist>
|
---|
182 | <bridgehead renderas="sect3">Short Descriptions</bridgehead>
|
---|
183 | <?dbfo list-presentation="list"?>
|
---|
184 | <?dbhtml list-presentation="table"?>
|
---|
185 |
|
---|
186 | <varlistentry id="lua-prog">
|
---|
187 | <term><command>lua</command></term>
|
---|
188 | <listitem>
|
---|
189 | <para>
|
---|
190 | is the standalone Lua interpreter.
|
---|
191 | </para>
|
---|
192 | <indexterm zone="lua lua-prog">
|
---|
193 | <primary sortas="b-lua">lua</primary>
|
---|
194 | </indexterm>
|
---|
195 | </listitem>
|
---|
196 | </varlistentry>
|
---|
197 |
|
---|
198 | <varlistentry id="luac">
|
---|
199 | <term><command>luac</command></term>
|
---|
200 | <listitem>
|
---|
201 | <para>
|
---|
202 | is the Lua compiler.
|
---|
203 | </para>
|
---|
204 | <indexterm zone="lua luac">
|
---|
205 | <primary sortas="b-luac">luac</primary>
|
---|
206 | </indexterm>
|
---|
207 | </listitem>
|
---|
208 | </varlistentry>
|
---|
209 |
|
---|
210 | <varlistentry id="liblua">
|
---|
211 | <term><filename class="libraryfile">liblua.so</filename></term>
|
---|
212 | <listitem>
|
---|
213 | <para>
|
---|
214 | contains the <application>Lua</application> API functions.
|
---|
215 | </para>
|
---|
216 | <indexterm zone="lua liblua">
|
---|
217 | <primary sortas="c-liblua">liblua.so</primary>
|
---|
218 | </indexterm>
|
---|
219 | </listitem>
|
---|
220 | </varlistentry>
|
---|
221 |
|
---|
222 | </variablelist>
|
---|
223 |
|
---|
224 | </sect2>
|
---|
225 |
|
---|
226 | </sect1>
|
---|