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@…>, 4 months ago

Many tags.

Mostly Programming and Xorg sections and dependencies.

  • Property mode set to 100644
File size: 8.2 KB
RevLine 
[ab4fdfc]1<?xml version="1.0" encoding="UTF-8"?>
[c1a0390]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 " ">
[412cf83]9 <!ENTITY lua-md5sum "25a429319dff20dfbfb9956c2b5be911">
[a8d67ac6]10 <!ENTITY lua-size "356 KB">
[412cf83]11 <!ENTITY lua-buildsize "3.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 " ">
[412cf83]16 <!ENTITY lua-tests-md5sum "e10a3da28b05d0e8d25ad08b7820c213">
17 <!ENTITY lua-tests-size "134 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
[b9874725]44 &lfs121_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:
[412cf83]85 <ulink url="&patch-root;/lua-&lua-version;-shared_library-1.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 </sect2>
111
112 <sect2 role="installation">
113 <title>Installation of Lua</title>
114
[de33b2a]115 <para>
116 Some packages check for the <application>pkg-config</application> file
117 for <application>Lua</application>, which is created with:
118 </para>
[ae5a7024]119
[34525b48]120<screen><userinput>cat &gt; lua.pc &lt;&lt; "EOF"
[eb7de89]121<literal>V=5.4
[ae5a7024]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:
[5f3018f8]139Libs: -L${libdir} -llua -lm -ldl
[ae5a7024]140Cflags: -I${includedir}</literal>
141EOF</userinput></screen>
142
[c1a0390]143 <para>
144 Install <application>Lua</application> by running the following
145 commands:
146 </para>
147
[412cf83]148<screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &amp;&amp;
[eb7de89]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.-->
[c1a0390]154
155 <para>
156 To test the results, issue: <command>make test</command>.
[eb7de89]157 <quote>This will run the interpreter and print its version</quote>.
[c8229af]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
[0cd81836]160 installed, thus we defer to the description below.
[c1a0390]161 </para>
162
163 <para>
164 Now, as the <systemitem class="username">root</systemitem> user:
165 </para>
166
[198f4b92]167<screen role="root"><userinput>make INSTALL_TOP=/usr \
168 INSTALL_DATA="cp -d" \
169 INSTALL_MAN=/usr/share/man/man1 \
[eb7de89]170 TO_LIB="liblua.so liblua.so.5.4 liblua.so.&lua-version;" \
[198f4b92]171 install &amp;&amp;
[c8229af]172
[198f4b92]173mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
[ae5a7024]174cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version; &amp;&amp;
[c1a0390]175
[ae5a7024]176install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc</userinput></screen>
[ef47d83f]177
[c8229af]178 <para>
[0cd81836]179 Here we describe only the "Basic tests". Untar the tarball and
[c8229af]180 change to the
[eb7de89]181 <filename class="directory">lua-&lua-version;-tests</filename> directory,
[c8229af]182 then issue
[0cd81836]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".
[c8229af]185 </para>
186
[eb7de89]187 <!-- The optimization problem fixed in the patch was identified by running
188 the test suite, and ultimately culminated in a SIGBUS error. -->
[c1a0390]189 </sect2>
190
[eb7de89]191 <!-- Brought into the patch, unneeded
[123114f8]192 <sect2 role="commands">
193 <title>Command Explanations</title>
194
195 <para>
[0cd81836]196 <command>sed -i ... src/luaconf.h</command>: This command changes the
197 <application>Lua</application> search path to match the install path.
[123114f8]198 </para>
199
[d76c6b9]200 <para>
[ae5a7024]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.
[d76c6b9]204 </para>
205
[123114f8]206 </sect2>
[eb7de89]207 -->
[123114f8]208
[c1a0390]209 <sect2 role="content">
210 <title>Contents</title>
211
212 <segmentedlist>
213 <segtitle>Installed Programs</segtitle>
[9b29b78]214 <segtitle>Installed Library</segtitle>
[c1a0390]215 <segtitle>Installed Directories</segtitle>
216
217 <seglistitem>
218 <seg>
219 lua and luac
220 </seg>
221 <seg>
[ef47d83f]222 liblua.so
[c1a0390]223 </seg>
224 <seg>
[c8229af]225 /usr/{lib,share}/lua and
[c1a0390]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>
[4c24eb0a]240 is the standalone Lua interpreter
[c1a0390]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>
[4c24eb0a]252 is the Lua compiler
[c1a0390]253 </para>
254 <indexterm zone="lua luac">
255 <primary sortas="b-luac">luac</primary>
256 </indexterm>
257 </listitem>
258 </varlistentry>
259
[ef47d83f]260 <varlistentry id="liblua">
261 <term><filename class="libraryfile">liblua.so</filename></term>
262 <listitem>
263 <para>
[4c24eb0a]264 contains the <application>Lua</application> API functions
[ef47d83f]265 </para>
266 <indexterm zone="lua liblua">
[9297e31]267 <primary sortas="c-liblua">liblua.so</primary>
[ef47d83f]268 </indexterm>
269 </listitem>
270 </varlistentry>
271
[c1a0390]272 </variablelist>
273
274 </sect2>
275
276</sect1>
Note: See TracBrowser for help on using the repository browser.