55 | | pre-destroot { |
56 | | # This must be evaluated after variants selection. |
57 | | destroot.args lib-languages="[join ${languages}]" |
| 44 | array set bindings { |
| 45 | allegro {port:allegro allegrocl} |
| 46 | chicken {port:chicken chicken} |
| 47 | clisp {port:clisp clisp} |
| 48 | csharp {port:mono csharp} |
| 49 | gcj {port:gcc44 "gcj=${prefix}/bin/gcj-mp-4.4 --with-gcjh=${prefix}/bin/gcjh-mp-4.4"} |
| 50 | go {port:go go} |
| 51 | guile {port:guile guile} |
| 52 | java {bin:java:kaffe java} |
| 53 | lua {port:lua lua} |
| 54 | mzscheme {port:mzscheme mzscheme} |
| 55 | ocaml {port:ocaml ocaml} |
| 56 | octave {path:bin/octave:octave octave} |
| 57 | perl {path:bin/perl:perl5 perl5=${prefix}/bin/perl} |
| 58 | php5 {path:bin/php:php5 php} |
| 59 | pike {port:pike pike} |
| 60 | python {port:python_select python} |
| 61 | r {port:R r} |
| 62 | ruby {port:ruby ruby} |
| 63 | tcl {port:tcl tcl} |
60 | | post-destroot { |
61 | | xinstall -d ${destroot}${docdir} |
62 | | xinstall -m 0644 -W ${worksrcpath} ANNOUNCE CHANGES LICENSE README \ |
63 | | TODO ${destroot}${docdir} |
| 70 | options swig.lang |
| 71 | default swig.lang "" |
| 72 | |
| 73 | foreach lang [lsort [array names bindings]] { |
| 74 | set arg [lindex $bindings($lang) 1] |
| 75 | set arg_name [lindex [split ${arg} =] 0] |
| 76 | subport swig-${lang} " |
| 77 | depends_lib-append [lindex $bindings($lang) 0] |
| 78 | configure.args-append --with-${arg} |
| 79 | destroot.args lib-languages=\"${arg_name}\" |
| 80 | swig.lang $arg_name |
| 81 | " |
| 82 | if {${swig.lang} != $arg_name} { |
| 83 | configure.args-append --without-${arg_name} |
| 84 | } |
66 | | variant doc description {Install extra documentation} { |
| 87 | subport swig-gcj { |
| 88 | variant gcc43 conflicts gcc44 description {build using GCJ 4.3} { |
| 89 | depends_lib-delete port:gcc44 |
| 90 | depends_lib-append port:gcc43 |
| 91 | configure.args-delete --with-gcj=${prefix}/bin/gcj-mp-4.4 --with-gcjh=${prefix}/bin/gcjh-mp-4.4 |
| 92 | configure.args-append --with-gcj=${prefix}/bin/gcj-mp-4.3 --with-gcjh=${prefix}/bin/gcjh-mp-4.3 |
| 93 | } |
| 94 | |
| 95 | # just a placeholder variant until gcc45 gets added |
| 96 | variant gcc44 conflicts gcc43 description {build using GCJ 4.4} {} |
| 97 | |
| 98 | if {![variant_isset gcc43]} { |
| 99 | default_variants +gcc44 |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | if {${swig.lang} == ""} { |
| 104 | depends_lib port:pcre |
| 105 | |
| 106 | set docdir ${prefix}/share/doc/${name}-${version} |
| 107 | |
| 108 | destroot.args lib-languages="typemaps" |
| 109 | |
| 115 | |
| 116 | variant doc description {Install extra documentation} { |
| 117 | post-destroot { |
| 118 | xinstall -d ${destroot}${docdir}/html |
| 119 | eval xinstall -m 0644 [glob ${worksrcpath}/Doc/Manual/*.{css,html,pdf,png}] \ |
| 120 | ${destroot}${docdir}/html |
| 121 | } |
| 122 | } |
| 123 | |
| 124 | livecheck.type regex |
| 125 | livecheck.url http://www.swig.org/download.html |
| 126 | livecheck.regex ${name}-(\\d+(?:\\.\\d+)*) |
| 127 | } else { |
| 128 | description $prettynames(${swig.lang}) binding for swig |
| 129 | long_description \ |
| 130 | SWIG is a software development tool that connects programs written in C \ |
| 131 | and C++ with a variety of high-level programming languages. This is the \ |
| 132 | $prettynames(${swig.lang}) binding. |
| 133 | supported_archs noarch |
| 134 | depends_lib-append port:swig |
| 135 | livecheck.type none |
| 136 | post-destroot { |
| 137 | delete ${destroot}${prefix}/bin |
| 138 | delete ${destroot}${prefix}/share/man |
| 139 | foreach f [glob -directory ${destroot}${prefix}/share/swig/${version} *] { |
| 140 | if {[file tail $f] != ${swig.lang}} { |
| 141 | delete $f |
| 142 | } |
| 143 | } |
| 144 | } |