source: trunk/dports/devel/tbb/Portfile @ 87220

Last change on this file since 87220 was 87220, checked in by stromnov@…, 6 years ago

tbb: update to version 4.0-20111003

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 3.1 KB
Line 
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 87220 2011-11-14 09:21:04Z stromnov@macports.org $
3
4PortSystem          1.0
5
6name                tbb
7set rel_date        20111003
8set vers            4.0
9set update_ver      1
10version             ${vers}-${rel_date}
11maintainers         mnick openmaintainer
12
13categories          devel
14description         Intel Threading Building Blocks offers a rich and complete approach to parallelism in C++
15long_description    ${description} \
16                    It represents a higher-level, task-based parallelism that abstracts \
17                    platform details and threading mechanisms for scalability and performance
18license             GPL
19platforms           darwin
20
21homepage            http://threadingbuildingblocks.org
22master_sites        "${homepage}/uploads/77/177/${vers}%20update%20${update_ver}/"
23
24worksrcdir          ${name}40_${rel_date}oss
25distname            ${worksrcdir}_src
26extract.suffix      .tgz
27
28checksums           md5     7b5d94eb35a563b29ef402e0fd8f15c9 \
29                    sha1    1155b2fa6d5f2f92a766ca7919951992d37c1e08 \
30                    rmd160  d0ff75aa5c9ff7dd5a3f43a1c1acaeddf2e4b48a
31
32patchfiles          patch-build-macos.inc.diff
33
34use_configure       no
35build.target        tbb tbbmalloc
36
37switch ${build_arch} {
38    i386 {
39        set arch_flag intel32
40    }
41    x86_64 {
42        set arch_flag intel64
43    }
44    ppc -
45    ppc64 {
46        set arch_flag ${build_arch}
47    }
48}
49
50set compilers       "CONLY=${configure.cc} CPLUS=${configure.cxx}"
51build.args-append   ${compilers}
52build.env-append    arch=${arch_flag}
53test.env-append     arch=${arch_flag}
54
55destroot {
56    set build_dir [exec sh -c "cd ${worksrcpath} && ${build.env} make info ${compilers} | grep build_prefix | cut -f2 -d'='"]
57    set build_dir "${worksrcpath}/build/${build_dir}_release"
58
59    # fix paths
60    reinplace "s|\\(TBB30_INSTALL_DIR.\\)\".*\"|\\1\"${prefix}\"|g" \
61        ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh
62    reinplace "s|\\(tbb_bin.\\)\".*\"|\\1\"${prefix}/lib\"|g" \
63        ${build_dir}/tbbvars.sh ${build_dir}/tbbvars.csh
64
65    # copy lib, include & bin
66    eval file copy [glob ${build_dir}/lib*.dylib] ${destroot}${prefix}/lib
67    eval file copy [glob ${build_dir}/tbbvars.*sh] ${destroot}${prefix}/bin
68    file copy ${worksrcpath}/include/tbb ${destroot}${prefix}/include/tbb
69
70    # fix install_name paths
71    system "install_name_tool -id ${prefix}/lib/libtbb.dylib ${destroot}${prefix}/lib/libtbb.dylib"
72    system "install_name_tool -id ${prefix}/lib/libtbbmalloc.dylib ${destroot}${prefix}/lib/libtbbmalloc.dylib"
73
74    # copy examples & docs
75    file mkdir ${destroot}${prefix}/share/${name}
76    file copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/doc
77    file copy ${worksrcpath}/examples ${destroot}${prefix}/share/${name}/examples
78}
79
80test.run            yes
81test.cmd            make
82test.target         test
83
84livecheck.type      regex
85livecheck.url       http://threadingbuildingblocks.org/file.php?fid=77
86livecheck.version   [join [split [lrange [split ${version} -] 0 0] .] ""]_${rel_date}
87livecheck.regex     <a href="ver.php\\?fid=\\d+">${name}(\[\\d_\]+)oss</a>
Note: See TracBrowser for help on using the repository browser.