Ticket #39152: Portfile

File Portfile, 2.4 KB (added by leonardo.martins@…, 11 years ago)

Portfile with updated revision.

Line 
1# $Id: Portfile 81075 2011-07-24 22:43:51Z ryandesign@macports.org $
2
3PortSystem          1.0
4
5name                DSDP
6version             5.8
7revision            3
8maintainers         mnick
9
10categories          math science
11description         DSDP is a open source implementation of an interior-point method for semidefinite programming
12long_description    DSDP provides primal and dual solutions, exploits low-rank structure \
13                    and sparsity in the data, and has relatively low memory requirements for an \
14                    interior-point method. The dual-scaling algorithm implemented in this package has \
15                    a convergence proof and worst-case polynomial complexity under mild assumptions on the data
16platforms           darwin
17
18homepage            http://www.mcs.anl.gov/hs/software/DSDP/
19master_sites        ${homepage}
20
21distname            ${name}${version}
22
23use_zip             yes
24use_configure       no
25checksums           md5     f61d3759cc8c6de688ab5c30877ca83c \
26                    sha1    8327a6fe2de902d97c3b4cf63668f2731c84b80d \
27                    rmd160  75cf8629445522a4f9bbfffdcec25e832c8ffc4e
28
29depends_lib         port:atlas
30
31patchfiles          patch-make.include.diff
32
33build.target        dsdpapi
34build.env-append    DSDPROOT=${worksrcpath}
35
36variant octave description {Build DSDP with octave interface} {
37    build.target            all
38    depends_lib-append      path:bin/octave:octave
39}
40
41post-patch {   
42    reinplace "s|@@MP_CC@@|${configure.cc}|g" \
43        ${worksrcpath}/make.include
44    reinplace "s|@@MP_ARCHFLAGS@@|${configure.cc_archflags}|g" \
45        ${worksrcpath}/make.include
46}
47destroot {
48    xinstall ${worksrcpath}/lib/libdsdp.a ${destroot}${prefix}/lib
49    eval xinstall [glob ${worksrcpath}/include/*] ${destroot}${prefix}/include
50    xinstall ${worksrcpath}/bin/dsdp5 ${destroot}${prefix}/bin
51    xinstall ${worksrcpath}/bin/maxcut ${destroot}${prefix}/bin
52    xinstall ${worksrcpath}/bin/theta ${destroot}${prefix}/bin
53   
54    if {[variant_isset octave]} {
55        if {[catch {set msite [exec ${prefix}/bin/octave-config --m-site-dir]}]} {
56            set msite ${prefix}/share/dsdp/matlab
57        }
58        set msite ${msite}/dsdp
59        xinstall -d ${destroot}${msite}
60        eval file copy [glob ${worksrcpath}/matlab/*] ${destroot}${msite}
61    }
62}
63
64livecheck.type      regex
65livecheck.url       ${master_sites}
66livecheck.regex     <a href=\"${name}(.*).tar.gz\">.tar.gz</a>