From b19154127768a3bdf6422c8a2230d26af7b4d7f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= Date: Sun, 24 Mar 2024 16:52:04 +0100 Subject: [PATCH 1/2] Ports: Update gemrb to version 0.9.2 --- Ports/AvailablePorts.md | 2 +- Ports/gemrb/package.sh | 14 +++++++------- ...Hard-code-some-paths-for-runtime-purposes.patch | 2 +- ...002-Create-SDL2-renderer-as-unaccelerated.patch | 14 +++++++------- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index 55b038588a74d2..b6945266a227cf 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -91,7 +91,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`gawk`](gawk/) | GNU awk | 5.3.0 | https://www.gnu.org/software/gawk/ | | [`gcc`](gcc/) | GNU Compiler Collection | 13.2.0 | https://gcc.gnu.org/ | | [`gdb`](gdb/) | GNU Project Debugger | 11.2 | https://sourceware.org/gdb | -| [`gemrb`](gemrb/) | GemRB | 0.9.1 | https://gemrb.org/ | +| [`gemrb`](gemrb/) | GemRB | 0.9.2 | https://gemrb.org/ | | [`genemu`](genemu/) | Genesis / MegaDrive Emulator | e39f690 | https://github.com/rasky/genemu | | [`genext2fs`](genext2fs/) | genext2fs | 1.5.0 | https://github.com/bestouff/genext2fs | | [`gettext`](gettext/) | GNU gettext | 0.22.4 | https://www.gnu.org/software/gettext/ | diff --git a/Ports/gemrb/package.sh b/Ports/gemrb/package.sh index 6bc5ec51e2e7ac..25d60b7ea796c3 100755 --- a/Ports/gemrb/package.sh +++ b/Ports/gemrb/package.sh @@ -1,17 +1,17 @@ #!/usr/bin/env -S bash ../.port_include.sh port='gemrb' -version='0.9.1' +version='0.9.2' useconfigure='true' files=( - "https://github.com/gemrb/gemrb/archive/refs/tags/v${version}.tar.gz#6e5dbcf7398d5566751f434b0d4647196bfbe9a813e3b65ad6a4ee2f1bbfb9ba" + "https://github.com/gemrb/gemrb/archive/refs/tags/v${version}.tar.gz#ea614c067483606dab680ab18cd50527f56803bd46e0888e3c786eec05d3bb7d" ) depends=( - 'freetype' - 'libiconv' - 'python3' - 'SDL2' + 'freetype' + 'libiconv' + 'python3' + 'SDL2' 'SDL2_mixer' - 'zlib' + 'zlib' ) configopts=( "-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt" diff --git a/Ports/gemrb/patches/0001-Hard-code-some-paths-for-runtime-purposes.patch b/Ports/gemrb/patches/0001-Hard-code-some-paths-for-runtime-purposes.patch index dd704695c19dda..01f0004cdf19e8 100644 --- a/Ports/gemrb/patches/0001-Hard-code-some-paths-for-runtime-purposes.patch +++ b/Ports/gemrb/patches/0001-Hard-code-some-paths-for-runtime-purposes.patch @@ -12,7 +12,7 @@ this is to hard-code these paths in the header file. 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmake/cmake_config.h.in b/cmake/cmake_config.h.in -index 17584b33da6e9cc610d8be7d1a4f28b8b587844a..02a6214f4215723eb4c90b65f67aea6d508be193 100644 +index 8368c3b0e9b1b67b9cbf18a1abd8b2194733094b..4bc1c7b283dce482b1e40561c46a82c954d79ac9 100644 --- a/cmake/cmake_config.h.in +++ b/cmake/cmake_config.h.in @@ -10,9 +10,9 @@ diff --git a/Ports/gemrb/patches/0002-Create-SDL2-renderer-as-unaccelerated.patch b/Ports/gemrb/patches/0002-Create-SDL2-renderer-as-unaccelerated.patch index bf97a04f713103..26decfe01dcc75 100644 --- a/Ports/gemrb/patches/0002-Create-SDL2-renderer-as-unaccelerated.patch +++ b/Ports/gemrb/patches/0002-Create-SDL2-renderer-as-unaccelerated.patch @@ -8,15 +8,15 @@ Subject: [PATCH] Create SDL2 renderer as unaccelerated 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gemrb/plugins/SDLVideo/SDL20Video.cpp b/gemrb/plugins/SDLVideo/SDL20Video.cpp -index 36dc17caffc89bed2610d26d19e97290905bcf20..158ee2fe5eb1b396c1a63b1e7bc898bd1ae224fc 100644 +index 8d906ec6066cac11a91ebcc372810b3e0a4f71db..741f4085458a6b7cc03c7613e8fa93beb7a60a2d 100644 --- a/gemrb/plugins/SDLVideo/SDL20Video.cpp +++ b/gemrb/plugins/SDLVideo/SDL20Video.cpp -@@ -139,7 +139,7 @@ int SDL20VideoDriver::CreateSDLDisplay(const char* title) +@@ -171,7 +171,7 @@ int SDL20VideoDriver::CreateSDLDisplay(const char* title, bool vsync) SetWindowIcon(window); #endif -- renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_TARGETTEXTURE | SDL_RENDERER_ACCELERATED); -+ renderer = SDL_CreateRenderer(window, -1, SDL_RENDERER_TARGETTEXTURE); - SDL_RendererInfo info; - SDL_GetRendererInfo(renderer, &info); - Log(DEBUG, "SDL20Video", "Renderer: {}", info.name); +- int rendererFlags = SDL_RENDERER_TARGETTEXTURE | SDL_RENDERER_ACCELERATED; ++ int rendererFlags = SDL_RENDERER_TARGETTEXTURE; + if (vsync) { + rendererFlags |= SDL_RENDERER_PRESENTVSYNC; + } From b6640565f2a3d3afdcf4ab061674f3005a1c1d72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= Date: Sun, 24 Mar 2024 17:01:00 +0100 Subject: [PATCH 2/2] Ports: Update openrct2 to version 0.4.9 --- Ports/AvailablePorts.md | 2 +- Ports/openrct2/package.sh | 6 ++-- ...01-Add-SerenityOS-platform-detection.patch | 2 +- .../patches/0002-Add-missing-includes.patch | 36 ------------------- ...-executable-path-from-proc-self-exe.patch} | 0 ...atch => 0003-Remove-use-of-strptime.patch} | 0 ...d-compile-options-to-CMakeLists.txt.patch} | 6 ++-- ...tection-for-writing-the-default-con.patch} | 0 ...patch => 0006-Disable-g2.dat-target.patch} | 4 +-- Ports/openrct2/patches/ReadMe.md | 16 +++------ 10 files changed, 15 insertions(+), 57 deletions(-) delete mode 100644 Ports/openrct2/patches/0002-Add-missing-includes.patch rename Ports/openrct2/patches/{0003-Read-the-executable-path-from-proc-self-exe.patch => 0002-Read-the-executable-path-from-proc-self-exe.patch} (100%) rename Ports/openrct2/patches/{0004-Remove-use-of-strptime.patch => 0003-Remove-use-of-strptime.patch} (100%) rename Ports/openrct2/patches/{0005-Add-compile-options-to-CMakeLists.txt.patch => 0004-Add-compile-options-to-CMakeLists.txt.patch} (91%) rename Ports/openrct2/patches/{0006-Disable-locale-detection-for-writing-the-default-con.patch => 0005-Disable-locale-detection-for-writing-the-default-con.patch} (100%) rename Ports/openrct2/patches/{0007-Disable-g2.dat-target.patch => 0006-Disable-g2.dat-target.patch} (89%) diff --git a/Ports/AvailablePorts.md b/Ports/AvailablePorts.md index b6945266a227cf..3643bd05a14af5 100644 --- a/Ports/AvailablePorts.md +++ b/Ports/AvailablePorts.md @@ -234,7 +234,7 @@ This list is also available at [ports.serenityos.net](https://ports.serenityos.n | [`ObjFW`](ObjFW/) | ObjFW | 8d19ba9 | https://objfw.nil.im/ | | [`oksh`](oksh/) | oksh | 7.1 | https://github.com/ibara/oksh | | [`OpenJDK`](OpenJDK/) | OpenJDK | 17.0.6 | https://openjdk.java.net/ | -| [`openrct2`](openrct2/) | OpenRCT2 | 0.4.8 | https://openrct2.org/ | +| [`openrct2`](openrct2/) | OpenRCT2 | 0.4.9 | https://openrct2.org/ | | [`openssh`](openssh/) | OpenSSH | 9.0-94eb685 | https://github.com/openssh/openssh-portable | | [`openssl`](openssl/) | OpenSSL | 3.1.2 | https://www.openssl.org/ | | [`openttd`](openttd/) | OpenTTD | 13.4 | https://www.openttd.org/ | diff --git a/Ports/openrct2/package.sh b/Ports/openrct2/package.sh index f1ef1d472b6df7..3674cdbf259f89 100755 --- a/Ports/openrct2/package.sh +++ b/Ports/openrct2/package.sh @@ -1,6 +1,6 @@ #!/usr/bin/env -S bash ../.port_include.sh port='openrct2' -version='0.4.8' +version='0.4.9' depends=( 'curl' 'flac' @@ -18,8 +18,8 @@ depends=( 'zlib' ) files=( - "https://github.com/OpenRCT2/OpenRCT2/archive/refs/tags/v${version}.tar.gz#b79bdfd91e2676b0238a94ef3a53bf13a6b6ba417a8d77056a8ea2a903967fd1" - "https://github.com/OpenRCT2/OpenRCT2/releases/download/v${version}/OpenRCT2-${version}-linux-jammy-x86_64.tar.gz#a9152601612e2c5249324bce849c5fbdbfe40886128cf3848aae4b62b0c51936" + "https://github.com/OpenRCT2/OpenRCT2/archive/refs/tags/v${version}.tar.gz#d9eb7bb99923152122716707888a6182491662e106bef91b86106fa7b45b4309" + "https://github.com/OpenRCT2/OpenRCT2/releases/download/v${version}/OpenRCT2-${version}-linux-jammy-x86_64.tar.gz#f388d46956f32755a504df1582fea7b800a8c100333667cb3f9c495c5c9d7201" ) useconfigure='true' workdir="OpenRCT2-${version}" diff --git a/Ports/openrct2/patches/0001-Add-SerenityOS-platform-detection.patch b/Ports/openrct2/patches/0001-Add-SerenityOS-platform-detection.patch index b762e40f82750a..ad664f0cc83d27 100644 --- a/Ports/openrct2/patches/0001-Add-SerenityOS-platform-detection.patch +++ b/Ports/openrct2/patches/0001-Add-SerenityOS-platform-detection.patch @@ -9,7 +9,7 @@ We teach OpenRCT2 about the name of our platform. 1 file changed, 3 insertions(+) diff --git a/src/openrct2/Version.h b/src/openrct2/Version.h -index 4495fa0b66b840b88034d2e8e3e023b1a1edfb68..1212b43a3745a46ab4ed6d4316ab4894a1f96ddc 100644 +index 14c26ea19956318a1a82d21d69a63c6a2cebdbe6..07df815d073a4e623ac9ae5ff01936e1055a9891 100644 --- a/src/openrct2/Version.h +++ b/src/openrct2/Version.h @@ -70,6 +70,9 @@ diff --git a/Ports/openrct2/patches/0002-Add-missing-includes.patch b/Ports/openrct2/patches/0002-Add-missing-includes.patch deleted file mode 100644 index 72d70a3844721a..00000000000000 --- a/Ports/openrct2/patches/0002-Add-missing-includes.patch +++ /dev/null @@ -1,36 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= -Date: Tue, 7 Feb 2023 21:21:46 +0100 -Subject: [PATCH] Add missing includes - -These are missing when compiling the release build. ---- - src/openrct2/core/String.cpp | 1 + - src/openrct2/network/Socket.cpp | 2 ++ - 2 files changed, 3 insertions(+) - -diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp -index 4cc60ce853d4ab8b707483c949032f48271f9660..32a88bde45fd53082cf5ba38c9f7bd02a6c16d5d 100644 ---- a/src/openrct2/core/String.cpp -+++ b/src/openrct2/core/String.cpp -@@ -8,6 +8,7 @@ - *****************************************************************************/ - - #include -+#include - #include - #include - #include -diff --git a/src/openrct2/network/Socket.cpp b/src/openrct2/network/Socket.cpp -index b8b2edbf32a292acefc67893e4c6f1f12f266691..a84c92fc471b55bdf9476821a234cd727a0b370b 100644 ---- a/src/openrct2/network/Socket.cpp -+++ b/src/openrct2/network/Socket.cpp -@@ -52,6 +52,8 @@ - #include - #include - #include -+ #include -+ #include - #include - #include "../common.h" - using SOCKET = int32_t; diff --git a/Ports/openrct2/patches/0003-Read-the-executable-path-from-proc-self-exe.patch b/Ports/openrct2/patches/0002-Read-the-executable-path-from-proc-self-exe.patch similarity index 100% rename from Ports/openrct2/patches/0003-Read-the-executable-path-from-proc-self-exe.patch rename to Ports/openrct2/patches/0002-Read-the-executable-path-from-proc-self-exe.patch diff --git a/Ports/openrct2/patches/0004-Remove-use-of-strptime.patch b/Ports/openrct2/patches/0003-Remove-use-of-strptime.patch similarity index 100% rename from Ports/openrct2/patches/0004-Remove-use-of-strptime.patch rename to Ports/openrct2/patches/0003-Remove-use-of-strptime.patch diff --git a/Ports/openrct2/patches/0005-Add-compile-options-to-CMakeLists.txt.patch b/Ports/openrct2/patches/0004-Add-compile-options-to-CMakeLists.txt.patch similarity index 91% rename from Ports/openrct2/patches/0005-Add-compile-options-to-CMakeLists.txt.patch rename to Ports/openrct2/patches/0004-Add-compile-options-to-CMakeLists.txt.patch index 4482bf69e2fffd..9ab3a3aa9bdbf9 100644 --- a/Ports/openrct2/patches/0005-Add-compile-options-to-CMakeLists.txt.patch +++ b/Ports/openrct2/patches/0004-Add-compile-options-to-CMakeLists.txt.patch @@ -9,10 +9,10 @@ This irons out some compiler warnings that turned into errors when compiling a r 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index e10c7a2f1115916f52c389f0774b69aa03c6cf37..59df8b88d3b937fd8c61d6f8b98c4ba4d12783bc 100644 +index 0f62a0bb62ebb1ea867898f3eb18e819d6a513ac..6a5da9dd95fb23f2063e79951b0df29032f9dcc0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -301,6 +301,8 @@ else () +@@ -304,6 +304,8 @@ else () # unused-const-variable[=2] would check for unused values from headers as well ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_UNUSED_CONST_VARIABLE -Wunused-const-variable=1) ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WNO_CLOBBERED -Wno-clobbered) @@ -21,7 +21,7 @@ index e10c7a2f1115916f52c389f0774b69aa03c6cf37..59df8b88d3b937fd8c61d6f8b98c4ba4 # Disabled due to problems compiling OpenSSL on macOS. # ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DOCUMENTATION -Wdocumentation) -@@ -310,7 +312,7 @@ else () +@@ -313,7 +315,7 @@ else () ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_REDUNDANT_DECLS -Wredundant-decls) # Currently used MinGW w/GCC 7.2 doesn't provide sane error messages for this diff --git a/Ports/openrct2/patches/0006-Disable-locale-detection-for-writing-the-default-con.patch b/Ports/openrct2/patches/0005-Disable-locale-detection-for-writing-the-default-con.patch similarity index 100% rename from Ports/openrct2/patches/0006-Disable-locale-detection-for-writing-the-default-con.patch rename to Ports/openrct2/patches/0005-Disable-locale-detection-for-writing-the-default-con.patch diff --git a/Ports/openrct2/patches/0007-Disable-g2.dat-target.patch b/Ports/openrct2/patches/0006-Disable-g2.dat-target.patch similarity index 89% rename from Ports/openrct2/patches/0007-Disable-g2.dat-target.patch rename to Ports/openrct2/patches/0006-Disable-g2.dat-target.patch index f21ce7313423bd..a68af76dd6de99 100644 --- a/Ports/openrct2/patches/0007-Disable-g2.dat-target.patch +++ b/Ports/openrct2/patches/0006-Disable-g2.dat-target.patch @@ -9,10 +9,10 @@ Normally, the build system uses one of the compiled binaries to pack assets into 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt -index 59df8b88d3b937fd8c61d6f8b98c4ba4d12783bc..86e6b82ae0a2cdc1fd6e209bd39b9b9292411f47 100644 +index 6a5da9dd95fb23f2063e79951b0df29032f9dcc0..aff9e6bed903b3701fff69c098adf619326f92c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt -@@ -389,7 +389,7 @@ endif () +@@ -395,7 +395,7 @@ endif () # g2 diff --git a/Ports/openrct2/patches/ReadMe.md b/Ports/openrct2/patches/ReadMe.md index 5653f16b238e22..16b12cfaa2256a 100644 --- a/Ports/openrct2/patches/ReadMe.md +++ b/Ports/openrct2/patches/ReadMe.md @@ -6,37 +6,31 @@ Add SerenityOS platform detection We teach OpenRCT2 about the name of our platform. -## `0002-Add-missing-includes.patch` - -Add missing includes - -These are missing when compiling the release build. - -## `0003-Read-the-executable-path-from-proc-self-exe.patch` +## `0002-Read-the-executable-path-from-proc-self-exe.patch` Read the executable path from /proc/self/exe When looking for the executable path, we behave exactly like Linux. -## `0004-Remove-use-of-strptime.patch` +## `0003-Remove-use-of-strptime.patch` Remove use of strptime() This is a hack to patch out strptime() from duktape, which is not being used by this project. -## `0005-Add-compile-options-to-CMakeLists.txt.patch` +## `0004-Add-compile-options-to-CMakeLists.txt.patch` Add compile options to CMakeLists.txt This irons out some compiler warnings that turned into errors when compiling a release build. -## `0006-Disable-locale-detection-for-writing-the-default-con.patch` +## `0005-Disable-locale-detection-for-writing-the-default-con.patch` Disable locale detection for writing the default config.ini At the time of writing, locale support in Serenity is not great. We always returned the "C" locale, which this code interpreted wrong. Since this is just used for writing a default value to the game config (which can be changed later), we just default to English. -## `0007-Disable-g2.dat-target.patch` +## `0006-Disable-g2.dat-target.patch` Disable g2.dat target