manaplus: fix build, disable internalsdlgfx, move to by-name (#366351)
This commit is contained in:
commit
2490a12cd4
@ -0,0 +1,25 @@
|
||||
diff --git a/src/utils/dumplibs.cpp b/src/utils/dumplibs.cpp
|
||||
index 4215d6183..2d410f150 100644
|
||||
--- a/src/utils/dumplibs.cpp
|
||||
+++ b/src/utils/dumplibs.cpp
|
||||
@@ -140,7 +140,7 @@ void dumpLibs()
|
||||
LIBXML_TEST_VERSION
|
||||
#endif // LIBXML_TEST_VERSION
|
||||
#ifdef ENABLE_LIBXML
|
||||
- const char **xmlVersion = __xmlParserVersion();
|
||||
+ const char * const *xmlVersion = __xmlParserVersion();
|
||||
if (xmlVersion != nullptr)
|
||||
logger->log(" libxml2: %s", *xmlVersion);
|
||||
#endif // ENABLE_LIBXML
|
||||
diff --git a/src/utils/xml/libxml.inc b/src/utils/xml/libxml.inc
|
||||
index c60abd095..cf4c845a9 100644
|
||||
--- a/src/utils/xml/libxml.inc
|
||||
+++ b/src/utils/xml/libxml.inc
|
||||
@@ -24,6 +24,7 @@
|
||||
|
||||
#ifdef ENABLE_LIBXML
|
||||
|
||||
+#include <libxml/parser.h>
|
||||
#include <libxml/xmlwriter.h>
|
||||
|
||||
__XML_XMLWRITER_H__
|
30
pkgs/by-name/ma/manaplus/0002-missing-ctime-include.patch
Normal file
30
pkgs/by-name/ma/manaplus/0002-missing-ctime-include.patch
Normal file
@ -0,0 +1,30 @@
|
||||
diff --git a/src/progs/dyecmd/client.cpp b/src/progs/dyecmd/client.cpp
|
||||
index 6321da0d2..bb655519b 100644
|
||||
--- a/src/progs/dyecmd/client.cpp
|
||||
+++ b/src/progs/dyecmd/client.cpp
|
||||
@@ -86,9 +86,7 @@ PRAGMA48(GCC diagnostic pop)
|
||||
#include <sys/time.h>
|
||||
#include "fs/specialfolder.h"
|
||||
#undef ERROR
|
||||
-#endif // WIN32
|
||||
-
|
||||
-#ifdef __clang__
|
||||
+#else
|
||||
#include <ctime>
|
||||
#endif // __clang__
|
||||
|
||||
diff --git a/src/resources/wallpaper.cpp b/src/resources/wallpaper.cpp
|
||||
index 2df412b7d..1658e3d4a 100644
|
||||
--- a/src/resources/wallpaper.cpp
|
||||
+++ b/src/resources/wallpaper.cpp
|
||||
@@ -37,9 +37,7 @@
|
||||
|
||||
#ifdef WIN32
|
||||
#include <sys/time.h>
|
||||
-#endif // WIN32
|
||||
-
|
||||
-#ifdef __clang__
|
||||
+#else
|
||||
#include <ctime>
|
||||
#endif // __clang__
|
||||
|
79
pkgs/by-name/ma/manaplus/package.nix
Normal file
79
pkgs/by-name/ma/manaplus/package.nix
Normal file
@ -0,0 +1,79 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchFromGitLab,
|
||||
SDL2,
|
||||
SDL2_image,
|
||||
SDL2_ttf,
|
||||
SDL2_mixer,
|
||||
SDL2_net,
|
||||
SDL2_gfx,
|
||||
zlib,
|
||||
physfs,
|
||||
curl,
|
||||
libxml2,
|
||||
libpng,
|
||||
pkg-config,
|
||||
libGL,
|
||||
autoreconfHook,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "manaplus";
|
||||
version = "2.1.3.17-unstable-2024-08-15";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "manaplus";
|
||||
repo = "manaplus";
|
||||
rev = "40ebe02e81b34f5b02ea682d2d470a20e7e63cfc";
|
||||
sha256 = "sha256-OVmCqK8undrBKgY5bB2spezmYwWXnmrPlSpV5euortc=";
|
||||
};
|
||||
|
||||
# The unstable version has this commit that fixes missing <cstdint> include:
|
||||
# https://gitlab.com/manaplus/manaplus/-/commit/63912a8a6bfaecdb6b40d2a89191a2fb5af32906
|
||||
patches = [
|
||||
# https://gitlab.com/manaplus/manaplus/-/issues/33
|
||||
./0001-libxml2-const-ptr-and-missing-include.patch
|
||||
# https://gitlab.com/manaplus/manaplus/-/issues/32
|
||||
./0002-missing-ctime-include.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
SDL2_gfx
|
||||
SDL2_image
|
||||
SDL2_mixer
|
||||
SDL2_net
|
||||
SDL2_ttf
|
||||
curl
|
||||
libGL
|
||||
libpng
|
||||
libxml2
|
||||
physfs
|
||||
zlib
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
|
||||
configureFlags = [
|
||||
(lib.withFeature true "sdl2")
|
||||
(lib.withFeature false "dyecmd")
|
||||
(lib.withFeature false "internalsdlgfx")
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
maintainers = [ ];
|
||||
description = "Free OpenSource 2D MMORPG client";
|
||||
homepage = "https://manaplus.org/";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
platforms = lib.platforms.all;
|
||||
badPlatforms = [ lib.systems.inspect.patterns.isDarwin ];
|
||||
};
|
||||
})
|
@ -1,63 +0,0 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
fetchurl,
|
||||
SDL2,
|
||||
SDL2_image,
|
||||
SDL2_ttf,
|
||||
SDL2_mixer,
|
||||
SDL2_net,
|
||||
SDL2_gfx,
|
||||
zlib,
|
||||
physfs,
|
||||
curl,
|
||||
libxml2,
|
||||
libpng,
|
||||
pkg-config,
|
||||
libGL,
|
||||
autoreconfHook,
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "manaplus";
|
||||
version = "2.1.3.17";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://download.evolonline.org/manaplus/download/${version}/manaplus-${version}.tar.xz";
|
||||
sha256 = "sha256-6NFqxUjEAp7aiIScyTOFh2tT7PfuTCKH1vTgPpTm+j0=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
autoreconfHook
|
||||
pkg-config
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
SDL2
|
||||
SDL2_image
|
||||
SDL2_ttf
|
||||
SDL2_mixer
|
||||
SDL2_net
|
||||
SDL2_gfx
|
||||
zlib
|
||||
physfs
|
||||
curl
|
||||
libxml2
|
||||
libpng
|
||||
libGL
|
||||
];
|
||||
|
||||
configureFlags = [
|
||||
"--with-sdl2"
|
||||
"--without-dyecmd"
|
||||
];
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
||||
meta = {
|
||||
maintainers = [ ];
|
||||
description = "Free OpenSource 2D MMORPG client";
|
||||
homepage = "https://manaplus.org/";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
broken = stdenv.hostPlatform.isDarwin;
|
||||
};
|
||||
}
|
@ -16758,8 +16758,6 @@ with pkgs;
|
||||
openjfx = openjfx21;
|
||||
};
|
||||
|
||||
manaplus = callPackage ../games/manaplus { stdenv = gcc11Stdenv; };
|
||||
|
||||
mindustry-wayland = callPackage ../by-name/mi/mindustry/package.nix {
|
||||
enableWayland = true;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user