[117034] trunk/dports/devel/tbb
ryandesign at macports.org
ryandesign at macports.org
Thu Feb 13 07:53:29 PST 2014
Revision: 117034
https://trac.macports.org/changeset/117034
Author: ryandesign at macports.org
Date: 2014-02-13 07:53:29 -0800 (Thu, 13 Feb 2014)
Log Message:
-----------
tbb:
* update to 4.2-20140122
* remove update_ver variable unneeded since r100635
* 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
Revision Links:
--------------
https://trac.macports.org/changeset/100635
Modified Paths:
--------------
trunk/dports/devel/tbb/Portfile
trunk/dports/devel/tbb/files/patch-build-macos.inc.diff
Modified: trunk/dports/devel/tbb/Portfile
===================================================================
--- 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)
@@ -4,86 +4,96 @@
PortSystem 1.0
name tbb
-set rel_date 20130725
-set vers 4.2
-set update_ver 0
-version ${vers}-${rel_date}
-revision 0
+version 4.2-20140122
+categories devel
+platforms darwin
maintainers nomaintainer
+license GPL-2
-categories devel
description Intel Threading Building Blocks offers a rich and complete approach to parallelism in C++
+
long_description ${description} \
It represents a higher-level, task-based parallelism that abstracts \
platform details and threading mechanisms for scalability and performance
-platforms darwin
-license GPL
homepage http://threadingbuildingblocks.org/
master_sites ${homepage}sites/default/files/software_releases/source/
-worksrcdir ${name}42_${rel_date}oss
+livecheck.version [strsed [strsed ${version} {g/-/_/}] {g/\.//}]
+
+worksrcdir ${name}${livecheck.version}oss
distname ${worksrcdir}_src
extract.suffix .tgz
-checksums rmd160 baf0e101f5702165616eded00c89ae4dfce1e1b2 \
- sha256 f436c1cab797dccf6e2b2997dec2c9761b5bc86afcdbb8b8368967e40b73293d
+checksums rmd160 20c8df2e84fb1a77fc939c6f33678b6dfe86108a \
+ sha256 f1bd8d983f93a10e340ba63f3a479632ddca1562a5242814dd82a378d3233b75
-patchfiles patch-build-macos.inc.diff
-
use_configure no
-build.target tbb tbbmalloc tbbproxy
switch ${build_arch} {
i386 {
- set arch_flag ia32
+ set tbb_arch ia32
}
x86_64 {
- set arch_flag intel64
+ set tbb_arch intel64
}
ppc {
- set arch_flag ppc32
+ set tbb_arch ppc32
}
default {
- set arch_flag ${build_arch}
+ set tbb_arch ${build_arch}
}
}
-set compilers "CONLY=${configure.cc} CPLUS=${configure.cxx}"
-build.args-append ${compilers}
-build.env-append arch=${arch_flag}
-test.env-append arch=${arch_flag}
+if {[string match *clang* ${configure.compiler}]} {
+ set tbb_compiler clang
+} else {
+ set tbb_compiler gcc
+}
+set tbb_build_prefix macports
+
+patchfiles patch-build-macos.inc.diff
+
+post-patch {
+ reinplace "s|@CC@|${configure.cc}|g" ${worksrcpath}/build/macos.inc
+ reinplace "/^CONLY *=/s|=.*$|= ${configure.cc}|g" ${worksrcpath}/build/macos.${tbb_compiler}.inc
+ reinplace "/^CPLUS *=/s|=.*$|= ${configure.cxx}|g" ${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
destroot {
- set build_dir [exec sh -c "cd ${worksrcpath} && ${build.env} make info ${compilers} | grep build_prefix | cut -f2 -d'='"]
- set build_dir "${worksrcpath}/build/${build_dir}_release"
-
# fix paths
reinplace "s|\\(TBBROOT.\\)\".*\"|\\1\"${prefix}\"|g" \
- ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh
+ ${destroot.dir}/tbbvars.sh ${destroot.dir}/tbbvars.csh
reinplace "s|\\(tbb_bin.\\)\".*\"|\\1\"${prefix}/lib\"|g" \
- ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh
+ ${destroot.dir}/tbbvars.sh ${destroot.dir}/tbbvars.csh
# copy lib, include & bin
- 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
+ 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
# fix install_name paths
system "install_name_tool -id ${prefix}/lib/libtbb.dylib ${destroot}${prefix}/lib/libtbb.dylib"
system "install_name_tool -id ${prefix}/lib/libtbbmalloc.dylib ${destroot}${prefix}/lib/libtbbmalloc.dylib"
# copy examples & docs
- file mkdir ${destroot}${prefix}/share/${name}
- file copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/doc
- file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/examples
+ xinstall -d ${destroot}${prefix}/share/${name}
+ copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/doc
+ copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/examples
}
-test.run yes
-test.cmd make
-test.target test
-
livecheck.type regex
livecheck.url ${homepage}download
-livecheck.version [join [split [lrange [split ${version} -] 0 0] .] ""]_${rel_date}
livecheck.regex ${name}(\[\\d_\]+)oss_src${extract.suffix}
Modified: trunk/dports/devel/tbb/files/patch-build-macos.inc.diff
===================================================================
--- 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)
@@ -1,11 +1,11 @@
---- 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 @@
+--- 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 @@
endif
ifndef runtime
- gcc_version = $(shell gcc -dumpversion)
-+ gcc_version = $(shell $(CONLY) -dumpversion)
++ gcc_version = $(shell @CC@ -dumpversion)
os_version:=$(shell /usr/bin/sw_vers -productVersion)
export runtime:=cc$(gcc_version)_os$(os_version)
endif
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20140213/4a09eed6/attachment.html>
More information about the macports-changes
mailing list