<!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>[117034] trunk/dports/devel/tbb</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/117034">117034</a></dd>
<dt>Author</dt> <dd>ryandesign@macports.org</dd>
<dt>Date</dt> <dd>2014-02-13 07:53:29 -0800 (Thu, 13 Feb 2014)</dd>
</dl>

<h3>Log Message</h3>
<pre>tbb:

 * update to 4.2-20140122
 * remove update_ver variable unneeded since <a href="https://trac.macports.org/changeset/100635">r100635</a>
 * simplify version number handling
 * use the correct inc file based on compiler family
 * ensure once again we're UsingTheRightCompiler (no longer recognized as build args; patch the inc file instead)
 * license GPL-2</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkdportsdeveltbbPortfile">trunk/dports/devel/tbb/Portfile</a></li>
<li><a href="#trunkdportsdeveltbbfilespatchbuildmacosincdiff">trunk/dports/devel/tbb/files/patch-build-macos.inc.diff</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkdportsdeveltbbPortfile"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/tbb/Portfile (117033 => 117034)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/tbb/Portfile        2014-02-13 15:49:07 UTC (rev 117033)
+++ trunk/dports/devel/tbb/Portfile        2014-02-13 15:53:29 UTC (rev 117034)
</span><span class="lines">@@ -4,86 +4,96 @@
</span><span class="cx"> PortSystem          1.0
</span><span class="cx"> 
</span><span class="cx"> name                tbb
</span><del>-set rel_date        20130725
-set vers            4.2
-set update_ver      0
-version             ${vers}-${rel_date}
-revision            0
</del><ins>+version             4.2-20140122
+categories          devel
+platforms           darwin
</ins><span class="cx"> maintainers         nomaintainer
</span><ins>+license             GPL-2
</ins><span class="cx"> 
</span><del>-categories          devel
</del><span class="cx"> description         Intel Threading Building Blocks offers a rich and complete approach to parallelism in C++
</span><ins>+
</ins><span class="cx"> long_description    ${description} \
</span><span class="cx">                     It represents a higher-level, task-based parallelism that abstracts \
</span><span class="cx">                     platform details and threading mechanisms for scalability and performance
</span><del>-platforms           darwin
-license             GPL
</del><span class="cx"> 
</span><span class="cx"> homepage            http://threadingbuildingblocks.org/
</span><span class="cx"> master_sites        ${homepage}sites/default/files/software_releases/source/
</span><span class="cx"> 
</span><del>-worksrcdir          ${name}42_${rel_date}oss
</del><ins>+livecheck.version   [strsed [strsed ${version} {g/-/_/}] {g/\.//}]
+
+worksrcdir          ${name}${livecheck.version}oss
</ins><span class="cx"> distname            ${worksrcdir}_src
</span><span class="cx"> extract.suffix      .tgz
</span><span class="cx"> 
</span><del>-checksums           rmd160  baf0e101f5702165616eded00c89ae4dfce1e1b2 \
-                    sha256  f436c1cab797dccf6e2b2997dec2c9761b5bc86afcdbb8b8368967e40b73293d
</del><ins>+checksums           rmd160  20c8df2e84fb1a77fc939c6f33678b6dfe86108a \
+                    sha256  f1bd8d983f93a10e340ba63f3a479632ddca1562a5242814dd82a378d3233b75
</ins><span class="cx"> 
</span><del>-patchfiles          patch-build-macos.inc.diff
-
</del><span class="cx"> use_configure       no
</span><del>-build.target        tbb tbbmalloc tbbproxy
</del><span class="cx"> 
</span><span class="cx"> switch ${build_arch} {
</span><span class="cx">     i386 {
</span><del>-        set arch_flag ia32
</del><ins>+        set tbb_arch ia32
</ins><span class="cx">     }
</span><span class="cx">     x86_64 {
</span><del>-        set arch_flag intel64
</del><ins>+        set tbb_arch intel64
</ins><span class="cx">     }
</span><span class="cx">     ppc {
</span><del>-        set arch_flag ppc32
</del><ins>+        set tbb_arch ppc32
</ins><span class="cx">     }
</span><span class="cx">     default {
</span><del>-        set arch_flag ${build_arch}
</del><ins>+        set tbb_arch ${build_arch}
</ins><span class="cx">     }
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-set compilers       &quot;CONLY=${configure.cc} CPLUS=${configure.cxx}&quot;
-build.args-append   ${compilers}
-build.env-append    arch=${arch_flag}
-test.env-append     arch=${arch_flag}
</del><ins>+if {[string match *clang* ${configure.compiler}]} {
+    set tbb_compiler clang
+} else {
+    set tbb_compiler gcc
+}
</ins><span class="cx"> 
</span><ins>+set tbb_build_prefix macports
+
+patchfiles          patch-build-macos.inc.diff
+
+post-patch {
+    reinplace &quot;s|@CC@|${configure.cc}|g&quot; ${worksrcpath}/build/macos.inc
+    reinplace &quot;/^CONLY *=/s|=.*$|= ${configure.cc}|g&quot; ${worksrcpath}/build/macos.${tbb_compiler}.inc
+    reinplace &quot;/^CPLUS *=/s|=.*$|= ${configure.cxx}|g&quot; ${worksrcpath}/build/macos.${tbb_compiler}.inc
+}
+
+build.target        tbb tbbmalloc tbbproxy
+build.args-append   arch=${tbb_arch} \
+                    compiler=${tbb_compiler} \
+                    tbb_build_prefix=${tbb_build_prefix} \
+                    use_proxy=1
+
+test.run            yes
+test.target         test
+test.args-append    ${build.args}
+
+destroot.dir        ${worksrcpath}/build/${tbb_build_prefix}_release
</ins><span class="cx"> destroot {
</span><del>-    set build_dir [exec sh -c &quot;cd ${worksrcpath} &amp;&amp; ${build.env} make info ${compilers} | grep build_prefix | cut -f2 -d'='&quot;]
-    set build_dir &quot;${worksrcpath}/build/${build_dir}_release&quot;
-
</del><span class="cx">     # fix paths
</span><span class="cx">     reinplace &quot;s|\\(TBBROOT.\\)\&quot;.*\&quot;|\\1\&quot;${prefix}\&quot;|g&quot; \
</span><del>-        ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh
</del><ins>+        ${destroot.dir}/tbbvars.sh ${destroot.dir}/tbbvars.csh
</ins><span class="cx">     reinplace &quot;s|\\(tbb_bin.\\)\&quot;.*\&quot;|\\1\&quot;${prefix}/lib\&quot;|g&quot; \
</span><del>-        ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh
</del><ins>+        ${destroot.dir}/tbbvars.sh ${destroot.dir}/tbbvars.csh
</ins><span class="cx"> 
</span><span class="cx">     # copy lib, include &amp; bin
</span><del>-    eval file copy [glob ${build_dir}/lib*.dylib] ${destroot}${prefix}/lib
-    eval file copy [glob ${build_dir}/tbbvars.*sh] ${destroot}${prefix}/bin
-    file copy ${worksrcpath}/include/tbb ${destroot}${prefix}/include/tbb
</del><ins>+    eval copy [glob ${destroot.dir}/lib*.dylib] ${destroot}${prefix}/lib
+    eval copy [glob ${destroot.dir}/tbbvars.*sh] ${destroot}${prefix}/bin
+    copy ${worksrcpath}/include/tbb ${destroot}${prefix}/include/tbb
</ins><span class="cx"> 
</span><span class="cx">     # fix install_name paths
</span><span class="cx">     system &quot;install_name_tool -id ${prefix}/lib/libtbb.dylib ${destroot}${prefix}/lib/libtbb.dylib&quot;
</span><span class="cx">     system &quot;install_name_tool -id ${prefix}/lib/libtbbmalloc.dylib ${destroot}${prefix}/lib/libtbbmalloc.dylib&quot;
</span><span class="cx"> 
</span><span class="cx">     # copy examples &amp; docs
</span><del>-    file mkdir ${destroot}${prefix}/share/${name}
-    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/doc
-    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/examples
</del><ins>+    xinstall -d ${destroot}${prefix}/share/${name}
+    copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/doc
+    copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/examples
</ins><span class="cx"> }
</span><span class="cx"> 
</span><del>-test.run            yes
-test.cmd            make
-test.target         test
-
</del><span class="cx"> livecheck.type      regex
</span><span class="cx"> livecheck.url       ${homepage}download
</span><del>-livecheck.version   [join [split [lrange [split ${version} -] 0 0] .] &quot;&quot;]_${rel_date}
</del><span class="cx"> livecheck.regex     ${name}(\[\\d_\]+)oss_src${extract.suffix}
</span></span></pre></div>
<a id="trunkdportsdeveltbbfilespatchbuildmacosincdiff"></a>
<div class="modfile"><h4>Modified: trunk/dports/devel/tbb/files/patch-build-macos.inc.diff (117033 => 117034)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/dports/devel/tbb/files/patch-build-macos.inc.diff        2014-02-13 15:49:07 UTC (rev 117033)
+++ trunk/dports/devel/tbb/files/patch-build-macos.inc.diff        2014-02-13 15:53:29 UTC (rev 117034)
</span><span class="lines">@@ -1,11 +1,11 @@
</span><del>---- build/macos.inc.orig        2012-06-09 16:15:03.000000000 +0400
-+++ build/macos.inc        2012-06-09 16:15:53.000000000 +0400
-@@ -56,7 +56,7 @@
</del><ins>+--- build/macos.inc.orig        2014-02-11 07:29:22.000000000 -0600
++++ build/macos.inc        2014-02-13 09:51:50.000000000 -0600
+@@ -69,7 +69,7 @@
</ins><span class="cx">  endif
</span><span class="cx">  
</span><span class="cx">  ifndef runtime
</span><span class="cx"> - gcc_version = $(shell gcc -dumpversion)
</span><del>-+ gcc_version = $(shell $(CONLY) -dumpversion)
</del><ins>++ gcc_version = $(shell @CC@ -dumpversion)
</ins><span class="cx">   os_version:=$(shell /usr/bin/sw_vers -productVersion)
</span><span class="cx">   export runtime:=cc$(gcc_version)_os$(os_version)
</span><span class="cx">  endif
</span></span></pre>
</div>
</div>

</body>
</html>