Merge pull request #197492 from jcumming/widelands_1_1
widelands 1.0 -> 1.1
This commit is contained in:
commit
e5703123b9
2 changed files with 21 additions and 38 deletions
|
@ -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()
|
|
|
@ -2,12 +2,12 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, fetchpatch
|
, fetchpatch
|
||||||
|
, pkg-config # needed to find minizip
|
||||||
, SDL2
|
, SDL2
|
||||||
, SDL2_image
|
, SDL2_image
|
||||||
, SDL2_mixer
|
, SDL2_mixer
|
||||||
, SDL2_net
|
, SDL2_net
|
||||||
, SDL2_ttf
|
, SDL2_ttf
|
||||||
, boost
|
|
||||||
, cmake
|
, cmake
|
||||||
, curl
|
, curl
|
||||||
, doxygen
|
, doxygen
|
||||||
|
@ -20,28 +20,24 @@
|
||||||
, lua
|
, lua
|
||||||
, python3
|
, python3
|
||||||
, zlib
|
, zlib
|
||||||
|
, minizip
|
||||||
|
, asio
|
||||||
|
, libSM
|
||||||
|
, libICE
|
||||||
|
, libXext
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "widelands";
|
pname = "widelands";
|
||||||
version = "1.0";
|
version = "1.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "widelands";
|
owner = "widelands";
|
||||||
repo = "widelands";
|
repo = "widelands";
|
||||||
rev = "v${version}";
|
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 = ''
|
postPatch = ''
|
||||||
substituteInPlace xdg/org.widelands.Widelands.desktop \
|
substituteInPlace xdg/org.widelands.Widelands.desktop \
|
||||||
--replace 'Exec=widelands' "Exec=$out/bin/widelands"
|
--replace 'Exec=widelands' "Exec=$out/bin/widelands"
|
||||||
|
@ -49,12 +45,14 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
cmakeFlags = [
|
cmakeFlags = [
|
||||||
"-Wno-dev" # dev warnings are only needed for upstream development
|
"-Wno-dev" # dev warnings are only needed for upstream development
|
||||||
"-DWL_INSTALL_BASEDIR=${placeholder "out"}"
|
"-DWL_INSTALL_BASEDIR=${placeholder "out"}/share/widelands" # for COPYING, Changelog, etc.
|
||||||
"-DWL_INSTALL_DATADIR=${placeholder "out"}/share/widelands"
|
"-DWL_INSTALL_DATADIR=${placeholder "out"}/share/widelands" # for game data
|
||||||
"-DWL_INSTALL_BINARY=${placeholder "out"}/bin"
|
"-DWL_INSTALL_BINDIR=${placeholder "out"}/bin"
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake doxygen gettext graphviz installShellFiles ];
|
nativeBuildInputs = [ cmake doxygen gettext graphviz installShellFiles pkg-config ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
SDL2
|
SDL2
|
||||||
|
@ -62,7 +60,6 @@ stdenv.mkDerivation rec {
|
||||||
SDL2_mixer
|
SDL2_mixer
|
||||||
SDL2_net
|
SDL2_net
|
||||||
SDL2_ttf
|
SDL2_ttf
|
||||||
boost
|
|
||||||
curl
|
curl
|
||||||
glew
|
glew
|
||||||
icu
|
icu
|
||||||
|
@ -70,6 +67,11 @@ stdenv.mkDerivation rec {
|
||||||
lua
|
lua
|
||||||
python3
|
python3
|
||||||
zlib
|
zlib
|
||||||
|
minizip
|
||||||
|
asio
|
||||||
|
libSM # XXX: these should be propagated by SDL2?
|
||||||
|
libICE
|
||||||
|
libXext
|
||||||
];
|
];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
@ -90,6 +92,8 @@ stdenv.mkDerivation rec {
|
||||||
Settlers II". It has a single player campaign mode, as well as a networked
|
Settlers II". It has a single player campaign mode, as well as a networked
|
||||||
multiplayer mode.
|
multiplayer mode.
|
||||||
'';
|
'';
|
||||||
|
changelog = "https://github.com/widelands/widelands/releases/tag/v1.1";
|
||||||
|
mainProgram = "widelands";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = with maintainers; [ raskin jcumming ];
|
maintainers = with maintainers; [ raskin jcumming ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
|
|
Loading…
Reference in a new issue