sony-headphones-client: patch gcc-20 support

This commit is contained in:
Felix Buehler 2022-05-15 12:24:50 +02:00
parent 88be12e5dd
commit f8e9160a67
2 changed files with 39 additions and 11 deletions

View File

@ -19,26 +19,35 @@ stdenv.mkDerivation rec {
cmakeFlags = [ "-Wno-dev" ];
patches = [ ./gcc.patch ];
postPatch = ''
substituteInPlace Constants.h \
--replace "UNKNOWN = -1" "// UNKNOWN removed since it doesn't fit in char"
'';
installPhase = ''
runHook preInstall
install -Dm755 -t $out/bin SonyHeadphonesClient
runHook postInstall
'';
desktopItems = [ (makeDesktopItem {
name = "SonyHeadphonesClient";
exec = "SonyHeadphonesClient";
icon = "SonyHeadphonesClient";
desktopName = "Sony Headphones Client";
comment = "A client recreating the functionality of the Sony Headphones app";
categories = [ "Audio" "Mixer" ];
}) ];
desktopItems = [
(makeDesktopItem {
name = "SonyHeadphonesClient";
exec = "SonyHeadphonesClient";
icon = "SonyHeadphonesClient";
desktopName = "Sony Headphones Client";
comment = "A client recreating the functionality of the Sony Headphones app";
categories = [ "Audio" "Mixer" ];
})
];
meta = with lib; {
description = "A client recreating the functionality of the Sony Headphones app";
homepage = "https://github.com/Plutoberth/SonyHeadphonesClient";
license = licenses.mit;
homepage = "https://github.com/Plutoberth/SonyHeadphonesClient";
license = licenses.mit;
maintainers = with maintainers; [ stunkymonkey ];
platforms = platforms.linux;
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,19 @@
diff --git a/SingleInstanceFuture.h b/SingleInstanceFuture.h
index 8af733f..d2e6c49 100644
--- a/SingleInstanceFuture.h
+++ b/SingleInstanceFuture.h
@@ -12,13 +12,13 @@ template <class T>
class SingleInstanceFuture : public std::future<T>
{
public:
- SingleInstanceFuture<T>() = default;
+ SingleInstanceFuture(void) = default;
template<class Func, class... Args>
void setFromAsync(Func func, Args&&... args) noexcept(false);
bool ready();
private:
- SingleInstanceFuture<T>(std::future<T> other);
+ SingleInstanceFuture(std::future<T> other);
SingleInstanceFuture<T> operator=(std::future<T>& other);
};