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

10.0 10.1 11.0 11.1 11.2 11.3 12.0 12.1 7.10 7.9 8.0 8.1 8.2 8.3 8.4 9.0 9.1 basic bdubbs/svn elogind kea ken/TL2024 ken/inkscape-core-mods ken/tuningfonts lazarus lxqt nosym perl-modules 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 0b81c46 was 9a4dfd4, checked in by Igor Živković <igor@…>, 8 years ago

slight correction in lua.pc

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

  • Property mode set to 100644
File size: 7.8 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 " ">
[54165091]9 <!ENTITY lua-md5sum "33278c2ab5ee3c1a875be8d55c1ca2a1">
[c8229af]10 <!ENTITY lua-size "284 KB">
11 <!ENTITY lua-buildsize "4 MB (add 440 KB for the Basic tests)">
12 <!ENTITY lua-time "less than 0.1 SBU (with Basic tests)">
13
14 <!ENTITY lua-tests-download-http "http://www.lua.org/tests/lua-&lua-version;-tests.tar.gz">
15 <!ENTITY lua-tests-download-ftp " ">
16 <!ENTITY lua-tests-md5sum "a2b7ab1b8ff82a0145376e233ef30a4a">
17 <!ENTITY lua-tests-size "100 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
[41c36b3]48 &lfs78_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
122 <para>
123 Install <application>Lua</application> by running the following
124 commands:
125 </para>
126
[5b63ae51]127<screen><userinput>patch -Np1 -i ../lua-&lua-version;-shared_library-1.patch &amp;&amp;
[c8229af]128
[123114f8]129sed -i '/#define LUA_ROOT/s:/usr/local/:/usr/:' src/luaconf.h &amp;&amp;
[c8229af]130
[ef47d83f]131make linux</userinput></screen>
[c1a0390]132
133 <para>
134 To test the results, issue: <command>make test</command>.
[c8229af]135 <quote>This will run the interpreter and print its version.</quote>.
136 More comprehensive tests can be performed if you downloaded the "Test
137 suite" tarball. Those tests need to be executed after the package is
138 installed, thus we defer to describe then below.
[c1a0390]139 </para>
140
141 <para>
142 Now, as the <systemitem class="username">root</systemitem> user:
143 </para>
144
[646a42e]145<screen role="root"><userinput>make INSTALL_TOP=/usr TO_LIB="liblua.so liblua.so.5.3 liblua.so.&lua-version;" \
[ef47d83f]146 INSTALL_DATA="cp -d" INSTALL_MAN=/usr/share/man/man1 install &amp;&amp;
[c8229af]147
[9b29b78]148mkdir -pv /usr/share/doc/lua-&lua-version; &amp;&amp;
[c1a0390]149cp -v doc/*.{html,css,gif,png} /usr/share/doc/lua-&lua-version;</userinput></screen>
150
[ef47d83f]151 <para>Some packages check for the <application>pkg-config</application> file
152 for <application>Lua</application>. As the
153 <systemitem class="username">root</systemitem> user:</para>
154
155<screen role="root"><userinput>cat &gt; /usr/lib/pkgconfig/lua.pc &lt;&lt; "EOF"
[646a42e]156<literal>V=5.3
[5b63ae51]157R=&lua-version;
[ef47d83f]158
159prefix=/usr
160INSTALL_BIN=${prefix}/bin
161INSTALL_INC=${prefix}/include
162INSTALL_LIB=${prefix}/lib
[9a4dfd4]163INSTALL_MAN=${prefix}/share/man/man1
[ef47d83f]164INSTALL_LMOD=${prefix}/share/lua/${V}
165INSTALL_CMOD=${prefix}/lib/lua/${V}
166exec_prefix=${prefix}
167libdir=${exec_prefix}/lib
168includedir=${prefix}/include
169
170Name: Lua
171Description: An Extensible Extension Language
172Version: ${R}
[f3429309]173Requires:
[ef47d83f]174Libs: -L${libdir} -llua -lm
175Cflags: -I${includedir}</literal>
176EOF</userinput></screen>
177
[c8229af]178 <para>
179 We are going to describe only the "Basic tests". Untar the tarball and
180 change to the
181 <filename class="directory">lua-&lua-version;-tests</filename> directory,
182 then issue
183 <command>lua -e"_U=true" all.lua</command>. If the tests finish without
184 error, you will see a message containing the string "final OK", at the
185 end.
186 </para>
187
[c1a0390]188 </sect2>
189
[123114f8]190 <sect2 role="commands">
191 <title>Command Explanations</title>
192
193 <para>
[231d5eb]194 <command>sed -i ... src/luaconf.h</command>: This command changes
[123114f8]195 <application>Lua</application> search path to match the install paths.
196 </para>
197
198 </sect2>
199
[c1a0390]200 <sect2 role="content">
201 <title>Contents</title>
202
203 <segmentedlist>
204 <segtitle>Installed Programs</segtitle>
[9b29b78]205 <segtitle>Installed Library</segtitle>
[c1a0390]206 <segtitle>Installed Directories</segtitle>
207
208 <seglistitem>
209 <seg>
210 lua and luac
211 </seg>
212 <seg>
[ef47d83f]213 liblua.so
[c1a0390]214 </seg>
215 <seg>
[c8229af]216 /usr/{lib,share}/lua and
[c1a0390]217 /usr/share/doc/lua-&lua-version;
218 </seg>
219 </seglistitem>
220 </segmentedlist>
221
222 <variablelist>
223 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
224 <?dbfo list-presentation="list"?>
225 <?dbhtml list-presentation="table"?>
226
227 <varlistentry id="lua-prog">
228 <term><command>lua</command></term>
229 <listitem>
230 <para>
231 is the standalone Lua interpreter.
232 </para>
233 <indexterm zone="lua lua-prog">
234 <primary sortas="b-lua">lua</primary>
235 </indexterm>
236 </listitem>
237 </varlistentry>
238
239 <varlistentry id="luac">
240 <term><command>luac</command></term>
241 <listitem>
242 <para>
243 is the Lua compiler.
244 </para>
245 <indexterm zone="lua luac">
246 <primary sortas="b-luac">luac</primary>
247 </indexterm>
248 </listitem>
249 </varlistentry>
250
[ef47d83f]251 <varlistentry id="liblua">
252 <term><filename class="libraryfile">liblua.so</filename></term>
253 <listitem>
254 <para>
255 contains the <application>Lua</application> API functions.
256 </para>
257 <indexterm zone="lua liblua">
[9297e31]258 <primary sortas="c-liblua">liblua.so</primary>
[ef47d83f]259 </indexterm>
260 </listitem>
261 </varlistentry>
262
[c1a0390]263 </variablelist>
264
265 </sect2>
266
267</sect1>
Note: See TracBrowser for help on using the repository browser.