mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 18:02:05 -05:00
Ports: Add SDL2-GNUBoy Gameboy emulator
This commit is contained in:
parent
4b8b8b91c2
commit
7004fab643
3 changed files with 88 additions and 0 deletions
|
@ -102,6 +102,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`rsync`](rsync/) | rsync | 3.1.3 | https://rsync.samba.org/ |
|
||||
| [`scummvm`](scummvm/) | ScummVM | 2.2.0 | https://www.scummvm.org/ |
|
||||
| [`SDL2`](SDL2/) | Simple DirectMedia Layer (SDL2) | | https://github.com/SerenityOS/SDL |
|
||||
| [`SDL2-GNUBoy`](SDL2-GNUBoy/) | SDL2 GNUBoy | 1.2 | https://github.com/AlexOberhofer/SDL2-GNUBoy |
|
||||
| [`SDL2_gfx`](SDL2_gfx/) | SDL2\_gfx (Graphics primitives add-on for SDL2) | 1.0.4 | https://sourceforge.net/projects/sdl2gfx/ |
|
||||
| [`SDL2_image`](SDL2_image/) | SDL2\_image (Image loading add-on for SDL2) | 2.0.5 | https://www.libsdl.org/projects/SDL_image/ |
|
||||
| [`SDL2_mixer`](SDL2_mixer/) | SDL2\_mixer (audio mixer add-on for SDL2) | 2.0.4 | https://www.libsdl.org/projects/SDL_mixer/ |
|
||||
|
|
8
Ports/SDL2-GNUBoy/package.sh
Executable file
8
Ports/SDL2-GNUBoy/package.sh
Executable file
|
@ -0,0 +1,8 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
|
||||
port=SDL2-GNUBoy
|
||||
version=1.2
|
||||
useconfigure=false
|
||||
files="https://github.com/AlexOberhofer/SDL2-GNUBoy/archive/refs/tags/v${version}.tar.gz SDL2-GNUBoy-${version}.tar.gz 7d00a80e4b6bbb4c388b1ea0a34daca5f90fba574f09915c5135431f81091c8a"
|
||||
auth_type=sha256
|
||||
depends="SDL2"
|
79
Ports/SDL2-GNUBoy/patches/fix-make.patch
Normal file
79
Ports/SDL2-GNUBoy/patches/fix-make.patch
Normal file
|
@ -0,0 +1,79 @@
|
|||
diff --git a/makefile b/makefile
|
||||
index 427d696..653a5d3 100644
|
||||
--- a/makefile
|
||||
+++ b/makefile
|
||||
@@ -1,20 +1,58 @@
|
||||
-.PHONY: all
|
||||
-.PHONY: clean
|
||||
+prefix = ${DESTDIR}/usr/local
|
||||
+exec_prefix = ${prefix}
|
||||
+bindir = ${exec_prefix}/bin
|
||||
|
||||
-.PHONY: linux
|
||||
-linux:
|
||||
- make -f makefile.linux
|
||||
- rm -f sys/*/*.o src/*.o
|
||||
+LD = $(CC)
|
||||
+AS = $(CC)
|
||||
+INSTALL = /usr/bin/install -c
|
||||
|
||||
-.PHONY: windows
|
||||
-windows:
|
||||
- make -f makefile.windows
|
||||
- rm -f sys/*/*.o src/*.o
|
||||
+CFLAGS = -std=c99 -Wall -O3 -I./include
|
||||
+LDFLAGS = $(CFLAGS) -s `sdl2-config --cflags --libs`
|
||||
+ASFLAGS = $(CFLAGS)
|
||||
|
||||
-.PHONY: osx
|
||||
-osx:
|
||||
- make -f makefile.osx
|
||||
- rm -f sys/*/*.o src/*.o
|
||||
+TARGETS = sdl2gnuboy
|
||||
+
|
||||
+SYS_DEFS = -DIS_LITTLE_ENDIAN -DIS_LINUX -DSOUND
|
||||
+SYS_OBJS = sys/nix/nix.o
|
||||
+SYS_INCS = -I/usr/local/include -I./sys/nix
|
||||
+
|
||||
+SDL_OBJS = sys/sdl2/sdl-video.o sys/sdl2/sdl-audio.o sys/sdl2/sdl-input.o
|
||||
+SDL_LIBS = -L/usr/lib -lSDL2 -lpthread
|
||||
+SDL_CFLAGS = -I/usr/include/SDL2 -D_GNU_SOURCE=1 -D_REENTRANT `sdl2-config --cflags --libs`
|
||||
+
|
||||
+
|
||||
+all: $(TARGETS)
|
||||
+
|
||||
+XZ_OBJS = lib/xz/xz_crc32.o lib/xz/xz_crc64.o lib/xz/xz_dec_lzma2.o lib/xz/xz_dec_stream.o lib/xz/xz_dec_bcj.o
|
||||
+
|
||||
+OBJS = ./src/lcd.o ./src/refresh.o ./src/lcdc.o ./src/palette.o ./src/cpu.o ./src/mem.o ./src/rtc.o ./src/hw.o ./src/sound.o \
|
||||
+ ./src/events.o ./src/keytable.o \
|
||||
+ ./src/loader.o ./src/save.o ./src/debug.o ./src/emu.o ./src/main.o \
|
||||
+ ./src/rccmds.o ./src/rckeys.o ./src/rcvars.o ./src/rcfile.o ./src/exports.o \
|
||||
+ ./src/split.o ./src/path.o ./lib/gz/inflate.o $(XZ_OBJS)
|
||||
+
|
||||
+INCS = -I.
|
||||
+
|
||||
+MYCC = $(CC) $(CFLAGS) $(INCS) $(SYS_INCS) $(SYS_DEFS)
|
||||
+MYAS = $(AS) $(ASFLAGS) $(INCS) $(SYS_INCS) $(SYS_DEFS)
|
||||
+
|
||||
+main.o: Version
|
||||
+
|
||||
+.c.o:
|
||||
+ $(MYCC) -c $< -o $@
|
||||
+
|
||||
+.s.o:
|
||||
+ $(MYAS) -c $< -o $@
|
||||
+
|
||||
+sdl2gnuboy: $(OBJS) $(SYS_OBJS) $(SDL_OBJS)
|
||||
+ $(LD) $(LDFLAGS) $(OBJS) $(SYS_OBJS) $(SDL_OBJS) -o $@ $(SDL_LIBS)
|
||||
+
|
||||
+install: all
|
||||
+ $(INSTALL) -d $(bindir)
|
||||
+ $(INSTALL) -m 755 $(TARGETS) $(bindir)
|
||||
|
||||
clean:
|
||||
- rm -f *gnuboy sdl2gnuboy.exe mac-sdl2gnuboy gmon.out *.o sys/*.o sys/*/*.o src/*.o
|
||||
\ No newline at end of file
|
||||
+ rm -f *gnuboy sdl2gnuboy.exe gmon.out *.o sys/*.o sys/*/*.o $(OBJS)
|
||||
+
|
||||
+
|
||||
+
|
Loading…
Add table
Reference in a new issue