mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 19:47:46 +00:00
Ports: Added a chester port, a very simple GameBoy emulator.
This commit is contained in:
parent
6d913db9fe
commit
54b4d7611c
5 changed files with 63 additions and 1 deletions
16
Ports/chester/package.sh
Executable file
16
Ports/chester/package.sh
Executable file
|
@ -0,0 +1,16 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=chester
|
||||
useconfigure=true
|
||||
version=git
|
||||
depends="SDL2"
|
||||
workdir=chester-public
|
||||
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMakeToolchain.txt"
|
||||
files="https://github.com/veikkos/chester/archive/public.tar.gz chester.tar.gz"
|
||||
|
||||
configure() {
|
||||
run cmake $configopts
|
||||
}
|
||||
|
||||
install() {
|
||||
run cp bin/chester "${SERENITY_BUILD_DIR}/Root/bin"
|
||||
}
|
13
Ports/chester/patches/disable_Werror.patch
Normal file
13
Ports/chester/patches/disable_Werror.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index a68cf88..c541385 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -22,7 +22,7 @@ endif ()
|
||||
if (MSVC)
|
||||
add_compile_options(/WX /wd4996)
|
||||
else()
|
||||
- set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror")
|
||||
+ set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
|
||||
endif()
|
||||
|
||||
add_subdirectory(src/lib)
|
22
Ports/chester/patches/disable_opengl.patch
Normal file
22
Ports/chester/patches/disable_opengl.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff --git a/src/app/main.c b/src/app/main.c
|
||||
index cfd46b8..fc47912 100644
|
||||
--- a/src/app/main.c
|
||||
+++ b/src/app/main.c
|
||||
@@ -47,7 +47,7 @@ bool init_graphics(gpu *g)
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
SDL_WINDOWPOS_UNDEFINED,
|
||||
X_RES * WINDOW_SCALE, Y_RES * WINDOW_SCALE,
|
||||
- SDL_WINDOW_OPENGL);
|
||||
+ 0);
|
||||
|
||||
if (sdl_graphics_ptr->window == NULL)
|
||||
{
|
||||
@@ -58,7 +58,7 @@ bool init_graphics(gpu *g)
|
||||
|
||||
sdl_graphics_ptr->renderer = SDL_CreateRenderer(sdl_graphics_ptr->window,
|
||||
-1,
|
||||
- SDL_RENDERER_ACCELERATED);
|
||||
+ 0);
|
||||
|
||||
if (sdl_graphics_ptr->renderer == NULL)
|
||||
{
|
10
Ports/chester/patches/link_against_serenity_libs.patch
Normal file
10
Ports/chester/patches/link_against_serenity_libs.patch
Normal file
|
@ -0,0 +1,10 @@
|
|||
diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt
|
||||
index 95d0a51..be3e4db 100644
|
||||
--- a/src/app/CMakeLists.txt
|
||||
+++ b/src/app/CMakeLists.txt
|
||||
@@ -13,4 +13,4 @@ endif()
|
||||
find_package(SDL2 REQUIRED)
|
||||
|
||||
target_include_directories(chester PRIVATE ${SDL2_INCLUDE_DIR})
|
||||
-target_link_libraries(chester libchester ${SDL2_LIBRARY})
|
||||
+target_link_libraries(chester libchester ${SDL2_LIBRARY} -lm -lgfx -lgui -lipc -lcore)
|
Loading…
Add table
Add a link
Reference in a new issue