On Tue, 16 Apr 2024, Anthony J. Bentley wrote:

> Paco Esteban writes:
> > Hi ports@,
> >
> > This is an update of games/openttd to its latest version 14.0
> > Announcement here: https://www.openttd.org/news/2024/04/13/openttd-14-0
> > Changelog here: https://cdn.openttd.org/openttd-releases/14.0/changelog.txt
> 
> Hm!
> 
> /usr/ports/pobj/openttd-14.0/openttd-14.0/src/core/random_func.cpp:137:3:
> warning: "No cryptographically-strong random generator available; using a
> fallback instead" [-W#warnings]
> 
> There's a block that uses arc4random, but OpenBSD is missing:
> 
> #elif defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__)
>         arc4random_buf(buf.data(), buf.size());
>         return;
> 

Does this look better ?

diff /usr/ports
commit - 40e21b176f2f017c8f5c494569a33b7a20435466
path + /usr/ports
blob - 58a761ffaac070945eae88dceb44cadd2381c511
file + games/openttd/Makefile
--- games/openttd/Makefile
+++ games/openttd/Makefile
@@ -1,6 +1,6 @@
 COMMENT=       open source clone of the game Transport Tycoon Deluxe
 
-V =            13.4
+V =            14.0
 DISTNAME =     openttd-$V-source
 PKGNAME =      openttd-$V
 
@@ -14,7 +14,7 @@ HOMEPAGE=     https://www.openttd.org/
 PERMIT_PACKAGE=        Yes
 
 WANTLIB += ${COMPILER_LIBCXX}
-WANTLIB += c fluidsynth fontconfig freetype icudata icui18n icuuc
+WANTLIB += c curl fluidsynth fontconfig freetype harfbuzz icudata icui18n icuuc
 WANTLIB += lzma lzo2 m png z
 
 COMPILER =             base-clang ports-gcc
@@ -27,10 +27,12 @@ DIST_SUBDIR =               openttd
 MODULES =              devel/cmake
 
 LIB_DEPENDS=           archivers/lzo2 \
+                       archivers/xz \
                        audio/fluidsynth \
+                       devel/harfbuzz \
                        graphics/png \
-                       textproc/icu4c \
-                       archivers/xz
+                       net/curl \
+                       textproc/icu4c
 
 # statically linked
 LIB_DEPENDS +=         devel/sdl2
blob - c243e15d0f9f25431e88ba50fc2326ebd7bbe19d
file + games/openttd/distinfo
--- games/openttd/distinfo
+++ games/openttd/distinfo
@@ -1,2 +1,2 @@
-SHA256 (openttd/openttd-13.4-source.tar.xz) = 
Kh3roBv+WOIYiHn0UMP6TzgZJxq0m/NI3WZUXwQNFG8=
-SIZE (openttd/openttd-13.4-source.tar.xz) = 7428012
+SHA256 (openttd/openttd-14.0-source.tar.xz) = 
lvdquFiBal4wA4reBpLm6/NQufcL8Zx7SN2oRciEGLE=
+SIZE (openttd/openttd-14.0-source.tar.xz) = 7997536
blob - aecafbca60942cdf01c745b684c505b57cc2b9c6
file + games/openttd/patches/patch-src_3rdparty_squirrel_squirrel_sqvm_cpp
--- games/openttd/patches/patch-src_3rdparty_squirrel_squirrel_sqvm_cpp
+++ games/openttd/patches/patch-src_3rdparty_squirrel_squirrel_sqvm_cpp
@@ -3,9 +3,9 @@ Unbreak with newer libc++. FreeBSD r447202
 Index: src/3rdparty/squirrel/squirrel/sqvm.cpp
 --- src/3rdparty/squirrel/squirrel/sqvm.cpp.orig
 +++ src/3rdparty/squirrel/squirrel/sqvm.cpp
-@@ -4,9 +4,9 @@
- 
+@@ -5,9 +5,9 @@
  #include "../../../stdafx.h"
+ #include "../../fmt/format.h"
  
 +#include <math.h>
  #include <squirrel.h>
