source: general/prog/lua.xml@ eb7de89

10.0 10.1 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 eb7de89 was eb7de89, checked in by Douglas R. Reno <renodr@…>, 4 years ago

Update to lua-5.4.0
VIM: Adapt Lua interface to Lua-5.4
Apache/httpd: Adapt Lua module to Lua-5.4
Brotli: Remove invalid dependency on lua, there is a separate package that provides one, and it's not bundled with our download of Brotli
Dovecot: Add a command explanation describing how to build Lua support
Lua-5.2: Minor adjustment to installed files
Hexchat: Promote libcanberra to recommended

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

  • Property mode set to 100644
File size: 8.4 KB
RevLine 
[c1a0390]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-&lua-version;.tar.gz">
8 <!ENTITY lua-download-ftp " ">
[eb7de89]9 <!ENTITY lua-md5sum "dbf155764e5d433fc55ae80ea7060b60">
10 <!ENTITY lua-size "344 KB">
11 <!ENTITY lua-buildsize "5.5 MB (with Basic tests)">
[c8229af]12 <!ENTITY lua-time "less than 0.1 SBU (with Basic tests)">
13
[eb7de89]14 <!ENTITY lua-tests-download-http "http://www.lua.org/tests/lua-&lua-version;-tests.tar.gz">
[c8229af]15 <!ENTITY lua-tests-download-ftp " ">
[eb7de89]16 <!ENTITY lua-tests-md5sum "3d7768b090046506afa974a4ac0c5ba2">
17 <!ENTITY lua-tests-size "124 KB">
[c1a0390]18]>
19
20<sect1 id="lua" xreflabel="Lua-&lua-version;">
21 <?dbhtml filename="lua.html"?>
22
23 <sect1info>
24 <othername>$LastChangedBy$</othername>
25 <date>$Date$</date>
26 </sect1info>
27
28 <title>Lua-&lua-version;</title>
29
30 <indexterm zone="lua">
31 <primary sortas="a-Lua">Lua</primary>
32 </indexterm>
33
34 <sect2 role="package">
35 <title>Introduction to Lua</title>
36
37 <para>
38 <application>Lua</application> is a powerful light-weight programming
39 language designed for extending applications. It is also frequently used
40 as a general-purpose, stand-alone language. <application>Lua</application>
[32d4980]41 is implemented as a small library of C functions, written in ANSI C, and
42 compiles unmodified in all known platforms. The implementation goals are
43 simplicity, efficiency, portability, and low embedding cost. The result is
44 a fast language engine with small footprint, making it ideal in embedded
45 systems too.
[c1a0390]46 </para>
47
[5380ca3]48 &lfs91_checked;
[c1a0390]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
[ef47d83f]84 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
85 <itemizedlist spacing="compact">
86 <listitem>
87 <para>
88 Required patch:
[5b63ae51]89 <ulink url="&patch-root;/lua-&lua-version;-shared_library-1.patch"/>
[ef47d83f]90 </para>
91 </listitem>
[c8229af]92 <listitem>
93 <para>
94 Optional Test Suite Download (HTTP): <ulink url="&lua-tests-download-http;"/>
95 </para>
96 </listitem>
97 <listitem>
98 <para>
99 Optional Test Suite Download (FTP): <ulink url="&lua-tests-download-ftp;"/>
100 </para>
101 </listitem>
102 <listitem>
103 <para>
104 Optional Test Suite Download MD5 sum: &lua-tests-md5sum;
105 </para>
106 </listitem>
107 <listitem>
108 <para>
109 Optional Test Suite Download size: &lua-tests-size;
110 </para>
111 </listitem>
[ef47d83f]112 </itemizedlist>
113
[c1a0390]114 <para condition="html" role="usernotes">User Notes:
115 <ulink url="&blfs-wiki;/lua"/>
116 </para>
117 </sect2>
118
119 <sect2 role="installation">
120 <title>Installation of Lua</title>
121
[de33b2a]122 <para>
123 Some packages check for the <application>pkg-config</application> file
124 for <application>Lua</application>, which is created with:
125 </para>
[ae5a7024]126
[34525b48]127<screen><userinput>cat &gt; lua.pc &lt;&lt; "EOF"
[eb7de89]128<literal>V=5.4
[ae5a7024]129R=&lua-version;
130
131prefix=/usr
132INSTALL_BIN=${prefix}/bin
133INSTALL_INC=${prefix}/include
134INSTALL_LIB=${prefix}/lib
135INSTALL_MAN=${prefix}/share/man/man1
136INSTALL_LMOD=${prefix}/share/lua/${V}
137INSTALL_CMOD=${prefix}/lib/lua/${V}
138exec_prefix=${prefix}
139libdir=${exec_prefix}/lib
140includedir=${prefix}/include
141
142Name: Lua
143Description: An Extensible Extension Language
144Version: ${R}
145Requires:
[5f3018f8]146Libs: -L${libdir} -llua -lm -ldl
[ae5a7024]147Cflags: -I${includedir}</literal>
148EOF</userinput></screen>
149
[c1a0390]150 <para>
151 Install <application>Lua</application> by running the following
152 commands:
153 </para>
154
[5b63ae51]155<screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &amp;&amp;
[eb7de89]156make linux</userinput></screen>
157<!-- make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux
158 The MYCFLAGS="" part was brought into the patch since optimization had to
159 be turned off.
160 The LUA_ROOT change also has been merged into the patch.-->
[c1a0390]161
162 <para>
163 To test the results, issue: <command>make test</command>.
[eb7de89]164 <quote>This will run the interpreter and print its version</quote>.
[c8229af]165 More comprehensive tests can be performed if you downloaded the "Test
166 suite" tarball. Those tests need to be executed after the package is
[0cd81836]167 installed, thus we defer to the description below.
[c1a0390]168 </para>
169
170 <para>
171 Now, as the <systemitem class="username">root</systemitem> user:
172 </para>
173
[198f4b92]174<screen role="root"><userinput>make INSTALL_TOP=/usr \
175 INSTALL_DATA="cp -d" \
176 INSTALL_MAN=/usr/share/man/man1 \
[eb7de89]177 TO_LIB="liblua.so liblua.so.5.4 liblua.so.&lua-version;" \
[198f4b92]178 install &amp;&amp;
[c8229af]179
[198f4b92]180mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
[ae5a7024]181cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version; &amp;&amp;
[c1a0390]182
[ae5a7024]183install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc</userinput></screen>
[ef47d83f]184
[c8229af]185 <para>
[0cd81836]186 Here we describe only the "Basic tests". Untar the tarball and
[c8229af]187 change to the
[eb7de89]188 <filename class="directory">lua-&lua-version;-tests</filename> directory,
[c8229af]189 then issue
[0cd81836]190 <command>lua -e "_U=true" all.lua</command>. If the tests finish without
191 error, you will see a message containing the string "final OK".
[c8229af]192 </para>
193
[eb7de89]194 <!-- The optimization problem fixed in the patch was identified by running
195 the test suite, and ultimately culminated in a SIGBUS error. -->
[c1a0390]196 </sect2>
197
[eb7de89]198 <!-- Brought into the patch, unneeded
[123114f8]199 <sect2 role="commands">
200 <title>Command Explanations</title>
201
202 <para>
[0cd81836]203 <command>sed -i ... src/luaconf.h</command>: This command changes the
204 <application>Lua</application> search path to match the install path.
[123114f8]205 </para>
206
[d76c6b9]207 <para>
[ae5a7024]208 <envar>MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"</envar>: This
209 environment variable includes compatibility layers with Lua 5.1 and 5.2
210 in the build.
[d76c6b9]211 </para>
212
[123114f8]213 </sect2>
[eb7de89]214 -->
[123114f8]215
[c1a0390]216 <sect2 role="content">
217 <title>Contents</title>
218
219 <segmentedlist>
220 <segtitle>Installed Programs</segtitle>
[9b29b78]221 <segtitle>Installed Library</segtitle>
[c1a0390]222 <segtitle>Installed Directories</segtitle>
223
224 <seglistitem>
225 <seg>
226 lua and luac
227 </seg>
228 <seg>
[ef47d83f]229 liblua.so
[c1a0390]230 </seg>
231 <seg>
[c8229af]232 /usr/{lib,share}/lua and
[c1a0390]233 /usr/share/doc/lua-&lua-version;
234 </seg>
235 </seglistitem>
236 </segmentedlist>
237
238 <variablelist>
239 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
240 <?dbfo list-presentation="list"?>
241 <?dbhtml list-presentation="table"?>
242
243 <varlistentry id="lua-prog">
244 <term><command>lua</command></term>
245 <listitem>
246 <para>
247 is the standalone Lua interpreter.
248 </para>
249 <indexterm zone="lua lua-prog">
250 <primary sortas="b-lua">lua</primary>
251 </indexterm>
252 </listitem>
253 </varlistentry>
254
255 <varlistentry id="luac">
256 <term><command>luac</command></term>
257 <listitem>
258 <para>
259 is the Lua compiler.
260 </para>
261 <indexterm zone="lua luac">
262 <primary sortas="b-luac">luac</primary>
263 </indexterm>
264 </listitem>
265 </varlistentry>
266
[ef47d83f]267 <varlistentry id="liblua">
268 <term><filename class="libraryfile">liblua.so</filename></term>
269 <listitem>
270 <para>
271 contains the <application>Lua</application> API functions.
272 </para>
273 <indexterm zone="lua liblua">
[9297e31]274 <primary sortas="c-liblua">liblua.so</primary>
[ef47d83f]275 </indexterm>
276 </listitem>
277 </varlistentry>
278
[c1a0390]279 </variablelist>
280
281 </sect2>
282
283</sect1>
Note: See TracBrowser for help on using the repository browser.