mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 07:30:19 +00:00
Ports: Add epsilon 15.5.0
This commit is contained in:
parent
c42807e3dc
commit
1420549abf
Notes:
sideshowbarker
2024-07-18 09:06:11 +09:00
Author: https://github.com/RedGl0w 🔰 Commit: https://github.com/SerenityOS/serenity/commit/1420549abf3 Pull-request: https://github.com/SerenityOS/serenity/pull/8726 Reviewed-by: https://github.com/BertalanD Reviewed-by: https://github.com/gmta Reviewed-by: https://github.com/gunnarbeutner ✅ Reviewed-by: https://github.com/linusg
5 changed files with 130 additions and 0 deletions
|
@ -30,6 +30,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
|
|||
| [`dungeonrush`](dungeonrush/) | DungeonRush | 1.1-beta | https://github.com/Rapiz1/DungeonRush |
|
||||
| [`ed`](ed/) | GNU ed | 1.15 | https://www.gnu.org/software/ed/ |
|
||||
| [`emu2`](emu2/) | emu2 DOS emulator | 2021.01 | https://github.com/dmsc/emu2 |
|
||||
| [`epsilon`](epsilon/) | graphical calculator simulator | 15.5.0 | https://github.com/numworks/epsilon |
|
||||
| [`figlet`](figlet/) | FIGlet | 2.2.5 | http://www.figlet.org/ |
|
||||
| [`flatbuffers`](flatbuffers/) | Flatbuffers | 1.12.0 | https://github.com/google/flatbuffers |
|
||||
| [`flex`](flex/) | flex | 2.6.4 | https://github.com/westes/flex |
|
||||
|
|
12
Ports/epsilon/package.sh
Executable file
12
Ports/epsilon/package.sh
Executable file
|
@ -0,0 +1,12 @@
|
|||
#!/usr/bin/env -S bash ../.port_include.sh
|
||||
port=epsilon
|
||||
version=15.5.0
|
||||
files="https://github.com/numworks/epsilon/archive/refs/tags/${version}.tar.gz ${port}-${version}.tar.gz 38c3b6baaf00863bbd179bce5e9cc42bbdbd0cd485b5bf3bbf4473383591bf83"
|
||||
auth_type=sha256
|
||||
makeopts="PLATFORM=simulator TARGET=serenity SERENITY_INSTALL_ROOT=${SERENITY_INSTALL_ROOT}"
|
||||
depends="SDL2 libpng libjpeg"
|
||||
|
||||
|
||||
install() {
|
||||
run cp output/release/simulator/serenity/epsilon.elf ${SERENITY_INSTALL_ROOT}/usr/local/bin/
|
||||
}
|
27
Ports/epsilon/patches/SHOULD_USE_DYNAMIC_SDL.patch
Normal file
27
Ports/epsilon/patches/SHOULD_USE_DYNAMIC_SDL.patch
Normal file
|
@ -0,0 +1,27 @@
|
|||
diff --color -rupN e15/build/platform.simulator.mak serenityEpsilon/build/platform.simulator.mak
|
||||
--- e15/build/platform.simulator.mak 2021-07-13 17:28:39.449969530 +0200
|
||||
+++ serenityEpsilon/build/platform.simulator.mak 2021-07-13 13:01:26.466106000 +0200
|
||||
@@ -1,6 +1,7 @@
|
||||
USE_LIBA = 0
|
||||
ION_KEYBOARD_LAYOUT = layout_B2
|
||||
EPSILON_GETOPT = 1
|
||||
+SHOULD_USE_DYNAMIC_SDL = 0
|
||||
|
||||
SFLAGS += -fPIE
|
||||
|
||||
diff --color -rupN e15/ion/src/simulator/external/Makefile serenityEpsilon/ion/src/simulator/external/Makefile
|
||||
--- e15/ion/src/simulator/external/Makefile 2021-07-13 17:28:39.493302861 +0200
|
||||
+++ serenityEpsilon/ion/src/simulator/external/Makefile 2021-07-13 13:02:07.986107000 +0200
|
||||
@@ -99,8 +99,12 @@ endif
|
||||
# Ignore warnings from external sources
|
||||
SDL_SFLAGS += -w
|
||||
|
||||
+ifeq ($(SHOULD_USE_DYNAMIC_SDL),0)
|
||||
include ion/src/simulator/external/config.$(TARGET).mak
|
||||
+endif
|
||||
|
||||
$(call object_for,$(sdl_src)): SFLAGS += $(SDL_SFLAGS)
|
||||
|
||||
+ifeq ($(SHOULD_USE_DYNAMIC_SDL),0)
|
||||
ion_src += $(sdl_src)
|
||||
+endif
|
65
Ports/epsilon/patches/build-serenity.patch
Normal file
65
Ports/epsilon/patches/build-serenity.patch
Normal file
|
@ -0,0 +1,65 @@
|
|||
diff --color -rupN e15/build/platform.simulator.serenity.mak serenityEpsilon/build/platform.simulator.serenity.mak
|
||||
--- e15/build/platform.simulator.serenity.mak 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ serenityEpsilon/build/platform.simulator.serenity.mak 2021-07-13 13:01:36.779439000 +0200
|
||||
@@ -0,0 +1,6 @@
|
||||
+TOOLCHAIN = i686-pc-serenity
|
||||
+EXE = elf
|
||||
+
|
||||
+EPSILON_TELEMETRY ?= 0
|
||||
+
|
||||
+SHOULD_USE_DYNAMIC_SDL = 1
|
||||
diff --color -rupN e15/build/toolchain.i686-pc-serenity.mak serenityEpsilon/build/toolchain.i686-pc-serenity.mak
|
||||
--- e15/build/toolchain.i686-pc-serenity.mak 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ serenityEpsilon/build/toolchain.i686-pc-serenity.mak 2021-07-13 12:57:58.796099000 +0200
|
||||
@@ -0,0 +1,4 @@
|
||||
+TOOLCHAIN_PREFIX = i686-pc-serenity
|
||||
+CC = $(TOOLCHAIN_PREFIX)-gcc
|
||||
+CXX = $(TOOLCHAIN_PREFIX)-g++
|
||||
+LD = $(TOOLCHAIN_PREFIX)-g++
|
||||
diff --color -rupN e15/ion/src/simulator/serenity/Makefile serenityEpsilon/ion/src/simulator/serenity/Makefile
|
||||
--- e15/ion/src/simulator/serenity/Makefile 1970-01-01 01:00:00.000000000 +0100
|
||||
+++ serenityEpsilon/ion/src/simulator/serenity/Makefile 2021-07-13 16:22:50.849650000 +0200
|
||||
@@ -0,0 +1,43 @@
|
||||
+ION_SIMULATOR_FILES = 1
|
||||
+
|
||||
+
|
||||
+ion_src += $(addprefix ion/src/simulator/linux/, \
|
||||
+ assets.s \
|
||||
+ platform_files.cpp \
|
||||
+ platform_images.cpp \
|
||||
+ platform_language.cpp \
|
||||
+)
|
||||
+
|
||||
+SFLAGS += -I$(SERENITY_INSTALL_ROOT)/usr/local/include/SDL2 -I$(SERENITY_INSTALL_ROOT)/usr/local/include
|
||||
+LDFLAGS += -lpng -lz -ljpeg -lSDL2
|
||||
+
|
||||
+ion_src += $(addprefix ion/src/simulator/shared/, \
|
||||
+ dummy/haptics_enabled.cpp \
|
||||
+ dummy/keyboard_callback.cpp \
|
||||
+ dummy/window_callback.cpp \
|
||||
+ actions.cpp \
|
||||
+ clipboard_helper.cpp \
|
||||
+ haptics.cpp \
|
||||
+ journal.cpp \
|
||||
+ state_file.cpp \
|
||||
+)
|
||||
+
|
||||
+ion_src += ion/src/shared/collect_registers.cpp
|
||||
+
|
||||
+ifeq ($(EPSILON_TELEMETRY),1)
|
||||
+ion_src += ion/src/simulator/shared/dummy/telemetry_init.cpp
|
||||
+ion_src += ion/src/shared/telemetry_console.cpp
|
||||
+endif
|
||||
+
|
||||
+$(eval $(call rule_for, \
|
||||
+ INCBIN, \
|
||||
+ ion/src/simulator/linux/assets.s ion/src/simulator/linux/platform_images.h, \
|
||||
+ $(ion_simulator_assets_paths), \
|
||||
+ $$(PYTHON) ion/src/simulator/linux/incbin.py $(ion_simulator_assets) -o $$@, \
|
||||
+ global \
|
||||
+))
|
||||
+
|
||||
+$(call object_for,ion/src/simulator/linux/platform_images.cpp): $(BUILD_DIR)/ion/src/simulator/linux/platform_images.h
|
||||
+
|
||||
+# The header is refered to as <ion/src/simulator/linux/platform_images.h> so make sure it's findable this way
|
||||
+$(call object_for,ion/src/simulator/linux/platform_images.cpp): SFLAGS += -I$(BUILD_DIR)
|
25
Ports/epsilon/patches/ion-linux.patch
Normal file
25
Ports/epsilon/patches/ion-linux.patch
Normal file
|
@ -0,0 +1,25 @@
|
|||
diff --color -rupN e15/ion/src/simulator/linux/platform_files.cpp serenityEpsilon/ion/src/simulator/linux/platform_files.cpp
|
||||
--- e15/ion/src/simulator/linux/platform_files.cpp 2021-07-13 17:28:39.633302855 +0200
|
||||
+++ serenityEpsilon/ion/src/simulator/linux/platform_files.cpp 2021-07-13 13:07:28.239451000 +0200
|
||||
@@ -1,4 +1,5 @@
|
||||
#include "../shared/platform.h"
|
||||
+#include <cstdio>
|
||||
|
||||
namespace Ion {
|
||||
namespace Simulator {
|
||||
diff --color -rupN e15/ion/src/simulator/linux/platform_images.cpp serenityEpsilon/ion/src/simulator/linux/platform_images.cpp
|
||||
--- e15/ion/src/simulator/linux/platform_images.cpp 2021-07-13 17:28:39.633302855 +0200
|
||||
+++ serenityEpsilon/ion/src/simulator/linux/platform_images.cpp 2021-07-13 21:10:37.889389316 +0200
|
||||
@@ -1,10 +1,12 @@
|
||||
#include "../shared/platform.h"
|
||||
|
||||
#include <assert.h>
|
||||
+#include <stdio.h>
|
||||
#include <jpeglib.h>
|
||||
#include <png.h>
|
||||
#include <SDL.h>
|
||||
#include <stdlib.h>
|
||||
+#include <cstring>
|
||||
|
||||
#include <ion/src/simulator/linux/platform_images.h>
|
||||
|
Loading…
Reference in a new issue