source: general/prog/lua.xml@ de33b2a

10.0 10.1 11.0 ken/refactor-virt lazarus qt5new trunk xry111/git-date xry111/git-date-for-trunk xry111/git-date-test
Last change on this file since de33b2a was de33b2a, checked in by Pierre Labastie <pieere@…>, 20 months ago

Format general/prog

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22835 af4574ff-66df-0310-9fd7-8a98e5e911e0

  • Property mode set to 100644
File size: 8.2 KB
Line 
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 "4f4b4f323fd3514a68e0ab3da8ce3455">
10 <!ENTITY lua-size "300 KB">
11 <!ENTITY lua-buildsize "4.5 MB (with Basic tests)">
12 <!ENTITY lua-time "less than 0.1 SBU (with Basic tests)">
13
14<!-- Note for editors - the soname and test suite versions did not change, so I
15 Had to hardcode them. -renodr -->
16 <!ENTITY lua-tests-download-http "http://www.lua.org/tests/lua-5.3.4-tests.tar.gz">
17 <!ENTITY lua-tests-download-ftp " ">
18 <!ENTITY lua-tests-md5sum "b14fe3748c1cb2d74e3acd1943629ba3">
19 <!ENTITY lua-tests-size "104 KB">
20]>
21
22<sect1 id="lua" xreflabel="Lua-&lua-version;">
23 <?dbhtml filename="lua.html"?>
24
25 <sect1info>
26 <othername>$LastChangedBy$</othername>
27 <date>$Date$</date>
28 </sect1info>
29
30 <title>Lua-&lua-version;</title>
31
32 <indexterm zone="lua">
33 <primary sortas="a-Lua">Lua</primary>
34 </indexterm>
35
36 <sect2 role="package">
37 <title>Introduction to Lua</title>
38
39 <para>
40 <application>Lua</application> is a powerful light-weight programming
41 language designed for extending applications. It is also frequently used
42 as a general-purpose, stand-alone language. <application>Lua</application>
43 is implemented as a small library of C functions, written in ANSI C, and
44 compiles unmodified in all known platforms. The implementation goals are
45 simplicity, efficiency, portability, and low embedding cost. The result is
46 a fast language engine with small footprint, making it ideal in embedded
47 systems too.
48 </para>
49
50 &lfs91_checked;
51
52 <bridgehead renderas="sect3">Package Information</bridgehead>
53 <itemizedlist spacing="compact">
54 <listitem>
55 <para>
56 Download (HTTP): <ulink url="&lua-download-http;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download (FTP): <ulink url="&lua-download-ftp;"/>
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download MD5 sum: &lua-md5sum;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Download size: &lua-size;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated disk space required: &lua-buildsize;
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 Estimated build time: &lua-time;
82 </para>
83 </listitem>
84 </itemizedlist>
85
86 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
87 <itemizedlist spacing="compact">
88 <listitem>
89 <para>
90 Required patch:
91 <ulink url="&patch-root;/lua-&lua-version;-shared_library-1.patch"/>
92 </para>
93 </listitem>
94 <listitem>
95 <para>
96 Optional Test Suite Download (HTTP): <ulink url="&lua-tests-download-http;"/>
97 </para>
98 </listitem>
99 <listitem>
100 <para>
101 Optional Test Suite Download (FTP): <ulink url="&lua-tests-download-ftp;"/>
102 </para>
103 </listitem>
104 <listitem>
105 <para>
106 Optional Test Suite Download MD5 sum: &lua-tests-md5sum;
107 </para>
108 </listitem>
109 <listitem>
110 <para>
111 Optional Test Suite Download size: &lua-tests-size;
112 </para>
113 </listitem>
114 </itemizedlist>
115
116 <para condition="html" role="usernotes">User Notes:
117 <ulink url="&blfs-wiki;/lua"/>
118 </para>
119 </sect2>
120
121 <sect2 role="installation">
122 <title>Installation of Lua</title>
123
124 <para>
125 Some packages check for the <application>pkg-config</application> file
126 for <application>Lua</application>, which is created with:
127 </para>
128
129<screen><userinput>cat &gt; lua.pc &lt;&lt; "EOF"
130<literal>V=5.3
131R=&lua-version;
132
133prefix=/usr
134INSTALL_BIN=${prefix}/bin
135INSTALL_INC=${prefix}/include
136INSTALL_LIB=${prefix}/lib
137INSTALL_MAN=${prefix}/share/man/man1
138INSTALL_LMOD=${prefix}/share/lua/${V}
139INSTALL_CMOD=${prefix}/lib/lua/${V}
140exec_prefix=${prefix}
141libdir=${exec_prefix}/lib
142includedir=${prefix}/include
143
144Name: Lua
145Description: An Extensible Extension Language
146Version: ${R}
147Requires:
148Libs: -L${libdir} -llua -lm -ldl
149Cflags: -I${includedir}</literal>
150EOF</userinput></screen>
151
152 <para>
153 Install <application>Lua</application> by running the following
154 commands:
155 </para>
156
157<screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &amp;&amp;
158sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h &amp;&amp;
159
160make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux</userinput></screen>
161
162 <para>
163 To test the results, issue: <command>make test</command>.
164 <quote>This will run the interpreter and print its version.</quote>.
165 More comprehensive tests can be performed if you downloaded the "Test
166 suite" tarball. Those tests need to be executed after the package is
167 installed, thus we defer to the description below.
168 </para>
169
170 <para>
171 Now, as the <systemitem class="username">root</systemitem> user:
172 </para>
173
174<screen role="root"><userinput>make INSTALL_TOP=/usr \
175 INSTALL_DATA="cp -d" \
176 INSTALL_MAN=/usr/share/man/man1 \
177 TO_LIB="liblua.so liblua.so.5.3 liblua.so.5.3.4" \
178 install &amp;&amp;
179<!-- As stated above, we have to hardcode 5.3.4. -->
180
181mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
182cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version; &amp;&amp;
183
184install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc</userinput></screen>
185
186 <para>
187 Here we describe only the "Basic tests". Untar the tarball and
188 change to the
189 <filename class="directory">lua-5.3.4-tests</filename> directory,
190 then issue
191 <command>lua -e "_U=true" all.lua</command>. If the tests finish without
192 error, you will see a message containing the string "final OK".
193 </para>
194
195 </sect2>
196
197 <sect2 role="commands">
198 <title>Command Explanations</title>
199
200 <para>
201 <command>sed -i ... src/luaconf.h</command>: This command changes the
202 <application>Lua</application> search path to match the install path.
203 </para>
204
205 <para>
206 <envar>MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"</envar>: This
207 environment variable includes compatibility layers with Lua 5.1 and 5.2
208 in the build.
209 </para>
210
211 </sect2>
212
213 <sect2 role="content">
214 <title>Contents</title>
215
216 <segmentedlist>
217 <segtitle>Installed Programs</segtitle>
218 <segtitle>Installed Library</segtitle>
219 <segtitle>Installed Directories</segtitle>
220
221 <seglistitem>
222 <seg>
223 lua and luac
224 </seg>
225 <seg>
226 liblua.so
227 </seg>
228 <seg>
229 /usr/{lib,share}/lua and
230 /usr/share/doc/lua-&lua-version;
231 </seg>
232 </seglistitem>
233 </segmentedlist>
234
235 <variablelist>
236 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
237 <?dbfo list-presentation="list"?>
238 <?dbhtml list-presentation="table"?>
239
240 <varlistentry id="lua-prog">
241 <term><command>lua</command></term>
242 <listitem>
243 <para>
244 is the standalone Lua interpreter.
245 </para>
246 <indexterm zone="lua lua-prog">
247 <primary sortas="b-lua">lua</primary>
248 </indexterm>
249 </listitem>
250 </varlistentry>
251
252 <varlistentry id="luac">
253 <term><command>luac</command></term>
254 <listitem>
255 <para>
256 is the Lua compiler.
257 </para>
258 <indexterm zone="lua luac">
259 <primary sortas="b-luac">luac</primary>
260 </indexterm>
261 </listitem>
262 </varlistentry>
263
264 <varlistentry id="liblua">
265 <term><filename class="libraryfile">liblua.so</filename></term>
266 <listitem>
267 <para>
268 contains the <application>Lua</application> API functions.
269 </para>
270 <indexterm zone="lua liblua">
271 <primary sortas="c-liblua">liblua.so</primary>
272 </indexterm>
273 </listitem>
274 </varlistentry>
275
276 </variablelist>
277
278 </sect2>
279
280</sect1>
Note: See TracBrowser for help on using the repository browser.