description Tool to wrap C/C++ libraries in high-level languages.
SWIG is a software development tool that connects programs written in C \
and C++ with a variety of high-level programming languages. SWIG is \
primarily used with common scripting languages such as Perl, Python, \
Tcl/Tk, Ruby, Guile and MzScheme, however the list of supported languages \
also includes non-scripting languages such as Java and OCAML. SWIG is \
most commonly used to create high-level interpreted programming \
environments, user interfaces, and as a tool for testing and \
prototyping C/C++ software. SWIG may be freely used, distributed, and \
modified for commercial and noncommercial use.
homepage http://www.swig.org/
checksums md5 36ee2d9974be46a9f0a36460af928eb9 \
sha1 60faa84a326e5aa8a94f290e9debed4551c1b1e7 \
rmd160 853677ea19307428983034265fb37ce0f4f8a464
depends_build port:bison \
# The configure script should use GNU sed
reinplace "s/\[\[:<:\]\]sed\[\[:>:\]\]/gsed/g" ${worksrcpath}/configure
foreach lang {python perl5 gcj guile mzscheme ruby php ocaml pike lua chicken allegrocl clisp r tcl csharp octave java} {
configure.args-append --without-${lang}
set languages [list typemaps]
set docdir ${prefix}/share/doc/${name}-${version}
# This must be evaluated after variants selection.
destroot.args lib-languages="[join ${languages}]"
xinstall -d ${destroot}${docdir}
xinstall -m 0644 -W ${worksrcpath} ANNOUNCE CHANGES LICENSE README \
TODO ${destroot}${docdir}
variant doc description {Install extra documentation} {
xinstall -d ${destroot}${docdir}/html
eval xinstall -m 0644 [glob ${worksrcpath}/Doc/Manual/*.{css,html,pdf,png}] \
${destroot}${docdir}/html
livecheck.url http://www.swig.org/download.html
livecheck.regex ${name}-(\\d+(?:\\.\\d+)*)