source: general/prog/swig.xml@ a6b9afb6

12.1 ken/TL2024 lazarus plabs/newcss rahul/power-profiles-daemon trunk xry111/llvm18
Last change on this file since a6b9afb6 was 0d961439, checked in by Xi Ruoyao <xry111@…>, 6 months ago

swig: Simplify doc install command

  • Property mode set to 100644
File size: 7.1 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 swig-download-http "&sourceforge-dl;/swig/swig-&swig-version;.tar.gz">
8 <!ENTITY swig-download-ftp " ">
9 <!ENTITY swig-md5sum "c7d55a1bca26752f3846c85b43c1a69c">
10 <!ENTITY swig-size "8.2 MB">
11 <!ENTITY swig-buildsize "82 MB (2.1 GB with tests)">
12 <!ENTITY swig-time "0.1 SBU (add 7.8 SBU for tests; both using parallelism=4)">
13]>
14
15<sect1 id="swig" xreflabel="SWIG-&swig-version;">
16 <?dbhtml filename="swig.html"?>
17
18
19 <title>SWIG-&swig-version;</title>
20
21 <indexterm zone="swig">
22 <primary sortas="a-swig">SWIG</primary>
23 </indexterm>
24
25 <sect2 role="package">
26 <title>Introduction to SWIG</title>
27
28 <para>
29 <application>SWIG</application> (Simplified Wrapper and Interface
30 Generator) is a compiler that integrates <application>C</application>
31 and <application>C++</application> with languages including
32 <application>Perl</application>,
33 <application>Python</application>,
34 <application>Tcl</application>,
35 <application>Ruby</application>,
36 <application>PHP</application>,
37 <application>Java</application>,
38 <application>C#</application>,
39 <application>D</application>,
40 <application>Go</application>,
41 <application>Lua</application>,
42 <application>Octave</application>,
43 <application>R</application>,
44 <application>Scheme</application>, and
45 <application>Ocaml</application>.
46 <application>SWIG</application> can
47 also export its parse tree into <application>Lisp</application>
48 s-expressions and <application>XML</application>.
49 </para>
50 <para>
51 <application>SWIG</application> reads annotated
52 <application>C/C++</application> header files and creates wrapper
53 code (glue code) in order to make the corresponding
54 <application>C/C++</application> libraries available to the listed
55 languages, or to extend <application>C/C++</application> programs
56 with a scripting language.
57 </para>
58
59 &lfs120_checked;
60
61 <bridgehead renderas="sect3">Package Information</bridgehead>
62 <itemizedlist spacing="compact">
63 <listitem>
64 <para>
65 Download (HTTP): <ulink url="&swig-download-http;"/>
66 </para>
67 </listitem>
68 <listitem>
69 <para>
70 Download (FTP): <ulink url="&swig-download-ftp;"/>
71 </para>
72 </listitem>
73 <listitem>
74 <para>
75 Download MD5 sum: &swig-md5sum;
76 </para>
77 </listitem>
78 <listitem>
79 <para>
80 Download size: &swig-size;
81 </para>
82 </listitem>
83 <listitem>
84 <para>
85 Estimated disk space required: &swig-buildsize;
86 </para>
87 </listitem>
88 <listitem>
89 <para>
90 Estimated build time: &swig-time;
91 </para>
92 </listitem>
93 </itemizedlist>
94
95 <bridgehead renderas="sect3">SWIG Dependencies</bridgehead>
96
97 <bridgehead renderas="sect4">Required</bridgehead>
98 <para role="required">
99 <xref linkend="pcre2"/>
100 </para>
101
102 <bridgehead renderas="sect4">Optional</bridgehead>
103 <para role="optional">
104 <xref linkend="boost"/> for tests, and any of the languages mentioned
105 in the introduction, as run-time dependencies
106 </para>
107
108 </sect2>
109
110 <sect2 role="installation">
111 <title>Installation of SWIG</title>
112
113 <para>
114 Install <application>SWIG</application> by running the following
115 commands:
116 </para>
117
118<screen><userinput>./configure --prefix=/usr \
119 --without-javascript \
120 --without-maximum-compile-warnings &amp;&amp;
121make</userinput></screen>
122
123 <para>
124 To test the results, issue: <command>PY3=1 make TCL_INCLUDE= -k check</command>.
125 The unsetting of the variable <envar>TCL_INCLUDE</envar> is
126 necessary since it is not correctly set by
127 <emphasis>configure</emphasis>. The tests are only executed for the
128 languages installed on your machine, so the disk space and SBU values
129 given for the tests may vary, and should be considered as mere orders of
130 magnitude. According to
131 <application>SWIG</application>'s documentation, the failure of some
132 tests should not be considered harmful. The go tests are buggy and may
133 generate a lot of meaningless output.
134 </para>
135
136 <para>
137 Now, as the <systemitem class="username">root</systemitem> user:
138 </para>
139
140<screen role="root"><userinput>make install &amp;&amp;
141cp -v -R Doc -T /usr/share/doc/swig-&swig-version;</userinput></screen>
142 </sect2>
143
144 <sect2 role="commands">
145 <title>Command Explanations</title>
146
147 <para>
148 <parameter>--without-maximum-compile-warnings</parameter>: disables
149 compiler ansi conformance enforcement, which triggers errors in
150 the <application>Lua</application> headers (starting with Lua 5.3).
151 </para>
152
153 <para>
154 <option>--without-&lt;language&gt;</option>: allows disabling the
155 building of tests and examples for &lt;language&gt;, but all the
156 languages capabilities of <application>SWIG</application> are always
157 built. <!--We use it for <application>Clisp</application>, because the
158 SWIG implementation is very incomplete and a lot of tests fail. -->
159 <!-- Now used for JavaScript because of node CLI changes -->
160 </para>
161
162 </sect2>
163
164 <sect2 role="content">
165 <title>Contents</title>
166
167 <segmentedlist>
168 <segtitle>Installed Programs</segtitle>
169 <segtitle>Installed Library</segtitle>
170 <segtitle>Installed Directories</segtitle>
171
172 <seglistitem>
173 <seg>
174 swig and ccache-swig
175 </seg>
176 <seg>
177 None
178 </seg>
179 <seg>
180 /usr/share/doc/swig-&swig-version; and
181 /usr/share/swig
182 </seg>
183 </seglistitem>
184 </segmentedlist>
185
186 <variablelist>
187 <bridgehead renderas="sect3">Short Descriptions</bridgehead>
188 <?dbfo list-presentation="list"?>
189 <?dbhtml list-presentation="table"?>
190
191 <varlistentry id="swig-prog">
192 <term><command>swig</command></term>
193 <listitem>
194 <para>
195 takes an interface file containing C/C++ declarations and
196 SWIG special instructions, and generates the corresponding
197 wrapper code needed to build extension modules
198 </para>
199 <indexterm zone="swig swig-prog">
200 <primary sortas="b-swig">swig</primary>
201 </indexterm>
202 </listitem>
203 </varlistentry>
204
205 <varlistentry id="ccache-swig">
206 <term><command>ccache-swig</command></term>
207 <listitem>
208 <para>
209 is a compiler cache, which speeds up re-compilation of
210 C/C++/SWIG code
211 </para>
212 <indexterm zone="swig ccache-swig">
213 <primary sortas="b-ccache-swig">ccache-swig</primary>
214 </indexterm>
215 </listitem>
216 </varlistentry>
217
218 </variablelist>
219 </sect2>
220
221</sect1>
Note: See TracBrowser for help on using the repository browser.