Skip to content

Commit 9cf2ee5

Browse files
committed
depends: boost: Split into non-/native packages
1 parent a57b498 commit 9cf2ee5

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

depends/packages/boost.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ $(package)_version=1_71_0
33
$(package)_download_path=https://dl.bintray.com/boostorg/release/$(subst _,.,$($(package)_version))/source/
44
$(package)_file_name=boost_$($(package)_version).tar.bz2
55
$(package)_sha256_hash=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
6+
$(package)_dependencies=native_b2
67

78
define $(package)_set_vars
89
$(package)_config_opts_release=variant=release
@@ -36,13 +37,13 @@ define $(package)_preprocess_cmds
3637
endef
3738

3839
define $(package)_config_cmds
39-
./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os))
40+
./bootstrap.sh --without-icu --with-libraries=$($(package)_config_libraries) --with-toolset=$($(package)_toolset_$(host_os)) --with-bjam=b2
4041
endef
4142

4243
define $(package)_build_cmds
43-
./b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage
44+
b2 -d2 -j2 -d1 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) stage
4445
endef
4546

4647
define $(package)_stage_cmds
47-
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install
48+
b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install
4849
endef

depends/packages/native_b2.mk

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package=native_b2
2+
$(package)_version=$(boost_version)
3+
$(package)_download_path=$(boost_download_path)
4+
$(package)_file_name=$(boost_file_name)
5+
$(package)_sha256_hash=$(boost_sha256_hash)
6+
$(package)_build_subdir=tools/build/src/engine
7+
ifneq (,$(findstring clang,$($(package)_cxx)))
8+
$(package)_toolset_$(host_os)=clang
9+
else
10+
$(package)_toolset_$(host_os)=gcc
11+
endif
12+
13+
define $(package)_build_cmds
14+
CXX="$($(package)_cxx)" CXXFLAGS="$($(package)_cxxflags)" ./build.sh "$($(package)_toolset_$(host_os))"
15+
endef
16+
17+
define $(package)_stage_cmds
18+
mkdir -p "$($(package)_staging_prefix_dir)"/bin/ && \
19+
cp b2 "$($(package)_staging_prefix_dir)"/bin/
20+
endef

depends/packages/packages.mk

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ multiprocess_native_packages = native_libmultiprocess native_capnp
2222

2323
darwin_native_packages = native_ds_store native_mac_alias
2424

25+
$(host_arch)_$(host_os)_native_packages += native_b2
26+
2527
ifneq ($(build_os),darwin)
2628
darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
2729
endif

0 commit comments

Comments
 (0)