Ticket #37320: tbb-universal.diff
File tbb-universal.diff, 3.0 KB (added by ryandesign (Ryan Carsten Schmidt), 9 years ago) |
---|
-
Portfile
2 2 # $Id$ 3 3 4 4 PortSystem 1.0 5 PortGroup muniversal 1.0 5 6 6 7 name tbb 7 8 version 4.3-20150424 … … 30 31 31 32 use_configure no 32 33 33 switch ${build_arch} { 34 i386 { 35 set tbb_arch ia32 36 } 37 x86_64 { 38 set tbb_arch intel64 39 } 40 ppc { 41 set tbb_arch ppc32 42 } 43 default { 44 set tbb_arch ${build_arch} 45 } 34 set tbb_arch(i386) ia32 35 set tbb_arch(ppc) ppc32 36 set tbb_arch(x86_64) intel64 37 if {![info exists tbb_arch(${configure.build_arch})]} { 38 set tbb_arch(${configure.build_arch}) ${configure.build_arch} 46 39 } 47 40 48 41 if {[string match *clang* ${configure.compiler}]} { … … 65 58 } 66 59 67 60 build.target tbb tbbmalloc tbbproxy 68 build.args-append arch=${tbb_arch} \ 69 compiler=${tbb_compiler} \ 61 build.args-append compiler=${tbb_compiler} \ 70 62 tbb_build_prefix=${tbb_build_prefix} \ 71 63 use_proxy=1 72 64 … … 76 68 77 69 # The Makefile does not have an install target. 78 70 # http://software.intel.com/en-us/forums/topic/347428 79 destroot.dir ${worksrcpath}/build/${tbb_build_prefix}_release 80 destroot { 71 # but the muniversal portgroup requires a destroot.cmd 72 destroot.cmd true 73 74 if {[variant_isset universal]} { 75 foreach arch ${configure.universal_archs} { 76 set merger_build_args(${arch}) arch=$tbb_arch(${arch}) 77 set merger_test_args(${arch}) arch=$tbb_arch(${arch}) 78 } 79 merger-post-destroot { 80 foreach arch ${universal_archs_to_use} { 81 tbb_destroot ${worksrcpath}-${arch} ${destroot}-${arch} 82 } 83 } 84 } else { 85 build.args-append arch=$tbb_arch(${configure.build_arch}) 86 test.args-append arch=$tbb_arch(${configure.build_arch}) 87 post-destroot { 88 tbb_destroot ${worksrcpath} ${destroot} 89 } 90 } 91 92 proc tbb_destroot {worksrcpath destroot} { 93 global destroot.dir prefix tbb_build_prefix 94 destroot.dir ${worksrcpath}/build/${tbb_build_prefix}_release 95 81 96 # fix paths 82 reinplace "s|\\(TBBROOT.\\)\".*\"|\\1\"${prefix}\"|g" \ 83 ${destroot.dir}/tbbvars.sh ${destroot.dir}/tbbvars.csh 84 reinplace "s|\\(tbb_bin.\\)\".*\"|\\1\"${prefix}/lib\"|g" \ 85 ${destroot.dir}/tbbvars.sh ${destroot.dir}/tbbvars.csh 97 reinplace -W ${destroot.dir} "s|\\(TBBROOT.\\)\".*\"|\\1\"${prefix}\"|g" tbbvars.sh tbbvars.csh 98 reinplace -W ${destroot.dir} "s|\\(tbb_bin.\\)\".*\"|\\1\"${prefix}/lib\"|g" tbbvars.sh tbbvars.csh 86 99 87 100 # copy lib, include & bin 88 101 copy {*}[glob ${destroot.dir}/lib*.dylib] ${destroot}${prefix}/lib 89 102 copy {*}[glob ${destroot.dir}/tbbvars.*sh] ${destroot}${prefix}/bin 90 103 copy ${worksrcpath}/include/tbb ${destroot}${prefix}/include/tbb 104 } 91 105 106 post-destroot { 92 107 # copy examples & docs 93 108 xinstall -d ${destroot}${prefix}/share/${name} 94 109 copy ${worksrcpath}/doc ${destroot}${prefix}/share/${name}/doc