widelands: 18 -> 19 (#22796)
This commit is contained in:
parent
01e5b8527d
commit
195ca7393c
21
pkgs/games/widelands/bincmake.patch
Normal file
21
pkgs/games/widelands/bincmake.patch
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
--- 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()
|
|
@ -1,10 +1,11 @@
|
||||||
{ stdenv, fetchurl, cmake, python, gettext
|
{ stdenv, fetchurl, cmake, python, gettext
|
||||||
, boost, libpng, zlib, glew, lua
|
, boost, libpng, zlib, glew, lua, doxygen, icu
|
||||||
, SDL, SDL_image, SDL_mixer, SDL_net, SDL_ttf, SDL_gfx
|
, SDL2, SDL2_image, SDL2_mixer, SDL2_net, SDL2_ttf, SDL2_gfx
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation rec {
|
||||||
name = "widelands-18";
|
name = "widelands-${version}";
|
||||||
|
version = "19";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "RTS with multiple-goods economy";
|
description = "RTS with multiple-goods economy";
|
||||||
|
@ -20,27 +21,39 @@ stdenv.mkDerivation {
|
||||||
hydraPlatforms = [];
|
hydraPlatforms = [];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
./bincmake.patch
|
||||||
|
];
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://launchpad.net/widelands/build18/build-18/+download/"
|
url = "https://launchpad.net/widelands/build${version}/build${version}/+download/"
|
||||||
+ "widelands-build18-src.tar.bz2";
|
+ "widelands-build${version}-src.tar.bz2";
|
||||||
sha256 = "1qvx1cwkf61iwq0qkngvg460dsxqsfvk36qc7jf7mzwkiwbxkzvd";
|
sha256 = "19h1gina7k1ai2mn2fd75lxm8iz8wrs6dz6dchdvg8i8d39gj4g5";
|
||||||
};
|
};
|
||||||
|
|
||||||
preConfigure = ''
|
preConfigure = ''
|
||||||
cmakeFlags="
|
cmakeFlags="
|
||||||
-DWL_INSTALL_PREFIX=$out
|
-DWL_INSTALL_BASEDIR=$out
|
||||||
-DWL_INSTALL_BINDIR=bin
|
-DWL_INSTALL_DATADIR=$out/share/widelands
|
||||||
-DWL_INSTALL_DATADIR=share/widelands
|
-DWL_INSTALL_BINARY=$out/bin
|
||||||
"
|
"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake python gettext ];
|
nativeBuildInputs = [ cmake python gettext ];
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost libpng zlib glew lua
|
boost libpng zlib glew lua doxygen icu
|
||||||
SDL SDL_image SDL_mixer SDL_net SDL_ttf SDL_gfx
|
SDL2 SDL2_image SDL2_mixer SDL2_net SDL2_ttf
|
||||||
];
|
];
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
substituteInPlace ./debian/widelands.desktop --replace "/usr/share/games/widelands/data/" "$out/share/widelands/"
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
mkdir -p "$out/share/applications/"
|
||||||
|
cp -v "../debian/widelands.desktop" "$out/share/applications/"
|
||||||
|
'';
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -16491,7 +16491,7 @@ with pkgs;
|
||||||
wesnoth-dev = callPackage ../games/wesnoth/dev.nix { };
|
wesnoth-dev = callPackage ../games/wesnoth/dev.nix { };
|
||||||
|
|
||||||
widelands = callPackage ../games/widelands {
|
widelands = callPackage ../games/widelands {
|
||||||
lua = lua5_1;
|
lua = lua5_2;
|
||||||
};
|
};
|
||||||
|
|
||||||
worldofgoo_demo = callPackage ../games/worldofgoo {
|
worldofgoo_demo = callPackage ../games/worldofgoo {
|
||||||
|
|
Loading…
Reference in a new issue