From d51341eaa16c7b588604e611ebef386859025355 Mon Sep 17 00:00:00 2001 From: sagitter Date: Feb 03 2019 13:19:49 +0000 Subject: Release 20190203 --- diff --git a/.gitignore b/.gitignore index 0992595..d265478 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,4 @@ /pioneer-20171001.tar.gz /pioneer-20180203.tar.gz /pioneer-20181223.tar.gz +/pioneer-20190203.tar.gz diff --git a/pioneer-bug4503.patch b/pioneer-bug4503.patch deleted file mode 100644 index 6068082..0000000 --- a/pioneer-bug4503.patch +++ /dev/null @@ -1,258 +0,0 @@ -From 1fdea8fe6fd1caf7b37de3e0ad423121b73672e4 Mon Sep 17 00:00:00 2001 -From: Andrew Copland -Date: Wed, 26 Dec 2018 21:58:54 +0000 -Subject: [PATCH] Queue requests in response to UI events, never process them - immediately. - ---- - src/LuaEngine.cpp | 4 +-- - src/Pi.cpp | 57 +++++++++++++++++++++++++++++-------------- - src/Pi.h | 15 +++++++++--- - src/galaxy/Galaxy.cpp | 6 ++--- - src/main.cpp | 1 - - 5 files changed, 54 insertions(+), 29 deletions(-) - -diff --git a/src/LuaEngine.cpp b/src/LuaEngine.cpp -index ebfe2b5eb1..858dcbf75f 100644 ---- a/src/LuaEngine.cpp -+++ b/src/LuaEngine.cpp -@@ -152,9 +152,7 @@ static int l_engine_attr_version(lua_State *l) - */ - static int l_engine_quit(lua_State *l) - { -- if (Pi::game) -- Pi::EndGame(); -- Pi::Quit(); -+ Pi::RequestQuit(); - return 0; - } - -diff --git a/src/Pi.cpp b/src/Pi.cpp -index db4b6721b4..4066e44e7b 100644 ---- a/src/Pi.cpp -+++ b/src/Pi.cpp -@@ -152,7 +152,7 @@ Graphics::RenderTarget *Pi::renderTarget; - RefCountedPtr Pi::renderTexture; - std::unique_ptr Pi::renderQuad; - Graphics::RenderState *Pi::quadRenderState = nullptr; --bool Pi::bRequestEndGame = false; -+std::vector Pi::internalRequests; - bool Pi::isRecordingVideo = false; - FILE *Pi::ffmpegFile = nullptr; - -@@ -774,6 +774,9 @@ bool Pi::IsConsoleActive() - - void Pi::Quit() - { -+ if (Pi::game) { // always end the game if there is one before quitting -+ Pi::EndGame(); -+ } - if (Pi::ffmpegFile != nullptr) { - _pclose(Pi::ffmpegFile); - } -@@ -837,9 +840,7 @@ void Pi::HandleKeyDown(SDL_Keysym *key) - if (CTRL) { - switch (key->sym) { - case SDLK_q: // Quit -- if (Pi::game) -- Pi::EndGame(); -- Pi::Quit(); -+ Pi::RequestQuit(); - break; - case SDLK_PRINTSCREEN: // print - case SDLK_KP_MULTIPLY: // screen -@@ -1039,9 +1040,7 @@ void Pi::HandleEvents() - Pi::input.mouseMotion[0] = Pi::input.mouseMotion[1] = 0; - while (SDL_PollEvent(&event)) { - if (event.type == SDL_QUIT) { -- if (Pi::game) -- Pi::EndGame(); -- Pi::Quit(); -+ Pi::RequestQuit(); - } - - Pi::pigui->ProcessEvent(&event); -@@ -1095,6 +1094,26 @@ void Pi::HandleEvents() - } - } - -+void Pi::HandleRequests() -+{ -+ for (auto request : internalRequests) -+ { -+ switch (request) -+ { -+ case END_GAME: -+ EndGame(); -+ break; -+ case QUIT_GAME: -+ Quit(); -+ break; -+ default: -+ Output("Pi::HandleRequests, unhandled request type processed.\n"); -+ break; -+ } -+ } -+ internalRequests.clear(); -+} -+ - void Pi::TombStoneLoop() - { - std::unique_ptr tombstone(new Tombstone(Pi::renderer, Graphics::GetScreenWidth(), Graphics::GetScreenHeight())); -@@ -1115,6 +1134,8 @@ void Pi::TombStoneLoop() - Pi::DrawRenderTarget(); - Pi::renderer->SwapBuffers(); - -+ Pi::HandleRequests(); -+ - Pi::frameTime = 0.001f * (SDL_GetTicks() - last_time); - _time += Pi::frameTime; - last_time = SDL_GetTicks(); -@@ -1162,8 +1183,6 @@ void Pi::StartGame() - - void Pi::Start(const SystemPath &startPath) - { -- Pi::bRequestEndGame = false; -- - Pi::intro = new Intro(Pi::renderer, Graphics::GetScreenWidth(), Graphics::GetScreenHeight()); - if (startPath != SystemPath(0, 0, 0, 0, 0)) { - Pi::game = new Game(startPath, 0.0); -@@ -1179,7 +1198,7 @@ void Pi::Start(const SystemPath &startPath) - SDL_Event event; - while (SDL_PollEvent(&event)) { - if (event.type == SDL_QUIT) -- Pi::Quit(); -+ Pi::RequestQuit(); - else { - Pi::pigui->ProcessEvent(&event); - -@@ -1260,6 +1279,8 @@ void Pi::Start(const SystemPath &startPath) - _time += Pi::frameTime; - last_time = SDL_GetTicks(); - -+ Pi::HandleRequests(); -+ - #ifdef ENABLE_SERVER_AGENT - Pi::serverAgent->ProcessResponses(); - #endif -@@ -1276,14 +1297,16 @@ void Pi::Start(const SystemPath &startPath) - // request that the game is ended as soon as safely possible - void Pi::RequestEndGame() - { -- Pi::bRequestEndGame = true; -+ internalRequests.push_back(END_GAME); - } - --void Pi::EndGame() -+void Pi::RequestQuit() - { -- // always reset this, otherwise we can never play again -- Pi::bRequestEndGame = false; -+ internalRequests.push_back(QUIT_GAME); -+} - -+void Pi::EndGame() -+{ - Pi::SetMouseGrab(false); - - Pi::musicPlayer.Stop(); -@@ -1423,10 +1446,6 @@ void Pi::MainLoop() - Pi::luaConsole->HandleTCPDebugConnections(); - #endif - -- if (Pi::bRequestEndGame) { -- Pi::EndGame(); -- } -- - Pi::renderer->EndFrame(); - - Pi::renderer->ClearDepthBuffer(); -@@ -1510,6 +1529,8 @@ void Pi::MainLoop() - asyncJobQueue->FinishJobs(); - syncJobQueue->FinishJobs(); - -+ HandleRequests(); -+ - #if WITH_DEVKEYS - if (Pi::showDebugInfo && SDL_GetTicks() - last_stats > 1000) { - size_t lua_mem = Lua::manager->GetMemoryUsage(); -diff --git a/src/Pi.h b/src/Pi.h -index e7dfa78877..8924536e4e 100644 ---- a/src/Pi.h -+++ b/src/Pi.h -@@ -65,10 +65,10 @@ class Pi { - static void RequestEndGame(); // request that the game is ended as soon as safely possible - static void EndGame(); - static void Start(const SystemPath &startPath); -+ static void RequestQuit(); - static void MainLoop(); - static void TombStoneLoop(); - static void OnChangeDetailLevel(); -- static void Quit() __attribute((noreturn)); - static float GetFrameTime() { return frameTime; } - static float GetGameTickAlpha() { return gameTickAlpha; } - -@@ -160,10 +160,20 @@ class Pi { - static bool DrawGUI; - - private: -+ // msgs/requests that can be posted which the game processes at the end of a game loop in HandleRequests -+ enum InternalRequests -+ { -+ END_GAME = 0, -+ QUIT_GAME, -+ }; -+ static void Quit() __attribute((noreturn)); - static void HandleKeyDown(SDL_Keysym *key); - static void HandleEvents(); -- // Handler for ESC key press -+ static void HandleRequests(); - static void HandleEscKey(); -+ -+ // private members -+ static std::vector internalRequests; - static const Uint32 SYNC_JOBS_PER_LOOP = 1; - static std::unique_ptr asyncJobQueue; - static std::unique_ptr syncJobQueue; -@@ -193,7 +203,6 @@ class Pi { - static Graphics::RenderState *quadRenderState; - - static bool doingMouseGrab; -- static bool bRequestEndGame; - - static bool isRecordingVideo; - static FILE *ffmpegFile; -diff --git a/src/galaxy/Galaxy.cpp b/src/galaxy/Galaxy.cpp -index d19d615f3b..312fec6ded 100644 ---- a/src/galaxy/Galaxy.cpp -+++ b/src/galaxy/Galaxy.cpp -@@ -113,15 +113,13 @@ DensityMapGalaxy::DensityMapGalaxy(RefCountedPtr galaxyGenerato - { - RefCountedPtr filedata = FileSystem::gameDataFiles.ReadFile(mapfile); - if (!filedata) { -- Output("Galaxy: couldn't load '%s'\n", mapfile.c_str()); -- Pi::Quit(); -+ Error("Galaxy: couldn't load '%s'\n", mapfile.c_str()); - } - - SDL_RWops *datastream = SDL_RWFromConstMem(filedata->GetData(), filedata->GetSize()); - SDL_Surface *galaxyImg = SDL_LoadBMP_RW(datastream, 1); - if (!galaxyImg) { -- Output("Galaxy: couldn't load: %s (%s)\n", mapfile.c_str(), SDL_GetError()); -- Pi::Quit(); -+ Error("Galaxy: couldn't load: %s (%s)\n", mapfile.c_str(), SDL_GetError()); - } - - // now that we have our raw image loaded -diff --git a/src/main.cpp b/src/main.cpp -index 864ae2a737..f59ca02336 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -197,7 +197,6 @@ int main(int argc, char** argv) - if (filename != "-" && fclose(file) != 0) { - Output("pioneer: writing to \"%s\" failed: %s\n", filename.c_str(), strerror(errno)); - } -- Pi::Quit(); - } - break; - } diff --git a/pioneer-bug4505.patch b/pioneer-bug4505.patch deleted file mode 100644 index f6e8639..0000000 --- a/pioneer-bug4505.patch +++ /dev/null @@ -1,27 +0,0 @@ -From d8a0d783b32b066c9d246e009791eddbf2aedbf3 Mon Sep 17 00:00:00 2001 -From: orbea -Date: Fri, 28 Dec 2018 08:21:42 -0800 -Subject: [PATCH] cmake: Test for a .git directory. - -This prevents the following error when git is found and the source -directory is not a git repo. - - fatal: not a git repository (or any parent up to mount point /) - Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set). ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2b91161386..2d00fd1924 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -39,7 +39,7 @@ endif() - - # Get the GIT hash of the latest commit - include(FindGit OPTIONAL) --if (GIT_FOUND) -+if (GIT_FOUND AND EXISTS ${PROJECT_SOURCE_DIR}/.git) - execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} diff --git a/pioneer-bug4509.patch b/pioneer-bug4509.patch deleted file mode 100644 index 7f14662..0000000 --- a/pioneer-bug4509.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 882a9bb23c83f0260050f06b2c77626caf449e5a Mon Sep 17 00:00:00 2001 -From: Webster Sheets -Date: Thu, 3 Jan 2019 13:05:49 -0500 -Subject: [PATCH] Use dummy videodriver for modelcompiler. - ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 2d00fd1924..1512307f95 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -241,7 +241,7 @@ set_target_properties(${PROJECT_NAME} modelcompiler savegamedump pioneerLib PROP - # Optimize the models after the modelcompiler is built. - # This really shouldn't be done inside the source tree... - add_custom_command(TARGET modelcompiler POST_BUILD -- COMMAND modelcompiler -b inplace -+ COMMAND ${CMAKE_COMMAND} -E env SDL_VIDEODRIVER=dummy $ -b inplace - WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} - COMMENT "Optimizing models" VERBATIM - ) diff --git a/pioneer-bug4510.patch b/pioneer-bug4510.patch deleted file mode 100644 index 8a96cf0..0000000 --- a/pioneer-bug4510.patch +++ /dev/null @@ -1,62 +0,0 @@ -From e83b0c04eaafb8314639380b8cf8a85141ca65e8 Mon Sep 17 00:00:00 2001 -From: orbea -Date: Thu, 3 Jan 2019 16:51:05 -0800 -Subject: [PATCH 1/2] Fix modelcompiler crash when opengl.txt doesn't exist. - -This crash is reproduced during the build when ran with sandbox. - -Further fixes https://github.com/pioneerspacesim/pioneer/issues/4506 ---- - src/graphics/Graphics.cpp | 13 +++++++++---- - 1 file changed, 9 insertions(+), 4 deletions(-) - -diff --git a/src/graphics/Graphics.cpp b/src/graphics/Graphics.cpp -index f5d0c345ec..e4958b0f3f 100644 ---- a/src/graphics/Graphics.cpp -+++ b/src/graphics/Graphics.cpp -@@ -102,11 +102,16 @@ Renderer* Init(Settings vs) - renderer->WriteRendererInfo(buf); - - FILE *f = FileSystem::userFiles.OpenWriteStream("opengl.txt", FileSystem::FileSourceFS::WRITE_TEXT); -- if (!f) -+ if (f) -+ { -+ const std::string &s = buf.str(); -+ fwrite(s.c_str(), 1, s.size(), f); -+ fclose(f); -+ } -+ else -+ { - Output("Could not open 'opengl.txt'\n"); -- const std::string &s = buf.str(); -- fwrite(s.c_str(), 1, s.size(), f); -- fclose(f); -+ } - } - - initted = true; - -From b97fe61476f6fd7eb0621dbd660f0020fd32a9fc Mon Sep 17 00:00:00 2001 -From: orbea -Date: Thu, 3 Jan 2019 16:59:50 -0800 -Subject: [PATCH 2/2] cmake: Add missing DESTDIR. - -This will be installed directly to the file system even when DESTDIR -is used. ---- - CMakeLists.txt | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/CMakeLists.txt b/CMakeLists.txt -index 1512307f95..0b6b504611 100644 ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -250,7 +250,7 @@ install(TARGETS ${PROJECT_NAME} modelcompiler savegamedump - RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} - ) - install(DIRECTORY data/ -- DESTINATION ${PIONEER_DATA_DIR} -+ DESTINATION ${DESTDIR}${PIONEER_DATA_DIR} - PATTERN "listdata.*" EXCLUDE - PATTERN "Makefile.am" EXCLUDE - ) diff --git a/pioneer.spec b/pioneer.spec index dad2c1a..4f512f1 100644 --- a/pioneer.spec +++ b/pioneer.spec @@ -12,8 +12,8 @@ ExclusiveArch: %{ix86} x86_64 Name: pioneer Summary: A game of lonely space adventure -Version: 20181223 -Release: 5%{?dist} +Version: 20190203 +Release: 1%{?dist} ## Main license: GPLv3 ## Dejavu font license: Bitstream Vera and Public Domain @@ -24,12 +24,6 @@ Source0: https://github.com/pioneerspacesim/%{name}/archive/%{version}/%{n Source1: %{name}.desktop Source2: %{name}.appdata.xml -# Set of patches from January 2019 changes -Patch0: %{name}-bug4503.patch -Patch1: %{name}-bug4505.patch -Patch2: %{name}-bug4509.patch -Patch3: %{name}-bug4510.patch - %if 0%{?use_autotools} BuildRequires: autoconf BuildRequires: automake @@ -124,7 +118,7 @@ Requires: fontpackages-filesystem PionilliumText22L Medium font file based on Titillium. %prep -%autosetup -p1 -n %{name}-%{version} +%autosetup -n %{name}-%{version} ## Pioneer does not work with Lua 5.3.* ## We cannot unbundle internal Lua yet @@ -282,6 +276,9 @@ ln -sf %{_fontbasedir}/dejavu/DejaVuSans.ttf %{buildroot}%{_datadir}/%{name}/fon %dir %{_fontdir} %changelog +* Sun Feb 03 2019 Antonio Trande - 20190203-1 +- Release 20190203 + * Sat Feb 02 2019 Fedora Release Engineering - 20181223-5 - Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild diff --git a/sources b/sources index 8894454..789ec80 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (pioneer-20181223.tar.gz) = 421f80076c4ee9a334c6e856e6c0ac1ef2e8c3c67d62d3c28492a5b9d977116c746aa2d196eea3b4be921c4bef5f9c489b036dac8755c6c1a24c1ef4c05bc7c3 +SHA512 (pioneer-20190203.tar.gz) = 40e408dde19622cf9c926ba4458e2bf0e11e5f7d4713e9ea9a6e16d1e3f676b0329516b4a26d5ebe6f425b43c3711030b842468513da853f389d8de8caea848c