source: general/prog/lua.xml@ 0a954655

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 9.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 0a954655 was 0a954655, checked in by Xi Ruoyao <xry111@…>, 4 years ago

lua: fix tests directory name

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

  • Property mode set to 100644
File size: 8.2 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 " ">
[69d690f]9 <!ENTITY lua-md5sum "4f4b4f323fd3514a68e0ab3da8ce3455">
[198f4b92]10 <!ENTITY lua-size "300 KB">
[69d690f]11 <!ENTITY lua-buildsize "4.5 MB (with Basic tests)">
[c8229af]12 <!ENTITY lua-time "less than 0.1 SBU (with Basic tests)">
13
[69d690f]14<!-- Note for editors - the soname and test suite versions did not change, so I
15 Had to hardcode them. -renodr -->
16 <!ENTITY lua-tests-download-http "http://www.lua.org/tests/lua-5.3.4-tests.tar.gz">
[c8229af]17 <!ENTITY lua-tests-download-ftp " ">
[198f4b92]18 <!ENTITY lua-tests-md5sum "b14fe3748c1cb2d74e3acd1943629ba3">
[0cd81836]19 <!ENTITY lua-tests-size "104 KB">
[c1a0390]20]>
21
22<sect1 id="lua" xreflabel="Lua-&lua-version;">
23 <?dbhtml filename="lua.html"?>
24
25 <sect1info>
26 <othername>$LastChangedBy$</othername>
27 <date>$Date$</date>
28 </sect1info>
29
30 <title>Lua-&lua-version;</title>
31
32 <indexterm zone="lua">
33 <primary sortas="a-Lua">Lua</primary>
34 </indexterm>
35
36 <sect2 role="package">
37 <title>Introduction to Lua</title>
38
39 <para>
40 <application>Lua</application> is a powerful light-weight programming
41 language designed for extending applications. It is also frequently used
42 as a general-purpose, stand-alone language. <application>Lua</application>
[32d4980]43 is implemented as a small library of C functions, written in ANSI C, and
44 compiles unmodified in all known platforms. The implementation goals are
45 simplicity, efficiency, portability, and low embedding cost. The result is
46 a fast language engine with small footprint, making it ideal in embedded
47 systems too.
[c1a0390]48 </para>
49
[6030130]50 &lfs90_checked;
[c1a0390]51
52 <bridgehead renderas="sect3">Package Information</bridgehead>
53 <itemizedlist spacing="compact">
54 <listitem>
55 <para>
56 Download (HTTP): <ulink url="&lua-download-http;"/>
57 </para>
58 </listitem>
59 <listitem>
60 <para>
61 Download (FTP): <ulink url="&lua-download-ftp;"/>
62 </para>
63 </listitem>
64 <listitem>
65 <para>
66 Download MD5 sum: &lua-md5sum;
67 </para>
68 </listitem>
69 <listitem>
70 <para>
71 Download size: &lua-size;
72 </para>
73 </listitem>
74 <listitem>
75 <para>
76 Estimated disk space required: &lua-buildsize;
77 </para>
78 </listitem>
79 <listitem>
80 <para>
81 Estimated build time: &lua-time;
82 </para>
83 </listitem>
84 </itemizedlist>
85
[ef47d83f]86 <bridgehead renderas="sect3">Additional Downloads</bridgehead>
87 <itemizedlist spacing="compact">
88 <listitem>
89 <para>
90 Required patch:
[5b63ae51]91 <ulink url="&patch-root;/lua-&lua-version;-shared_library-1.patch"/>
[ef47d83f]92 </para>
93 </listitem>
[c8229af]94 <listitem>
95 <para>
96 Optional Test Suite Download (HTTP): <ulink url="&lua-tests-download-http;"/>
97 </para>
98 </listitem>
99 <listitem>
100 <para>
101 Optional Test Suite Download (FTP): <ulink url="&lua-tests-download-ftp;"/>
102 </para>
103 </listitem>
104 <listitem>
105 <para>
106 Optional Test Suite Download MD5 sum: &lua-tests-md5sum;
107 </para>
108 </listitem>
109 <listitem>
110 <para>
111 Optional Test Suite Download size: &lua-tests-size;
112 </para>
113 </listitem>
[ef47d83f]114 </itemizedlist>
115
[c1a0390]116 <para condition="html" role="usernotes">User Notes:
117 <ulink url="&blfs-wiki;/lua"/>
118 </para>
119 </sect2>
120
121 <sect2 role="installation">
122 <title>Installation of Lua</title>
123
[ae5a7024]124 <para>Some packages check for the <application>pkg-config</application> file
[1c159417]125 for <application>Lua</application>, which is created with:</para>
[ae5a7024]126
[34525b48]127<screen><userinput>cat &gt; lua.pc &lt;&lt; "EOF"
[ae5a7024]128<literal>V=5.3
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;
[123114f8]156sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h &amp;&amp;
[c8229af]157
[ae5a7024]158make MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1" linux</userinput></screen>
[c1a0390]159
160 <para>
161 To test the results, issue: <command>make test</command>.
[c8229af]162 <quote>This will run the interpreter and print its version.</quote>.
163 More comprehensive tests can be performed if you downloaded the "Test
164 suite" tarball. Those tests need to be executed after the package is
[0cd81836]165 installed, thus we defer to the description below.
[c1a0390]166 </para>
167
168 <para>
169 Now, as the <systemitem class="username">root</systemitem> user:
170 </para>
171
[198f4b92]172<screen role="root"><userinput>make INSTALL_TOP=/usr \
173 INSTALL_DATA="cp -d" \
174 INSTALL_MAN=/usr/share/man/man1 \
[69d690f]175 TO_LIB="liblua.so liblua.so.5.3 liblua.so.5.3.4" \
[198f4b92]176 install &amp;&amp;
[69d690f]177<!-- As stated above, we have to hardcode 5.3.4. -->
[c8229af]178
[198f4b92]179mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
[ae5a7024]180cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version; &amp;&amp;
[c1a0390]181
[ae5a7024]182install -v -m644 -D lua.pc /usr/lib/pkgconfig/lua.pc</userinput></screen>
[ef47d83f]183
[c8229af]184 <para>
[0cd81836]185 Here we describe only the "Basic tests". Untar the tarball and
[c8229af]186 change to the
[0a954655]187 <filename class="directory">lua-5.3.4-tests</filename> directory,
[c8229af]188 then issue
[0cd81836]189 <command>lua -e "_U=true" all.lua</command>. If the tests finish without
190 error, you will see a message containing the string "final OK".
[c8229af]191 </para>
192
[c1a0390]193 </sect2>
194
[123114f8]195 <sect2 role="commands">
196 <title>Command Explanations</title>
197
198 <para>
[0cd81836]199 <command>sed -i ... src/luaconf.h</command>: This command changes the
200 <application>Lua</application> search path to match the install path.
[123114f8]201 </para>
202
[d76c6b9]203 <para>
[ae5a7024]204 <envar>MYCFLAGS="-DLUA_COMPAT_5_2 -DLUA_COMPAT_5_1"</envar>: This
205 environment variable includes compatibility layers with Lua 5.1 and 5.2
206 in the build.
[d76c6b9]207 </para>
208
[123114f8]209 </sect2>
210
[c1a0390]211 <sect2 role="content">
212 <title>Contents</title>
213
214 <segmentedlist>
215 <segtitle>Installed Programs</segtitle>
[9b29b78]216 <segtitle>Installed Library</segtitle>
[c1a0390]217 <segtitle>Installed Directories</segtitle>
218
219 <seglistitem>
220 <seg>
221 lua and luac
222 </seg>
223 <seg>
[ef47d83f]224 liblua.so
[c1a0390]225 </seg>
226 <seg>
[c8229af]227 /usr/{lib,share}/lua and
[c1a0390]228 /usr/share/doc/lua-&lua-version;
229 </seg>
230 </seglistitem>
231 </segmentedlist>
232
233 <variablelist>
234 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
235 <?dbfo list-presentation="list"?>
236 <?dbhtml list-presentation="table"?>
237
238 <varlistentry id="lua-prog">
239 <term><command>lua</command></term>
240 <listitem>
241 <para>
242 is the standalone Lua interpreter.
243 </para>
244 <indexterm zone="lua lua-prog">
245 <primary sortas="b-lua">lua</primary>
246 </indexterm>
247 </listitem>
248 </varlistentry>
249
250 <varlistentry id="luac">
251 <term><command>luac</command></term>
252 <listitem>
253 <para>
254 is the Lua compiler.
255 </para>
256 <indexterm zone="lua luac">
257 <primary sortas="b-luac">luac</primary>
258 </indexterm>
259 </listitem>
260 </varlistentry>
261
[ef47d83f]262 <varlistentry id="liblua">
263 <term><filename class="libraryfile">liblua.so</filename></term>
264 <listitem>
265 <para>
266 contains the <application>Lua</application> API functions.
267 </para>
268 <indexterm zone="lua liblua">
[9297e31]269 <primary sortas="c-liblua">liblua.so</primary>
[ef47d83f]270 </indexterm>
271 </listitem>
272 </varlistentry>
273
[c1a0390]274 </variablelist>
275
276 </sect2>
277
278</sect1>
Note: See TracBrowser for help on using the repository browser.