blob - /dev/null
file + games/openttd/patches/patch-src_core_random_func_cpp (mode 644)
--- /dev/null
+++ games/openttd/patches/patch-src_core_random_func_cpp
@@ -0,0 +1,12 @@
+Index: src/core/random_func.cpp
+--- src/core/random_func.cpp.orig
++++ src/core/random_func.cpp
+@@ -113,7 +113,7 @@ void RandomBytesWithFallback(std::span<uint8_t> buf)
+ #if defined(_WIN32)
+       auto res = BCryptGenRandom(nullptr, static_cast<PUCHAR>(buf.data()), 
static_cast<ULONG>(buf.size()), BCRYPT_USE_SYSTEM_PREFERRED_RNG);
+       if (res >= 0) return;
+-#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__)
++#elif defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) || 
defined(__OpenBSD__)
+       arc4random_buf(buf.data(), buf.size());
+       return;
+ #elif defined(__GLIBC__) && ((__GLIBC__ > 2) || ((__GLIBC__ == 2) && 
(__GLIBC_MINOR__ >= 25)))
blob - 5b152f7c46a2bfaf118b9941efce9bbeadbb6d80
file + games/openttd/patches/patch-src_string_func_h
--- games/openttd/patches/patch-src_string_func_h
+++ games/openttd/patches/patch-src_string_func_h
@@ -2,7 +2,7 @@ Don't use openttd's internal copy of strcasestr().
 Index: src/string_func.h
 --- src/string_func.h.orig
 +++ src/string_func.h
-@@ -268,7 +268,7 @@ static inline bool IsWhitespace(WChar c)
+@@ -256,7 +256,7 @@ inline bool IsWhitespace(char32_t c)
  #endif
  
  /* strcasestr is available for _GNU_SOURCE, BSD and some Apple */
blob - 7dd7c7287ced54fc8abea55aff235875c0890cea
file + games/openttd/pkg/PLIST
--- games/openttd/pkg/PLIST
+++ games/openttd/pkg/PLIST
@@ -2,7 +2,9 @@
 @man man/man6/openttd.6
 share/applications/openttd.desktop
 share/doc/openttd/
+share/doc/openttd/CONTRIBUTING.md
 share/doc/openttd/COPYING.md
+share/doc/openttd/CREDITS.md
 share/doc/openttd/README.md
 share/doc/openttd/admin_network.md
 share/doc/openttd/changelog.txt
@@ -11,6 +13,21 @@ share/doc/openttd/compiling_lang_files.md
 share/doc/openttd/debugging_desyncs.md
 share/doc/openttd/desync.md
 share/doc/openttd/directory_structure.md
+share/doc/openttd/docs/
+share/doc/openttd/docs/admin_network.md
+share/doc/openttd/docs/debugging_desyncs.md
+share/doc/openttd/docs/desync.md
+share/doc/openttd/docs/directory_structure.md
+share/doc/openttd/docs/eints.md
+share/doc/openttd/docs/game_coordinator.md
+share/doc/openttd/docs/linkgraph.md
+share/doc/openttd/docs/logging_and_performance_metrics.md
+share/doc/openttd/docs/multiplayer.md
+share/doc/openttd/docs/obg_format.txt
+share/doc/openttd/docs/obm_format.txt
+share/doc/openttd/docs/obs_format.txt
+share/doc/openttd/docs/savegame_format.md
+share/doc/openttd/docs/symbol_server.md
 share/doc/openttd/eints.md
 share/doc/openttd/elrail.svg
 share/doc/openttd/elrail_tile.png
@@ -32,7 +49,9 @@ share/doc/openttd/palettes/
 share/doc/openttd/palettes/openttd.gpl
 share/doc/openttd/palettes/palette.act
 share/doc/openttd/palettes/palette_key.png
+share/doc/openttd/releasing_openttd.md
 share/doc/openttd/savegame_format.md
+share/doc/openttd/symbol_server.md
 share/doc/openttd/tileh.png
 share/doc/pkg-readmes/${PKGSTEM}
 share/examples/openttd/
