Skip to content

Instantly share code, notes, and snippets.

@a-chernykh
Created March 26, 2014 17:51
Show Gist options
  • Save a-chernykh/9789227 to your computer and use it in GitHub Desktop.
Save a-chernykh/9789227 to your computer and use it in GitHub Desktop.
Install and compile TBB for android
default[:tbb][:version] = '4.2-20140122oss'
default[:tbb][:url] = 'https://www.threadingbuildingblocks.org/sites/default/files/software_releases/source/tbb42_20140122oss_src.tgz'
default[:tbb][:sha] = 'f1bd8d983f93a10e340ba63f3a479632ddca1562a5242814dd82a378d3233b75'
ark 'tbb' do
url node[:tbb][:url]
checksum node[:tbb][:sha]
version node[:tbb][:version]
strip_components 2
end
install_path = "#{node['ark']['prefix_root']}/tbb"
bash 'compile_tbb' do
cwd install_path
code <<-EOT
cd jni
ndk-build target=android tbb_release arch=arm
cd ..
mkdir -p lib/android
cp -rf build/linux_arm_*/*.so lib/android/
EOT
creates "#{install_path}/lib/android/libtbb.so"
end
template '/etc/profile.d/tbb.sh' do
variables path: install_path
end
export TBB_PATH=<%= @path %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment