From 0068f7f764e9ea59e7aee30dc37c20823d617a9d Mon Sep 17 00:00:00 2001 From: Ali Mohammad Pur Date: Tue, 17 May 2022 00:06:45 +0430 Subject: [PATCH] Ports: Update sam's patches to use git patches --- ...windows-function-stubs-for-serenity.patch} | 29 +++++++++---------- ...he-SDL2-include-path-and-library-dir.patch | 27 +++++++++++++++++ Ports/sam/patches/ReadMe.md | 12 ++++++++ 3 files changed, 52 insertions(+), 16 deletions(-) rename Ports/sam/patches/{sam.patch => 0001-Enable-the-windows-function-stubs-for-serenity.patch} (50%) create mode 100644 Ports/sam/patches/0002-Manually-set-the-SDL2-include-path-and-library-dir.patch create mode 100644 Ports/sam/patches/ReadMe.md diff --git a/Ports/sam/patches/sam.patch b/Ports/sam/patches/0001-Enable-the-windows-function-stubs-for-serenity.patch similarity index 50% rename from Ports/sam/patches/sam.patch rename to Ports/sam/patches/0001-Enable-the-windows-function-stubs-for-serenity.patch index e09df7da30..ea08511370 100644 --- a/Ports/sam/patches/sam.patch +++ b/Ports/sam/patches/0001-Enable-the-windows-function-stubs-for-serenity.patch @@ -1,24 +1,18 @@ -diff --git a/Makefile b/Makefile -index 1153e0c..9c70190 100644 ---- a/Makefile -+++ b/Makefile -@@ -3,8 +3,8 @@ OBJS = reciter.o sam.o render.o main.o debug.o processframes.o createtransitions - CC = gcc - - # libsdl present --CFLAGS = -Wall -O2 -DUSESDL `sdl-config --cflags` --LFLAGS = `sdl-config --libs` -+CFLAGS = -Wall -O2 -DUSESDL -I../../SDL2/SDL-main-serenity/include -D_REENTRANT -+LFLAGS = -L../../SDL2 -lSDL2 - - # no libsdl present - #CFLAGS = -Wall -O2 +From e9875cfafe88de258da81b2b366a534d7f1edfc4 Mon Sep 17 00:00:00 2001 +From: Timothy +Date: Thu, 3 Jun 2021 14:20:09 -0700 +Subject: [PATCH 1/2] Enable the windows function stubs for serenity + +--- + src/main.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + diff --git a/src/main.c b/src/main.c index 3e8fdde..3432fe8 100644 --- a/src/main.c +++ b/src/main.c @@ -14,7 +14,7 @@ - + // Approximations of some Windows functions to ease portability -#if defined __GNU_LIBRARY__ || defined __GLIBC__ @@ -26,3 +20,6 @@ index 3e8fdde..3432fe8 100644 static int min(int l, int r) { return l < r ? l : r; } static void strcat_s(char * dest, int size, char * str) { unsigned int dlen = strlen(dest); +-- +2.36.1 + diff --git a/Ports/sam/patches/0002-Manually-set-the-SDL2-include-path-and-library-dir.patch b/Ports/sam/patches/0002-Manually-set-the-SDL2-include-path-and-library-dir.patch new file mode 100644 index 0000000000..e699bdd434 --- /dev/null +++ b/Ports/sam/patches/0002-Manually-set-the-SDL2-include-path-and-library-dir.patch @@ -0,0 +1,27 @@ +From e588447c853b3df909747002985f833a428c8c37 Mon Sep 17 00:00:00 2001 +From: Timothy +Date: Mon, 16 May 2022 23:23:21 +0430 +Subject: [PATCH 2/2] Manually set the SDL2 include path and library dir + +--- + Makefile | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 1153e0c..9c70190 100644 +--- a/Makefile ++++ b/Makefile +@@ -3,8 +3,8 @@ OBJS = reciter.o sam.o render.o main.o debug.o processframes.o createtransitions + CC = gcc + + # libsdl present +-CFLAGS = -Wall -O2 -DUSESDL `sdl-config --cflags` +-LFLAGS = `sdl-config --libs` ++CFLAGS = -Wall -O2 -DUSESDL -I../../SDL2/SDL-main-serenity/include -D_REENTRANT ++LFLAGS = -L../../SDL2 -lSDL2 + + # no libsdl present + #CFLAGS = -Wall -O2 +-- +2.36.1 + diff --git a/Ports/sam/patches/ReadMe.md b/Ports/sam/patches/ReadMe.md new file mode 100644 index 0000000000..826dcf8ee4 --- /dev/null +++ b/Ports/sam/patches/ReadMe.md @@ -0,0 +1,12 @@ +# Patches for sam on SerenityOS + +## `0001-Enable-the-windows-function-stubs-for-serenity.patch` + +Enable the windows function stubs for serenity + + +## `0002-Manually-set-the-SDL2-include-path-and-library-dir.patch` + +Manually set the SDL2 include path and library dir + +