3
0
Fork 0
forked from mirrors/nixpkgs

widelands 1.0 -> 1.1

Remove in-tree patch, as it isn't needed anymore.
Addresses #197395.
This commit is contained in:
Jack Cummings 2022-10-23 22:51:22 -07:00
parent f157bef02b
commit 5d2907308f
2 changed files with 21 additions and 38 deletions

View file

@ -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()

View file

@ -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;