source: general/prog/lua52.xml@ 427b46a

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 427b46a was 4a2c778d, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Tag perl modules and some other programming apps

git-svn-id: svn://svn.linuxfromscratch.org/BLFS/trunk/BOOK@24249 af4574ff-66df-0310-9fd7-8a98e5e911e0

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