fix(depends): make it compilable with Xcode 15 on macos

This commit is contained in:
UdjinM6 2023-10-12 18:57:46 +03:00
parent e4c9cb5371
commit aa7ba58804
No known key found for this signature in database
GPG Key ID: 83592BD1400D58D9

View File

@ -21,8 +21,12 @@ $(package)_config_opts_i686_android=address-model=32
$(package)_config_opts_aarch64_android=address-model=64
$(package)_config_opts_x86_64_android=address-model=64
$(package)_config_opts_armv7a_android=address-model=32
unary_function=unary_function
ifneq (,$(findstring clang,$($(package)_cxx)))
$(package)_toolset_$(host_os)=clang
ifeq ($(build_os),darwin)
unary_function=__unary_function
endif
else
$(package)_toolset_$(host_os)=gcc
endif
@ -36,8 +40,10 @@ $(package)_cxxflags_x86_64=-fcf-protection=full
endef
# Fix unused variable in boost_process, can be removed after upgrading to 1.72
# Fix missing unary_function in clang15 on macos, can be removed after upgrading to 1.81
define $(package)_preprocess_cmds
sed -i.old "s/int ret_sig = 0;//" boost/process/detail/posix/wait_group.hpp && \
sed -i.old "s/unary_function/$(unary_function)/" boost/container_hash/hash.hpp && \
echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : <cflags>\"$($(package)_cflags)\" <cxxflags>\"$($(package)_cxxflags)\" <compileflags>\"$($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_ar)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef