source: trunk/dports/math/DSDP/Portfile

Last change on this file was 145715, checked in by devans@…, 18 months ago

DSDP: install library as well, required by py-cvxopt, add license, increment revision.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
2# $Id: Portfile 145715 2016-02-14 19:28:29Z ryandesign@macports.org $
3
4PortSystem          1.0
5PortGroup           muniversal 1.0
6
7name                DSDP
8version             5.8
9revision            3
10categories          math science
11platforms           darwin
12maintainers         nomaintainer
13license             Permissive
14
15description         DSDP is a open source implementation of an interior-point method for semidefinite programming
16
17long_description    DSDP provides primal and dual solutions, exploits low-rank structure \
18                    and sparsity in the data, and has relatively low memory requirements for an \
19                    interior-point method. The dual-scaling algorithm implemented in this package has \
20                    a convergence proof and worst-case polynomial complexity under mild assumptions on the data
21
22homepage            http://www.mcs.anl.gov/hs/software/DSDP/
23master_sites        ${homepage}
24
25distname            ${name}${version}
26use_zip             yes
27
28checksums           rmd160  75cf8629445522a4f9bbfffdcec25e832c8ffc4e \
29                    sha256  8915e55456f1a7cc5c970ad157d094a5fb399737cf192dfe79b89c2d94d97a8a
30
31patchfiles          patch-make.include.diff \
32                    patch-src-sys-dsdploginfo.c.diff
33
34use_configure       no
35
36build.target        dsdpapi
37if { ![variant_isset universal] } {
38    build.env-append                              \
39        DSDPROOT=${worksrcpath}                   \
40        MP_ARCHFLAGS="${configure.cc_archflags}"
41} else {
42    foreach arch ${configure.universal_archs} {
43        lappend merger_build_env(${arch})    \
44            DSDPROOT=${worksrcpath}-${arch}  \
45            MP_ARCHFLAGS='-arch ${arch}'
46    }
47}
48
49variant atlas description {Use ATLAS as BLAS, LAPACK library} {
50    depends_lib-append      port:atlas
51}
52
53variant octave description {Build DSDP with octave interface} {
54    build.target            all
55    depends_lib-append      path:bin/octave:octave
56}
57
58post-patch {
59    reinplace "s|@@MP_CC@@|${configure.cc}|g" \
60        ${worksrcpath}/make.include
61    if {[variant_isset atlas]} {
62        reinplace "s|@@MP_LAPACKBLAS@@|-ltatlas -lm|g" \
63            ${worksrcpath}/make.include
64    } else {
65        reinplace "s|@@MP_LAPACKBLAS@@|-Wl,-framework -Wl,Accelerate|g" \
66            ${worksrcpath}/make.include
67    }
68}
69
70# muniversal build requires Makefile
71post-extract {
72    set makefile [open ${worksrcpath}/Makefile-Install "w"]
73    puts ${makefile} "MSITE:=\$(shell ${prefix}/bin/octave-config --m-site-dir)/dsdp"
74    puts ${makefile} {install:}
75    puts ${makefile} "\t/usr/bin/install -m 0644 include/* \$(DESTDIR)${prefix}/include/"
76    puts ${makefile} "\t/usr/bin/install -m 0644 lib/* \$(DESTDIR)${prefix}/lib/"
77    foreach bin "dsdp5 maxcut theta" {
78        puts ${makefile} "\t/usr/bin/install -m 0755 bin/${bin} \$(DESTDIR)${prefix}/bin/"
79    }
80    if {[variant_isset octave]} {
81        puts ${makefile} "\t/usr/bin/install -d -m 0755 \$(DESTDIR)\$(MSITE)"
82        puts ${makefile} "\t/usr/bin/install -m 0644 matlab/Contents \$(DESTDIR)\$(MSITE)"
83        puts ${makefile} "\t/usr/bin/install -m 0644 matlab/*.m \$(DESTDIR)\$(MSITE)"
84        puts ${makefile} "\t/usr/bin/install -m 0644 matlab/*.dat-s \$(DESTDIR)\$(MSITE)"
85        puts ${makefile} "\t/usr/bin/install -m 0644 matlab/*.out \$(DESTDIR)\$(MSITE)"
86        puts ${makefile} "\t/usr/bin/install -m 0755 matlab/*.mex \$(DESTDIR)\$(MSITE)"
87    }
88    close ${makefile}
89}
90destroot.args-append -f Makefile-Install
91
92livecheck.type      regex
93livecheck.url       ${master_sites}
94livecheck.regex     <a href=\"${name}(.*).tar.gz\">.tar.gz</a>
Note: See TracBrowser for help on using the repository browser.