Skip to content

Commit 0f09788

Browse files
dongcarlFuzzbawls
authored andcommitted
depends: boost: Split into non-/native packages
1 parent de97b06 commit 0f09788

File tree

3 files changed

+26
-3
lines changed

3 files changed

+26
-3
lines changed

depends/packages/boost.mk

+4-3
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
@@ -35,13 +36,13 @@ define $(package)_preprocess_cmds
3536
endef
3637

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

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

4546
define $(package)_stage_cmds
46-
./b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install
47+
b2 -d0 -j4 --prefix=$($(package)_staging_prefix_dir) $($(package)_config_opts) toolset=$($(package)_toolset_$(host_os)) install
4748
endef

depends/packages/native_b2.mk

+20
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

+2
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ upnp_packages=miniupnpc
8989

9090
darwin_native_packages = native_biplist native_ds_store native_mac_alias
9191

92+
$(host_arch)_$(host_os)_native_packages += native_b2
93+
9294
ifneq ($(build_os),darwin)
9395
darwin_native_packages += native_cctools native_cdrkit native_libdmg-hfsplus
9496
endif

0 commit comments

Comments
 (0)