Ticket #42016: Portfile

File Portfile, 2.5 KB (added by jwhowse4, 11 years ago)

portfile which worked

Line 
1# $Id: Portfile 113965 2013-11-26 20:23:14Z macsforever2000@macports.org $
2
3PortSystem          1.0
4
5name                DSDP
6version             5.8
7revision            2
8maintainers         nomaintainer
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    reinplace "s|@@PREFIX@@|${prefix}|g" \
47        ${worksrcpath}/make.include
48}
49destroot {
50    xinstall ${worksrcpath}/lib/libdsdp.a ${destroot}${prefix}/lib
51    eval xinstall [glob ${worksrcpath}/include/*] ${destroot}${prefix}/include
52    xinstall ${worksrcpath}/bin/dsdp5 ${destroot}${prefix}/bin
53    xinstall ${worksrcpath}/bin/maxcut ${destroot}${prefix}/bin
54    xinstall ${worksrcpath}/bin/theta ${destroot}${prefix}/bin
55   
56    if {[variant_isset octave]} {
57        if {[catch {set msite [exec ${prefix}/bin/octave-config --m-site-dir]}]} {
58            set msite ${prefix}/share/dsdp/matlab
59        }
60        set msite ${msite}/dsdp
61        xinstall -d ${destroot}${msite}
62        eval file copy [glob ${worksrcpath}/matlab/*] ${destroot}${msite}
63    }
64}
65
66livecheck.type      regex
67livecheck.url       ${master_sites}
68livecheck.regex     <a href=\"${name}(.*).tar.gz\">.tar.gz</a>