Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:goupilmtos:2024:games
pioneer
use_system_fmt.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File use_system_fmt.patch of Package pioneer
From: Adam Mizerski <adam@mizerski.pl> Date: 2021-02-04T01:03:27+01:00 Subject: use system fmt Upstream: no By default it's built from bundled source as shared library and not installed. Index: pioneer-20240203/CMakeLists.txt =================================================================== --- pioneer-20240203.orig/CMakeLists.txt +++ pioneer-20240203/CMakeLists.txt @@ -259,7 +259,7 @@ find_package(Freetype REQUIRED) find_package(OpenGL REQUIRED) add_subdirectory(contrib/lz4) -add_subdirectory(contrib/fmt) +find_package(fmt REQUIRED) set(NANOSOCKETS_STATIC "1") add_subdirectory(contrib/nanosockets) @@ -271,7 +271,6 @@ include_directories( ${PIONEER_SRC} ${PIONEER_CONTRIB} ${PIONEER_CONTRIB}/doctest - ${PIONEER_CONTRIB}/fmt/include ${ASSIMP_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIRS} ${OPENGL_INCLUDE_DIRS} @@ -361,7 +360,7 @@ if (PYTHON) WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) endif() -target_link_libraries(pioneer-lib PUBLIC lz4 fmt::fmt) +target_link_libraries(pioneer-lib PUBLIC lz4 fmt) list(APPEND pioneerLibs pioneer-core Index: pioneer-20240203/src/lua/LuaPiGui.cpp =================================================================== --- pioneer-20240203.orig/src/lua/LuaPiGui.cpp +++ pioneer-20240203/src/lua/LuaPiGui.cpp @@ -2126,7 +2126,7 @@ bool PiGui::first_body_is_more_important else if (b == ObjectType::PROJECTILE) result = false; else - Error("don't know how to compare %i and %i\n", a, b); + Error("don't know how to compare %i and %i\n", int(a), int(b)); return result; } Index: pioneer-20240203/src/versioningInfo.cpp =================================================================== --- pioneer-20240203.orig/src/versioningInfo.cpp +++ pioneer-20240203/src/versioningInfo.cpp @@ -39,7 +39,7 @@ void OutputVersioningInfo() Output("LibCurl Version: %s", LIBCURL_VERSION); #endif - Output("GLEW dynamic version: %s\n", glewGetString(GLEW_VERSION)); + Output("GLEW dynamic version: %s\n", fmt::string_view{reinterpret_cast<const char*>(glewGetString(GLEW_VERSION))}); Output("--------------------\n"); Output("\n"); } Index: pioneer-20240203/src/graphics/opengl/RendererGL.cpp =================================================================== --- pioneer-20240203.orig/src/graphics/opengl/RendererGL.cpp +++ pioneer-20240203/src/graphics/opengl/RendererGL.cpp @@ -172,7 +172,7 @@ namespace Graphics { glewExperimental = true; GLenum glew_err; if ((glew_err = glewInit()) != GLEW_OK) - Error("GLEW initialisation failed: %s", glewGetErrorString(glew_err)); + Error("GLEW initialisation failed: %s", fmt::string_view{reinterpret_cast<const char*>(glewGetErrorString(glew_err))}); // pump this once as glewExperimental is necessary but spews a single error glGetError(); Index: pioneer-20240203/src/graphics/opengl/Program.cpp =================================================================== --- pioneer-20240203.orig/src/graphics/opengl/Program.cpp +++ pioneer-20240203/src/graphics/opengl/Program.cpp @@ -45,7 +45,7 @@ namespace Graphics { if (status == GL_FALSE) { Log::Error("Error compiling shader: {}:\n {}\n OpenGL vendor: {}\nOpenGL renderer string: {}", - filename, infoLog, glGetString(GL_VENDOR), glGetString(GL_RENDERER)); + filename, infoLog, fmt::string_view{reinterpret_cast<const char *>(glGetString(GL_VENDOR))}, fmt::string_view{reinterpret_cast<const char *>(glGetString(GL_RENDERER))}); return false; } Index: pioneer-20240203/src/CityOnPlanet.cpp =================================================================== --- pioneer-20240203.orig/src/CityOnPlanet.cpp +++ pioneer-20240203/src/CityOnPlanet.cpp @@ -151,7 +151,7 @@ void CityOnPlanet::LoadBuildingType(std: } Log::Verbose("\tLoaded city building {} ({}x{}c, atm: {}, arl: {}, kind: {}, idleAnim: {})", - key, out.cellSize[0], out.cellSize[1], out.rarityAtmo, out.rarityAirless, out.buildingKind, out.idleAnimation != nullptr); + key, out.cellSize[0], out.cellSize[1], out.rarityAtmo, out.rarityAirless, static_cast<uint32_t>(out.buildingKind), out.idleAnimation != nullptr); } void CityOnPlanet::LoadCityFlavour(const FileSystem::FileInfo &file) Index: pioneer-20240203/src/core/Log.cpp =================================================================== --- pioneer-20240203.orig/src/core/Log.cpp +++ pioneer-20240203/src/core/Log.cpp @@ -166,7 +166,7 @@ void Log::LogFatalInternal(const char *m void Log::LogOld(Severity sv, const char *message, fmt::printf_args args) { - std::string out_message = fmt::vsprintf(message, args); + std::string out_message = fmt::vsprintf(fmt::string_view{message}, args); GetLog()->LogLevel(sv, out_message); if (sv == Severity::Warning) { SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_WARNING, "Pioneer warning", out_message.c_str(), 0); @@ -175,7 +175,7 @@ void Log::LogOld(Severity sv, const char [[noreturn]] void Log::LogFatalOld(const char *message, fmt::printf_args args) { - std::string out_message = fmt::vsprintf(message, args); + std::string out_message = fmt::vsprintf(fmt::string_view{message}, args); GetLog()->LogLevel(Severity::Fatal, out_message); SDL_ShowSimpleMessageBox(SDL_MESSAGEBOX_ERROR, "Pioneer error", out_message.c_str(), 0); Index: pioneer-20240203/src/lua/LuaPlayer.cpp =================================================================== --- pioneer-20240203.orig/src/lua/LuaPlayer.cpp +++ pioneer-20240203/src/lua/LuaPlayer.cpp @@ -580,7 +580,7 @@ static int l_get_alert_state(lua_State * LuaPush(l, "ship-firing"); break; default: - Error("Unknown alert state %i", state); + Error("Unknown alert state %i", int{state}); } return 1; }
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor