diff options
author | Tim Schumacher <timschumi@gmx.de> | 2022-08-21 14:03:33 +0200 |
---|---|---|
committer | Linus Groh <mail@linusgroh.de> | 2022-08-23 13:30:48 +0100 |
commit | 2e31a479c45045aa988cad63938fff05b4706faa (patch) | |
tree | 32112e58306e176797c4e22126585bebc6df8343 | |
parent | ffe9a862f04eadd1bdae134a6903b9f666ecf65e (diff) | |
download | serenity-2e31a479c45045aa988cad63938fff05b4706faa.zip |
Ports/SDL2: Do an out-of-tree build
SDL 2.24.0 starts having include loops if we try to do an in-tree build
against its wishes, so let's not do that anymore.
-rwxr-xr-x | Ports/SDL2/package.sh | 12 | ||||
-rw-r--r-- | Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch | 16 |
2 files changed, 14 insertions, 14 deletions
diff --git a/Ports/SDL2/package.sh b/Ports/SDL2/package.sh index b8389fdf6a..d6b07c725f 100755 --- a/Ports/SDL2/package.sh +++ b/Ports/SDL2/package.sh @@ -8,9 +8,17 @@ configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" "- depends=("libiconv") configure() { - run cmake "${configopts[@]}" + mkdir -p "${PORT_BUILD_DIR}/SDL2-${version}-build" + cd "${PORT_BUILD_DIR}/SDL2-${version}-build" + cmake "${configopts[@]}" "${PORT_BUILD_DIR}/SDL2-${version}" +} + +build() { + cd "${PORT_BUILD_DIR}/SDL2-${version}-build" + make "${makeopts[@]}" } install() { - run make install + cd "${PORT_BUILD_DIR}/SDL2-${version}-build" + make install } diff --git a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch index 278ba6eba5..cbac3d4951 100644 --- a/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch +++ b/Ports/SDL2/patches/0001-Add-SerenityOS-platform-support.patch @@ -16,7 +16,7 @@ Co-Authored-By: Stephan Unverwerth <s.unverwerth@gmx.de> Co-Authored-By: Tim Schumacher <timschumi@gmx.de> Co-Authored-By: circl <circl.lastname@gmail.com> --- - CMakeLists.txt | 29 +- + CMakeLists.txt | 25 +- build-scripts/config.sub | 3 + cmake/sdlchecks.cmake | 20 + include/SDL_config.h.cmake | 2 + @@ -36,7 +36,7 @@ Co-Authored-By: circl <circl.lastname@gmail.com> src/video/serenity/SDL_serenitymouse.h | 39 + src/video/serenity/SDL_serenityvideo.cpp | 720 ++++++++++++++++++ src/video/serenity/SDL_serenityvideo.h | 98 +++ - 20 files changed, 1414 insertions(+), 29 deletions(-) + 20 files changed, 1414 insertions(+), 25 deletions(-) create mode 100644 src/audio/serenity/SDL_serenityaudio.cpp create mode 100644 src/audio/serenity/SDL_serenityaudio.h create mode 100644 src/video/serenity/SDL_serenityevents.cpp @@ -49,18 +49,10 @@ Co-Authored-By: circl <circl.lastname@gmail.com> create mode 100644 src/video/serenity/SDL_serenityvideo.h diff --git a/CMakeLists.txt b/CMakeLists.txt -index 644715a..2400d53 100644 +index 644715a..4cd432d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -1,7 +1,3 @@ --if(${CMAKE_CURRENT_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_BINARY_DIR}) -- message(FATAL_ERROR "Prevented in-tree build. Please create a build directory outside of the SDL source code and run \"cmake -S ${CMAKE_SOURCE_DIR} -B .\" from there") --endif() -- - cmake_minimum_required(VERSION 3.0.0) - project(SDL2 C CXX) - -@@ -17,6 +13,9 @@ endif() +@@ -17,6 +17,9 @@ endif() # etc. See https://github.com/libsdl-org/SDL/issues/4150 add_library(sdl-build-options INTERFACE) |