source: trunk/dports/devel/swig/Portfile @ 47793

Last change on this file since 47793 was 47793, checked in by ryandesign@…, 9 years ago

swig: allow php5-devel to satisfy php dependency; closes #18385 (maintainer timeout)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.4 KB
Line 
1# $Id: Portfile 47793 2009-03-06 10:23:02Z ryandesign@macports.org $
2
3PortSystem 1.0
4
5name            swig
6version         1.3.38
7
8categories      devel
9maintainers     kevin jwa
10
11description     Tool to wrap C/C++ libraries in high-level languages.
12long_description        \
13    SWIG is a software development tool that connects programs written in C \
14    and C++ with a variety of high-level programming languages. SWIG is \
15    primarily used with common scripting languages such as Perl, Python, \
16    Tcl/Tk, Ruby, Guile and MzScheme, however the list of supported languages \
17    also includes non-scripting languages such as Java and OCAML. SWIG is \
18    most commonly used to create high-level interpreted programming \
19    environments, user interfaces, and as a tool for testing and \
20    prototyping C/C++ software. SWIG may be freely used, distributed, and \
21    modified for commercial and noncommercial use.
22
23homepage        http://www.swig.org/
24platforms       darwin
25master_sites    sourceforge
26checksums           md5     650c774917be49c526a4f8a3e733c898 \
27                    sha1    fc3759f1671bf55e14ee7ec178e1b08033a3160c \
28                    rmd160  4bca6975c1011a96a3eeff84f3ac539f2a91bedc
29
30depends_build   port:bison \
31    port:gsed
32
33post-patch {
34    # The configure script should use GNU sed
35    reinplace "s/\[\[:<:\]\]sed\[\[:>:\]\]/gsed/g" ${worksrcpath}/configure
36}
37
38default_variants        +python +perl +ruby +php5
39configure.args  --with-java
40
41build.target
42
43set languages   {typemaps java}
44set docdir      ${prefix}/share/doc/${name}-${version}
45
46test.run        yes
47test.target     check
48
49pre-destroot {
50    # This must be evaluated after variants selection.
51    destroot.args   lib-languages="[join ${languages}]"
52}
53
54post-destroot {
55    xinstall -d ${destroot}${docdir}
56    xinstall -m 0644 -W ${worksrcpath} ANNOUNCE CHANGES FUTURE LICENSE NEW README \
57        TODO ${destroot}${docdir}
58}
59
60variant doc description {Install extra documentation} {
61    post-destroot {
62        xinstall -d ${destroot}${docdir}/html
63        eval xinstall -m 0644 [glob ${worksrcpath}/Doc/Manual/*.{css,html,pdf,png}] \
64            ${destroot}${docdir}/html
65    }
66}
67
68set bindings {
69    python      port:python_select     python=${prefix}/bin/python
70    perl        path:bin/perl:perl5    perl5=${prefix}/bin/perl
71    gcj         port:gcc43             "gcj=${prefix}/bin/gcj-mp-4.3 --with-gcjh=${prefix}/bin/gcjh-mp-4.3"
72    guile       port:guile             guile
73    mzscheme    port:mzscheme          mzscheme
74    ruby        port:ruby              ruby
75    php5        path:bin/php:php5      php4
76    ocaml       port:ocaml             ocaml
77    pike        port:pike              pike
78    lua         port:lua               lua
79    chicken     port:chicken           chicken
80    allegro     port:allegro           allegrocl
81    clisp       port:clisp             clisp
82    r           port:R                 r
83    tcl         port:tcl               tcl
84    csharp      port:mono              csharp
85    octave      port:octave            octave
86}
87
88foreach {variant port arg} ${bindings} {
89    set arg_name    [lindex [split ${arg} =] 0]
90
91    configure.args-append   --without-${arg_name}
92
93    eval [subst {
94        variant ${variant} {
95            configure.args-delete   --without-${arg_name}
96            configure.args-append   --with-${arg}
97
98            depends_lib-append   ${port}
99
100            lappend languages       ${arg_name}
101        }
102    }]
103}
104
105livecheck.check     sourceforge
106livecheck.regex     <title>${name} ${name}-(.*) released.*</title>
Note: See TracBrowser for help on using the repository browser.