From 47a840ea13401398358c496df794e9f662b10528 Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Mon, 16 May 2022 19:21:34 +0430 Subject: Ports: Update epsilon's patches to use git patches --- ...y-toolchain-information-and-makefile-file.patch | 88 ++++++++++++++++++++++ .../0002-Include-some-missing-headers.patch | 40 ++++++++++ .../patches/0003-Don-t-use-dynamic-SDL.patch | 42 +++++++++++ Ports/epsilon/patches/ReadMe.md | 17 +++++ Ports/epsilon/patches/SHOULD_USE_DYNAMIC_SDL.patch | 27 ------- Ports/epsilon/patches/build-serenity.patch | 65 ---------------- Ports/epsilon/patches/ion-linux.patch | 25 ------ 7 files changed, 187 insertions(+), 117 deletions(-) create mode 100644 Ports/epsilon/patches/0001-Add-serenity-toolchain-information-and-makefile-file.patch create mode 100644 Ports/epsilon/patches/0002-Include-some-missing-headers.patch create mode 100644 Ports/epsilon/patches/0003-Don-t-use-dynamic-SDL.patch create mode 100644 Ports/epsilon/patches/ReadMe.md delete mode 100644 Ports/epsilon/patches/SHOULD_USE_DYNAMIC_SDL.patch delete mode 100644 Ports/epsilon/patches/build-serenity.patch delete mode 100644 Ports/epsilon/patches/ion-linux.patch diff --git a/Ports/epsilon/patches/0001-Add-serenity-toolchain-information-and-makefile-file.patch b/Ports/epsilon/patches/0001-Add-serenity-toolchain-information-and-makefile-file.patch new file mode 100644 index 0000000000..5389b68fab --- /dev/null +++ b/Ports/epsilon/patches/0001-Add-serenity-toolchain-information-and-makefile-file.patch @@ -0,0 +1,88 @@ +From baa0491c1ce039d7de092f3f91b6d5b752c3ef24 Mon Sep 17 00:00:00 2001 +From: Joachim Le Fournis +Date: Tue, 13 Jul 2021 21:17:44 +0200 +Subject: [PATCH 1/3] Add serenity toolchain information and makefile files + +--- + build/platform.simulator.serenity.mak | 6 ++++ + build/toolchain.i686-pc-serenity.mak | 4 +++ + ion/src/simulator/serenity/Makefile | 43 +++++++++++++++++++++++++++ + 3 files changed, 53 insertions(+) + create mode 100644 build/platform.simulator.serenity.mak + create mode 100644 build/toolchain.i686-pc-serenity.mak + create mode 100644 ion/src/simulator/serenity/Makefile + +diff --git a/build/platform.simulator.serenity.mak b/build/platform.simulator.serenity.mak +new file mode 100644 +index 0000000..ff985de +--- /dev/null ++++ b/build/platform.simulator.serenity.mak +@@ -0,0 +1,6 @@ ++TOOLCHAIN = i686-pc-serenity ++EXE = elf ++ ++EPSILON_TELEMETRY ?= 0 ++ ++SHOULD_USE_DYNAMIC_SDL = 1 +diff --git a/build/toolchain.i686-pc-serenity.mak b/build/toolchain.i686-pc-serenity.mak +new file mode 100644 +index 0000000..d6110e2 +--- /dev/null ++++ b/build/toolchain.i686-pc-serenity.mak +@@ -0,0 +1,4 @@ ++TOOLCHAIN_PREFIX = i686-pc-serenity ++CC = $(TOOLCHAIN_PREFIX)-gcc ++CXX = $(TOOLCHAIN_PREFIX)-g++ ++LD = $(TOOLCHAIN_PREFIX)-g++ +diff --git a/ion/src/simulator/serenity/Makefile b/ion/src/simulator/serenity/Makefile +new file mode 100644 +index 0000000..5d4bb13 +--- /dev/null ++++ b/ion/src/simulator/serenity/Makefile +@@ -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 so make sure it's findable this way ++$(call object_for,ion/src/simulator/linux/platform_images.cpp): SFLAGS += -I$(BUILD_DIR) +-- +2.36.1 + diff --git a/Ports/epsilon/patches/0002-Include-some-missing-headers.patch b/Ports/epsilon/patches/0002-Include-some-missing-headers.patch new file mode 100644 index 0000000000..cfb2a5695f --- /dev/null +++ b/Ports/epsilon/patches/0002-Include-some-missing-headers.patch @@ -0,0 +1,40 @@ +From 150a510965a5f673ca1fc3459f0f1766cdfa1217 Mon Sep 17 00:00:00 2001 +From: Joachim Le Fournis +Date: Tue, 13 Jul 2021 21:17:44 +0200 +Subject: [PATCH 2/3] Include some missing headers + +--- + ion/src/simulator/linux/platform_files.cpp | 1 + + ion/src/simulator/linux/platform_images.cpp | 2 ++ + 2 files changed, 3 insertions(+) + +diff --git a/ion/src/simulator/linux/platform_files.cpp b/ion/src/simulator/linux/platform_files.cpp +index b866fe0..cc31edc 100644 +--- a/ion/src/simulator/linux/platform_files.cpp ++++ b/ion/src/simulator/linux/platform_files.cpp +@@ -1,4 +1,5 @@ + #include "../shared/platform.h" ++#include + + namespace Ion { + namespace Simulator { +diff --git a/ion/src/simulator/linux/platform_images.cpp b/ion/src/simulator/linux/platform_images.cpp +index 0fb2386..94ed16c 100644 +--- a/ion/src/simulator/linux/platform_images.cpp ++++ b/ion/src/simulator/linux/platform_images.cpp +@@ -1,10 +1,12 @@ + #include "../shared/platform.h" + + #include ++#include + #include + #include + #include + #include ++#include + + #include + +-- +2.36.1 + diff --git a/Ports/epsilon/patches/0003-Don-t-use-dynamic-SDL.patch b/Ports/epsilon/patches/0003-Don-t-use-dynamic-SDL.patch new file mode 100644 index 0000000000..efacacc334 --- /dev/null +++ b/Ports/epsilon/patches/0003-Don-t-use-dynamic-SDL.patch @@ -0,0 +1,42 @@ +From 5c104400d226a1531145b8e30e2055ef6a24d1e3 Mon Sep 17 00:00:00 2001 +From: Joachim Le Fournis +Date: Tue, 13 Jul 2021 21:17:44 +0200 +Subject: [PATCH 3/3] Don't use dynamic SDL + +--- + build/platform.simulator.mak | 1 + + ion/src/simulator/external/Makefile | 4 ++++ + 2 files changed, 5 insertions(+) + +diff --git a/build/platform.simulator.mak b/build/platform.simulator.mak +index 07f1edd..9c349f8 100644 +--- a/build/platform.simulator.mak ++++ b/build/platform.simulator.mak +@@ -1,6 +1,7 @@ + USE_LIBA = 0 + ION_KEYBOARD_LAYOUT = layout_B2 + EPSILON_GETOPT = 1 ++SHOULD_USE_DYNAMIC_SDL = 0 + + SFLAGS += -fPIE + +diff --git a/ion/src/simulator/external/Makefile b/ion/src/simulator/external/Makefile +index cf7744b..5157f3c 100644 +--- a/ion/src/simulator/external/Makefile ++++ b/ion/src/simulator/external/Makefile +@@ -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 +-- +2.36.1 + diff --git a/Ports/epsilon/patches/ReadMe.md b/Ports/epsilon/patches/ReadMe.md new file mode 100644 index 0000000000..618f15ac11 --- /dev/null +++ b/Ports/epsilon/patches/ReadMe.md @@ -0,0 +1,17 @@ +# Patches for epsilon on SerenityOS + +## `0001-Add-serenity-toolchain-information-and-makefile-file.patch` + +Add serenity toolchain information and makefile files + + +## `0002-Include-some-missing-headers.patch` + +Include some missing headers + + +## `0003-Don-t-use-dynamic-SDL.patch` + +Don't use dynamic SDL + + diff --git a/Ports/epsilon/patches/SHOULD_USE_DYNAMIC_SDL.patch b/Ports/epsilon/patches/SHOULD_USE_DYNAMIC_SDL.patch deleted file mode 100644 index abed295c82..0000000000 --- a/Ports/epsilon/patches/SHOULD_USE_DYNAMIC_SDL.patch +++ /dev/null @@ -1,27 +0,0 @@ -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 diff --git a/Ports/epsilon/patches/build-serenity.patch b/Ports/epsilon/patches/build-serenity.patch deleted file mode 100644 index 87f3bf6816..0000000000 --- a/Ports/epsilon/patches/build-serenity.patch +++ /dev/null @@ -1,65 +0,0 @@ -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 so make sure it's findable this way -+$(call object_for,ion/src/simulator/linux/platform_images.cpp): SFLAGS += -I$(BUILD_DIR) diff --git a/Ports/epsilon/patches/ion-linux.patch b/Ports/epsilon/patches/ion-linux.patch deleted file mode 100644 index 2b2d2d470c..0000000000 --- a/Ports/epsilon/patches/ion-linux.patch +++ /dev/null @@ -1,25 +0,0 @@ -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 - - 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 -+#include - #include - #include - #include - #include -+#include - - #include - -- cgit v1.2.3