@@ -67,7 +86,12 @@ share/openttd/ai/compat_1.8.nut
 share/openttd/ai/compat_1.9.nut
 share/openttd/ai/compat_12.nut
 share/openttd/ai/compat_13.nut
+share/openttd/ai/compat_14.nut
 share/openttd/baseset/
+share/openttd/baseset/OpenTTD-Mono.ttf
+share/openttd/baseset/OpenTTD-Sans.ttf
+share/openttd/baseset/OpenTTD-Serif.ttf
+share/openttd/baseset/OpenTTD-Small.ttf
 share/openttd/baseset/no_music.obm
 share/openttd/baseset/no_sound.obs
 share/openttd/baseset/openttd.32.bmp
@@ -95,6 +119,7 @@ share/openttd/game/compat_1.8.nut
 share/openttd/game/compat_1.9.nut
 share/openttd/game/compat_12.nut
 share/openttd/game/compat_13.nut
+share/openttd/game/compat_14.nut
 share/openttd/lang/
 share/openttd/lang/afrikaans.lng
 share/openttd/lang/arabic_egypt.lng
@@ -165,10 +190,16 @@ share/openttd/media/
 share/openttd/media/CMakeLists.txt
 share/openttd/media/baseset/
 share/openttd/media/baseset/CMakeLists.txt
+share/openttd/media/baseset/OpenTTD-Mono.ttf
+share/openttd/media/baseset/OpenTTD-Sans.ttf
+share/openttd/media/baseset/OpenTTD-Serif.ttf
+share/openttd/media/baseset/OpenTTD-Small.ttf
+share/openttd/media/baseset/OpenTTD-font.md
 share/openttd/media/baseset/no_music.obm
 share/openttd/media/baseset/no_sound.obs
 share/openttd/media/baseset/openttd/
 share/openttd/media/baseset/openttd.grf
+share/openttd/media/baseset/openttd.grf.hash
 share/openttd/media/baseset/openttd/2ccmap.nfo
 share/openttd/media/baseset/openttd/CMakeLists.txt
 share/openttd/media/baseset/openttd/airport_preview.nfo
@@ -218,6 +249,7 @@ share/openttd/media/baseset/orig_dos.obs
 share/openttd/media/baseset/orig_dos_de.obg
 share/openttd/media/baseset/orig_extra/
 share/openttd/media/baseset/orig_extra.grf
+share/openttd/media/baseset/orig_extra.grf.hash
 share/openttd/media/baseset/orig_extra/CMakeLists.txt
 share/openttd/media/baseset/orig_extra/airports_orig_extra.nfo
 share/openttd/media/baseset/orig_extra/canals_extra.nfo
@@ -233,10 +265,14 @@ share/openttd/media/baseset/orig_extra/rivers/arctic_b
 share/openttd/media/baseset/orig_extra/rivers/arctic_snowy.png
 share/openttd/media/baseset/orig_extra/rivers/rapids.nfo
 share/openttd/media/baseset/orig_extra/rivers/rapids.png
+share/openttd/media/baseset/orig_extra/rivers/rapids_shading.png
 share/openttd/media/baseset/orig_extra/rivers/temperate.nfo
 share/openttd/media/baseset/orig_extra/rivers/temperate.png
 share/openttd/media/baseset/orig_extra/rivers/toyland.nfo
 share/openttd/media/baseset/orig_extra/rivers/toyland.png
+share/openttd/media/baseset/orig_extra/rivers/toyland_rapids.nfo
+share/openttd/media/baseset/orig_extra/rivers/toyland_rapids.png
+share/openttd/media/baseset/orig_extra/rivers/toyland_rapids_shading.png
 share/openttd/media/baseset/orig_extra/rivers/tropic.nfo
 share/openttd/media/baseset/orig_extra/rivers/tropic_desert.png
 share/openttd/media/baseset/orig_extra/rivers/tropic_forest.png

-- 
Paco Esteban.
0x5818130B8A6DBC03

Reply via email to