summary refs log tree commit diff
diff options
context:
space:
mode:
authorRenaud <c0bw3b@users.noreply.github.com>2018-10-20 00:25:22 +0200
committerGitHub <noreply@github.com>2018-10-20 00:25:22 +0200
commitf6410997923daa61bf165eca2516df0e547f4846 (patch)
treebedf57b25d13d3f0a39d98a7897a47592817fb4c
parent42ead52bfe2fda319fae12ee368f2ed330e23489 (diff)
downloadnixpkgs-f6410997923daa61bf165eca2516df0e547f4846.tar
nixpkgs-f6410997923daa61bf165eca2516df0e547f4846.tar.gz
nixpkgs-f6410997923daa61bf165eca2516df0e547f4846.tar.bz2
nixpkgs-f6410997923daa61bf165eca2516df0e547f4846.tar.lz
nixpkgs-f6410997923daa61bf165eca2516df0e547f4846.tar.xz
nixpkgs-f6410997923daa61bf165eca2516df0e547f4846.tar.zst
nixpkgs-f6410997923daa61bf165eca2516df0e547f4846.zip
warmux: 11.04.1 -> unstable-2017-10-20 (#48277)
Gna.org forge is closed but someone was kind
enough to clone the repo on GitHub and even
add some fixes on top of it
-rw-r--r--pkgs/games/warmux/default.nix39
-rw-r--r--pkgs/games/warmux/gcc-fix.patch51
2 files changed, 20 insertions, 70 deletions
diff --git a/pkgs/games/warmux/default.nix b/pkgs/games/warmux/default.nix
index a56afbbf44b..c99183bfbea 100644
--- a/pkgs/games/warmux/default.nix
+++ b/pkgs/games/warmux/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchurl
+{ stdenv, fetchFromGitHub, autoconf, automake
 , zlib, curl, gnutls, fribidi, libpng, SDL, SDL_gfx, SDL_image, SDL_mixer
 , SDL_net, SDL_ttf, libunwind, libX11, xproto, libxml2, pkgconfig
 , gettext, intltool, libtool, perl
@@ -6,31 +6,32 @@
 
 stdenv.mkDerivation rec {
   name = "warmux-${version}";
-  version = "11.04.1";
+  version = "unstable-2017-10-20";
 
-  src = fetchurl {
-    url = "http://download.gna.org/warmux/${name}.tar.bz2";
-    sha256 = "1vp44wdpnb1g6cddmn3nphc543pxsdhjis52mfif0p2c7qslz73q";
+  src = fetchFromGitHub {
+    owner = "fluxer";
+    repo = "warmux";
+    rev = "8f81d4fc309a548ae89a068c2dde27b7e7ef8851";
+    sha256 = "1hvzglsmp75xiqqb0k75qjz4jwi8kl3fhn8zfsz53hhhqmbw6wkr";
   };
 
-  buildInputs =
-    [ zlib curl gnutls fribidi libpng SDL SDL_gfx SDL_image SDL_mixer
-      SDL_net SDL_ttf libunwind libX11 xproto libxml2 pkgconfig
-      gettext intltool libtool perl
-    ];
-
+  preConfigure = "patchShebangs autogen.sh && ./autogen.sh";
   configureFlagsArray = ("CFLAGS=-include ${zlib.dev}/include/zlib.h");
 
-  patches = [ ./gcc-fix.patch ];
+  nativeBuildInputs = [
+    autoconf automake gettext intltool libtool pkgconfig
+  ];
+  buildInputs = [
+    zlib curl gnutls fribidi libpng SDL SDL_gfx SDL_image SDL_mixer
+    SDL_net SDL_ttf libunwind libX11 xproto libxml2 perl
+  ];
+  enableParallelBuilding = true;
 
   meta = with stdenv.lib; {
-    description = "Ballistics turn-based battle game between teams";
-    maintainers = with maintainers;
-    [
-      raskin
-    ];
+    description = "Ballistics turn-based battle game between teams - unofficial copy";
+    maintainers = with maintainers; [ raskin ];
     platforms = platforms.linux;
-    license = licenses.gpl2;
-    downloadPage = "http://download.gna.org/warmux/";
+    license = with licenses; [ gpl2 ufl ];
+    homepage = https://github.com/fluxer/warmux;
   };
 }
diff --git a/pkgs/games/warmux/gcc-fix.patch b/pkgs/games/warmux/gcc-fix.patch
deleted file mode 100644
index 913b912af7d..00000000000
--- a/pkgs/games/warmux/gcc-fix.patch
+++ /dev/null
@@ -1,51 +0,0 @@
-## i-love-you-lordheavy.patch [diff]
-diff -ru warmux-11.04/lib/warmux/action/action.cpp warmux-11.04-new/lib/warmux/action/action.cpp
---- warmux-11.04/lib/warmux/action/action.cpp	2011-04-28 21:03:14.000000000 +0200
-+++ warmux-11.04-new/lib/warmux/action/action.cpp	2012-01-29 09:51:16.680251815 +0100
-@@ -81,7 +81,7 @@
- }
- 
- // Build an action from a network packet
--Action::Action(const char *buffer, DistantComputer* _creator)
-+Action::Action(char *buffer, DistantComputer* _creator)
- {
-   m_creator = _creator;
- 
-diff -ru warmux-11.04/lib/warmux/include/WARMUX_action.h warmux-11.04-new/lib/warmux/include/WARMUX_action.h
---- warmux-11.04/lib/warmux/include/WARMUX_action.h	2011-04-28 21:03:13.000000000 +0200
-+++ warmux-11.04-new/lib/warmux/include/WARMUX_action.h	2012-01-29 09:52:14.246921833 +0100
-@@ -168,7 +168,7 @@
-   Action(Action_t type, Double value1, Double value2);
- 
-   // Build an action from a network packet
--  Action(const char* buffer, DistantComputer* _creator);
-+  Action(char* buffer, DistantComputer* _creator);
- 
-   ~Action();
- 
-Description: Fix FTBFS with gcc 4.7.
-Author: Felix Geyer <debfx-pkg@fobos.de>
-
---- warmux-11.04.1+repack.orig/tools/list_games/main.cpp
-+++ warmux-11.04.1+repack/tools/list_games/main.cpp
-@@ -1,4 +1,5 @@
- #include <stdio.h>
-+#include <unistd.h>
- #include <WARMUX_types.h>
- #include <WARMUX_network.h>
- #include <WARMUX_index_server.h>
-
-Description: Fix conversion error in gcc 6.
-Author: Robin Gloster <mail@glob.in>
-
---- warmux-11.04.1.orig/src/interface/weapon_menu.cpp	2017-01-19 23:06:32.401035923 +0100
-+++ warmux-11.04.1/src/interface/weapon_menu.cpp	2017-01-19 23:07:14.245866593 +0100
-@@ -391,7 +391,7 @@
- Weapon * WeaponsMenu::UpdateCurrentOverflyItem(const Polygon * poly)
- {
-   if (!show)
--    return false;
-+    return nullptr;
-   const std::vector<PolygonItem *>& items = poly->GetItem();
-   WeaponMenuItem * tmp;
-   Interface::GetInstance()->SetCurrentOverflyWeapon(NULL);