Skip to content

Commit e24b55d

Browse files
committed
Ports: Update SDLPoP's patches to use git patches
1 parent 9826097 commit e24b55d

7 files changed

+111
-42
lines changed

Ports/SDLPoP/patches/disable_extra_features.patch renamed to Ports/SDLPoP/patches/0001-Disable-some-extra-features.patch

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
1+
From 79a5522062cf03b1f7dc878799c66389e689b1d5 Mon Sep 17 00:00:00 2001
2+
From: Manuel Palenzuela <manuelpalenzuelamerino@gmail.com>
3+
Date: Sat, 3 Apr 2021 17:53:44 +0200
4+
Subject: [PATCH 1/4] Disable some extra features
5+
6+
This just disables some extra features the game has such as screenshots, hardware acceleration, etc.
7+
---
8+
src/config.h | 24 ++++++++++++------------
9+
1 file changed, 12 insertions(+), 12 deletions(-)
10+
111
diff --git a/src/config.h b/src/config.h
2-
index b6bb168..5af0adf 100644
12+
index 698e7ed..0a935ee 100644
313
--- a/src/config.h
414
+++ b/src/config.h
515
@@ -35,7 +35,7 @@ The authors of this program may be contacted at https://forum.princed.org
@@ -54,7 +64,7 @@ index b6bb168..5af0adf 100644
5464

5565

5666
// Bugfixes:
57-
@@ -250,11 +250,11 @@ The authors of this program may be contacted at https://forum.princed.org
67+
@@ -277,11 +277,11 @@ The authors of this program may be contacted at https://forum.princed.org
5868
#define USE_LIGHTING
5969

6070
// Enable screenshot features.
@@ -68,7 +78,7 @@ index b6bb168..5af0adf 100644
6878

6979
#ifdef USE_TEXT // The menu won't work without text.
7080

71-
@@ -264,13 +264,13 @@ The authors of this program may be contacted at https://forum.princed.org
81+
@@ -291,13 +291,13 @@ The authors of this program may be contacted at https://forum.princed.org
7282
#endif
7383

7484
// Enable colored torches. A torch can be colored by changing its modifier in a level editor.
@@ -85,3 +95,6 @@ index b6bb168..5af0adf 100644
8595

8696
// Speed up the sound during fast forward using resampling.
8797
// If disabled, the sound is sped up by clipping out parts from it.
98+
--
99+
2.36.1
100+
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
From d352df3380953ce7acb34aa26dc3b343853c32df Mon Sep 17 00:00:00 2001
2+
From: Gunnar Beutner <gunnar@beutner.name>
3+
Date: Mon, 19 Apr 2021 16:17:10 +0200
4+
Subject: [PATCH 2/4] Use the correct include paths for SDL
5+
6+
The SDL port is installed into /usr/local, and its headers are
7+
accessible as <SDL2/...>.
8+
---
9+
src/types.h | 4 ++--
10+
1 file changed, 2 insertions(+), 2 deletions(-)
11+
12+
diff --git a/src/types.h b/src/types.h
13+
index 1f696d1..b5ede07 100644
14+
--- a/src/types.h
15+
+++ b/src/types.h
16+
@@ -31,8 +31,8 @@ The authors of this program may be contacted at https://forum.princed.org
17+
// These headers for SDL seem to be the pkgconfig/meson standard as per the
18+
// latest versions. If the old ones should be used, the ifdef must be used
19+
// to compare versions.
20+
-# include <SDL.h>
21+
-# include <SDL_image.h>
22+
+# include <SDL2/SDL.h>
23+
+# include <SDL2/SDL_image.h>
24+
//#endif
25+
26+
#if SDL_BYTEORDER != SDL_LIL_ENDIAN
27+
--
28+
2.36.1
29+

