games-strategy/freeorion: fix build+runtime w/ boost-1.85

Re-tested in a clean env and seems fine.

Hoping -fno-sa won't be permanent, but it'll do better
than an upper bound.

Closes: https://bugs.gentoo.org/932780
Signed-off-by: Ionen Wolkens <ionen@gentoo.org>
This commit is contained in:
Ionen Wolkens
2024-05-27 11:30:44 -04:00
parent 9b6a8deac4
commit 998fae593f
2 changed files with 63 additions and 2 deletions

View File

@@ -0,0 +1,57 @@
https://bugs.gentoo.org/932780
https://github.com/freeorion/freeorion/issues/4897
Backport of: https://github.com/freeorion/freeorion/pull/4899/commits
--- a/GG/src/dialogs/FileDlg.cpp
+++ b/GG/src/dialogs/FileDlg.cpp
@@ -11,3 +11,3 @@
#include <boost/algorithm/string/predicate.hpp>
-#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem.hpp>
#include <boost/format.hpp>
@@ -217,3 +217,3 @@
fs::path filename_path = fs::system_complete(fs::path(m_init_filename));
- m_files_edit->SetText(filename_path.leaf().string());
+ m_files_edit->SetText(filename_path.filename().string());
}
@@ -550,3 +550,3 @@
if ((s_working_dir.string() != s_working_dir.root_path().string() &&
- !s_working_dir.branch_path().string().empty()) ||
+ !s_working_dir.parent_path().string().empty()) ||
Win32Paths())
@@ -696,6 +696,6 @@
if (s_working_dir.string() != s_working_dir.root_path().string() &&
- !s_working_dir.branch_path().string().empty())
+ !s_working_dir.parent_path().string().empty())
{
// move to new directory
- SetWorkingDirectory(s_working_dir.branch_path());
+ SetWorkingDirectory(s_working_dir.parent_path());
--- a/util/Directories.cpp
+++ b/util/Directories.cpp
@@ -6,5 +6,4 @@
#include <boost/algorithm/string/trim.hpp>
-#include <boost/filesystem/convenience.hpp>
-#include <boost/filesystem/operations.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
+#include <boost/filesystem.hpp>
@@ -268,3 +267,3 @@
fs::path binary_file = fs::system_complete(FilenameToPath(argv0));
- bin_dir = binary_file.branch_path();
+ bin_dir = binary_file.parent_path();
} catch (const fs::filesystem_error &) {
@@ -317,3 +316,3 @@
fs::path binary_file = fs::system_complete(fs::path(path_text));
- bin_dir = binary_file.branch_path();
+ bin_dir = binary_file.parent_path();
--- a/util/OptionsDB.cpp
+++ b/util/OptionsDB.cpp
@@ -16,4 +16,3 @@
#include <boost/algorithm/string/predicate.hpp>
-#include <boost/filesystem/fstream.hpp>
-#include <boost/filesystem/operations.hpp>
+#include <boost/filesystem.hpp>
#include <boost/range/algorithm_ext/erase.hpp>

View File

@@ -18,10 +18,9 @@ IUSE="+client doc test"
REQUIRED_USE="${PYTHON_REQUIRED_USE}"
RESTRICT="!test? ( test )"
# bug #932780 wrt boost upper bound
DEPEND="
${PYTHON_DEPS}
$(python_gen_cond_dep '<dev-libs/boost-1.85:=[${PYTHON_USEDEP},nls,python]')
$(python_gen_cond_dep 'dev-libs/boost:=[${PYTHON_USEDEP},nls,python]')
sys-libs/zlib:=
client? (
media-libs/freetype
@@ -50,6 +49,10 @@ BDEPEND="
test? ( $(python_gen_cond_dep 'dev-python/pytest[${PYTHON_USEDEP}]') )
"
PATCHES=(
"${FILESDIR}"/${P}-boost1.85.patch
)
freeorion_check-reqs() {
# cc1plus processes may suddenly use ~1.5GB all at once early on (2+GB
# if debug symbols) then far less for the rest, check minimal jobs*1.5
@@ -75,6 +78,7 @@ src_prepare() {
}
src_configure() {
append-flags -fno-strict-aliasing #932780
filter-lto # -Werror=odr issues
local mycmakeargs=(