Ports: Update OpenRCT2 to version 0.4.8

This commit is contained in:
Julian Offenhäuser 2024-02-24 15:03:14 +01:00 committed by Tim Schumacher
parent 8ac0e3f0e5
commit bf9240c7a9
Notes: sideshowbarker 2024-07-16 23:34:49 +09:00
10 changed files with 28 additions and 57 deletions

View File

@ -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.5 | https://openrct2.org/ |
| [`openrct2`](openrct2/) | OpenRCT2 | 0.4.8 | 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/ |

View File

@ -1,6 +1,6 @@
#!/usr/bin/env -S bash ../.port_include.sh
port='openrct2'
version='0.4.5'
version='0.4.8'
depends=(
'curl'
'flac'
@ -18,12 +18,12 @@ depends=(
'zlib'
)
files=(
"https://github.com/OpenRCT2/OpenRCT2/archive/refs/tags/v${version}.tar.gz#eb9e20dc0dcbf10b02b5f334a029983a0a2b43d931f95a2088a64e8b2657bab1"
"https://github.com/OpenRCT2/OpenRCT2/releases/download/v${version}/OpenRCT2-${version}-linux-jammy-x86_64.tar.gz#c0652ace6fd2302e77cd25b85bb973e3c0d2c8be1d20cfdcb7a2a9b15630d112"
"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"
)
useconfigure='true'
workdir="OpenRCT2-${version}"
icon_file='resources/logo/icon_x16.png'
icon_file='resources/logo/icon.ico'
launcher_name='OpenRCT2'
launcher_category='&Games'
launcher_command='/usr/local/bin/openrct2'

View File

@ -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 0e5d83aaf2cf0b0e2562065cab6c7b1526a0f1e9..428552a4f78cc9d21a15f4641144fe65b6c751e4 100644
index 4495fa0b66b840b88034d2e8e3e023b1a1edfb68..1212b43a3745a46ab4ed6d4316ab4894a1f96ddc 100644
--- a/src/openrct2/Version.h
+++ b/src/openrct2/Version.h
@@ -70,6 +70,9 @@

View File

@ -10,27 +10,27 @@ These are missing when compiling the release build.
2 files changed, 3 insertions(+)
diff --git a/src/openrct2/core/String.cpp b/src/openrct2/core/String.cpp
index 76c4574ed6e060dc7032b0a8c346bdbc3a435a2d..fbe23e4af894e3dbf4bc57ba3370e3f9e2ed24e7 100644
index 4cc60ce853d4ab8b707483c949032f48271f9660..32a88bde45fd53082cf5ba38c9f7bd02a6c16d5d 100644
--- a/src/openrct2/core/String.cpp
+++ b/src/openrct2/core/String.cpp
@@ -14,6 +14,7 @@
#include <sstream>
#include <stdexcept>
#include <vector>
@@ -8,6 +8,7 @@
*****************************************************************************/
#include <algorithm>
+#include <alloca.h>
#ifndef _WIN32
# include <unicode/ucnv.h>
# include <unicode/unistr.h>
#include <cctype>
#include <cwctype>
#include <iomanip>
diff --git a/src/openrct2/network/Socket.cpp b/src/openrct2/network/Socket.cpp
index 89803e28568efd38dd82845f89af97e47366f5b6..e166ed45d158d0cf516ff83b7992e04780f28edb 100644
index b8b2edbf32a292acefc67893e4c6f1f12f266691..a84c92fc471b55bdf9476821a234cd727a0b370b 100644
--- a/src/openrct2/network/Socket.cpp
+++ b/src/openrct2/network/Socket.cpp
@@ -51,6 +51,8 @@
#include <netinet/tcp.h>
@@ -52,6 +52,8 @@
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/socket.h>
+ #include <sys/time.h>
+ #include <sys/select.h>
#include <unistd.h>
#include "../common.h"
using SOCKET = int32_t;
#define SOCKET_ERROR -1

View File

@ -9,7 +9,7 @@ When looking for the executable path, we behave exactly like Linux.
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp
index fb1f1e58d92a9e8823f1c8ff82bcf1efc448a8fd..eea10444874fced76027421350c7a4402bbbbfe0 100644
index 516c126cfea262448e94a9e883e5b0ea88e4036e..3f3f48b949fd9c6b24a09f8f88b51266c74462f2 100644
--- a/src/openrct2/platform/Platform.Linux.cpp
+++ b/src/openrct2/platform/Platform.Linux.cpp
@@ -129,7 +129,7 @@ namespace Platform

View File

@ -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 78307ec3de4d769ce750a1da4d6eb5de120babf9..7c0e068143deae77fbaa818169b5cec7585a921e 100644
index e10c7a2f1115916f52c389f0774b69aa03c6cf37..59df8b88d3b937fd8c61d6f8b98c4ba4d12783bc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -306,6 +306,8 @@ else ()
@@ -301,6 +301,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 78307ec3de4d769ce750a1da4d6eb5de120babf9..7c0e068143deae77fbaa818169b5cec7
# Disabled due to problems compiling OpenSSL on macOS.
# ADD_CHECK_CXX_COMPILER_FLAG(CMAKE_CXX_FLAGS CXX_WARN_DOCUMENTATION -Wdocumentation)
@@ -315,7 +317,7 @@ else ()
@@ -310,7 +312,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

View File

@ -1,23 +0,0 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Julian=20Offenh=C3=A4user?= <offenhaeuser@protonmail.com>
Date: Tue, 7 Feb 2023 22:16:32 +0100
Subject: [PATCH] Don't try linking to stdc++fs
This code tried to link to stdc++fs for std::filesystem features, which are already included in our toolchain.
---
src/openrct2/CMakeLists.txt | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/openrct2/CMakeLists.txt b/src/openrct2/CMakeLists.txt
index 6a1a1f081a0131d0cd93b558802989804ba4df67..377c62dbd70fe359bf58f7dddd5c302c8f1a15a4 100644
--- a/src/openrct2/CMakeLists.txt
+++ b/src/openrct2/CMakeLists.txt
@@ -38,7 +38,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES PREFIX "")
SET_CHECK_CXX_FLAGS(${PROJECT_NAME})
# GCC / Clang likes us to pass the -lstdc++fs flag to link C++17 filesystem implementation.
-if (NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
+if (NOT MINGW AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD" AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SerenityOS")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU" OR CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
target_link_libraries(${PROJECT_NAME} stdc++fs)
endif()

View File

@ -9,7 +9,7 @@ At the time of writing, locale support in Serenity is not great. We always retur
1 file changed, 2 insertions(+)
diff --git a/src/openrct2/platform/Platform.Linux.cpp b/src/openrct2/platform/Platform.Linux.cpp
index eea10444874fced76027421350c7a4402bbbbfe0..ecd97d9a708c61ff8ba3f5e3096f41a47bc7a34d 100644
index 3f3f48b949fd9c6b24a09f8f88b51266c74462f2..ce5acb00a19b00c5adc2d7be07db42e4c49eebc6 100644
--- a/src/openrct2/platform/Platform.Linux.cpp
+++ b/src/openrct2/platform/Platform.Linux.cpp
@@ -178,6 +178,7 @@ namespace Platform

View File

@ -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 7c0e068143deae77fbaa818169b5cec7585a921e..2c781b26bad33730157ecfc3a5775d2ffdc4109f 100644
index 59df8b88d3b937fd8c61d6f8b98c4ba4d12783bc..86e6b82ae0a2cdc1fd6e209bd39b9b9292411f47 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -394,7 +394,7 @@ endif ()
@@ -389,7 +389,7 @@ endif ()
# g2

View File

@ -24,25 +24,19 @@ Remove use of strptime()
This is a hack to patch out strptime() from duktape, which is not being used by this project.
## `0005-Don-t-try-linking-to-stdc-fs.patch`
Don't try linking to stdc++fs
This code tried to link to stdc++fs for std::filesystem features, which are already included in our toolchain.
## `0006-Add-compile-options-to-CMakeLists.txt.patch`
## `0005-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.
## `0007-Disable-locale-detection-for-writing-the-default-con.patch`
## `0006-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.
## `0008-Disable-g2.dat-target.patch`
## `0007-Disable-g2.dat-target.patch`
Disable g2.dat target