boost: fix b2 when enable iostreams deps (#5670)

pull/5672/head
star9029 3 weeks ago committed by GitHub
parent 926b89fc9d
commit 14f527a6c1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      packages/b/boost/b2/install.lua
  2. 3
      packages/b/boost/b2/load.lua
  3. 6
      packages/b/boost/cmake/install.lua
  4. 9
      packages/b/boost/cmake/load.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

@ -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

@ -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

@ -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)

Loading…
Cancel
Save