source: general/prog/swig.xml

trunk
Last change on this file was f78c3c3, checked in by Bruce Dubbs <bdubbs@…>, 7 weeks ago

Update to swig-4.2.1.

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