source: general/prog/lua52.xml@ 75fee1b

11.3 12.0 12.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 xry111/llvm18 xry111/xf86-video-removal
Last change on this file since 75fee1b was 3f2db3a6, checked in by Pierre Labastie <pierre.labastie@…>, 17 months ago

Remove sect1info tags

They only contain a date tag that is nowhere used.

  • Property mode set to 100644
File size: 7.8 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 "https://www.lua.org/ftp/lua-&lua52-version;.tar.gz">
8 <!ENTITY lua-download-ftp " ">
9 <!ENTITY lua-md5sum "913fdb32207046b273fdb17aad70be13">
10 <!ENTITY lua-size "248 KB">
11 <!ENTITY lua-buildsize "3.6 MB">
12 <!ENTITY lua-time "less than 0.1 SBU">
13]>
14
15<sect1 id="lua52" xreflabel="Lua-&lua52-version;">
16 <?dbhtml filename="lua52.html"?>
17
18
19 <title>Lua-&lua52-version;</title>
20
21 <indexterm zone="lua52">
22 <primary sortas="a-Lua">Lua</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to Lua 5.2</title>
27
28 <para>
29 <application>Lua</application> is a powerful light-weight programming
30 language designed for extending applications. It is also frequently used
31 as a general-purpose, stand-alone language. <application>Lua</application>
32 is implemented as a small library of C functions, written in ANSI C, and
33 compiles unmodified in all known platforms. The implementation goals are
34 simplicity, efficiency, portability, and low embedding cost. The result is
35 a fast language engine with small footprint, making it ideal in embedded
36 systems too.
37 </para>
38
39 <para>
40 This is an older version of <application>Lua</application> needed only
41 for compatibility with other programs such as <xref linkend='wireshark'/>.
42 </para>
43
44 &lfs112_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-&lua52-version;-shared_library-1.patch"/>
86 </para>
87 </listitem>
88 </itemizedlist>
89
90 <para condition="html" role="usernotes">User Notes:
91 <ulink url="&blfs-wiki;/lua"/>
92 </para>
93 </sect2>
94
95 <sect2 role="installation">
96 <title>Installation of Lua 5.2</title>
97
98 <para>
99 Some packages check for the <application>pkg-config</application> file
100 for <application>Lua</application>, which is created with:
101 </para>
102
103<screen><userinput>cat &gt; lua.pc &lt;&lt; "EOF"
104<literal>V=5.2
105R=&lua52-version;
106
107prefix=/usr
108INSTALL_BIN=${prefix}/bin
109INSTALL_INC=${prefix}/include/lua5.2
110INSTALL_LIB=${prefix}/lib
111INSTALL_MAN=${prefix}/share/man/man1
112INSTALL_LMOD=${prefix}/share/lua/${V}
113INSTALL_CMOD=${prefix}/lib/lua/${V}
114exec_prefix=${prefix}
115libdir=${exec_prefix}/lib
116includedir=${prefix}/include/lua5.2
117
118Name: Lua
119Description: An Extensible Extension Language
120Version: ${R}
121Requires:
122Libs: -L${libdir} -llua5.2 -lm -ldl
123Cflags: -I${includedir}</literal>
124EOF</userinput></screen>
125
126 <para>
127 Install <application>Lua</application> by running the following
128 commands:
129 </para>
130
131<screen><userinput>patch -Np1 -i ../lua-&lua52-version;-shared_library-1.patch &amp;&amp;
132
133sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h &amp;&amp;
134
135sed -r -e '/^LUA_(SO|A|T)=/ s/lua/lua5.2/' \
136 -e '/^LUAC_T=/ s/luac/luac5.2/' \
137 -i src/Makefile &amp;&amp;
138
139make MYCFLAGS="-fPIC" linux</userinput></screen>
140<!--
141 <para>
142 To test the results, issue: <command>make test</command>.
143 <quote>This will run the interpreter and print its version.</quote>.
144 More comprehensive tests can be performed if you downloaded the "Test
145 suite" tarball. Those tests need to be executed after the package is
146 installed, thus we defer to the description below.
147 </para>
148-->
149 <para>
150 The installation of this package is complex, so we will use
151 the DESTDIR method of installation:
152 </para>
153
154<screen><userinput>make TO_BIN='lua5.2 luac5.2' \
155 TO_LIB="liblua5.2.so liblua5.2.so.5.2 liblua5.2.so.&lua52-version;" \
156 INSTALL_DATA="cp -d" \
157 INSTALL_TOP=$PWD/install/usr \
158 INSTALL_INC=$PWD/install/usr/include/lua5.2 \
159 INSTALL_MAN=$PWD/install/usr/share/man/man1 \
160 install &amp;&amp;
161
162install -Dm644 lua.pc install/usr/lib/pkgconfig/lua52.pc &amp;&amp;
163
164mkdir -pv install/usr/share/doc/lua-&lua52-version; &amp;&amp;
165cp -v doc/*.{html,css,gif,png} install/usr/share/doc/lua-&lua52-version; &amp;&amp;
166
167ln -s liblua5.2.so install/usr/lib/liblua.so.5.2 &amp;&amp;
168ln -s liblua5.2.so install/usr/lib/liblua.so.&lua52-version; &amp;&amp;
169
170mv install/usr/share/man/man1/{lua.1,lua5.2.1} &amp;&amp;
171mv install/usr/share/man/man1/{luac.1,luac5.2.1}</userinput></screen>
172
173 <para>
174 Now, as the <systemitem class="username">root</systemitem> user:
175 </para>
176
177<screen role="root"><userinput>chown -R root:root install &amp;&amp;
178cp -a install/* /</userinput></screen>
179
180 </sect2>
181
182 <sect2 role="commands">
183 <title>Command Explanations</title>
184
185 <para>
186 <command>sed -i ... src/luaconf.h</command>: This command changes the
187 <application>Lua</application> search path to match the install path.
188 </para>
189
190 <para>
191 <command>sed -i ... src/Makefile</command>: This command deconflicts
192 this installation with the latest version of lua.
193 </para>
194
195 </sect2>
196
197 <sect2 role="content">
198 <title>Contents</title>
199
200 <segmentedlist>
201 <segtitle>Installed Programs</segtitle>
202 <segtitle>Installed Library</segtitle>
203 <segtitle>Installed Directories</segtitle>
204
205 <seglistitem>
206 <seg>
207 lua5.2 and luac5.2
208 </seg>
209 <seg>
210 liblua5.2.so
211 </seg>
212 <seg>
213 /usr/include/lua5.2,
214 /usr/lib/lua/5.2,
215 /usr/share/doc/lua-&lua52-version;, and
216 /usr/share/lua/5.2
217 </seg>
218 </seglistitem>
219 </segmentedlist>
220
221 <variablelist>
222 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
223 <?dbfo list-presentation="list"?>
224 <?dbhtml list-presentation="table"?>
225
226 <varlistentry id="lua52-prog">
227 <term><command>lua5.2</command></term>
228 <listitem>
229 <para>
230 is the standalone Lua version 5.2 interpreter
231 </para>
232 <indexterm zone="lua52 lua-prog">
233 <primary sortas="b-lua52">lua5.2</primary>
234 </indexterm>
235 </listitem>
236 </varlistentry>
237
238 <varlistentry id="luac52">
239 <term><command>luac5.2</command></term>
240 <listitem>
241 <para>
242 is the Lua version 5.2 compiler
243 </para>
244 <indexterm zone="lua52 luac52">
245 <primary sortas="b-luac52">luac5.2</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="liblua52">
251 <term><filename class="libraryfile">liblua5.2.so</filename></term>
252 <listitem>
253 <para>
254 contains the <application>Lua</application> version 5.2 API functions
255 </para>
256 <indexterm zone="lua52 liblua52">
257 <primary sortas="c-liblua52">liblua5.2.so</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
262 </variablelist>
263
264 </sect2>
265
266</sect1>
Note: See TracBrowser for help on using the repository browser.