commit:     9c65c36c3c18a3cbab86b009ff17daccf023c6d6
Author:     Sam James <sam <AT> gentoo <DOT> org>
AuthorDate: Tue May 28 01:11:20 2024 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Tue May 28 01:11:20 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9c65c36c

games-strategy/0ad: fix build w/ boost-1.85

Closes: https://bugs.gentoo.org/932254
Signed-off-by: Sam James <sam <AT> gentoo.org>

 games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild      |  2 ++
 .../0ad/files/0ad-0.0.26_alpha-boost-1.85.patch    | 32 ++++++++++++++++++++++
 2 files changed, 34 insertions(+)

diff --git a/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild 
b/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
index 14311b6b04fe..7c7373e81a78 100644
--- a/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
+++ b/games-strategy/0ad/0ad-0.0.26_alpha-r1.ebuild
@@ -101,6 +101,8 @@ PATCHES=(
        "${FILESDIR}"/${P}-add-missing-cstdint-include.patch
        # https://code.wildfiregames.com/D5219
        "${FILESDIR}"/${P}-libxml2-2.12.patch
+       # https://code.wildfiregames.com/D5267
+       "${FILESDIR}"/${P}-boost-1.85.patch
 )
 
 pkg_setup() {

diff --git a/games-strategy/0ad/files/0ad-0.0.26_alpha-boost-1.85.patch 
b/games-strategy/0ad/files/0ad-0.0.26_alpha-boost-1.85.patch
new file mode 100644
index 000000000000..cddec5e2a86c
--- /dev/null
+++ b/games-strategy/0ad/files/0ad-0.0.26_alpha-boost-1.85.patch
@@ -0,0 +1,32 @@
+https://bugs.gentoo.org/932254
+https://code.wildfiregames.com/file/data/ubpvat3mgrfn6gnaquuq/PHID-FILE-d7xwslolc5hv2vwv66tb/D5267.diff
+
+Index: source/graphics/TextureManager.cpp
+===================================================================
+--- a/source/graphics/TextureManager.cpp
++++ b/source/graphics/TextureManager.cpp
+@@ -806,7 +806,7 @@
+                               files.push_back(f);
+                       p = p / GetWstringFromWpath(*it);
+               }
+-              return 
m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.leaf()), files);
++              return 
m_TextureConverter.ComputeSettings(GetWstringFromWpath(srcPath.filename()), 
files);
+       }
+ 
+       /**
+Index: source/lib/file/file_system.cpp
+===================================================================
+--- a/source/lib/file/file_system.cpp
++++ b/source/lib/file/file_system.cpp
+@@ -229,7 +229,11 @@
+       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()));
+       }

Reply via email to