retroarch-free: fix with gcc15 (#477178)

This commit is contained in:
lassulus
2026-01-05 19:57:45 +00:00
committed by GitHub
2 changed files with 12 additions and 0 deletions
@@ -30,6 +30,15 @@ mkLibretroCore {
})
];
postPatch = ''
# Fix sol2 compatibility with GCC 15 (construct -> emplace)
# https://github.com/ThePhD/sol2/issues/1657
sed -i 's/this->construct(std::forward<Args>(args)\.\.\.);/this->emplace(std::forward<Args>(args)...);/g' 3rdparty/sol2/sol/sol.hpp
# Fix missing cstdint include for uint8_t
sed -i '1i #include <cstdint>' src/lib/util/corestr.cpp
'';
extraNativeBuildInputs = [ python3 ];
extraBuildInputs = [
alsa-lib
@@ -50,6 +50,9 @@ mkLibretroCore {
cp -a ${libretro-deps-src}/* deps/libretro-deps
chmod -R u+w deps/
# Fix conflicts with glibc index/rindex functions
sed -i 's/\bindex\b/faad_index/g; s/\brindex\b/faad_rindex/g' deps/libretro-deps/libfaad/libfaad/common.h
patchShebangs ./scripts/*
'';