mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 00:47:45 +00:00
Ports: Update sam's patches to use git patches
This commit is contained in:
parent
57bbe11933
commit
0068f7f764
3 changed files with 52 additions and 16 deletions
|
@ -1,18 +1,12 @@
|
||||||
diff --git a/Makefile b/Makefile
|
From e9875cfafe88de258da81b2b366a534d7f1edfc4 Mon Sep 17 00:00:00 2001
|
||||||
index 1153e0c..9c70190 100644
|
From: Timothy <timmot@users.noreply.github.com>
|
||||||
--- a/Makefile
|
Date: Thu, 3 Jun 2021 14:20:09 -0700
|
||||||
+++ b/Makefile
|
Subject: [PATCH 1/2] Enable the windows function stubs for serenity
|
||||||
@@ -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`
|
src/main.c | 2 +-
|
||||||
-LFLAGS = `sdl-config --libs`
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
+CFLAGS = -Wall -O2 -DUSESDL -I../../SDL2/SDL-main-serenity/include -D_REENTRANT
|
|
||||||
+LFLAGS = -L../../SDL2 -lSDL2
|
|
||||||
|
|
||||||
# no libsdl present
|
|
||||||
#CFLAGS = -Wall -O2
|
|
||||||
diff --git a/src/main.c b/src/main.c
|
diff --git a/src/main.c b/src/main.c
|
||||||
index 3e8fdde..3432fe8 100644
|
index 3e8fdde..3432fe8 100644
|
||||||
--- a/src/main.c
|
--- a/src/main.c
|
||||||
|
@ -26,3 +20,6 @@ index 3e8fdde..3432fe8 100644
|
||||||
static int min(int l, int r) { return l < r ? l : r; }
|
static int min(int l, int r) { return l < r ? l : r; }
|
||||||
static void strcat_s(char * dest, int size, char * str) {
|
static void strcat_s(char * dest, int size, char * str) {
|
||||||
unsigned int dlen = strlen(dest);
|
unsigned int dlen = strlen(dest);
|
||||||
|
--
|
||||||
|
2.36.1
|
||||||
|
|
|
@ -0,0 +1,27 @@
|
||||||
|
From e588447c853b3df909747002985f833a428c8c37 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Timothy <timmot@users.noreply.github.com>
|
||||||
|
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
|
||||||
|
|
12
Ports/sam/patches/ReadMe.md
Normal file
12
Ports/sam/patches/ReadMe.md
Normal file
|
@ -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
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue