1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-30 18:37:48 +00:00

Ports: Add a Super Tux Kart port

Co-Authored-By: Linus Groh <mail@linusgroh.de>
Co-Authored-By: Panagiotis "Ivory" Vasilopoulos <git@n0toose.net>
Co-Authored-By: lilylunatic <lily@acab.dev>
Co-Authored-By: io_err <quint@guvernator.net>
This commit is contained in:
Dominika Liberda 2023-07-02 07:30:25 +02:00 committed by Jelle Raaijmakers
parent 815fc034ff
commit 484f10132d
9 changed files with 1345 additions and 0 deletions

View file

@ -0,0 +1,80 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Dominika Liberda <ja@sdomi.pl>
Date: Sun, 11 Jun 2023 01:56:50 +0200
Subject: [PATCH] Add build system support for Serenity
---
lib/angelscript/source/as_memory.cpp | 2 +-
lib/irrlicht/include/IrrCompileConfig.h | 16 ++++++++++++----
.../third_party/spirv-tools/CMakeLists.txt | 2 ++
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/lib/angelscript/source/as_memory.cpp b/lib/angelscript/source/as_memory.cpp
index 5914658ba23736da57506fc58066032b5f99e435..399a3842300ed01adaf0afdbf2ae794fd89c0415 100644
--- a/lib/angelscript/source/as_memory.cpp
+++ b/lib/angelscript/source/as_memory.cpp
@@ -38,7 +38,7 @@
#include <stdlib.h>
-#if !defined(__APPLE__) && !defined(__SNC__) && !defined(__ghs__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__)
+#if !defined(__APPLE__) && !defined(__SNC__) && !defined(__ghs__) && !defined(__FreeBSD__) && !defined(__OpenBSD__) && !defined(__DragonFly__) && !defined(__serenity__)
#include <malloc.h>
#endif
diff --git a/lib/irrlicht/include/IrrCompileConfig.h b/lib/irrlicht/include/IrrCompileConfig.h
index 384c6836e2050ad8cfeaa4da3bf3365b5a3cf1a8..92a8d3dd4b6c82ee571ca2bf2d7858709de4f9d5 100644
--- a/lib/irrlicht/include/IrrCompileConfig.h
+++ b/lib/irrlicht/include/IrrCompileConfig.h
@@ -23,6 +23,7 @@
//! _IRR_WINDOWS_API_ for Windows or XBox
//! _IRR_LINUX_PLATFORM_ for Linux (it is defined here if no other os is defined)
//! _IRR_HAIKU_PLATFORM_ for Haiku
+//! _IRR_SERENITY_PLATFORM_ for SerenityOS
//! _IRR_SOLARIS_PLATFORM_ for Solaris
//! _IRR_OSX_PLATFORM_ for Apple systems running OSX
//! _IRR_IOS_PLATFORM_ for Apple devices running iOS
@@ -94,11 +95,15 @@
#endif
#endif
-#if defined(HAIKU)
+//#if defined(HAIKU)
#define _IRR_HAIKU_PLATFORM_
+//#endif
+/*
+#if defined(__serenity__)
+#define _IRR_SERENITY_PLATFORM_
#endif
-
-#if defined(_IRR_HAIKU_PLATFORM_)
+*/
+#if defined(_IRR_HAIKU_PLATFORM_) || defined(_IRR_SERENITY_PLATFORM_)
#define _IRR_COMPILE_WITH_SDL_DEVICE_
#define _IRR_COMPILE_WITH_OPENGL_
#endif
@@ -113,7 +118,10 @@
#define _IRR_COMPILE_WITH_OGLES2_
#endif
-#if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_ANDROID_PLATFORM_) && !defined(_IRR_HAIKU_PLATFORM_)
+#define _IRR_POSIX_API_
+
+
+#if !defined(_IRR_WINDOWS_API_) && !defined(_IRR_OSX_PLATFORM_) && !defined(_IRR_ANDROID_PLATFORM_) && !defined(_IRR_HAIKU_PLATFORM_) && !defined(_IRR_SERENITY_PLATFORM_)
#ifndef _IRR_SOLARIS_PLATFORM_
#define _IRR_LINUX_PLATFORM_
#endif
diff --git a/lib/shaderc/third_party/spirv-tools/CMakeLists.txt b/lib/shaderc/third_party/spirv-tools/CMakeLists.txt
index 2a06a9ca39a61f5f3b618dc3f5655889a9dd38f4..e471b0bacf1bb04dc4c545e8dad4db0f4209f930 100644
--- a/lib/shaderc/third_party/spirv-tools/CMakeLists.txt
+++ b/lib/shaderc/third_party/spirv-tools/CMakeLists.txt
@@ -69,6 +69,8 @@ elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Haiku")
add_definitions(-DSPIRV_HAIKU)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")
add_definitions(-DSPIRV_SOLARIS)
+elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "SerenityOS")
+ add_definitions(-DSPIRV_LINUX)
else()
message(FATAL_ERROR "Your platform '${CMAKE_SYSTEM_NAME}' is not supported!")
endif()