Ticket #37097: Portfile

File Portfile, 2.5 KB (added by dallas.johnston@…, 11 years ago)

Modified Portfile to implement this. Tested to build without error.

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            2
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
29patchfiles          patch-make.include.diff
30
31build.target        dsdpapi
32build.env-append    DSDPROOT=${worksrcpath}
33
34variant atlas description {Link against ATLAS instead of Apple's Accelerator Framework} {
35        depends_lib         port:atlas
36}
37
38variant octave description {Build DSDP with octave interface} {
39    build.target            all
40    depends_lib-append      path:bin/octave:octave
41}
42
43post-patch {   
44    reinplace "s|@@MP_CC@@|${configure.cc}|g" \
45        ${worksrcpath}/make.include
46    reinplace "s|@@MP_ARCHFLAGS@@|${configure.cc_archflags}|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>