Ports: Update openttd to version 12.2

This commit is contained in:
Kevin Nobel 2022-04-05 23:05:14 +02:00 committed by Linus Groh
parent 3049ef740a
commit 654075ab48
Notes: sideshowbarker 2024-07-17 14:23:54 +09:00
4 changed files with 17 additions and 6 deletions

View File

@ -152,7 +152,7 @@ Please make sure to keep this list up to date when adding and updating ports. :^
| [`nyancat`](nyancat/) | Nyancat | | https://github.com/klange/nyancat |
| [`openssh`](openssh/) | OpenSSH | 8.3-9ca7e9c | https://github.com/openssh/openssh-portable |
| [`openssl`](openssl/) | OpenSSL | 1.1.1n | https://www.openssl.org/ |
| [`openttd`](openttd/) | OpenTTD | 1.11.0 | https://www.openttd.org/ |
| [`openttd`](openttd/) | OpenTTD | 12.2 | https://www.openttd.org/ |
| [`openttd-opengfx`](openttd-opengfx/) | OpenGFX graphics for OpenTTD | 7.1 | https://www.openttd.org/ |
| [`openttd-opensfx`](openttd-opensfx/) | OpenSFX audio files for OpenTTD | 1.0.3 | https://www.openttd.org/ |
| [`opentyrian`](opentyrian/) | OpenTyrian | 84b820f | https://github.com/opentyrian/opentyrian |

View File

@ -1,9 +1,9 @@
#!/usr/bin/env -S bash ../.port_include.sh
port=openttd
version=1.11.0
version=12.2
auth_type=sha256
depends=("freetype" "SDL2" "libicu" "libpng" "zlib" "xz" "openttd-opengfx" "openttd-opensfx")
files="https://cdn.openttd.org/openttd-releases/${version}/openttd-${version}-source.tar.xz openttd-${version}.tar.xz 5e65184e07368ba1afa62dbb3e35abaee6c4da6730ff4bc9eb4447d53363c7a8"
files="https://cdn.openttd.org/openttd-releases/${version}/openttd-${version}-source.tar.xz openttd-${version}.tar.xz 81508f0de93a0c264b216ef56a05f8381fff7bffa6d010121a21490b4dace95c"
useconfigure=true
configopts=("-DCMAKE_TOOLCHAIN_FILE=${SERENITY_BUILD_DIR}/CMakeToolchain.txt")
launcher_name=OpenTTD

View File

@ -1,12 +1,12 @@
diff -Naur openttd-1.11.0/cmake/CompileFlags.cmake openttd-1.11.0.serenity/cmake/CompileFlags.cmake
--- openttd-1.11.0/cmake/CompileFlags.cmake 2021-04-01 14:33:44.000000000 +0200
+++ openttd-1.11.0.serenity/cmake/CompileFlags.cmake 2021-04-19 19:30:33.457232215 +0200
@@ -154,7 +154,7 @@
@@ -158,7 +158,7 @@
message(FATAL_ERROR "No warning flags are set for this compiler yet; please consider creating a Pull Request to add support for this compiler.")
endif()
- if(NOT WIN32)
+ if(NOT WIN32 AND NOT SERENITYOS)
- if(NOT WIN32 AND NOT HAIKU)
+ if(NOT WIN32 AND NOT HAIKU AND NOT SERENITYOS)
# rdynamic is used to get useful stack traces from crash reports.
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -rdynamic")
endif()

View File

@ -0,0 +1,11 @@
--- openttd-12.1/src/network/core/os_abstraction_original.cpp 2022-03-31 15:13:24.270873422 +0200
+++ openttd-12.1/src/network/core/os_abstraction.cpp 2022-03-31 15:14:01.978511406 +0200
@@ -172,7 +172,7 @@
return setsockopt(d, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuse_port, sizeof(reuse_port)) == 0;
#else
int reuse_port = 1;
- return setsockopt(d, SOL_SOCKET, SO_REUSEPORT, &reuse_port, sizeof(reuse_port)) == 0;
+ return setsockopt(d, SOL_SOCKET, SO_REUSEADDR, (const char *)&reuse_port, sizeof(reuse_port)) == 0;
#endif
}