about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorJack Cummings <jack@mudshark.org>2022-10-23 22:51:22 -0700
committerJack Cummings <jack@mudshark.org>2022-10-23 22:51:22 -0700
commit5d2907308f9f5f35653fb0cb5c1b93325886da12 (patch)
tree7a73991243856fc433fe86b10d7a8dc140b2ec7a /pkgs/games
parentf157bef02b0902079561a02a2559e89ccb13236b (diff)
widelands 1.0 -> 1.1
Remove in-tree patch, as it isn't needed anymore.
Addresses #197395.
Diffstat (limited to 'pkgs/games')
-rw-r--r--pkgs/games/widelands/bincmake.patch21
-rw-r--r--pkgs/games/widelands/default.nix38
2 files changed, 21 insertions, 38 deletions
diff --git a/pkgs/games/widelands/bincmake.patch b/pkgs/games/widelands/bincmake.patch
deleted file mode 100644
index ed6a991252230..0000000000000
--- a/pkgs/games/widelands/bincmake.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/CMakeLists.txt
-+++ b/CMakeLists.txt
-@@ -25,6 +25,8 @@
- # Packagers (or people using make install) have to set this variable to an absolute path.
- wl_set_if_unset(WL_INSTALL_DATADIR "./data")
- 
-+wl_set_if_unset(WL_INSTALL_BINARY "./bin")
-+
- if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
-   if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.7)
-     message(FATAL_ERROR "Widelands needs GCC >= 4.7 to compile.")
-
---- a/cmake/WlFunctions.cmake
-+++ b/cmake/WlFunctions.cmake
-@@ -276,5 +276,5 @@
- 
-   #Quoting the CMake documentation on DESTINATION:
-   #"If a relative path is given it is interpreted relative to the value of CMAKE_INSTALL_PREFIX"
--  install(TARGETS ${NAME} DESTINATION "." COMPONENT ExecutableFiles)
-+  install(TARGETS ${NAME} DESTINATION ${WL_INSTALL_BINARY} COMPONENT ExecutableFiles)
- endfunction()
diff --git a/pkgs/games/widelands/default.nix b/pkgs/games/widelands/default.nix
index f53b3deaef493..f49921024e45f 100644
--- a/pkgs/games/widelands/default.nix
+++ b/pkgs/games/widelands/default.nix
@@ -2,12 +2,12 @@
 , stdenv
 , fetchFromGitHub
 , fetchpatch
+, pkg-config # needed to find minizip
 , SDL2
 , SDL2_image
 , SDL2_mixer
 , SDL2_net
 , SDL2_ttf
-, boost
 , cmake
 , curl
 , doxygen
@@ -20,28 +20,24 @@
 , lua
 , python3
 , zlib
+, minizip
+, asio
+, libSM
+, libICE
+, libXext
 }:
 
 stdenv.mkDerivation rec {
   pname = "widelands";
-  version = "1.0";
+  version = "1.1";
 
   src = fetchFromGitHub {
     owner = "widelands";
     repo = "widelands";
     rev = "v${version}";
-    sha256 = "sha256-gNumYoeKePaxiAzrqEPKibMxFwv9vyBrCSoua+MKhcM=";
+    sha256 = "sha256-fe1fey34b6T1+kqMa22STROu7dagQJtg24nW2jhVix8=";
   };
 
-  patches = [
-    ./bincmake.patch
-    # fix for building with Boost 1.77, https://github.com/widelands/widelands/pull/5025
-    (fetchpatch {
-      url = "https://github.com/widelands/widelands/commit/33981fda8c319c9feafc958f5f0b1670c48666ef.patch";
-      sha256 = "sha256-FjxxCTPpg/Zp01XpNfgRXMMLJBfxAptkLpsLmnFXm2Q=";
-    })
-  ];
-
   postPatch = ''
     substituteInPlace xdg/org.widelands.Widelands.desktop \
       --replace 'Exec=widelands' "Exec=$out/bin/widelands"
@@ -49,12 +45,14 @@ stdenv.mkDerivation rec {
 
   cmakeFlags = [
     "-Wno-dev" # dev warnings are only needed for upstream development
-    "-DWL_INSTALL_BASEDIR=${placeholder "out"}"
-    "-DWL_INSTALL_DATADIR=${placeholder "out"}/share/widelands"
-    "-DWL_INSTALL_BINARY=${placeholder "out"}/bin"
+    "-DWL_INSTALL_BASEDIR=${placeholder "out"}/share/widelands" # for COPYING, Changelog, etc.
+    "-DWL_INSTALL_DATADIR=${placeholder "out"}/share/widelands" # for game data
+    "-DWL_INSTALL_BINDIR=${placeholder "out"}/bin"
   ];
 
-  nativeBuildInputs = [ cmake doxygen gettext graphviz installShellFiles ];
+  nativeBuildInputs = [ cmake doxygen gettext graphviz installShellFiles pkg-config ];
+
+  enableParallelBuilding = true;
 
   buildInputs = [
     SDL2
@@ -62,7 +60,6 @@ stdenv.mkDerivation rec {
     SDL2_mixer
     SDL2_net
     SDL2_ttf
-    boost
     curl
     glew
     icu
@@ -70,6 +67,11 @@ stdenv.mkDerivation rec {
     lua
     python3
     zlib
+    minizip
+    asio
+    libSM  # XXX: these should be propagated by SDL2?
+    libICE
+    libXext
   ];
 
   postInstall = ''
@@ -90,6 +92,8 @@ stdenv.mkDerivation rec {
       Settlers II". It has a single player campaign mode, as well as a networked
       multiplayer mode.
     '';
+    changelog = "https://github.com/widelands/widelands/releases/tag/v1.1";
+    mainProgram = "widelands";
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ raskin jcumming ];
     platforms = platforms.linux;