From 8cdf9918b1af79f3a1bfc510eb457bc3947ce206 Mon Sep 17 00:00:00 2001 From: Guido Falsi Date: Sun, 6 Oct 2024 10:40:42 +0200 Subject: [PATCH] games/0ad: Fix buyild with new boost 1.85 PR: 281852 Obtained from: https://gitea.wildfiregames.com/0ad/0ad/commit/0831f5d3ce214970fed1b3a55817e7246acd58db --- games/0ad/files/patch-boost-1.85 | 49 ++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 games/0ad/files/patch-boost-1.85 diff --git a/games/0ad/files/patch-boost-1.85 b/games/0ad/files/patch-boost-1.85 new file mode 100644 index 000000000000..810873db2c50 --- /dev/null +++ b/games/0ad/files/patch-boost-1.85 @@ -0,0 +1,49 @@ +diff --git a/source/graphics/TextureManager.cpp b/source/graphics/TextureManager.cpp +index ec68b15989..9cfa615997 100644 +--- source/graphics/TextureManager.cpp ++++ source/graphics/TextureManager.cpp +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2023 Wildfire Games. ++/* Copyright (C) 2024 Wildfire Games. + * This file is part of 0 A.D. + * + * 0 A.D. is free software: you can redistribute it and/or modify +@@ -806,7 +806,7 @@ public: + files.push_back(f); + p = p / GetWstringFromWpath(*it); + } +- return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.leaf()), files); ++ return m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.filename()), files); + } + + /** +diff --git a/source/lib/file/file_system.cpp b/source/lib/file/file_system.cpp +index 1db6dc65d3..2b1fdba056 100644 +--- source/lib/file/file_system.cpp ++++ source/lib/file/file_system.cpp +@@ -1,4 +1,4 @@ +-/* Copyright (C) 2023 Wildfire Games. ++/* Copyright (C) 2024 Wildfire Games. + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the +@@ -32,6 +32,7 @@ + #include "lib/sysdep/filesystem.h" + + #include ++#include + #include + + bool DirectoryExists(const OsPath& path) +@@ -229,7 +230,11 @@ Status CopyFile(const OsPath& path, const OsPath& newPath, bool override_if_exis + try + { + if(override_if_exists) ++#if BOOST_VERSION >=107400 ++ fs::copy_file(fs::path(path.string()), fs::path(newPath.string()), boost::filesystem::copy_options::overwrite_existing); ++#else + fs::copy_file(fs::path(path.string()), fs::path(newPath.string()), boost::filesystem::copy_option::overwrite_if_exists); ++#endif + else + fs::copy_file(fs::path(path.string()), fs::path(newPath.string())); + }