From aa7ba58804b6d514ad94b1654dd0b89970d05ab8 Mon Sep 17 00:00:00 2001 From: UdjinM6 Date: Thu, 12 Oct 2023 18:57:46 +0300 Subject: [PATCH] fix(depends): make it compilable with Xcode 15 on macos --- depends/packages/boost.mk | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/depends/packages/boost.mk b/depends/packages/boost.mk index f90264d337..30f22365a6 100644 --- a/depends/packages/boost.mk +++ b/depends/packages/boost.mk @@ -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) : \"$($(package)_cflags)\" \"$($(package)_cxxflags)\" \"$($(package)_cppflags)\" \"$($(package)_ldflags)\" \"$($(package)_ar)\" \"$(host_STRIP)\" \"$(host_RANLIB)\" \"$(host_WINDRES)\" : ;" > user-config.jam endef