source: general/prog/lua.xml@ 0a954655

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss plabs/python-mods python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 0a954655 was 0a954655, checked in by Xi Ruoyao <xry111@…>, 4 years ago

lua: fix tests directory name

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@22537 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 &lfs90_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>Some packages check for the <application>pkg-config</application> file
125 for <application>Lua</application>, which is created with:</para>
126
127<screen><userinput>cat &gt; lua.pc &lt;&lt; "EOF"
128<literal>V=5.3
129R=&lua-version;
130
131prefix=/usr
132INSTALL_BIN=${prefix}/bin
133INSTALL_INC=${prefix}/include
134INSTALL_LIB=${prefix}/lib
135INSTALL_MAN=${prefix}/share/man/man1
136INSTALL_LMOD=${prefix}/share/lua/${V}
137INSTALL_CMOD=${prefix}/lib/lua/${V}
138exec_prefix=${prefix}
139libdir=${exec_prefix}/lib
140includedir=${prefix}/include
141
142Name: Lua
143Description: An Extensible Extension Language
144Version: ${R}
145Requires:
146Libs: -L${libdir} -llua -lm -ldl
147Cflags: -I${includedir}</literal>
148EOF</userinput></screen>
149
150 <para>
151 Install <application>Lua</application> by running the following
152 commands:
153 </para>
154
155<screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &amp;&amp;
156sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h &amp;&amp;
157
158make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux</userinput></screen>
159
160 <para>
161 To test the results, issue: <command>make test</command>.
162 <quote>This will run the interpreter and print its version.</quote>.
163 More comprehensive tests can be performed if you downloaded the "Test
164 suite" tarball. Those tests need to be executed after the package is
165 installed, thus we defer to the description below.
166 </para>
167
168 <para>
169 Now, as the <systemitem class="username">root</systemitem> user:
170 </para>
171
172<screen role="root"><userinput>make INSTALL_TOP=/usr \
173 INSTALL_DATA="cp -d" \
174 INSTALL_MAN=/usr/share/man/man1 \
175 TO_LIB="liblua.so liblua.so.5.3 liblua.so.5.3.4" \
176 install &amp;&amp;
177<!-- As stated above, we have to hardcode 5.3.4. -->
178
179mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
180cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version; &amp;&amp;
181
182install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc</userinput></screen>
183
184 <para>
185 Here we describe only the "Basic tests". Untar the tarball and
186 change to the
187 <filename class="directory">lua-5.3.4-tests</filename> directory,
188 then issue
189 <command>lua -e "_U=true" all.lua</command>. If the tests finish without
190 error, you will see a message containing the string "final OK".
191 </para>
192
193 </sect2>
194
195 <sect2 role="commands">
196 <title>Command Explanations</title>
197
198 <para>
199 <command>sed -i ... src/luaconf.h</command>: This command changes the
200 <application>Lua</application> search path to match the install path.
201 </para>
202
203 <para>
204 <envar>MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"</envar>: This
205 environment variable includes compatibility layers with Lua 5.1 and 5.2
206 in the build.
207 </para>
208
209 </sect2>
210
211 <sect2 role="content">
212 <title>Contents</title>
213
214 <segmentedlist>
215 <segtitle>Installed Programs</segtitle>
216 <segtitle>Installed Library</segtitle>
217 <segtitle>Installed Directories</segtitle>
218
219 <seglistitem>
220 <seg>
221 lua and luac
222 </seg>
223 <seg>
224 liblua.so
225 </seg>
226 <seg>
227 /usr/{lib,share}/lua and
228 /usr/share/doc/lua-&lua-version;
229 </seg>
230 </seglistitem>
231 </segmentedlist>
232
233 <variablelist>
234 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
235 <?dbfo list-presentation="list"?>
236 <?dbhtml list-presentation="table"?>
237
238 <varlistentry id="lua-prog">
239 <term><command>lua</command></term>
240 <listitem>
241 <para>
242 is the standalone Lua interpreter.
243 </para>
244 <indexterm zone="lua lua-prog">
245 <primary sortas="b-lua">lua</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="luac">
251 <term><command>luac</command></term>
252 <listitem>
253 <para>
254 is the Lua compiler.
255 </para>
256 <indexterm zone="lua luac">
257 <primary sortas="b-luac">luac</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
262 <varlistentry id="liblua">
263 <term><filename class="libraryfile">liblua.so</filename></term>
264 <listitem>
265 <para>
266 contains the <application>Lua</application> API functions.
267 </para>
268 <indexterm zone="lua liblua">
269 <primary sortas="c-liblua">liblua.so</primary>
270 </indexterm>
271 </listitem>
272 </varlistentry>
273
274 </variablelist>
275
276 </sect2>
277
278</sect1>
Note: See TracBrowser for help on using the repository browser.