1 | # -*- coding: utf-8; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:et:sw=4:ts=4:sts=4 |
---|
2 | # $Id: Portfile 57727 2009-09-15 18:40:12Z mnick@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | |
---|
6 | name tbb |
---|
7 | set rel_date 20100406 |
---|
8 | set vers 3.0 |
---|
9 | version ${vers}-${rel_date} |
---|
10 | revision 1 |
---|
11 | maintainers mnick openmaintainer |
---|
12 | |
---|
13 | categories devel |
---|
14 | description Intel Threading Building Blocks offers a rich and complete approach to parallelism in C++ |
---|
15 | long_description ${description} \ |
---|
16 | It represents a higher-level, task-based parallelism that abstracts \ |
---|
17 | platform details and threading mechanisms for scalability and performance |
---|
18 | license GPL |
---|
19 | platforms darwin |
---|
20 | |
---|
21 | homepage http://www.threadingbuildingblocks.org |
---|
22 | master_sites ${homepage}/uploads/77/151/${vers}/ |
---|
23 | worksrcdir ${name}30_${rel_date}oss |
---|
24 | distname ${worksrcdir}_src |
---|
25 | extract.suffix .tgz |
---|
26 | |
---|
27 | checksums md5 645aeaa5473e7a8986cd629c5f7262bb \ |
---|
28 | sha1 0c10aaa7f60762a4a2c2c907a2fee552eba4132c \ |
---|
29 | rmd160 52882e20b0753b669bda60bce7f61f20f3245a86 |
---|
30 | |
---|
31 | universal_variant no |
---|
32 | build.target tbb tbbmalloc |
---|
33 | |
---|
34 | configure { |
---|
35 | if {${build_arch} eq "i386"} { |
---|
36 | set arch_flag intel32 |
---|
37 | } elseif {${build_arch} eq "x86_64"} { |
---|
38 | set arch_flag intel64 |
---|
39 | } elseif {${build_arch} eq "ppc"} { |
---|
40 | set arch_flag ppc |
---|
41 | } elseif {${build_arch} eq "ppc64"} { |
---|
42 | set arch_flag ppc64 |
---|
43 | } |
---|
44 | build.env-append arch=${arch_flag} |
---|
45 | test.env-append arch=${arch_flag} |
---|
46 | } |
---|
47 | |
---|
48 | destroot { |
---|
49 | set build_dir [exec sh -c "cd ${worksrcpath} && ${build.env} make info | grep build_prefix | cut -f2 -d'='"] |
---|
50 | set build_dir "${worksrcpath}/build/${build_dir}_release" |
---|
51 | |
---|
52 | # fix paths |
---|
53 | reinplace "s|\\(TBB30_INSTALL_DIR.\\)\".*\"|\\1\"${prefix}\"|g" \ |
---|
54 | ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh |
---|
55 | reinplace "s|\\(tbb_bin.\\)\".*\"|\\1\"${prefix}/lib\"|g" \ |
---|
56 | ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh |
---|
57 | |
---|
58 | # copy lib, include & bin |
---|
59 | eval file copy [glob ${build_dir}/lib*.dylib] ${destroot}${prefix}/lib |
---|
60 | eval file copy [glob ${build_dir}/tbbvars.*sh] ${destroot}${prefix}/bin |
---|
61 | file copy ${worksrcpath}/include/tbb ${destroot}${prefix}/include/tbb |
---|
62 | |
---|
63 | # fix install_name paths |
---|
64 | system "install_name_tool -id ${prefix}/lib/libtbb.dylib ${destroot}${prefix}/lib/libtbb.dylib" |
---|
65 | system "install_name_tool -id ${prefix}/lib/libtbbmalloc.dylib ${destroot}${prefix}/lib/libtbbmalloc.dylib" |
---|
66 | |
---|
67 | # copy examples & docs |
---|
68 | file mkdir ${destroot}${prefix}/share/${name} |
---|
69 | file copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/doc |
---|
70 | file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/examples |
---|
71 | } |
---|
72 | |
---|
73 | test.run yes |
---|
74 | test.cmd make |
---|
75 | test.target test |
---|
76 | |
---|
77 | livecheck.type regex |
---|
78 | livecheck.url ${homepage}/file.php?fid=77 |
---|
79 | livecheck.version [join [split [lrange [split ${version} -] 0 0] .] ""]_${rel_date} |
---|
80 | livecheck.regex <a href='ver.php\\?fid=\\d+'>${name}(\[\\d_\]+)oss</a> |
---|