<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[144719] trunk/dports/math/DSDP</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="https://trac.macports.org/changeset/144719">144719</a></dd>
<dt>Author</dt> <dd>mcalhoun@macports.org</dd>
<dt>Date</dt> <dd>2016-01-15 19:41:22 -0800 (Fri, 15 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>DSDP: allow universal build</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsmathDSDPPortfile">trunk/dports/math/DSDP/Portfile</a></li>
<li><a href="#trunkdportsmathDSDPfilespatchmakeincludediff">trunk/dports/math/DSDP/files/patch-make.include.diff</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsmathDSDPPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/math/DSDP/Portfile (144718 => 144719)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/math/DSDP/Portfile        2016-01-16 03:39:31 UTC (rev 144718)
+++ trunk/dports/math/DSDP/Portfile        2016-01-16 03:41:22 UTC (rev 144719)
</span><span class="lines">@@ -2,6 +2,7 @@
</span><span class="cx"> # $Id$
</span><span class="cx">
</span><span class="cx"> PortSystem 1.0
</span><ins>+PortGroup muniversal 1.0
</ins><span class="cx">
</span><span class="cx"> name DSDP
</span><span class="cx"> version 5.8
</span><span class="lines">@@ -32,7 +33,17 @@
</span><span class="cx"> use_configure no
</span><span class="cx">
</span><span class="cx"> build.target dsdpapi
</span><del>-build.env-append DSDPROOT=${worksrcpath}
</del><ins>+if { ![variant_isset universal] } {
+ build.env-append \
+ DSDPROOT=${worksrcpath} \
+ MP_ARCHFLAGS="${configure.cc_archflags}"
+} else {
+ foreach arch ${configure.universal_archs} {
+ lappend merger_build_env(${arch}) \
+ DSDPROOT=${worksrcpath}-${arch} \
+ MP_ARCHFLAGS='-arch ${arch}'
+ }
+}
</ins><span class="cx">
</span><span class="cx"> variant atlas description {Use ATLAS as BLAS, LAPACK library} {
</span><span class="cx"> depends_lib-append port:atlas
</span><span class="lines">@@ -46,30 +57,35 @@
</span><span class="cx"> post-patch {
</span><span class="cx"> reinplace "s|@@MP_CC@@|${configure.cc}|g" \
</span><span class="cx"> ${worksrcpath}/make.include
</span><del>- reinplace "s|@@MP_ARCHFLAGS@@|${configure.cc_archflags}|g" \
- ${worksrcpath}/make.include
</del><span class="cx"> if {[variant_isset atlas]} {
</span><del>- reinplace "s|-Wl,-framework -Wl,Accelerate -lm|-ltatlas -lm|g" \
</del><ins>+ reinplace "s|@@MP_LAPACKBLAS@@|-ltatlas -lm|g" \
</ins><span class="cx"> ${worksrcpath}/make.include
</span><ins>+ } else {
+ reinplace "s|@@MP_LAPACKBLAS@@|-Wl,-framework -Wl,Accelerate|g" \
+ ${worksrcpath}/make.include
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>-destroot {
- xinstall ${worksrcpath}/lib/libdsdp.a ${destroot}${prefix}/lib
- eval xinstall [glob ${worksrcpath}/include/*] ${destroot}${prefix}/include
- xinstall ${worksrcpath}/bin/dsdp5 ${destroot}${prefix}/bin
- xinstall ${worksrcpath}/bin/maxcut ${destroot}${prefix}/bin
- xinstall ${worksrcpath}/bin/theta ${destroot}${prefix}/bin
-
</del><ins>+# muniversal build requires Makefile
+post-extract {
+ set makefile [open ${worksrcpath}/Makefile-Install "w"]
+ puts ${makefile} "MSITE:=\$(shell ${prefix}/bin/octave-config --m-site-dir)/dsdp"
+ puts ${makefile} {install:}
+ puts ${makefile} "\t/usr/bin/install -m 0644 include/* \$(DESTDIR)${prefix}/include/"
+ foreach bin "dsdp5 maxcut theta" {
+ puts ${makefile} "\t/usr/bin/install -m 0755 bin/${bin} \$(DESTDIR)${prefix}/bin/"
+ }
</ins><span class="cx"> if {[variant_isset octave]} {
</span><del>- if {[catch {set msite [exec ${prefix}/bin/octave-config --m-site-dir]}]} {
- set msite ${prefix}/share/dsdp/matlab
- }
- set msite ${msite}/dsdp
- xinstall -d ${destroot}${msite}
- eval file copy [glob ${worksrcpath}/matlab/*] ${destroot}${msite}
</del><ins>+ puts ${makefile} "\t/usr/bin/install -d -m 0755 \$(DESTDIR)\$(MSITE)"
+ puts ${makefile} "\t/usr/bin/install -m 0644 matlab/Contents \$(DESTDIR)\$(MSITE)"
+ puts ${makefile} "\t/usr/bin/install -m 0644 matlab/*.m \$(DESTDIR)\$(MSITE)"
+ puts ${makefile} "\t/usr/bin/install -m 0644 matlab/*.dat-s \$(DESTDIR)\$(MSITE)"
+ puts ${makefile} "\t/usr/bin/install -m 0644 matlab/*.out \$(DESTDIR)\$(MSITE)"
+ puts ${makefile} "\t/usr/bin/install -m 0755 matlab/*.mex \$(DESTDIR)\$(MSITE)"
</ins><span class="cx"> }
</span><ins>+ close ${makefile}
</ins><span class="cx"> }
</span><ins>+destroot.args-append -f Makefile-Install
</ins><span class="cx">
</span><span class="cx"> livecheck.type regex
</span><span class="cx"> livecheck.url ${master_sites}
</span></span></pre></div>
<a id="trunkdportsmathDSDPfilespatchmakeincludediff"></a>
<div class="modfile"><h4>Modified: trunk/dports/math/DSDP/files/patch-make.include.diff (144718 => 144719)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/math/DSDP/files/patch-make.include.diff        2016-01-16 03:39:31 UTC (rev 144718)
+++ trunk/dports/math/DSDP/files/patch-make.include.diff        2016-01-16 03:41:22 UTC (rev 144719)
</span><span class="lines">@@ -24,8 +24,8 @@
</span><span class="cx"> # STEP 4. Set Linker and FLAGS: Link the DSDP library to application
</span><span class="cx"> -CFLAGS = ${OPTFLAGS} -I. -I${DSDPROOT}/include ${DSDPCFLAGS}
</span><span class="cx"> -CLINKER        = ${CC} ${OPTFLAGS}
</span><del>-+CFLAGS = ${OPTFLAGS} @@MP_ARCHFLAGS@@ -I. -I${DSDPROOT}/include ${DSDPCFLAGS}
-+CLINKER        = ${CC} ${OPTFLAGS} @@MP_ARCHFLAGS@@
</del><ins>++CFLAGS = ${OPTFLAGS} ${MP_ARCHFLAGS} -I. -I${DSDPROOT}/include ${DSDPCFLAGS}
++CLINKER        = ${CC} ${OPTFLAGS} ${MP_ARCHFLAGS}
</ins><span class="cx"> #CLINKER        = ${CXX} ${OPTFLAGS} -static
</span><span class="cx"> #CLINKER        = link /out:dsdp5.exe
</span><span class="cx">
</span><span class="lines">@@ -34,7 +34,7 @@
</span><span class="cx"> # Needed to link DSDP library to the driver ( read SDPA files, maxcut example, ...)
</span><span class="cx"> # Also include the math library and other libraries needed to link the BLAS to the C files that call them.
</span><span class="cx"> -LAPACKBLAS = -llapack -lblas -lg2c -lm
</span><del>-+LAPACKBLAS = -ltatlas -lm
</del><ins>++LAPACKBLAS = @@MP_LAPACKBLAS@@
</ins><span class="cx"> #LAPACKBLAS = -L/usr/lib/ -llapack -lblas -lg2c -lm
</span><span class="cx"> #LAPACKBLAS = -L/home/benson/ATLAS/Linux_P4SSE2/lib -llapack -lcblas -lf77blas -latlas -lg2c -lm
</span><span class="cx"> #LAPACKBLAS = -L/sandbox/benson/ATLAS-3.6/lib/Linux_P4SSE2 -llapack -lcblas -lf77blas -latlas -lg2c -lm
</span><span class="lines">@@ -43,7 +43,7 @@
</span><span class="cx">
</span><span class="cx"> # STEP 6, MATLAB MACROS - If compiling Matlab interface, check MEX flag.
</span><span class="cx"> -MEX = mex -O
</span><del>-+MEX = mkoctfile --mex
</del><ins>++MEX = /usr/bin/arch ${MP_ARCHFLAGS} mkoctfile --mex `mkoctfile -p BLAS_LIBS` -v
</ins><span class="cx"> #MEX = C:\Matlab\bin\mex
</span><span class="cx"> DSDPMATLABDIR = ${DSDPROOT}/matlab
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>