mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-24 21:45:20 +00:00
Ports: Add nesalizer NES emulator (#722)
This commit is contained in:
parent
6c1a549057
commit
56bbf30f28
Notes:
sideshowbarker
2024-07-19 11:23:35 +09:00
Author: https://github.com/danboid Commit: https://github.com/SerenityOS/serenity/commit/56bbf30f288 Pull-request: https://github.com/SerenityOS/serenity/pull/722 Reviewed-by: https://github.com/awesomekling
3 changed files with 68 additions and 0 deletions
7
Ports/nesalizer/package.sh
Executable file
7
Ports/nesalizer/package.sh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/bin/bash ../.port_include.sh
|
||||
port=nesalizer
|
||||
version=git
|
||||
curlopts="-L"
|
||||
workdir=nesalizer-master
|
||||
files="https://github.com/ulfalizer/nesalizer/archive/master.tar.gz nesalizer-master.tar.gz"
|
||||
depends=SDL2
|
33
Ports/nesalizer/patches/Makefile-fix.patch
Normal file
33
Ports/nesalizer/patches/Makefile-fix.patch
Normal file
|
@ -0,0 +1,33 @@
|
|||
--- ./Makefile 2016-09-18 10:02:04.000000000 +0100
|
||||
+++ ./Makefile-serenity 2019-11-04 13:43:24.842907912 +0000
|
||||
@@ -58,7 +58,7 @@
|
||||
objects = $(c_objects) $(cpp_objects)
|
||||
deps = $(addprefix $(BUILD_DIR)/,$(c_sources:=.d) $(cpp_sources:=.d))
|
||||
|
||||
-LDLIBS := $(shell sdl2-config --libs) -lrt
|
||||
+LDLIBS := -L../../SDL2/SDL-master-serenity -lSDL2 -lgui -lcore -ldraw
|
||||
|
||||
ifeq ($(INCLUDE_DEBUGGER),1)
|
||||
LDLIBS += -lreadline
|
||||
@@ -105,12 +105,12 @@
|
||||
endif
|
||||
|
||||
ifneq ($(findstring debug,$(CONF)),)
|
||||
- compile_flags += -ggdb
|
||||
+ compile_flags += -ggdb -fno-rtti
|
||||
endif
|
||||
ifneq ($(findstring release,$(CONF)),)
|
||||
# Including -Ofast when linking (by including $(optimizations)) gives a
|
||||
# different binary size. Might be worth investigating why.
|
||||
- compile_flags += $(optimizations) -DOPTIMIZING
|
||||
+ compile_flags += $(optimizations) -DOPTIMIZING -fno-rtti
|
||||
link_flags += $(optimizations) -fuse-linker-plugin
|
||||
endif
|
||||
|
||||
@@ -175,3 +175,6 @@
|
||||
|
||||
.PHONY: clean
|
||||
clean: ; $(q)-rm -rf $(BUILD_DIR)
|
||||
+
|
||||
+install:
|
||||
+ install $(BUILD_DIR)/${EXECUTABLE} ${DESTDIR}/bin/${EXECUTABLE}
|
28
Ports/nesalizer/patches/disable-backtrace.patch
Normal file
28
Ports/nesalizer/patches/disable-backtrace.patch
Normal file
|
@ -0,0 +1,28 @@
|
|||
--- ./src/common.cpp 2016-09-18 10:02:04.000000000 +0100
|
||||
+++ ./src/common-serenity.cpp 2019-11-02 16:58:54.509792761 +0000
|
||||
@@ -1,6 +1,6 @@
|
||||
#include "common.h"
|
||||
|
||||
-#include <execinfo.h>
|
||||
+// #include <execinfo.h>
|
||||
#include <signal.h>
|
||||
|
||||
//
|
||||
@@ -96,7 +96,7 @@
|
||||
static void fatal_signal_handler(int sig) {
|
||||
// Use non-async-signal-safe functions. Likely to work in practice.
|
||||
|
||||
- static void *backtrace_buffer[100];
|
||||
+ /*static void *backtrace_buffer[100];
|
||||
static char addr2line_cmd_buf[100];
|
||||
|
||||
fprintf(stderr, "caught fatal signal '%s'. Backtrace:\n\n", strsignal(sig));
|
||||
@@ -124,7 +124,7 @@
|
||||
abort();
|
||||
}
|
||||
|
||||
- abort();
|
||||
+ abort();*/
|
||||
}
|
||||
|
||||
static void install_fatal_signal_handler(int sig) {
|
Loading…
Add table
Reference in a new issue