diff --git a/packages/b/boost/b2/install.lua b/packages/b/boost/b2/install.lua index 289fb0b5a..f30922153 100644 --- a/packages/b/boost/b2/install.lua +++ b/packages/b/boost/b2/install.lua @@ -40,7 +40,7 @@ function _get_compiler(package, toolchain) end end -function _config_deppath(file, depname, rule) +function _config_deppath(package, file, depname, rule) local dep = package:dep(depname) local info = dep:fetch({external = false}) if info then @@ -130,16 +130,16 @@ function main(package) if file then file:write(_get_compiler(package, build_toolchain)) if package:config("lzma") then - _config_deppath(file, "xz", "lzma") + _config_deppath(package, file, "xz", "lzma") end if package:config("zstd") then - _config_deppath(file, "zstd", "zstd") + _config_deppath(package, file, "zstd", "zstd") end if package:config("zlib") then - _config_deppath(file, "zlib", "zlib") + _config_deppath(package, file, "zlib", "zlib") end if package:config("bzip2") then - _config_deppath(file, "bzip2", "bzip2") + _config_deppath(package, file, "bzip2", "bzip2") end file:close() end diff --git a/packages/b/boost/b2/load.lua b/packages/b/boost/b2/load.lua index a68bb66af..b1f4a0f54 100644 --- a/packages/b/boost/b2/load.lua +++ b/packages/b/boost/b2/load.lua @@ -60,6 +60,9 @@ function main(package) -- disable auto-link all libs if package:is_plat("windows") then package:add("defines", "BOOST_ALL_NO_LIB") + if package:config("shared") then + package:add("defines", "BOOST_ALL_DYN_LINK") + end end if package:config("python") then diff --git a/packages/b/boost/cmake/install.lua b/packages/b/boost/cmake/install.lua index 80c08c306..cf7278f0d 100644 --- a/packages/b/boost/cmake/install.lua +++ b/packages/b/boost/cmake/install.lua @@ -10,7 +10,7 @@ function _mangle_link_string(package) end -- Only get package dep version in on_install function _add_links(package) - local suffix = _mangle_link_string(package) + local prefix = _mangle_link_string(package) local sub_libs_map = { test = {"prg_exec_monitor", "unit_test_framework"}, @@ -45,14 +45,14 @@ function _add_links(package) local sub_libs = sub_libs_map[libname] if sub_libs then for _, sub_libname in ipairs(sub_libs) do - package:add("links", suffix .. sub_libname) + package:add("links", prefix .. sub_libname) end if libname == "test" then -- always static package:add("links", "libboost_test_exec_monitor") end else - package:add("links", suffix .. libname) + package:add("links", prefix .. libname) end end) end diff --git a/packages/b/boost/cmake/load.lua b/packages/b/boost/cmake/load.lua index c78a2324b..7163a76a6 100644 --- a/packages/b/boost/cmake/load.lua +++ b/packages/b/boost/cmake/load.lua @@ -34,10 +34,6 @@ function _auto_enabled_dep_configs(package) end function _add_iostreams_deps(package) - if not package:config("iostreams") then - return - end - if package:config("zlib") then package:add("deps", "zlib") end @@ -69,8 +65,9 @@ function _add_deps(package) if package:config("openssl") then package:add("deps", "openssl >=1.1.1-a") -- same as python on_load end - - _add_iostreams_deps(package) + if package:config("iostreams") then + _add_iostreams_deps(package) + end end function _add_header_only_configs(package)