summaryrefslogtreecommitdiff
path: root/Ports/SDLPoP
diff options
context:
space:
mode:
Diffstat (limited to 'Ports/SDLPoP')
-rwxr-xr-xPorts/SDLPoP/package.sh10
-rw-r--r--Ports/SDLPoP/patches/includes.patch14
-rw-r--r--Ports/SDLPoP/patches/link_against_serenity_libs.patch11
-rw-r--r--Ports/SDLPoP/patches/sdl-path.patch16
4 files changed, 35 insertions, 16 deletions
diff --git a/Ports/SDLPoP/package.sh b/Ports/SDLPoP/package.sh
index a6bb39cdb8..60fa734cbd 100755
--- a/Ports/SDLPoP/package.sh
+++ b/Ports/SDLPoP/package.sh
@@ -3,17 +3,17 @@ port=PrinceOfPersia
useconfigure=true
version=git
depends="SDL2 SDL2_image"
-workdir=SDLPoP-master
+workdir=SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68
configopts="-DCMAKE_TOOLCHAIN_FILE=$SERENITY_ROOT/Toolchain/CMake/CMakeToolchain.txt"
-files="https://github.com/NagyD/SDLPoP/archive/refs/heads/master.zip PoP.zip c75184eb2a7e8c9ed008ffae371ec178"
-auth_type=md5
+files="https://github.com/NagyD/SDLPoP/archive/86988c668eeaa10f218e1d4938fc5b4e42314d68.zip PoP.zip d18cae8541fb8cbcc374fd998316993d561429a83f92061bc0754337ada774c5"
+auth_type=sha256
install_location="Root/opt/PrinceOfPersia"
configure() {
- run cmake $configopts src/.
+ run cmake $configopts ./src
}
install() {
- run mkdir -p "${SERENITY_BUILD_DIR}/${install_location}"
+ mkdir -p "${SERENITY_BUILD_DIR}/${install_location}"
run cp -r prince data SDLPoP.ini "${SERENITY_BUILD_DIR}/${install_location}"
}
diff --git a/Ports/SDLPoP/patches/includes.patch b/Ports/SDLPoP/patches/includes.patch
new file mode 100644
index 0000000000..7f1d6ed18f
--- /dev/null
+++ b/Ports/SDLPoP/patches/includes.patch
@@ -0,0 +1,14 @@
+diff -Naur SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68/src/types.h SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68.serenity/src/types.h
+--- SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68/src/types.h 2021-04-18 10:45:52.000000000 +0200
++++ SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68.serenity/src/types.h 2021-04-19 16:09:34.732779363 +0200
+@@ -31,8 +31,8 @@
+ // These headers for SDL seem to be the pkgconfig/meson standard as per the
+ // latest versions. If the old ones should be used, the ifdef must be used
+ // to compare versions.
+-# include <SDL.h>
+-# include <SDL_image.h>
++# include <SDL2/SDL.h>
++# include <SDL2/SDL_image.h>
+ //#endif
+
+ #if SDL_BYTEORDER != SDL_LIL_ENDIAN
diff --git a/Ports/SDLPoP/patches/link_against_serenity_libs.patch b/Ports/SDLPoP/patches/link_against_serenity_libs.patch
deleted file mode 100644
index ab51236a70..0000000000
--- a/Ports/SDLPoP/patches/link_against_serenity_libs.patch
+++ /dev/null
@@ -1,11 +0,0 @@
-diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
-index 3558a6c..2092651 100644
---- a/src/CMakeLists.txt
-+++ b/src/CMakeLists.txt
-@@ -118,5 +118,5 @@ if(WIN32)
- elseif(APPLE)
- target_link_libraries(prince SDL2main SDL2 SDL2_image m)
- else() # Linux, *BSD, etc.
-- target_link_libraries(prince SDL2 SDL2_image m)
-+ target_link_libraries(prince SDL2 SDL2_image -lm -lpng -ljpeg -lz -lgui -lcore -lipc -lgfx -lpthread)
- endif()
diff --git a/Ports/SDLPoP/patches/sdl-path.patch b/Ports/SDLPoP/patches/sdl-path.patch
new file mode 100644
index 0000000000..14fdb2390d
--- /dev/null
+++ b/Ports/SDLPoP/patches/sdl-path.patch
@@ -0,0 +1,16 @@
+diff -Naur SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68/src/CMakeLists.txt SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68.serenity/src/CMakeLists.txt
+--- SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68/src/CMakeLists.txt 2021-04-19 15:57:54.748801218 +0200
++++ SDLPoP-86988c668eeaa10f218e1d4938fc5b4e42314d68.serenity/src/CMakeLists.txt 2021-04-19 15:59:47.581060085 +0200
+@@ -14,10 +14,10 @@
+
+ # On macOS, if you used Homebrew to install SDL2, the location may be something like this:
+
+-#set(SDL2 "/usr/local/Cellar/sdl2/2.0.5")
++set(SDL2 "/usr/local")
+
+ if (NOT(WIN32) AND (DEFINED SDL2))
+- include_directories(${SDL2}/include)
++ include_directories(${SDL2}/include/SDL2)
+ link_directories(${SDL2}/lib)
+ endif()
+