1package=boost
2$(package)_version=1_70_0
3$(package)_download_path=https://dl.bintray.com/boostorg/release/1.70.0/source/
4$(package)_file_name=boost_$($(package)_version).tar.bz2
5$(package)_sha256_hash=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
6$(package)_patches=unused_var_in_process.patch
7
8define $(package)_set_vars
9$(package)_config_opts_release=variant=release
10$(package)_config_opts_debug=variant=debug
11$(package)_config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
12$(package)_config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
13$(package)_config_opts_linux=target-os=linux threadapi=pthread runtime-link=shared
14$(package)_config_opts_darwin=target-os=darwin runtime-link=shared
15$(package)_config_opts_mingw32=target-os=windows binary-format=pe threadapi=win32 runtime-link=static
16$(package)_config_opts_x86_64_mingw32=address-model=64
17$(package)_config_opts_i686_mingw32=address-model=32
18$(package)_config_opts_i686_linux=address-model=32 architecture=x86
19$(package)_config_opts_i686_android=address-model=32
20$(package)_config_opts_aarch64_android=address-model=64
21$(package)_config_opts_x86_64_android=address-model=64
22$(package)_config_opts_armv7a_android=address-model=32
23$(package)_toolset_$(host_os)=gcc
24$(package)_toolset_darwin=clang
25ifneq (,$(findstring clang,$($(package)_cxx)))
26   $(package)_toolset_$(host_os)=clang
27endif
28$(package)_archiver_$(host_os)=$($(package)_ar)
29$(package)_config_libraries=filesystem,system,thread,test
30$(package)_cxxflags=-std=c++11 -fvisibility=hidden
31$(package)_cxxflags_linux=-fPIC
32$(package)_cxxflags_android=-fPIC
33endef
34
35define $(package)_preprocess_cmds
36  patch -p1 < $($(package)_patch_dir)/unused_var_in_process.patch && \
37  echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_archiver_$(host_os))\" <striper>\"$(host_STRIP)\"  <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
38endef
39
40define $(package)_config_cmds
41  ./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os))
42endef
43
44define $(package)_build_cmds
45  ./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage
46endef
47
48define $(package)_stage_cmds
49  ./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install
50endef
51