The package rpms/powdertoy.git has added or updated architecture specific content in its
spec file (ExclusiveArch/ExcludeArch or %ifarch/%ifnarch) in commit(s):
https://src.fedoraproject.org/cgit/rpms/powdertoy.git/commit/?id=57e05058....
Change:
-%ifarch %{ix86} x86_64
Thanks.
Full change:
============
commit 57e05058f0b3b19ffcb1b61f2c1169379eec028c
Author: Artur Frenszek-Iwicki <fedora(a)svgames.pl>
Date: Wed Jul 14 19:00:00 2021 +0200
Update to v96.0.348
diff --git a/.gitignore b/.gitignore
index b670df9..8e3344b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,3 @@
/The-Powder-Toy-v94.1.tar.gz
/The-Powder-Toy-v95.0.tar.gz
+/The-Powder-Toy-v96.0.348.tar.gz
diff --git a/0000-backwards-compatible-data-dir.patch
b/0000-backwards-compatible-data-dir.patch
new file mode 100644
index 0000000..b640b68
--- /dev/null
+++ b/0000-backwards-compatible-data-dir.patch
@@ -0,0 +1,13 @@
+--- The-Powder-Toy-96.0.348/src/PowderToySDL.cpp 2021-07-11 01:33:17.000000000 +0200
++++ The-Powder-Toy-96.0.348/src/PowderToySDL.cpp 2021-07-14 18:55:00.000000000 +0200
+@@ -755,9 +755,9 @@
+ perror("failed to chdir to requested ddir");
+ }
+ else
+ {
+- char *ddir = SDL_GetPrefPath(NULL, "The Powder Toy");
++ char *ddir = SDL_GetPrefPath(NULL, "powdertoy");
+ #ifdef WIN
+ struct _stat s;
+ if (_stat("powder.pref", &s) != 0)
+ #else
diff --git a/powdertoy--add-the-noupdatecheck-option-to-Sconscript.patch
b/powdertoy--add-the-noupdatecheck-option-to-Sconscript.patch
deleted file mode 100644
index 60735f8..0000000
--- a/powdertoy--add-the-noupdatecheck-option-to-Sconscript.patch
+++ /dev/null
@@ -1,226 +0,0 @@
-diff --git a/SConscript b/SConscript
-index 2c5bad32..94936dae 100644
---- a/SConscript
-+++ b/SConscript
-@@ -46,6 +46,7 @@ AddSconsOption("tool", False, True, "Tool prefix
appended before gcc/g++.")
-
- AddSconsOption('beta', False, False, "Beta build.")
- AddSconsOption('no-install-prompt', False, False, "Disable the \"do
you want to install Powder Toy?\" prompt.")
-+AddSconsOption('no-update-check', False, False, "Disable checking for
updates.")
- AddSconsOption('save-version', False, True, "Save version.")
- AddSconsOption('minor-version', False, True, "Minor version.")
- AddSconsOption('build-number', False, True, "Build number.")
-@@ -549,6 +550,8 @@ if GetOption('beta'):
- env.Append(CPPDEFINES=['BETA'])
- if GetOption('no-install-prompt'):
- env.Append(CPPDEFINES=['NO_INSTALL_CHECK'])
-+if GetOption('no-update-check'):
-+ env.Append(CPPDEFINES=['NO_UPDATE_CHECK'])
-
-
- #Generate list of sources to compile
-diff --git a/src/client/Client.cpp b/src/client/Client.cpp
-index d0a80610..fbb8a175 100644
---- a/src/client/Client.cpp
-+++ b/src/client/Client.cpp
-@@ -59,10 +59,12 @@ extern "C"
-
- Client::Client():
- messageOfTheDay("Fetching the message of the day..."),
-+#ifndef NO_UPDATE_CHECK
- versionCheckRequest(nullptr),
- alternateVersionCheckRequest(nullptr),
- usingAltUpdateServer(false),
- updateAvailable(false),
-+#endif
- authUser(0, "")
- {
- //Read config
-@@ -129,6 +131,7 @@ void Client::Initialise(ByteString proxyString, bool disableNetwork)
- }
- stampsLib.close();
-
-+#ifndef NO_UPDATE_CHECK
- //Begin version check
- versionCheckRequest = new http::Request(SCHEME SERVER "/Startup.json");
-
-@@ -147,7 +150,8 @@ void Client::Initialise(ByteString proxyString, bool disableNetwork)
- alternateVersionCheckRequest->AuthHeaders(authUser.Username, "");
- }
- alternateVersionCheckRequest->Start();
--#endif
-+#endif // UPDATESERVER
-+#endif // NO_UPDATE_CHECK
- }
-
- bool Client::IsFirstRun()
-@@ -708,6 +712,7 @@ RequestStatus Client::ParseServerReturn(ByteString &result, int
status, bool jso
-
- void Client::Tick()
- {
-+#ifndef NO_UPDATE_CHECK
- if (versionCheckRequest)
- {
- if (CheckUpdate(versionCheckRequest, true))
-@@ -718,8 +723,10 @@ void Client::Tick()
- if (CheckUpdate(alternateVersionCheckRequest, false))
- alternateVersionCheckRequest = nullptr;
- }
-+#endif
- }
-
-+#ifndef NO_UPDATE_CHECK
- bool Client::CheckUpdate(http::Request *updateRequest, bool checkSession)
- {
- //Check status on version check request
-@@ -843,6 +850,7 @@ void Client::notifyUpdateAvailable()
- (*iterator)->NotifyUpdateAvailable(this);
- }
- }
-+#endif // NO_UPDATE_CHECK
-
- void Client::notifyMessageOfTheDay()
- {
-@@ -917,6 +925,7 @@ void Client::WritePrefs()
-
- void Client::Shutdown()
- {
-+#ifndef NO_UPDATE_CHECK
- if (versionCheckRequest)
- {
- versionCheckRequest->Cancel();
-@@ -925,6 +934,7 @@ void Client::Shutdown()
- {
- alternateVersionCheckRequest->Cancel();
- }
-+#endif
-
- #ifndef NOHTTP
- http::RequestManager::Ref().Shutdown();
-diff --git a/src/client/Client.h b/src/client/Client.h
-index bce8f667..5817e258 100644
---- a/src/client/Client.h
-+++ b/src/client/Client.h
-@@ -51,11 +51,13 @@ private:
- String messageOfTheDay;
- std::vector<std::pair<String, ByteString> > serverNotifications;
-
-+#ifndef NO_UPDATE_CHECK
- http::Request *versionCheckRequest;
- http::Request *alternateVersionCheckRequest;
- bool usingAltUpdateServer;
- bool updateAvailable;
- UpdateInfo updateInfo;
-+#endif
-
- String lastError;
- bool firstRun;
-@@ -163,9 +165,12 @@ public:
- }
- RequestStatus ParseServerReturn(ByteString &result, int status, bool json);
- void Tick();
-- bool CheckUpdate(http::Request *updateRequest, bool checkSession);
- void Shutdown();
-
-+#ifndef NO_UPDATE_CHECK
-+ bool CheckUpdate(http::Request *updateRequest, bool checkSession);
-+#endif
-+
- // preferences functions
- void WritePrefs();
-
-diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp
-index 77c51520..1a64e8e6 100644
---- a/src/gui/game/GameController.cpp
-+++ b/src/gui/game/GameController.cpp
-@@ -1570,6 +1570,7 @@ void GameController::NotifyNewNotification(Client * sender,
std::pair<String, By
- gameModel->AddNotification(new LinkNotification(notification.second,
notification.first));
- }
-
-+#ifndef NO_UPDATE_CHECK
- void GameController::NotifyUpdateAvailable(Client * sender)
- {
- class UpdateNotification : public Notification
-@@ -1635,12 +1636,14 @@ void GameController::NotifyUpdateAvailable(Client * sender)
- break;
- }
- }
-+#endif
-
- void GameController::RemoveNotification(Notification * notification)
- {
- gameModel->RemoveNotification(notification);
- }
-
-+#ifndef NO_UPDATE_CHECK
- void GameController::RunUpdater()
- {
- #ifndef MACOSX
-@@ -1657,6 +1660,7 @@ void GameController::RunUpdater()
- Platform::OpenURI(file);
- #endif // MACOSX
- }
-+#endif
-
- bool GameController::GetMouseClickRequired()
- {
-diff --git a/src/gui/game/GameController.h b/src/gui/game/GameController.h
-index 3b62106a..1316da5c 100644
---- a/src/gui/game/GameController.h
-+++ b/src/gui/game/GameController.h
-@@ -168,10 +168,14 @@ public:
-
- void RemoveNotification(Notification * notification);
-
-- void NotifyUpdateAvailable(Client * sender) override;
- void NotifyAuthUserChanged(Client * sender) override;
- void NotifyNewNotification(Client * sender, std::pair<String, ByteString>
notification) override;
-+
-+#ifndef NO_UPDATE_CHECK
-+ void NotifyUpdateAvailable(Client * sender) override;
- void RunUpdater();
-+#endif
-+
- bool GetMouseClickRequired();
- };
-
-diff --git a/src/gui/update/UpdateActivity.cpp b/src/gui/update/UpdateActivity.cpp
-index 30742e40..383f69f7 100644
---- a/src/gui/update/UpdateActivity.cpp
-+++ b/src/gui/update/UpdateActivity.cpp
-@@ -15,6 +15,9 @@
- #include "Config.h"
- #include "Platform.h"
-
-+// The whole class is unused if the update check is disabled.
-+#ifndef NO_UPDATE_CHECK
-+
- class UpdateDownloadTask : public Task
- {
- public:
-@@ -164,3 +167,4 @@ void UpdateActivity::NotifyError(Task * sender)
- UpdateActivity::~UpdateActivity() {
- }
-
-+#endif // NO_UPDATE_CHECK
-diff --git a/src/gui/update/UpdateActivity.h b/src/gui/update/UpdateActivity.h
-index 861f6240..2673b74e 100644
---- a/src/gui/update/UpdateActivity.h
-+++ b/src/gui/update/UpdateActivity.h
-@@ -1,6 +1,9 @@
- #ifndef UPDATEACTIVITY_H_
- #define UPDATEACTIVITY_H_
-
-+// The whole class is unused if the update check is disabled.
-+#ifndef NO_UPDATE_CHECK
-+
- class Task;
- class TaskWindow;
- class UpdateActivity
-@@ -15,4 +18,6 @@ public:
- virtual void NotifyError(Task * sender);
- };
-
-+#endif // NO_UPDATE_CHECK
-+
- #endif /* UPDATEACTIVITY_H_ */
diff --git a/powdertoy--store-powder.pref-in-user-directory.patch
b/powdertoy--store-powder.pref-in-user-directory.patch
deleted file mode 100644
index d4eccc9..0000000
--- a/powdertoy--store-powder.pref-in-user-directory.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-diff --git a/SConscript b/SConscript
-index 2c5bad32..7916f0d0 100644
---- a/SConscript
-+++ b/SConscript
-@@ -70,6 +70,8 @@ AddSconsOption('opengl-renderer', False, False, "Build
with OpenGL renderer supp
- AddSconsOption('renderer', False, False, "Build the save renderer.")
- AddSconsOption('font', False, False, "Build the font editor.")
-
-+AddSconsOption('data-in-homedir', False, False, "Store preferences and
savegames inside the user home directory.")
-+
- AddSconsOption('wall', False, False, "Error on all warnings.")
- AddSconsOption('no-warnings', False, False, "Disable all compiler
warnings.")
- AddSconsOption('nolua', False, False, "Disable Lua.")
-@@ -518,6 +520,9 @@ if GetOption('renderer'):
- if GetOption('font'):
- env.Append(CPPDEFINES=['FONTEDITOR'])
-
-+if GetOption('data-in-homedir'):
-+ env.Append(CPPDEFINES=['DATA_IN_HOMEDIR'])
-+
- if GetOption("wall"):
- if msvc:
- env.Append(CCFLAGS=['/WX'])
-diff --git a/src/Platform.cpp b/src/Platform.cpp
-index dd7ec77e..08b73dff 100644
---- a/src/Platform.cpp
-+++ b/src/Platform.cpp
-@@ -10,8 +10,10 @@
- #include <shlwapi.h>
- #include <windows.h>
- #else
--#include <unistd.h>
- #include <ctime>
-+#include <errno.h>
-+#include <unistd.h>
-+#include <sys/stat.h>
- #include <sys/time.h>
- #endif
- #ifdef MACOSX
-@@ -23,6 +25,40 @@
- namespace Platform
- {
-
-+ByteString PrefFileDirectory()
-+{
-+#if defined(WIN)
-+ char *appdata = getenv("APPDATA");
-+ if(appdata != nullptr) return std::string(appdata) + "\\The Powder Toy\\";
-+
-+ char *homedrive = getenv("HOMEDRIVE");
-+ char *homepath = getenv("HOMEPATH");
-+ if(homedrive != nullptr && homepath != nullptr) return std::string(homedrive) +
std::string(homepath) + "\\AppData\\Roaming\\The Powder Toy\\";
-+#elif defined(LIN)
-+ char *xdg_data = getenv("XDG_DATA_HOME");
-+ if(xdg_data != nullptr) return std::string(xdg_data) + "/powdertoy/";
-+
-+ char *home = getenv("HOME");
-+ if(home != nullptr) return std::string(home) + "/.local/share/powdertoy/";
-+
-+ char *username = getlogin();
-+ if(username != nullptr) return "/home/" + std::string(username) +
"/.local/share/powdertoy/";
-+#elif defined(MACOSX)
-+ FSRef ref;
-+ OSType folderType = kApplicationSupportFolderType;
-+ char path[PATH_MAX];
-+
-+ FSFindFolder( kUserDomain, folderType, kCreateFolder, &ref );
-+
-+ FSRefMakePath( &ref, (UInt8*)&path, PATH_MAX );
-+
-+ std::string tptPath = std::string(path) + "/The Powder Toy";
-+ return tptPath;
-+#endif
-+
-+ return ""; // give up
-+}
-+
- ByteString ExecutableName()
- {
- ByteString ret;
-@@ -146,4 +182,51 @@ void LoadFileInResource(int name, int type, unsigned int& size,
const char*& dat
- #endif
- }
-
-+int MakeDirectory(const char * dirName)
-+{
-+#ifdef WIN
-+ return _mkdir(dirName);
-+#else
-+ return mkdir(dirName, 0755);
-+#endif
-+}
-+
-+int MakeDirectory(const ByteString &dirName)
-+{
-+ return MakeDirectory(dirName.c_str());
-+}
-+
-+int MakeDirectoryChain(const char * dirName)
-+{
-+ ByteString dirStr = dirName;
-+ return MakeDirectoryChain(dirStr);
-+}
-+
-+int MakeDirectoryChain(ByteString dirName)
-+{
-+ int success = MakeDirectory(dirName);
-+ if(success == 0) return 0;
-+
-+ // If the directory already exists, consider it a success
-+ if(errno == EEXIST) return 0;
-+
-+ // ENOENT signifies that an element of the path does not exist, i.e. a parent directory
is missing.
-+ // If the error is ENOENT, descend in path and try to create parent directories.
-+ // If it's something else, bail out and return failure.
-+ if(errno != ENOENT) return -1;
-+
-+#ifdef WIN
-+ unsigned long slashPos = dirName.find_last_of('\\', 0);
-+#else
-+ unsigned long slashPos = dirName.find_last_of('/', 0);
-+#endif
-+
-+ // No slash, means we can't descent further in path
-+ if(slashPos == std::string::npos) return -1;
-+
-+ // Descend in path and try again
-+ dirName = dirName.Erase(slashPos, dirName.length());
-+ return MakeDirectoryChain(dirName);
-+}
-+
- }
-diff --git a/src/Platform.h b/src/Platform.h
-index 9a2ad8ab..f5cdffc2 100644
---- a/src/Platform.h
-+++ b/src/Platform.h
-@@ -5,6 +5,7 @@
-
- namespace Platform
- {
-+ ByteString PrefFileDirectory();
- ByteString ExecutableName();
- void DoRestart();
-
-@@ -14,6 +15,11 @@ namespace Platform
- long unsigned int GetTime();
-
- void LoadFileInResource(int name, int type, unsigned int& size, const char*&
data);
-+
-+ int MakeDirectory(const char * dirname);
-+ int MakeDirectory(const ByteString &dirname);
-+ int MakeDirectoryChain(const char * dirname);
-+ int MakeDirectoryChain(ByteString dirname);
- }
-
- #endif
-diff --git a/src/PowderToySDL.cpp b/src/PowderToySDL.cpp
-index 701c197a..ee8dbb00 100644
---- a/src/PowderToySDL.cpp
-+++ b/src/PowderToySDL.cpp
-@@ -53,6 +53,7 @@
-
- #define INCLUDE_SYSWM
- #include "SDLCompat.h"
-+#include "Platform.h"
-
- int desktopWidth = 1280, desktopHeight = 1024;
-
-@@ -619,18 +620,10 @@ void SigHandler(int signal)
-
- void ChdirToDataDirectory()
- {
--#ifdef MACOSX
-- FSRef ref;
-- OSType folderType = kApplicationSupportFolderType;
-- char path[PATH_MAX];
--
-- FSFindFolder( kUserDomain, folderType, kCreateFolder, &ref );
--
-- FSRefMakePath( &ref, (UInt8*)&path, PATH_MAX );
--
-- std::string tptPath = std::string(path) + "/The Powder Toy";
-- mkdir(tptPath.c_str(), 0755);
-- chdir(tptPath.c_str());
-+#if defined(DATA_IN_HOMEDIR) || defined(MACOSX)
-+ ByteString path = Platform::PrefFileDirectory();
-+ Platform::MakeDirectoryChain(path);
-+ chdir(path.c_str());
- #endif
- }
-
-diff --git a/src/client/Client.cpp b/src/client/Client.cpp
-index d0a80610..e308e4a6 100644
---- a/src/client/Client.cpp
-+++ b/src/client/Client.cpp
-@@ -515,15 +515,6 @@ std::vector<ByteString> Client::DirectorySearch(ByteString
directory, ByteString
- return searchResults;
- }
-
--int Client::MakeDirectory(const char * dirName)
--{
--#ifdef WIN
-- return _mkdir(dirName);
--#else
-- return mkdir(dirName, 0755);
--#endif
--}
--
- bool Client::WriteFile(std::vector<unsigned char> fileData, ByteString filename)
- {
- bool saveError = false;
-@@ -1066,7 +1057,7 @@ ByteString Client::AddStamp(GameSave * saveData)
- ByteString saveID = ByteString::Build(Format::Hex(Format::Width(lastStampTime, 8)),
Format::Hex(Format::Width(lastStampName, 2)));
- ByteString filename = STAMPS_DIR PATH_SEP + saveID + ".stm";
-
-- MakeDirectory(STAMPS_DIR);
-+ Platform::MakeDirectory(STAMPS_DIR);
-
- Json::Value stampInfo;
- stampInfo["type"] = "stamp";
-@@ -1101,7 +1092,7 @@ ByteString Client::AddStamp(GameSave * saveData)
-
- void Client::updateStamps()
- {
-- MakeDirectory(STAMPS_DIR);
-+ Platform::MakeDirectory(STAMPS_DIR);
-
- std::ofstream stampsStream;
- stampsStream.open(ByteString(STAMPS_DIR PATH_SEP "stamps.def").c_str(),
std::ios::binary);
-diff --git a/src/client/Client.h b/src/client/Client.h
-index bce8f667..026113a0 100644
---- a/src/client/Client.h
-+++ b/src/client/Client.h
-@@ -117,7 +117,6 @@ public:
- void Initialise(ByteString proxyString, bool disableNetwork);
- bool IsFirstRun();
-
-- int MakeDirectory(const char * dirname);
- bool WriteFile(std::vector<unsigned char> fileData, ByteString filename);
- bool WriteFile(std::vector<char> fileData, ByteString filename);
- bool FileExists(ByteString filename);
-diff --git a/src/gui/game/GameController.cpp b/src/gui/game/GameController.cpp
-index 77c51520..9ccf8241 100644
---- a/src/gui/game/GameController.cpp
-+++ b/src/gui/game/GameController.cpp
-@@ -1210,7 +1210,7 @@ void GameController::OpenLocalSaveWindow(bool asCurrent)
- gameSave->authors = localSaveInfo;
-
- gameModel->SetSaveFile(&tempSave, gameView->ShiftBehaviour());
-- Client::Ref().MakeDirectory(LOCAL_SAVE_DIR);
-+ Platform::MakeDirectory(LOCAL_SAVE_DIR);
- std::vector<char> saveData = gameSave->Serialise();
- if (saveData.size() == 0)
- new ErrorMessage("Error", "Unable to serialize game data.");
-diff --git a/src/gui/game/GameView.cpp b/src/gui/game/GameView.cpp
-index b992057f..2da88534 100644
---- a/src/gui/game/GameView.cpp
-+++ b/src/gui/game/GameView.cpp
-@@ -38,6 +38,8 @@
- #include "simulation/ElementDefs.h"
- #include "simulation/ElementClasses.h"
-
-+#include "Platform.h"
-+
- #ifdef GetUserName
- # undef GetUserName // dammit windows
- #endif
-@@ -898,8 +900,8 @@ int GameView::Record(bool record)
- {
- time_t startTime = time(NULL);
- recordingFolder = startTime;
-- Client::Ref().MakeDirectory("recordings");
-- Client::Ref().MakeDirectory(ByteString::Build("recordings", PATH_SEP,
recordingFolder).c_str());
-+ Platform::MakeDirectory("recordings");
-+ Platform::MakeDirectory(ByteString::Build("recordings", PATH_SEP,
recordingFolder));
- recording = true;
- }
- }
-diff --git a/src/gui/save/LocalSaveActivity.cpp b/src/gui/save/LocalSaveActivity.cpp
-index 2421303c..3cfb1329 100644
---- a/src/gui/save/LocalSaveActivity.cpp
-+++ b/src/gui/save/LocalSaveActivity.cpp
-@@ -15,6 +15,7 @@
- #include "gui/interface/Button.h"
- #include "gui/interface/Label.h"
- #include "gui/interface/Textbox.h"
-+#include "Platform.h"
-
- LocalSaveActivity::LocalSaveActivity(SaveFile save, OnSaved onSaved_) :
- WindowActivity(ui::Point(-1, -1), ui::Point(220, 200)),
-@@ -104,7 +105,7 @@ void LocalSaveActivity::Save()
-
- void LocalSaveActivity::saveWrite(ByteString finalFilename)
- {
-- Client::Ref().MakeDirectory(LOCAL_SAVE_DIR);
-+ Platform::MakeDirectory(LOCAL_SAVE_DIR);
- GameSave *gameSave = save.GetGameSave();
- Json::Value localSaveInfo;
- localSaveInfo["type"] = "localsave";
-diff --git a/src/lua/LuaScriptInterface.cpp b/src/lua/LuaScriptInterface.cpp
-index 2f94acd4..9a883257 100644
---- a/src/lua/LuaScriptInterface.cpp
-+++ b/src/lua/LuaScriptInterface.cpp
-@@ -3486,7 +3486,7 @@ int LuaScriptInterface::fileSystem_makeDirectory(lua_State * l)
- const char * dirname = luaL_checkstring(l, 1);
-
- int ret = 0;
-- ret = Client::Ref().MakeDirectory(dirname);
-+ ret = Platform::MakeDirectory(dirname);
- lua_pushboolean(l, ret == 0);
- return 1;
- }
diff --git a/powdertoy.spec b/powdertoy.spec
index 750cb65..c6aca19 100644
--- a/powdertoy.spec
+++ b/powdertoy.spec
@@ -7,33 +7,33 @@ URL:
https://powdertoy.co.uk
# src/json/ and src/lua/ are MIT
License: GPLv3 and MIT and ASL 2.0
-Version: 95.0
-Release: 3%{?dist}
+Version: 96.0.348
+Release: 1%{?dist}
%global repo_owner The-Powder-Toy
%global repo_name The-Powder-Toy
Source0:
https://github.com/%{repo_owner}/%{repo_name}/archive/v%{version}/%{repo_...
-# By default, the program stores its preferences file in current working dir
-Patch0: %{name}--store-powder.pref-in-user-directory.patch
+# Before v96, the game stored user data (config etc.) in $PWD.
+# Fedora shipped a patch which put the user data in
"$XDG_DATA_HOME/powdertoy".
+# Starting with v96, the game stores its user data in "$XDG_DATA_HOME/The Powder
Toy".
+# This patch changes the data dir to preserve backwards-compatibility.
+Patch0: 0000-backwards-compatible-data-dir.patch
-# The program has a built-in update checker - we don't want that
-Patch1: %{name}--add-the-noupdatecheck-option-to-Sconscript.patch
+BuildRequires: desktop-file-utils
+BuildRequires: gcc-c++
+BuildRequires: libappstream-glib
+BuildRequires: meson
BuildRequires: bzip2-devel
BuildRequires: fftw-devel
-BuildRequires: gcc-c++
BuildRequires: lua-devel
BuildRequires: luajit-devel
BuildRequires: libcurl-devel
BuildRequires: mesa-libGL-devel
-BuildRequires: python3-scons
BuildRequires: SDL2-devel
BuildRequires: zlib-devel
-BuildRequires: desktop-file-utils
-BuildRequires: libappstream-glib
-
Requires: hicolor-icon-theme
@@ -61,23 +61,23 @@ mv resources/powder.appdata.xml resources/%{name}.appdata.xml
%build
-%global noarch_scons_flags --builddir=build --data-in-homedir --luajit
--no-install-prompt --no-update-check --release --symbols --output=%{name}
-
-# The game assumes x86 and passes "--sse --sse2" to the compiler by default,
-# so we have to manually set the SSE flags based on the architecture
-%ifarch %{ix86} x86_64
- %global scons_flags %{noarch_scons_flags} --sse --sse2 --sse3
-%else
- %global scons_flags %{noarch_scons_flags} --no-sse
-%endif
-
-%set_build_flags
-scons-3 %{scons_flags} %{?_smp_mflags} ./
+%meson \
+ -Dstatic=none \
+ -Dignore_updates=true \
+ -Dinstall_check=false \
+ -Dgravfft=true \
+ -Dlua=luajit \
+ -Dx86_sse=auto \
+ -Dnative=false
+%meson_build
%install
+# Running "%%meson_install" gives "Nothing to install",
+# so we gotta do all of this manually.
+
install -m 755 -d %{buildroot}%{_bindir}
-install -m 755 build/%{name} %{buildroot}%{_bindir}/
+install -m 755 %{_vpath_builddir}/powder %{buildroot}%{_bindir}/%{name}
# -- png icons
for ICONSIZE in 128 256; do
@@ -121,6 +121,12 @@ appstream-util validate-relax --nonet
%{buildroot}%{_metainfodir}/%{name}.appdat
%changelog
+* Wed Jul 14 2021 Artur Frenszek-Iwicki <fedora(a)svgames.pl> - 96.0.348-1
+- Update to latest upstream release
+- Drop Patch0 (store "powder.pref" in user's home directory) - fixed
upstream
+- Drop Patch1 (option to disable the update checker) - accepted upstream
+- Add Patch0 - edit "powder.pref" storage path to preserve compatibility
+
* Tue Jul 28 2020 Fedora Release Engineering <releng(a)fedoraproject.org> - 95.0-3
- Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
diff --git a/sources b/sources
index 1860845..513766e 100644
--- a/sources
+++ b/sources
@@ -1 +1 @@
-SHA512 (The-Powder-Toy-v95.0.tar.gz) =
e2f8230631a8ee50b3cd4b9d34cf7121663266ea1fd6ffb176b37b569b2e1566fc84ff1abc434bbfd7eb6b55264eb87c11312e8ebdc28f07210efcc9db756910
+SHA512 (The-Powder-Toy-v96.0.348.tar.gz) =
22b7883fae33a16271eea6b16ddba473e607cb1376283a7aa966081d2ff4ebfa014d1ab2ced30508157416c22c71d22182f81f388321cd9075b4b9d7448f4025