Ports/SDLPoP/patches/remove_fscanf_unknwn_conversion_specfier.patch renamed to Ports/SDLPoP/patches/0003-Remove-some-unsupported-scanf-format-specifiers.patch

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
From 4776a79fcc39601e79b79909f1fa3c69a42d958c Mon Sep 17 00:00:00 2001
2+
From: Manuel Palenzuela <manuelpalenzuelamerino@gmail.com>
3+
Date: Sat, 3 Apr 2021 17:53:44 +0200
4+
Subject: [PATCH 3/4] Remove some unsupported scanf format specifiers
5+
6+
(Note that scanf has been rewritten since and probably supports these
7+
modifiers now, so this patch might not be necessary)
8+
---
9+
src/options.c | 6 +++---
10+
src/seg009.c | 2 +-
11+
2 files changed, 4 insertions(+), 4 deletions(-)
12+
113
diff --git a/src/options.c b/src/options.c
214
index 1bfe473..2bf173e 100644
315
--- a/src/options.c
@@ -35,3 +47,6 @@ index 139c2d8..e2047fb 100644
3547
perror(names_path);
3648
continue;
3749
}
50+
--
51+
2.36.1
52+
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
From ddde9196a6a165ff06ac725c567f7e9aebe1d4a8 Mon Sep 17 00:00:00 2001
2+
From: Gunnar Beutner <gunnar@beutner.name>
3+
Date: Mon, 19 Apr 2021 16:17:10 +0200
4+
Subject: [PATCH 4/4] Fix SDL2 include path
5+
6+
SDL2 headers are installed into /usr/local under SDL2, make it so
7+
they're found.
8+
---
9+
src/CMakeLists.txt | 4 ++--
10+
1 file changed, 2 insertions(+), 2 deletions(-)
11+
12+
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
13+
index 3558a6c..d074e48 100644
14+
--- a/src/CMakeLists.txt
15+
+++ b/src/CMakeLists.txt
16+
@@ -14,10 +14,10 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${SDLPoP_SOURCE_DIR}/..")
17+
18+
# On macOS, if you used Homebrew to install SDL2, the location may be something like this:
19+
20+
-#set(SDL2 "/usr/local/Cellar/sdl2/2.0.5")
21+
+set(SDL2 "/usr/local")
22+
23+
if (NOT(WIN32) AND (DEFINED SDL2))
24+
- include_directories(${SDL2}/include)
25+
+ include_directories(${SDL2}/include/SDL2)
26+
link_directories(${SDL2}/lib)
27+
endif()
28+
29+
--
30+
2.36.1
31+

Ports/SDLPoP/patches/ReadMe.md

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,29 @@
1-
# Patches for SDLPoP
1+
# Patches for SDLPoP on SerenityOS
22

3-
## `sdl-path.patch`
3+
## `0001-Disable-some-extra-features.patch`
44

5-
Use the correct path to refer to SDL (instead of a MacOS specific path)
5+
Disable some extra features
66

7-
## `includes.patch`
7+
This just disables some extra features the game has such as screenshots, hardware acceleration, etc.
88

9-
Use `SDL2/` paths for includes.
9+
## `0002-Use-the-correct-include-paths-for-SDL.patch`
1010

11-
## `disable_extra_features.patch`
11+
Use the correct include paths for SDL
1212

13-
Disables some (presumably) unsupported features.
13+
The SDL port is installed into /usr/local, and its headers are
14+
accessible as <SDL2/...>.
1415

15-
## `remove_fscanf_unknwn_conversion_specfier.patch`
16+
## `0003-Remove-some-unsupported-scanf-format-specifiers.patch`
1617

17-
Removes some (presumably) unsupported scanf specifiers.
18+
Remove some unsupported scanf format specifiers
19+
20+
(Note that scanf has been rewritten since and probably supports these
21+
modifiers now, so this patch might not be necessary)
22+
23+
## `0004-Fix-SDL2-include-path.patch`
24+
25+
Fix SDL2 include path
26+
27+
SDL2 headers are installed into /usr/local under SDL2, make it so
28+
they're found.
1829

Ports/SDLPoP/patches/includes.patch

Lines changed: 0 additions & 14 deletions
This file was deleted.

Ports/SDLPoP/patches/sdl-path.patch

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)