@@ -4,10 +4,9 @@ $(package)_download_path=https://archives.boost.io/release/1.74.0/source/
44$(package)_file_name =$(package ) _$($(package ) _version) .tar.bz2
55$(package)_sha256_hash =83bfc1507731a0906e387fc28b7ef5417d591429e51e788417fe9ff025e116b1
66
7- # Optional patch (ok to leave)
7+ # Optional existing patch
88$(package)_patches += bootstrap-clang-darwin.patch
99
10- # Darwin-only libc++ v1 patch
1110ifeq ($(host_os ) ,darwin)
1211$(package)_patches += use-libcxx-v1.patch
1312endif
@@ -18,7 +17,7 @@ $(package)_config_opts_debug=variant=debug
1817$(package ) _config_opts=--layout=tagged --build-type=complete --user-config=user-config.jam
1918$(package ) _config_opts+=threading=multi link=static -sNO_BZIP2=1 -sNO_ZLIB=1
2019
21- # ===== per -platform =====
20+ # Per -platform
2221$(package ) _config_opts_linux=threadapi=pthread runtime-link=shared
2322$(package ) _config_opts_darwin=toolset=clang-darwin runtime-link=shared
2423
@@ -30,93 +29,85 @@ $(package)_config_opts_i686_linux=address-model=32 architecture=x86
3029$(package ) _toolset_$(host_os ) =gcc
3130$(package ) _archiver_$(host_os ) =$($(package ) _ar)
3231
33- # Darwin override
32+ # macOS override
3433$(package ) _toolset_darwin=clang-darwin
3534$(package ) _archiver_darwin=$($(package ) _ar)
3635
37- # Libraries to build
3836$(package ) _config_libraries=chrono,filesystem,program_options,system,thread
3937
4038$(package ) _cxxflags=-std=c++11 -fvisibility=hidden
4139$(package ) _cxxflags_linux=-fPIC
4240
43- # linker flags only (sysroot handled by toolchain or preprocess)
4441$(package ) _ldflags+= -Wl,-syslibroot,$(OSX_SDK_PATH )
4542endef
4643
44+
4745# ==================================================================
48- # PREPROCESS — CREATE user-config.jam
46+ # PREPROCESS — Create user-config.jam
4947# ==================================================================
5048
5149ifeq ($(host_os ) ,darwin)
5250
5351define $(package)_preprocess_cmds
54- echo "using clang-darwin : : clang++ -target x86_64-apple-darwin11 \
55- --sysroot=$(OSX_SDK_PATH ) \
56- -mmacosx-version-min=10.8 \
57- -stdlib=libc++ \
58- : <cxxflags>\"-nostdinc++ -std=c++11 \
59- -isystem$(OSX_SDK_PATH ) /usr/include/c++/v1\" \
60- <linkflags>\"-stdlib=libc++ -Wl,-syslibroot,$(OSX_SDK_PATH ) \" \
61- <archiver>\"$(host_AR ) \" \
62- <ranlib>\"$(host_RANLIB ) \" \
63- <striper>\"$(host_STRIP ) \" \
64- ;" > user-config.jam
52+ echo "using clang-darwin : : clang++ -target x86_64-apple-darwin11 --sysroot=$(OSX_SDK_PATH ) -mmacosx-version-min=10.8 -stdlib=libc++ \
53+ : <cxxflags>\"-nostdinc++ -std=c++11 -isystem$(OSX_SDK_PATH ) /usr/include/c++/v1\" \
54+ <linkflags>\"-stdlib=libc++ -Wl,-syslibroot,$(OSX_SDK_PATH ) \" \
55+ <archiver>\"$(host_AR ) \" \
56+ <ranlib>\"$(host_RANLIB ) \" \
57+ <striper>\"$(host_STRIP ) \" ;" > user-config.jam
6558endef
6659
6760else
6861
6962define $(package)_preprocess_cmds
70- echo "using gcc : : $($(package ) _cxx) \
71- : <cxxflags>\"$($(package ) _cxxflags) \" \
72- <linkflags>\"$($(package ) _ldflags) \" \
73- <archiver>\"$($(package ) _ar) \" \
74- <ranlib>\"$(host_RANLIB ) \" \
75- <striper>\"$(host_STRIP ) \" \
76- ;" > user-config.jam
63+ echo "using gcc : : $($(package ) _cxx) \
64+ : <cxxflags>\"$($(package ) _cxxflags) \" \
65+ <linkflags>\"$($(package ) _ldflags) \" \
66+ <archiver>\"$($(package ) _ar) \" \
67+ <ranlib>\"$(host_RANLIB ) \" \
68+ <striper>\"$(host_STRIP ) \" ;" > user-config.jam
7769endef
7870
7971endif
8072
73+
8174# ==================================================================
82- # CONFIG — BUILD B2 ENGINE
75+ # CONFIG — Bootstrap B2
8376# ==================================================================
8477
8578ifeq ($(host_os ) ,darwin)
8679
8780define $(package)_config_cmds
88- PATH="$(BOOST_NO_WRAP_PATH ) " CC="$(CC_FOR_BUILD ) " CXX="$(CXX_FOR_BUILD ) " \
89- ./bootstrap.sh --without-icu \
90- --with-toolset=clang-darwin \
91- --with-libraries=$($(package ) _config_libraries) \
92- || ( echo "=== BOOST BOOTSTRAP.LOG ===" \
93- && cat bootstrap.log \
94- && echo "=== END BOOST BOOTSTRAP.LOG ===" \
95- && false )
96-
97- # Remove Boost auto-generated clang-darwin toolset to avoid duplicate entry
98- sed -i '/using clang-darwin/d' project-config.jam
81+ PATH="$(BOOST_NO_WRAP_PATH ) " CC="$(CC_FOR_BUILD ) " CXX="$(CXX_FOR_BUILD ) " ./bootstrap.sh \
82+ --without-icu \
83+ --with-toolset=clang-darwin \
84+ --with-libraries=$($(package ) _config_libraries) \
85+ || ( echo "=== BOOST BOOTSTRAP.LOG ===" && cat bootstrap.log && echo "=== END ===" && false )
86+
87+ # Remove Boost auto-generated toolset to avoid duplicate definitions
88+ sed -i '/using clang-darwin/d' project-config.jam
9989endef
10090
10191else
10292
10393define $(package)_config_cmds
104- ./bootstrap.sh --without-icu \
94+ ./bootstrap.sh --without-icu \
10595 --with-libraries=$($(package ) _config_libraries)
10696endef
10797
10898endif
10999
100+
110101# ==================================================================
111102# BUILD + INSTALL
112103# ==================================================================
113104
114105define $(package)_build_cmds
115- ./b2 -d2 -j2 -d1 --prefix=$($(package ) _staging_prefix_dir) \
116- $($(package ) _config_opts) stage
106+ ./b2 -d2 -j2 -d1 --prefix=$($(package ) _staging_prefix_dir) \
107+ $($(package ) _config_opts) stage
117108endef
118109
119110define $(package)_stage_cmds
120- ./b2 -d0 -j4 --prefix=$($(package ) _staging_prefix_dir) \
121- $($(package ) _config_opts) install
111+ ./b2 -d0 -j4 --prefix=$($(package ) _staging_prefix_dir) \
112+ $($(package ) _config_opts) install
122113endef
0 commit comments