diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 009c49dc0e..fe431e2bf2 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -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/ | diff --git a/Ports/chester/package.sh b/Ports/chester/package.sh new file mode 100755 index 0000000000..75584b52cc --- /dev/null +++ b/Ports/chester/package.sh @@ -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" +} diff --git a/Ports/chester/patches/disable_Werror.patch b/Ports/chester/patches/disable_Werror.patch new file mode 100644 index 0000000000..3579349d23 --- /dev/null +++ b/Ports/chester/patches/disable_Werror.patch @@ -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) diff --git a/Ports/chester/patches/disable_opengl.patch b/Ports/chester/patches/disable_opengl.patch new file mode 100644 index 0000000000..83c037a44e --- /dev/null +++ b/Ports/chester/patches/disable_opengl.patch @@ -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) + { diff --git a/Ports/chester/patches/link_against_serenity_libs.patch b/Ports/chester/patches/link_against_serenity_libs.patch new file mode 100644 index 0000000000..5bde6166b3 --- /dev/null +++ b/Ports/chester/patches/link_against_serenity_libs.patch @@ -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)