Ports: Added a chester port, a very simple GameBoy emulator.

This commit is contained in:
Manuel Palenzuela 2021-03-30 17:26:39 +02:00 committed by Andreas Kling
parent 6d913db9fe
commit 54b4d7611c
Notes: sideshowbarker 2024-07-18 20:57:14 +09:00
5 changed files with 63 additions and 1 deletions

View file

@ -11,6 +11,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`byacc`](byacc/) | Berkeley Yacc | 20191125 | https://invisible-island.net/byacc/byacc.html |
| [`bzip2`](bzip2/) | bzip2 | 1.0.8 | https://sourceware.org/bzip2/ |
| [`c-ray`](c-ray/) | C-Ray | | https://github.com/vkoskiv/c-ray |
| [`chester`](chester/) | Chester Gameboy Emulator | | https://github.com/veikkos/chester |
| [`cmake`](cmake/) | CMake | 3.19.4 | https://cmake.org/ |
| [`curl`](curl/) | curl | 7.65.3 | https://curl.se/ |
| [`dash`](dash/) | DASH | 0.5.10.2 | http://gondor.apana.org.au/~herbert/dash |
@ -28,7 +29,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`git`](git/) | Git | 2.26.0 | https://git-scm.com/ |
| [`gnuplot`](gnuplot/) | Gnuplot | 5.2.8 | http://www.gnuplot.info/ |
| [`grep`](grep/) | GNU Grep | 2.5.4 | https://www.gnu.org/software/grep/ |
| [`hatari`](hatari/) | Atari ST/STE/TT/Falcon emulator | 2.4.0-devel | https://hatari.tuxfamily.org/ |
| [`hatari`](hatari/) | Atari ST/STE/TT/Falcon emulator | 2.4.0-devel | https://hatari.tuxfamily.org/ |
| [`indent`](indent/) | GNU indent | 2.2.11 | https://www.gnu.org/software/indent/ |
| [`jot`](jot/) | jot (OpenBSD) | 6.6 | https://github.com/ibara/libpuffy |
| [`jq`](jq/) | jq | 1.6 | https://stedolan.github.io/jq/ |

16
Ports/chester/package.sh Executable file
View 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"
}

View 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)

View 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)
{

View 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)