Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

boost: improve patch #4710

Merged
merged 1 commit into from
Jul 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions packages/b/boost/patches/1.85.0/fix-v144.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
diff --git a/tools/build/src/tools/msvc.jam b/tools/build/src/tools/msvc.jam
index 54a6ced..bac3932 100644
--- a/tools/build/src/tools/msvc.jam
+++ b/tools/build/src/tools/msvc.jam
@@ -1137,7 +1137,7 @@ local rule generate-setup-cmd ( version : command : parent : options * : cpu : g
}
else
{
- if [ MATCH "(14.3)" : $(version) ]
+ if [ MATCH "(14.[34])" : $(version) ]
{
if $(.debug-configuration)
{
@@ -1316,7 +1316,7 @@ local rule configure-really ( version ? : options * )
# version from the path.
# FIXME: We currently detect both Microsoft Visual Studio 9.0 and
# 9.0express as 9.0 here.
- if [ MATCH "(MSVC\\\\14.3)" : $(command) ]
+ if [ MATCH "(MSVC\\\\14.[34])" : $(command) ]
{
version = 14.3 ;
}
26 changes: 11 additions & 15 deletions packages/b/boost/xmake.lua
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,17 @@ package("boost")
package:add("deps", "xz")
end
end

if package:is_plat("windows") and package:version():le("1.85.0") then
local vs_toolset = package:toolchain("msvc"):config("vs_toolset")
if vs_toolset then
local vs_toolset_ver = import("core.base.semver").new(vs_toolset)
local minor = vs_toolset_ver:minor()
if minor and minor >= 40 then
package:add("patches", "<=1.85.0", "patches/1.85.0/fix-v144.patch", "1ba99cb2e2f03a4ba489a32596c62e1310b6c73ba4d19afa8796bcf180c84422")
end
end
end
end)

on_install("macosx", "linux", "windows", "bsd", "mingw", "cross", function (package)
Expand Down Expand Up @@ -388,21 +399,6 @@ package("boost")
if package:is_plat("linux") then
table.insert(argv, "pch=off")
end

if package:is_plat("windows") and package:version():le("1.85.0") then
local vs_toolset = build_toolchain:config("vs_toolset")
if vs_toolset then
local vs_toolset_ver = import("core.base.semver").new(vs_toolset)
local minor = vs_toolset_ver:minor()
if minor and minor >= 40 then
io.replace("tools/build/src/engine/config_toolset.bat", "vc143", "vc144", {plain = true})
io.replace("tools/build/src/engine/build.bat", "vc143", "vc144", {plain = true})
io.replace("tools/build/src/engine/guess_toolset.bat", "vc143", "vc144", {plain = true})
io.replace("tools/build/src/tools/intel-win.jam", "14.3", "14.4", {plain = true})
io.replace("tools/build/src/tools/msvc.jam", "14.3", "14.4", {plain = true})
end
end
end
local ok = os.execv("./b2", argv, {envs = runenvs, try = true, stdout = "boost-log.txt"})
if ok ~= 0 then
raise("boost build failed, please check log in " .. path.join(os.curdir(), "boost-log.txt"))
Expand Down
Loading