1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-24 09:25:01 +00:00

games/0ad: Fix buyild with new boost 1.85

PR:		281852
Obtained from:	0831f5d3ce
This commit is contained in:
Guido Falsi 2024-10-06 10:40:42 +02:00
parent 622bdd5304
commit 8cdf9918b1

View File

@ -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 <boost/filesystem.hpp>
+#include <boost/version.hpp>
#include <memory>
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()));
}