Files
haikuports/games-action/minetest/patches/irrlichtmt-mt12.patchset
2023-10-24 08:06:57 +02:00

57 lines
1.5 KiB
Plaintext

From 78336f3a3c4c820eed445176c6f504f35ae7ad70 Mon Sep 17 00:00:00 2001
From: Maite Gamper <victor@wenzeslaus.de>
Date: Thu, 19 Oct 2023 05:55:57 +0200
Subject: fix for haiku (copied from irrlicht recipe)
diff --git a/include/IrrCompileConfig.h b/include/IrrCompileConfig.h
index 30ce67e..0e2d471 100644
--- a/include/IrrCompileConfig.h
+++ b/include/IrrCompileConfig.h
@@ -30,4 +30,15 @@
#define IRRLICHT_API
#endif
+// haiku-specific options
+#ifdef __HAIKU__
+ #define _IRR_COMPILE_WITH_SDL_DEVICE_
+
+ #undef _IRR_COMPILE_WITH_X11_
+ #undef _IRR_COMPILE_WITH_X11_DEVICE_
+ #undef _IRR_USE_NON_SYSTEM_JPEG_LIB_
+ #undef _IRR_USE_NON_SYSTEM_LIB_PNG_
+ #undef _IRR_USE_NON_SYSTEM_ZLIB_
+#endif
+
#endif // __IRR_COMPILE_CONFIG_H_INCLUDED__
diff --git a/source/Irrlicht/CFileSystem.h b/source/Irrlicht/CFileSystem.h
index bb87d37..ba720d0 100644
--- a/source/Irrlicht/CFileSystem.h
+++ b/source/Irrlicht/CFileSystem.h
@@ -4,6 +4,8 @@
#pragma once
+#include <unistd.h>
+
#include "IFileSystem.h"
#include "irrArray.h"
diff --git a/source/Irrlicht/CMakeLists.txt b/source/Irrlicht/CMakeLists.txt
index 62115c6..e53644f 100644
--- a/source/Irrlicht/CMakeLists.txt
+++ b/source/Irrlicht/CMakeLists.txt
@@ -99,6 +99,9 @@ elseif(EMSCRIPTEN)
elseif(SOLARIS)
add_definitions(-D_IRR_SOLARIS_PLATFORM_ -D_IRR_POSIX_API_)
set(DEVICE "X11")
+elseif(HAIKU)
+ add_definitions(-D_IRR_POSIX_API_)
+ set(DEVICE "SDL")
else()
add_definitions(-D_IRR_POSIX_API_)
set(LINUX_PLATFORM TRUE)
--
2.37.3