diff options
Diffstat (limited to 'audio/sayonara/files')
9 files changed, 183 insertions, 111 deletions
diff --git a/audio/sayonara/files/patch-cpp-compile b/audio/sayonara/files/patch-cpp-compile new file mode 100644 index 000000000000..ae8975b87232 --- /dev/null +++ b/audio/sayonara/files/patch-cpp-compile @@ -0,0 +1,109 @@ +diff --git src/Components/Covers/Fetcher/Audioscrobbler.cpp src/Components/Covers/Fetcher/Audioscrobbler.cpp +index 2490f8f4..7916ed16 100644 +--- src/Components/Covers/Fetcher/Audioscrobbler.cpp ++++ src/Components/Covers/Fetcher/Audioscrobbler.cpp +@@ -30,6 +30,8 @@ + #include <QStringList> + #include <QUrl> + ++#include <array> ++ + using Cover::Fetcher::Audioscrobbler; + + namespace +@@ -37,7 +39,7 @@ namespace + QStringList mapToStringList(const QMap<QString, QString>& map) + { + auto result = QStringList {}; +- const auto sizes = std::array {"mega", "extralarge", "large", "medium", "small"}; ++ const auto sizes = std::array<const char *, 5> {"mega", "extralarge", "large", "medium", "small"}; + for(const auto size: sizes) + { + result.push_back(map[size]); +diff --git src/Components/Engine/PipelineExtensions/Changeable.cpp src/Components/Engine/PipelineExtensions/Changeable.cpp +index 654a3c3c..2119e49d 100644 +--- src/Components/Engine/PipelineExtensions/Changeable.cpp ++++ src/Components/Engine/PipelineExtensions/Changeable.cpp +@@ -306,6 +306,12 @@ namespace + } + } + ++static Logger& operator<<(Logger& lhs, const EU::GStringAutoFree& s) ++{ ++ const auto * p = s.data(); ++ return lhs << (p ? p : "null"); ++} ++ + namespace PipelineExtensions::Changeable + { + // NOLINTNEXTLINE(*-make-member-function-const) +@@ -360,11 +366,11 @@ namespace PipelineExtensions::Changeable + auto parent = EU::AutoUnref(gst_element_get_parent(elementA)); + auto* parentElement = GST_ELEMENT(*parent); + const auto name = EU::GStringAutoFree(gst_element_get_name(element)); +- +- spLog(Log::Debug, __FUNCTION__) << "Remove " << name.data() << " from pipeline"; ++ ++ spLog(Log::Debug, __FUNCTION__) << "Remove " << name << " from pipeline"; + if(!EU::hasElement(GST_BIN(parentElement), element)) + { +- spLog(Log::Debug, __FUNCTION__) << "Element " << name.data() << " not in pipeline"; ++ spLog(Log::Debug, __FUNCTION__) << "Element " << name << " not in pipeline"; + return true; + } + +@@ -386,7 +392,7 @@ namespace PipelineExtensions::Changeable + + if(!success) + { +- spLog(Log::Debug, __FUNCTION__) << "Could not remove " << name.data(); ++ spLog(Log::Debug, __FUNCTION__) << "Could not remove " << name; + } + + return success; +@@ -428,4 +434,4 @@ namespace PipelineExtensions::Changeable + return success; + } + } +-#pragma clang diagnostic pop +\ No newline at end of file ++#pragma clang diagnostic pop +diff --git src/Components/Lyrics/LyricWebpageParser.cpp src/Components/Lyrics/LyricWebpageParser.cpp +index b5297b21..53b3b2dc 100644 +--- src/Components/Lyrics/LyricWebpageParser.cpp ++++ src/Components/Lyrics/LyricWebpageParser.cpp +@@ -27,6 +27,8 @@ + #include <QTextBlock> + #include <QTextDocument> + ++#include <array> ++ + using namespace Lyrics; + + namespace +diff --git src/Gui/InfoDialog/GUI_InfoDialog.cpp src/Gui/InfoDialog/GUI_InfoDialog.cpp +index 1752180a..709b8690 100644 +--- src/Gui/InfoDialog/GUI_InfoDialog.cpp ++++ src/Gui/InfoDialog/GUI_InfoDialog.cpp +@@ -47,6 +47,8 @@ + #include <QTabBar> + #include <QTableWidgetItem> + ++#include <unordered_map> ++ + namespace + { + enum StackedWidgetTab +diff --git src/Gui/Plugins/Engine/GUI_LevelPainter.cpp src/Gui/Plugins/Engine/GUI_LevelPainter.cpp +index 455051bb..98b3ee63 100644 +--- src/Gui/Plugins/Engine/GUI_LevelPainter.cpp ++++ src/Gui/Plugins/Engine/GUI_LevelPainter.cpp +@@ -185,7 +185,7 @@ void GUI_LevelPainter::paint() + + else + { +- m->steps[c][r] = std::max(m->steps[c][r] - 1, 0); ++ m->steps[c][r] = std::max(int(m->steps[c][r]) - 1, 0); + } + + if(m->steps[c][r] == 0) diff --git a/audio/sayonara/files/patch-python-compatible b/audio/sayonara/files/patch-python-compatible new file mode 100644 index 000000000000..9b48666a8e8b --- /dev/null +++ b/audio/sayonara/files/patch-python-compatible @@ -0,0 +1,74 @@ +diff --git src/DBus/sayonara-ctl src/DBus/sayonara-ctl +index 2fe80d48..3a5660a8 100755 +--- src/DBus/sayonara-ctl ++++ src/DBus/sayonara-ctl +@@ -4,11 +4,20 @@ + import sys + import argparse + ++# Either pydbus or dbus modules will do, and wrap their API ++# to get a bus-object with dbus_get_object() + try: + from pydbus import SessionBus ++ def dbus_get_object(bus, name, path): ++ return bus.get(name, path) + except ImportError as e: +- print("Cannot find pydbus module. Please install first") +- sys.exit(1) ++ try: ++ from dbus import SessionBus ++ def dbus_get_object(bus, name, path): ++ return bus.get_object(name, path) ++ except ImportError as e: ++ print("Cannot find pydbus or dbus module. Please install first") ++ sys.exit(1) + + def sgn(num): + if num > 0: +@@ -38,7 +47,8 @@ def main(): + bus = SessionBus() + try: + global gSayonaraInstance +- gSayonaraInstance = bus.get( ++ gSayonaraInstance = dbus_get_object( ++ bus, + "org.mpris.MediaPlayer2.sayonara", # Bus name + "/org/mpris/MediaPlayer2" # Object path + ) +diff --git src/DBus/sayonara-query src/DBus/sayonara-query +index f92a10e1..dcf7d735 100755 +--- src/DBus/sayonara-query ++++ src/DBus/sayonara-query +@@ -3,11 +3,20 @@ + import sys + import argparse + ++# Either pydbus or dbus modules will do, and wrap their API ++# to get a bus-object with dbus_get_object() + try: + from pydbus import SessionBus ++ def dbus_get_object(bus, name, path): ++ return bus.get(name, path) + except ImportError as e: +- print("Cannot find pydbus module. Please install first") +- sys.exit(1) ++ try: ++ from dbus import SessionBus ++ def dbus_get_object(bus, name, path): ++ return bus.get_object(name, path) ++ except ImportError as e: ++ print("Cannot find pydbus or dbus module. Please install first") ++ sys.exit(1) + + attributes = { + 'album': 'xesam:album', +@@ -77,7 +86,8 @@ def main(): + bus = SessionBus() + + try: +- sayonara = bus.get( ++ sayonara = dbus_get_object( ++ bus, + 'org.mpris.MediaPlayer2.sayonara', # Bus name + '/org/mpris/MediaPlayer2' # Object path + ) diff --git a/audio/sayonara/files/patch-src_Components_Covers_Fetcher_Audioscrobbler.cpp b/audio/sayonara/files/patch-src_Components_Covers_Fetcher_Audioscrobbler.cpp deleted file mode 100644 index ab2ed553fb5d..000000000000 --- a/audio/sayonara/files/patch-src_Components_Covers_Fetcher_Audioscrobbler.cpp +++ /dev/null @@ -1,20 +0,0 @@ ---- src/Components/Covers/Fetcher/Audioscrobbler.cpp.orig 2024-06-04 15:10:26 UTC -+++ src/Components/Covers/Fetcher/Audioscrobbler.cpp -@@ -30,6 +30,8 @@ - #include <QStringList> - #include <QUrl> - -+#include <array> -+ - using Cover::Fetcher::Audioscrobbler; - - namespace -@@ -37,7 +39,7 @@ namespace - QStringList mapToStringList(const QMap<QString, QString>& map) - { - auto result = QStringList {}; -- const auto sizes = std::array {"mega", "extralarge", "large", "medium", "small"}; -+ const auto sizes = std::array<char *, 5> {"mega", "extralarge", "large", "medium", "small"}; - for(const auto size: sizes) - { - result.push_back(map[size]); diff --git a/audio/sayonara/files/patch-src_Components_Lyrics_LyricWebpageParser.cpp b/audio/sayonara/files/patch-src_Components_Lyrics_LyricWebpageParser.cpp deleted file mode 100644 index 10a01bc6aadd..000000000000 --- a/audio/sayonara/files/patch-src_Components_Lyrics_LyricWebpageParser.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/Components/Lyrics/LyricWebpageParser.cpp.orig 2024-06-04 15:17:38 UTC -+++ src/Components/Lyrics/LyricWebpageParser.cpp -@@ -27,6 +27,8 @@ - #include <QTextBlock> - #include <QTextDocument> - -+#include <array> -+ - using namespace Lyrics; - - namespace diff --git a/audio/sayonara/files/patch-src_Components_Playlist_PlaylistModifiers.cpp b/audio/sayonara/files/patch-src_Components_Playlist_PlaylistModifiers.cpp deleted file mode 100644 index 10724e9ced95..000000000000 --- a/audio/sayonara/files/patch-src_Components_Playlist_PlaylistModifiers.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/Components/Playlist/PlaylistModifiers.cpp.orig 2024-06-04 19:25:08 UTC -+++ src/Components/Playlist/PlaylistModifiers.cpp -@@ -179,7 +179,7 @@ namespace Playlist - const auto& tracks = playlist.tracks(); - const auto durationMs = - std::accumulate(tracks.begin(), tracks.end(), 0, [](const auto timeMs, const auto& track) { -- return timeMs + std::max(0L, track.durationMs()); -+ return timeMs + std::max(MilliSeconds(0), track.durationMs()); - }); - - return durationMs; diff --git a/audio/sayonara/files/patch-src_DBus_sayonara-ctl b/audio/sayonara/files/patch-src_DBus_sayonara-ctl deleted file mode 100644 index 9b7d1b1b198c..000000000000 --- a/audio/sayonara/files/patch-src_DBus_sayonara-ctl +++ /dev/null @@ -1,20 +0,0 @@ ---- src/DBus/sayonara-ctl.orig 2024-06-11 21:55:30 UTC -+++ src/DBus/sayonara-ctl -@@ -5,7 +5,7 @@ import sys - import argparse - - try: -- from pydbus import SessionBus -+ from dbus import SessionBus - except ImportError as e: - print("Cannot find pydbus module. Please install first") - sys.exit(1) -@@ -38,7 +38,7 @@ def main(): - bus = SessionBus() - try: - global gSayonaraInstance -- gSayonaraInstance = bus.get( -+ gSayonaraInstance = bus.get_object( - "org.mpris.MediaPlayer2.sayonara", # Bus name - "/org/mpris/MediaPlayer2" # Object path - ) diff --git a/audio/sayonara/files/patch-src_DBus_sayonara-query b/audio/sayonara/files/patch-src_DBus_sayonara-query deleted file mode 100644 index 8f8baec0a714..000000000000 --- a/audio/sayonara/files/patch-src_DBus_sayonara-query +++ /dev/null @@ -1,20 +0,0 @@ ---- src/DBus/sayonara-query.orig 2024-06-11 21:55:30 UTC -+++ src/DBus/sayonara-query -@@ -4,7 +4,7 @@ import sys - import argparse - - try: -- from pydbus import SessionBus -+ from dbus import SessionBus - except ImportError as e: - print("Cannot find pydbus module. Please install first") - sys.exit(1) -@@ -77,7 +77,7 @@ def main(): - bus = SessionBus() - - try: -- sayonara = bus.get( -+ sayonara = bus.get_object( - 'org.mpris.MediaPlayer2.sayonara', # Bus name - '/org/mpris/MediaPlayer2' # Object path - ) diff --git a/audio/sayonara/files/patch-src_Gui_InfoDialog_GUI__InfoDialog.cpp b/audio/sayonara/files/patch-src_Gui_InfoDialog_GUI__InfoDialog.cpp deleted file mode 100644 index ba71d01e6eeb..000000000000 --- a/audio/sayonara/files/patch-src_Gui_InfoDialog_GUI__InfoDialog.cpp +++ /dev/null @@ -1,11 +0,0 @@ ---- src/Gui/InfoDialog/GUI_InfoDialog.cpp.orig 2024-05-13 19:42:03 UTC -+++ src/Gui/InfoDialog/GUI_InfoDialog.cpp -@@ -47,6 +47,8 @@ - #include <QTabBar> - #include <QTableWidgetItem> - -+#include <unordered_map> -+ - namespace - { - enum StackedWidgetTab diff --git a/audio/sayonara/files/patch-src_Utils_Tagging_MP4_PopularimeterFrame.cpp b/audio/sayonara/files/patch-src_Utils_Tagging_MP4_PopularimeterFrame.cpp deleted file mode 100644 index 3184afe67d16..000000000000 --- a/audio/sayonara/files/patch-src_Utils_Tagging_MP4_PopularimeterFrame.cpp +++ /dev/null @@ -1,18 +0,0 @@ ---- src/Utils/Tagging/MP4/PopularimeterFrame.cpp.orig 2024-01-27 22:05:38 UTC -+++ src/Utils/Tagging/MP4/PopularimeterFrame.cpp -@@ -22,13 +22,14 @@ - #include <QString> - #include "Tagging/TaggingUtils.h" - -+#include <array> - #include <optional> - - namespace - { - [[nodiscard]] int fourBytesToInteger(const int32_t fourBytes) - { -- const auto chars = std::array { -+ const auto chars = std::array<int32_t,3> { - (fourBytes >> 16) & 0xFF, - (fourBytes >> 8) & 0xFF, - (fourBytes & 0xFF) |