<!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>[148216] trunk/dports/lang/dmd</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/148216">148216</a></dd>
<dt>Author</dt> <dd>mcalhoun@macports.org</dd>
<dt>Date</dt> <dd>2016-04-30 08:30:00 -0700 (Sat, 30 Apr 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>dmd: respect build_arch and allow universal build</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportslangdmdPortfile">trunk/dports/lang/dmd/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li>trunk/dports/lang/dmd/files/</li>
<li><a href="#trunkdportslangdmdfilesmakefile_macports_install">trunk/dports/lang/dmd/files/makefile_macports_install</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportslangdmdPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/lang/dmd/Portfile (148215 => 148216)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/dmd/Portfile        2016-04-30 15:22:28 UTC (rev 148215)
+++ trunk/dports/lang/dmd/Portfile        2016-04-30 15:30:00 UTC (rev 148216)
</span><span class="lines">@@ -3,12 +3,12 @@
</span><span class="cx"> 
</span><span class="cx"> PortSystem          1.0
</span><span class="cx"> PortGroup           github 1.0
</span><ins>+PortGroup           muniversal 1.0
</ins><span class="cx"> 
</span><span class="cx"> github.setup        D-Programming-Language dmd 2.069.2 v
</span><span class="cx"> revision            1
</span><span class="cx"> categories          lang
</span><span class="cx"> platforms           darwin
</span><del>-supported_archs     noarch
</del><span class="cx"> license             {GPL-1 Artistic-1} Boost-1 Restrictive
</span><span class="cx"> maintainers         takeshi openmaintainer
</span><span class="cx"> description         dmd Digital Mars D compiler
</span><span class="lines">@@ -28,14 +28,15 @@
</span><span class="cx"> 
</span><span class="cx"> use_configure       no
</span><span class="cx"> 
</span><del>-variant universal {}
-
</del><span class="cx"> depends_build-append          port:dmd-bootstrap
</span><span class="cx"> depends_skip_archcheck-append dmd-bootstrap
</span><span class="cx"> 
</span><del>-
</del><span class="cx"> build.dir           ${worksrcpath}/src
</span><span class="cx"> 
</span><ins>+post-extract {
+    xinstall -m 0644 ${filespath}/makefile_macports_install ${build.dir}
+}
+
</ins><span class="cx"> # Use CFLAGS in the posix.make; some source needs special flags.
</span><span class="cx"> # Command-line arguments wipe the CFLAGS in posix.mak and
</span><span class="cx"> # extra flags cannot be added with +=.
</span><span class="lines">@@ -43,32 +44,26 @@
</span><span class="cx"> build.args          -f posix.mak \
</span><span class="cx">                     HOST_CC=&quot;${configure.cxx}&quot; \
</span><span class="cx">                     LDFLAGS=&quot;${configure.ldflags} -framework CoreServices&quot; \
</span><del>-                    MODEL_FLAG=&quot;[get_canonical_archflags]&quot; \
</del><span class="cx">                     ENVP=&quot;MACOSX_DEPLOYMENT_TARGET=${macosx_deployment_target}&quot; \
</span><span class="cx">                     HOST_DMD=${prefix}/libexec/dmd-bootstrap/bin/dmd
</span><span class="cx"> 
</span><del>-destroot {
-# man
-    xinstall -m 644 -W ${worksrcpath}/docs/man/man1 \
-        dmd.1 dumpobj.1 obj2asm.1 \
-        ${destroot}${prefix}/share/man/man1
-    xinstall -m 644 ${worksrcpath}/docs/man/man5/dmd.conf.5 \
-        ${destroot}${prefix}/share/man/man5
-# bin
-    xinstall -m 755 -W ${destroot.dir} \
-        dmd \
-        ${destroot}${prefix}/bin
-# samples
-    xinstall -d -m 755 ${destroot}${prefix}/share/${name}/samples
-    eval xinstall -m 644 [glob ${worksrcpath}/samples/*.d] ${destroot}${prefix}/share/${name}/samples
-# conf
-    xinstall -d -m 755 ${destroot}${prefix}/etc/${name}
-    set conf [open ${destroot}${prefix}/etc/${name}/${name}.conf w]
-    puts $conf &quot;\[Environment\]
-DFLAGS=-I${prefix}/include/druntime/import -I${prefix}/include/phobos -L-L${prefix}/lib&quot;
-    close $conf
</del><ins>+if { ![variant_isset universal] } {
+    if { ${build_arch} eq &quot;x86_64&quot; || ${build_arch} eq &quot;ppc64&quot; } {
+        build.args-append MODEL=64
+    } else {
+        build.args-append MODEL=32
+    }
+} else {
+    lappend merger_build_args(x86_64) MODEL=64
+    lappend merger_build_args(i386)   MODEL=32
+    lappend merger_build_args(ppc64)  MODEL=64
+    lappend merger_build_args(ppc)    MODEL=32
</ins><span class="cx"> }
</span><span class="cx"> 
</span><ins>+destroot.args \
+    -f makefile_macports_install \
+    PREFIX=${prefix}
+
</ins><span class="cx"> notes {
</span><span class="cx">     In order to have a complete dmd runtime environment consider installing the following ports:
</span><span class="cx">     druntime phobos dmd-tools }
</span></span></pre></div>
<a id="trunkdportslangdmdfilesmakefile_macports_install"></a>
<div class="addfile"><h4>Added: trunk/dports/lang/dmd/files/makefile_macports_install (0 => 148216)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/dmd/files/makefile_macports_install                                (rev 0)
+++ trunk/dports/lang/dmd/files/makefile_macports_install        2016-04-30 15:30:00 UTC (rev 148216)
</span><span class="lines">@@ -0,0 +1,23 @@
</span><ins>+# -*- mode: makefile -*-
+
+INSTALL=/usr/bin/install
+
+install:
+# man
+        for f in dmd.1 dumpobj.1 obj2asm.1; do \
+                $(INSTALL) -m 644 ../docs/man/man1/$$f \
+                        $(DESTDIR)$(PREFIX)/share/man/man1; \
+        done
+        $(INSTALL) -m 644 ../docs/man/man5/dmd.conf.5 \
+                $(DESTDIR)$(PREFIX)/share/man/man5
+# bin
+        for f in dmd; do \
+                $(INSTALL) -m 755 $$f $(DESTDIR)$(PREFIX)/bin; \
+        done
+# samples
+        $(INSTALL) -d -m 755 $(DESTDIR)$(PREFIX)/share/dmd/samples
+        $(INSTALL) -m 644 ../samples/*.d $(DESTDIR)$(PREFIX)/share/dmd/samples
+# conf
+        $(INSTALL) -d -m 755 $(DESTDIR)$(PREFIX)/etc/dmd
+        echo &quot;[Environment]&quot; &gt;&gt; $(DESTDIR)$(PREFIX)/etc/dmd/dmd.conf
+        echo &quot;DFLAGS=-I$(PREFIX)/include/druntime/import -I$(PREFIX)/include/phobos -L-L$(PREFIX)/lib&quot;  &gt;&gt; $(DESTDIR)$(PREFIX)/etc/dmd/dmd.conf
</ins></span></pre>
</div>
</div>

</body>
</html>