source: general/prog/lua.xml@ b112f043

11.3 12.0 12.1 kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt plabs/newcss python3.11 qt5new rahul/power-profiles-daemon renodr/vulkan-addition trunk xry111/llvm18 xry111/xf86-video-removal
Last change on this file since b112f043 was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 19 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

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