source: general/prog/lua.xml@ 9ddc81e

12.1 ken/TL2024 lazarus trunk xry111/llvm18
Last change on this file since 9ddc81e was b9874725, checked in by Bruce Dubbs <bdubbs@…>, 3 months ago

Many tags.

Mostly Programming and Xorg sections and dependencies.

  • Property mode set to 100644
File size: 8.2 KB
Line 
1<?xml version="1.0" encoding="UTF-8"?>
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 "https://www.lua.org/ftp/lua-&lua-version;.tar.gz">
8 <!ENTITY lua-download-ftp " ">
9 <!ENTITY lua-md5sum "25a429319dff20dfbfb9956c2b5be911">
10 <!ENTITY lua-size "356 KB">
11 <!ENTITY lua-buildsize "3.8 MB (with Basic tests)">
12 <!ENTITY lua-time "less than 0.1 SBU (with Basic tests)">
13
14 <!ENTITY lua-tests-download-http "https://www.lua.org/tests/lua-&lua-version;-tests.tar.gz">
15 <!ENTITY lua-tests-download-ftp " ">
16 <!ENTITY lua-tests-md5sum "e10a3da28b05d0e8d25ad08b7820c213">
17 <!ENTITY lua-tests-size "134 KB">
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>
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.
42 </para>
43
44 &lfs121_checked;
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
80 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
81 <itemizedlist spacing="compact">
82 <listitem>
83 <para>
84 Required patch:
85 <ulink url="&patch-root;/lua-&lua-version;-shared_library-1.patch"/>
86 </para>
87 </listitem>
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>
108 </itemizedlist>
109
110 </sect2>
111
112 <sect2 role="installation">
113 <title>Installation of Lua</title>
114
115 <para>
116 Some packages check for the <application>pkg-config</application> file
117 for <application>Lua</application>, which is created with:
118 </para>
119
120<screen><userinput>cat &gt; lua.pc &lt;&lt; "EOF"
121<literal>V=5.4
122R=&lua-version;
123
124prefix=/usr
125INSTALL_BIN=${prefix}/bin
126INSTALL_INC=${prefix}/include
127INSTALL_LIB=${prefix}/lib
128INSTALL_MAN=${prefix}/share/man/man1
129INSTALL_LMOD=${prefix}/share/lua/${V}
130INSTALL_CMOD=${prefix}/lib/lua/${V}
131exec_prefix=${prefix}
132libdir=${exec_prefix}/lib
133includedir=${prefix}/include
134
135Name: Lua
136Description: An Extensible Extension Language
137Version: ${R}
138Requires:
139Libs: -L${libdir} -llua -lm -ldl
140Cflags: -I${includedir}</literal>
141EOF</userinput></screen>
142
143 <para>
144 Install <application>Lua</application> by running the following
145 commands:
146 </para>
147
148<screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &amp;&amp;
149make linux</userinput></screen>
150<!-- make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux
151 The MYCFLAGS="" part was brought into the patch since optimization had to
152 be turned off.
153 The LUA_ROOT change also has been merged into the patch.-->
154
155 <para>
156 To test the results, issue: <command>make test</command>.
157 <quote>This will run the interpreter and print its version</quote>.
158 More comprehensive tests can be performed if you downloaded the "Test
159 suite" tarball. Those tests need to be executed after the package is
160 installed, thus we defer to the description below.
161 </para>
162
163 <para>
164 Now, as the <systemitem class="username">root</systemitem> user:
165 </para>
166
167<screen role="root"><userinput>make INSTALL_TOP=/usr \
168 INSTALL_DATA="cp -d" \
169 INSTALL_MAN=/usr/share/man/man1 \
170 TO_LIB="liblua.so liblua.so.5.4 liblua.so.&lua-version;" \
171 install &amp;&amp;
172
173mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
174cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version; &amp;&amp;
175
176install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc</userinput></screen>
177
178 <para>
179 Here we describe only the "Basic tests". Untar the tarball and
180 change to the
181 <filename class="directory">lua-&lua-version;-tests</filename> directory,
182 then issue
183 <command>lua -e "_U=true" all.lua</command>. If the tests finish without
184 error, you will see a message containing the string "final OK".
185 </para>
186
187 <!-- The optimization problem fixed in the patch was identified by running
188 the test suite, and ultimately culminated in a SIGBUS error. -->
189 </sect2>
190
191 <!-- Brought into the patch, unneeded
192 <sect2 role="commands">
193 <title>Command Explanations</title>
194
195 <para>
196 <command>sed -i ... src/luaconf.h</command>: This command changes the
197 <application>Lua</application> search path to match the install path.
198 </para>
199
200 <para>
201 <envar>MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"</envar>: This
202 environment variable includes compatibility layers with Lua 5.1 and 5.2
203 in the build.
204 </para>
205
206 </sect2>
207 -->
208
209 <sect2 role="content">
210 <title>Contents</title>
211
212 <segmentedlist>
213 <segtitle>Installed Programs</segtitle>
214 <segtitle>Installed Library</segtitle>
215 <segtitle>Installed Directories</segtitle>
216
217 <seglistitem>
218 <seg>
219 lua and luac
220 </seg>
221 <seg>
222 liblua.so
223 </seg>
224 <seg>
225 /usr/{lib,share}/lua and
226 /usr/share/doc/lua-&lua-version;
227 </seg>
228 </seglistitem>
229 </segmentedlist>
230
231 <variablelist>
232 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
233 <?dbfo list-presentation="list"?>
234 <?dbhtml list-presentation="table"?>
235
236 <varlistentry id="lua-prog">
237 <term><command>lua</command></term>
238 <listitem>
239 <para>
240 is the standalone Lua interpreter
241 </para>
242 <indexterm zone="lua lua-prog">
243 <primary sortas="b-lua">lua</primary>
244 </indexterm>
245 </listitem>
246 </varlistentry>
247
248 <varlistentry id="luac">
249 <term><command>luac</command></term>
250 <listitem>
251 <para>
252 is the Lua compiler
253 </para>
254 <indexterm zone="lua luac">
255 <primary sortas="b-luac">luac</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
260 <varlistentry id="liblua">
261 <term><filename class="libraryfile">liblua.so</filename></term>
262 <listitem>
263 <para>
264 contains the <application>Lua</application> API functions
265 </para>
266 <indexterm zone="lua liblua">
267 <primary sortas="c-liblua">liblua.so</primary>
268 </indexterm>
269 </listitem>
270 </varlistentry>
271
272 </variablelist>
273
274 </sect2>
275
276</sect1>
Note: See TracBrowser for help on using the repository browser.