maelstrom: fix build with gcc14, modernize (#394463)
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
diff --git a/Maelstrom-netd.c b/Maelstrom-netd.c
|
||||
index 3e6e942..41ed9a5 100644
|
||||
--- a/Maelstrom-netd.c
|
||||
+++ b/Maelstrom-netd.c
|
||||
@@ -13,6 +13,7 @@
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <unistd.h>
|
||||
+#include <time.h>
|
||||
|
||||
/* We wait in a loop for players to connect and tell us how many people
|
||||
are playing. Then, once all players have connected, then we broadcast
|
||||
@@ -7,12 +7,12 @@
|
||||
SDL2_net,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "maelstrom";
|
||||
version = "3.0.7";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.libsdl.org/projects/Maelstrom/src/Maelstrom-${version}.tar.gz";
|
||||
url = "http://www.libsdl.org/projects/Maelstrom/src/Maelstrom-${finalAttrs.version}.tar.gz";
|
||||
sha256 = "0dm0m5wd7amrsa8wnrblkv34sq4v4lglc2wfx8klfkdhyhi06s4k";
|
||||
};
|
||||
|
||||
@@ -21,6 +21,8 @@ stdenv.mkDerivation rec {
|
||||
./fix-compilation.patch
|
||||
# removes register keyword
|
||||
./c++17-fixes.diff
|
||||
# fix build with gcc14
|
||||
./add-maelstrom-netd-include-time.diff
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
@@ -44,11 +46,11 @@ stdenv.mkDerivation rec {
|
||||
})
|
||||
];
|
||||
|
||||
meta = with lib; {
|
||||
meta = {
|
||||
description = "Arcade-style game resembling Asteroids";
|
||||
mainProgram = "maelstrom";
|
||||
license = licenses.gpl2Plus;
|
||||
platforms = platforms.all;
|
||||
maintainers = with maintainers; [ tmountain ];
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ tmountain ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user