<!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>[140577] trunk/dports/lang</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/140577">140577</a></dd>
<dt>Author</dt> <dd>eborisch@macports.org</dd>
<dt>Date</dt> <dd>2015-09-23 19:38:52 -0700 (Wed, 23 Sep 2015)</dd>
</dl>

<h3>Log Message</h3>
<pre>llvm/clang-3.[78]: Update 3.7 to release; update 3.8 to latest SVN. Add +openmp variant (makes &quot;clang-mp-3.[78] -fopenmp ...&quot; work) to 3.7 and 3.8. See #48759.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportslangllvm37Portfile">trunk/dports/lang/llvm-3.7/Portfile</a></li>
<li><a href="#trunkdportslangllvm38Portfile">trunk/dports/lang/llvm-3.8/Portfile</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkdportslangllvm37filesopenmplocationspatch">trunk/dports/lang/llvm-3.7/files/openmp-locations.patch</a></li>
<li><a href="#trunkdportslangllvm38filesopenmplocationspatch">trunk/dports/lang/llvm-3.8/files/openmp-locations.patch</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportslangllvm37Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/lang/llvm-3.7/Portfile (140576 => 140577)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.7/Portfile        2015-09-24 01:18:36 UTC (rev 140576)
+++ trunk/dports/lang/llvm-3.7/Portfile        2015-09-24 02:38:52 UTC (rev 140577)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx"> PortSystem              1.0
</span><span class="cx"> PortGroup select        1.0
</span><span class="cx"> PortGroup compiler_blacklist_versions 1.0
</span><ins>+PortGroup active_variants 1.1
</ins><span class="cx"> 
</span><span class="cx"> set llvm_version        3.7
</span><span class="cx"> set llvm_version_no_dot 37
</span><span class="lines">@@ -62,26 +63,25 @@
</span><span class="cx">     default_variants    +analyzer
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-fetch.type              svn
-svn.revision            246024
</del><ins>+#fetch.type              svn
+#svn.revision            246024
</ins><span class="cx"> 
</span><del>-set compiler_rt_rev     ${svn.revision}
-set libcxx_rev          ${svn.revision}
-set clang-modernize_rev ${svn.revision}
-version                 ${llvm_version}-r${svn.revision}
</del><ins>+#set compiler_rt_rev     ${svn.revision}
+#set libcxx_rev          ${svn.revision}
+#set clang-modernize_rev ${svn.revision}
+#version                 ${llvm_version}-r${svn.revision}
</ins><span class="cx"> #worksrcdir              trunk
</span><span class="cx"> #svn.url                 https://llvm.org/svn/llvm-project/llvm/trunk
</span><del>-worksrcdir              release_${llvm_version_no_dot}
-svn.url                 https://llvm.org/svn/llvm-project/llvm/branches/release_${llvm_version_no_dot}
-default_variants-append +assertions
</del><ins>+#worksrcdir              release_${llvm_version_no_dot}
+#svn.url                 https://llvm.org/svn/llvm-project/llvm/branches/release_${llvm_version_no_dot}
+#default_variants-append +assertions
</ins><span class="cx"> 
</span><del>-#version                 ${llvm_version}.0
-#epoch                   1
-#master_sites            http://llvm.org/releases/${version}
-#use_xz                  yes
-#extract.suffix          .tar.xz
-#distfiles               llvm-${version}.src${extract.suffix}
-#worksrcdir              llvm-${version}.src
</del><ins>+version                 ${llvm_version}.0
+epoch                   1
+master_sites            http://llvm.org/releases/${version}
+use_xz                  yes
+distfiles               llvm-${version}.src${extract.suffix}
+worksrcdir              llvm-${version}.src
</ins><span class="cx"> 
</span><span class="cx"> if {${distfiles} ne &quot;&quot;} {
</span><span class="cx">     if {${subport} eq &quot;llvm-${llvm_version}&quot;} {
</span><span class="lines">@@ -93,6 +93,26 @@
</span><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+checksums \
+  llvm-3.7.0.src.tar.xz \
+    rmd160  1e47ce5e07df267a921c60e526673b2908ffb99b \
+    sha256  ab45895f9dcdad1e140a3a79fd709f64b05ad7364e308c0e582c5b02e9cc3153 \
+  cfe-3.7.0.src.tar.xz \
+    rmd160  b59a82dcc44d16f1152f5204584bbc47861d223e \
+    sha256  4ed740c5a91df1c90a4118c5154851d6a475f39a91346bdf268c1c29c13aa1cc \
+  compiler-rt-3.7.0.src.tar.xz \
+    rmd160  94cc920bce769e8b6234376ce8c517cdccd96e0c \
+    sha256  227fa998520bc94974a428dc8e7654d9bdf277e5bc70d4064ebc05691bd62b0b \
+  libcxx-3.7.0.src.tar.xz \
+    rmd160  d78a0948483ff593ab2c39dc5ca745b4d08e8620 \
+    sha256  c18f3c8333cd7e678c1424a57fe5e25efe740ca7caf62ac67152b4723f3ad08e \
+  clang-tools-extra-3.7.0.src.tar.xz \
+    rmd160  fda3871341bfbcfc28d8a368dd56ff8cf60b4987 \
+    sha256  8ae8a0a3a96b7a700412d67df0af172cb2fc1326beec575fcc0f71d2e72709cd \
+  polly-3.7.0.src.tar.xz \
+    rmd160  6c26e90141608c2c4e883faf36c74c35d3ee3d3e \
+    sha256  3e5f3f4dc141c7d25b36b910d48c7da74ecc92f10cea5b568c909623d6067edf
+
</ins><span class="cx"> patch.pre_args  -p1
</span><span class="cx"> patchfiles \
</span><span class="cx">         0001-Set-the-Mach-O-CPU-Subtype-to-ppc7400-when-targeting.patch \
</span><span class="lines">@@ -326,6 +346,14 @@
</span><span class="cx">         destroot.args-append  OVERRIDE_libdir=${sub_prefix}/lib
</span><span class="cx">     }
</span><span class="cx"> } elseif {${subport} eq &quot;clang-${llvm_version}&quot;} {
</span><ins>+    if {[variant_isset assertions]} {
+        # Need to match llvm +-assertions
+        require_active_variants port:llvm-${llvm_version} assertions
+    } else {
+        # Need to match llvm +-assertions
+        require_active_variants port:llvm-${llvm_version} {} assertions
+    }
+    
</ins><span class="cx">     variant analyzer description {Install clang static analyzer} {
</span><span class="cx">         depends_run-append port:perl5
</span><span class="cx"> 
</span><span class="lines">@@ -360,7 +388,18 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    variant openmp description {Use MacPorts' provided libomp with -fopenmp} {
+        configure.args-append \
+            --with-clang-default-openmp-runtime=libomp
+        depends_lib-append      port:libomp
+        patchfiles-append       openmp-locations.patch
</ins><span class="cx"> 
</span><ins>+        post-patch {
+            reinplace &quot;s|@@PREFIX@@|${prefix}|&quot; \
+                ${worksrcpath}/tools/clang/lib/Driver/Tools.cpp
+        }
+    }
+
</ins><span class="cx">     post-patch {
</span><span class="cx">         reinplace &quot;s|@CLANG_FORMAT_PATH@|${prefix}/bin/clang-format-${suffix}|g&quot; \
</span><span class="cx">             ${worksrcpath}/tools/clang/tools/clang-format/clang-format-bbedit.applescript \
</span></span></pre></div>
<a id="trunkdportslangllvm37filesopenmplocationspatch"></a>
<div class="addfile"><h4>Added: trunk/dports/lang/llvm-3.7/files/openmp-locations.patch (0 => 140577)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.7/files/openmp-locations.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.7/files/openmp-locations.patch        2015-09-24 02:38:52 UTC (rev 140577)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+--- orig/tools/clang/lib/Driver/Tools.cpp        2015-09-03 11:39:15.000000000 -0500
++++ fixed/tools/clang/lib/Driver/Tools.cpp        2015-09-03 11:44:09.000000000 -0500
+@@ -4064,6 +4064,8 @@
+     case OMPRT_OMP:
+     case OMPRT_IOMP5:
+       // Clang can generate useful OpenMP code for these two runtime libraries.
++      // Automatically find MacPorts' omp.h
++      CmdArgs.push_back(&quot;-I@@PREFIX@@/include/libomp&quot;);
+       CmdArgs.push_back(&quot;-fopenmp&quot;);

+       // If no option regarding the use of TLS in OpenMP codegeneration is
+@@ -6531,12 +6533,18 @@
+                    options::OPT_fno_openmp, false)) {
+     switch (getOpenMPRuntime(getToolChain(), Args)) {
+     case OMPRT_OMP:
++      // Automatically find MacPorts' libomp
++      CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+       CmdArgs.push_back(&quot;-lomp&quot;);
+       break;
+     case OMPRT_GOMP:
++      // Automatically find MacPorts' libgomp (libomp)
++      CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+       CmdArgs.push_back(&quot;-lgomp&quot;);
+       break;
+     case OMPRT_IOMP5:
++      // Automatically find MacPorts' libiomp5 (libomp)
++      CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+       CmdArgs.push_back(&quot;-liomp5&quot;);
+       break;
+     case OMPRT_Unknown:
+@@ -8248,9 +8256,13 @@
+         // Also link the particular OpenMP runtimes.
+         switch (getOpenMPRuntime(ToolChain, Args)) {
+         case OMPRT_OMP:
++          // Automatically find MacPorts' libomp
++          CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+           CmdArgs.push_back(&quot;-lomp&quot;);
+           break;
+         case OMPRT_GOMP:
++          // Automatically find MacPorts' libgomp (libomp)
++          CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+           CmdArgs.push_back(&quot;-lgomp&quot;);

+           // FIXME: Exclude this for platforms with libgomp that don't require
+@@ -8258,6 +8270,8 @@
+           CmdArgs.push_back(&quot;-lrt&quot;);
+           break;
+         case OMPRT_IOMP5:
++          // Automatically find MacPorts' libiomp5 (libomp)
++          CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+           CmdArgs.push_back(&quot;-liomp5&quot;);
+           break;
+         case OMPRT_Unknown:
</ins></span></pre></div>
<a id="trunkdportslangllvm38Portfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/lang/llvm-3.8/Portfile (140576 => 140577)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.8/Portfile        2015-09-24 01:18:36 UTC (rev 140576)
+++ trunk/dports/lang/llvm-3.8/Portfile        2015-09-24 02:38:52 UTC (rev 140577)
</span><span class="lines">@@ -3,6 +3,7 @@
</span><span class="cx"> PortSystem              1.0
</span><span class="cx"> PortGroup select        1.0
</span><span class="cx"> PortGroup compiler_blacklist_versions 1.0
</span><ins>+PortGroup active_variants 1.1
</ins><span class="cx"> 
</span><span class="cx"> set llvm_version        3.8
</span><span class="cx"> set llvm_version_no_dot 38
</span><span class="lines">@@ -326,6 +327,14 @@
</span><span class="cx">         destroot.args-append  OVERRIDE_libdir=${sub_prefix}/lib
</span><span class="cx">     }
</span><span class="cx"> } elseif {${subport} eq &quot;clang-${llvm_version}&quot;} {
</span><ins>+    if {[variant_isset assertions]} {
+        # Need to match llvm +-assertions
+        require_active_variants port:llvm-${llvm_version} assertions
+    } else {
+        # Need to match llvm +-assertions
+        require_active_variants port:llvm-${llvm_version} {} assertions
+    }
+
</ins><span class="cx">     variant analyzer description {Install clang static analyzer} {
</span><span class="cx">         depends_run-append port:perl5
</span><span class="cx"> 
</span><span class="lines">@@ -360,7 +369,18 @@
</span><span class="cx">         }
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    variant openmp description {Use MacPorts' provided libomp with -fopenmp} {
+        configure.args-append \
+            --with-clang-default-openmp-runtime=libomp
+        depends_lib-append      port:libomp
+        patchfiles-append       openmp-locations.patch
</ins><span class="cx"> 
</span><ins>+        post-patch {
+            reinplace &quot;s|@@PREFIX@@|${prefix}|&quot; \
+                ${worksrcpath}/tools/clang/lib/Driver/Tools.cpp
+        }
+    }
+
</ins><span class="cx">     post-patch {
</span><span class="cx">         reinplace &quot;s|@CLANG_FORMAT_PATH@|${prefix}/bin/clang-format-${suffix}|g&quot; \
</span><span class="cx">             ${worksrcpath}/tools/clang/tools/clang-format/clang-format-bbedit.applescript \
</span></span></pre></div>
<a id="trunkdportslangllvm38filesopenmplocationspatch"></a>
<div class="addfile"><h4>Added: trunk/dports/lang/llvm-3.8/files/openmp-locations.patch (0 => 140577)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/lang/llvm-3.8/files/openmp-locations.patch                                (rev 0)
+++ trunk/dports/lang/llvm-3.8/files/openmp-locations.patch        2015-09-24 02:38:52 UTC (rev 140577)
</span><span class="lines">@@ -0,0 +1,53 @@
</span><ins>+--- orig/tools/clang/lib/Driver/Tools.cpp        2015-09-03 11:39:15.000000000 -0500
++++ fixed/tools/clang/lib/Driver/Tools.cpp        2015-09-03 11:44:09.000000000 -0500
+@@ -4064,6 +4064,8 @@
+     case OMPRT_OMP:
+     case OMPRT_IOMP5:
+       // Clang can generate useful OpenMP code for these two runtime libraries.
++      // Automatically find MacPorts' omp.h
++      CmdArgs.push_back(&quot;-I@@PREFIX@@/include/libomp&quot;);
+       CmdArgs.push_back(&quot;-fopenmp&quot;);

+       // If no option regarding the use of TLS in OpenMP codegeneration is
+@@ -6531,12 +6533,18 @@
+                    options::OPT_fno_openmp, false)) {
+     switch (getOpenMPRuntime(getToolChain(), Args)) {
+     case OMPRT_OMP:
++      // Automatically find MacPorts' libomp
++      CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+       CmdArgs.push_back(&quot;-lomp&quot;);
+       break;
+     case OMPRT_GOMP:
++      // Automatically find MacPorts' libgomp (libomp)
++      CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+       CmdArgs.push_back(&quot;-lgomp&quot;);
+       break;
+     case OMPRT_IOMP5:
++      // Automatically find MacPorts' libiomp5 (libomp)
++      CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+       CmdArgs.push_back(&quot;-liomp5&quot;);
+       break;
+     case OMPRT_Unknown:
+@@ -8248,9 +8256,13 @@
+         // Also link the particular OpenMP runtimes.
+         switch (getOpenMPRuntime(ToolChain, Args)) {
+         case OMPRT_OMP:
++          // Automatically find MacPorts' libomp
++          CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+           CmdArgs.push_back(&quot;-lomp&quot;);
+           break;
+         case OMPRT_GOMP:
++          // Automatically find MacPorts' libgomp (libomp)
++          CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+           CmdArgs.push_back(&quot;-lgomp&quot;);

+           // FIXME: Exclude this for platforms with libgomp that don't require
+@@ -8258,6 +8270,8 @@
+           CmdArgs.push_back(&quot;-lrt&quot;);
+           break;
+         case OMPRT_IOMP5:
++          // Automatically find MacPorts' libiomp5 (libomp)
++          CmdArgs.push_back(&quot;-L@@PREFIX@@/lib/libomp&quot;);
+           CmdArgs.push_back(&quot;-liomp5&quot;);
+           break;
+         case OMPRT_Unknown:
</ins></span></pre>
</div>
</div>

</body>
</html>