source: general/prog/lua52.xml@ 5716cfc

11.0 11.1 11.2 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 upgradedb xry111/intltool xry111/llvm18 xry111/soup3 xry111/test-20220226 xry111/xf86-video-removal
Last change on this file since 5716cfc was 45ab6c7, checked in by Xi Ruoyao <xry111@…>, 3 years ago

more SVN prop clean up

Remove "$LastChanged$" everywhere, and also some unused $Date$

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