Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 11 May 2024 06:32:09 GMT
From:      Alexey Dokuchaev <danfe@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d3c9137c9ed2 - main - games/openttd: update OpenTTD to version 14.1 (major update)
Message-ID:  <202405110632.44B6W9w2026102@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by danfe:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d3c9137c9ed2d4a1429bc0c507b5b6dce4e136e0

commit d3c9137c9ed2d4a1429bc0c507b5b6dce4e136e0
Author:     Alexey Dokuchaev <danfe@FreeBSD.org>
AuthorDate: 2024-05-11 06:31:20 +0000
Commit:     Alexey Dokuchaev <danfe@FreeBSD.org>
CommitDate: 2024-05-11 06:31:20 +0000

    games/openttd: update OpenTTD to version 14.1 (major update)
    
    Users and server operators should read the announcement:
    https://www.openttd.org/news/2024/04/13/openttd-14-0
    
    Drop nowadays needless USES+=gnome: as explained by tobik@,
    it was required for INSTALLS_ICONS which only did something
    when `gnome.mk' was loaded, but this knob is long gone.
---
 games/openttd/Makefile                             | 14 ++++++-------
 games/openttd/distinfo                             |  6 +++---
 games/openttd/files/extra-patch-save-passwords     | 22 ++++++++++-----------
 games/openttd/files/patch-CMakeLists.txt           | 19 +++++++++++-------
 .../files/patch-cmake_InstallAndPackage.cmake      |  4 ++--
 games/openttd/pkg-plist                            | 23 +++++++++++++++++++++-
 6 files changed, 57 insertions(+), 31 deletions(-)

diff --git a/games/openttd/Makefile b/games/openttd/Makefile
index 2c8767d76450..651beb326053 100644
--- a/games/openttd/Makefile
+++ b/games/openttd/Makefile
@@ -1,5 +1,5 @@
 PORTNAME=	openttd
-DISTVERSION=	13.4
+DISTVERSION=	14.1
 CATEGORIES=	games
 MASTER_SITES=	https://cdn.openttd.org/openttd-releases/${DISTVERSION}/
 DISTNAME=	${PORTNAME}-${DISTVERSION}-source
@@ -10,8 +10,9 @@ WWW=		https://www.openttd.org/
 
 LICENSE=	GPLv2
 
-LIB_DEPENDS=	libpng.so:graphics/png \
-		liblzo2.so:archivers/lzo2
+LIB_DEPENDS=	libcurl.so:ftp/curl \
+		liblzo2.so:archivers/lzo2 \
+		libpng.so:graphics/png
 
 USES=		cmake compiler:c++17-lang cpe pkgconfig tar:xz
 CMAKE_ARGS=	-DCMAKE_INSTALL_BINDIR:PATH=bin \
@@ -34,14 +35,13 @@ SDL1_CMAKE_OFF=	-DWITH_SDL2:BOOL=ON
 SDL1_VARS_OFF=	_SDL_VERSION=sdl2
 
 SERVER_DESC=		Build dedicated server only (no GUI)
-SERVER_USES_OFF=	gnome sdl
+SERVER_USES_OFF=	sdl
 SERVER_USE_OFF=		SDL=${_SDL_VERSION}
 SERVER_CMAKE_ON=	-DOPTION_DEDICATED:BOOL=ON
 SERVER_LIB_DEPENDS_OFF=	libfontconfig.so:x11-fonts/fontconfig \
 			libfreetype.so:print/freetype2 \
-			libicui18n.so:devel/icu \
-			libicu-le-hb.so:devel/icu-le-hb \
-			libiculx.so:devel/icu-lx
+			libharfbuzz.so:print/harfbuzz \
+			libicui18n.so:devel/icu
 SERVER_VARS=		USE_RC_SUBR=${PORTNAME}
 
 post-install-SERVER-on:
diff --git a/games/openttd/distinfo b/games/openttd/distinfo
index c3828606cb3b..583c68d53a31 100644
--- a/games/openttd/distinfo
+++ b/games/openttd/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1708509717
-SHA256 (openttd-13.4-source.tar.xz) = 2a1deba01bfe58e2188879f450c3fa4f3819271ab49bf348dd66545f040d146f
-SIZE (openttd-13.4-source.tar.xz) = 7428012
+TIMESTAMP = 1715229396
+SHA256 (openttd-14.1-source.tar.xz) = 2c14c8f01f44148c4f2c88c169a30abcdb002eb128a92b9adb76baa76b013494
+SIZE (openttd-14.1-source.tar.xz) = 8015032
diff --git a/games/openttd/files/extra-patch-save-passwords b/games/openttd/files/extra-patch-save-passwords
index becd87ea8e82..ac4fa72b2e5e 100644
--- a/games/openttd/files/extra-patch-save-passwords
+++ b/games/openttd/files/extra-patch-save-passwords
@@ -25,8 +25,8 @@
  	this->last_frame = this->last_frame_server = _frame_counter;
  
 +	Debug( net, 1, "requesting GAME password" );
- 	Packet *p = new Packet(PACKET_SERVER_NEED_GAME_PASSWORD);
- 	this->SendPacket(p);
+ 	auto p = std::make_unique<Packet>(PACKET_SERVER_NEED_GAME_PASSWORD);
+ 	this->SendPacket(std::move(p));
  	return NETWORK_RECV_STATUS_OKAY;
 @@ -1563,6 +1565,9 @@ static void NetworkAutoCleanCompanies()
  				IConsolePrint(CC_INFO, "Auto-removed protection from company #{}.", c->index + 1);
@@ -57,9 +57,9 @@
 +void NetworkSavePassword( )
 +{
 +	static FILE *file_pointer;
-+	char password_file_name[80];
++	std::string password_file_name;
 +
-+	seprintf( password_file_name, lastof(password_file_name), "%u.pwd", _settings_game.game_creation.generation_seed );
++	password_file_name = fmt::format("{}.pwd", _settings_game.game_creation.generation_seed);
 +	Debug( net, 0, "Saving companies password to %s", password_file_name );
 +	file_pointer = FioFOpenFile( password_file_name, "wb", SAVE_DIR );
 +
@@ -78,9 +78,9 @@
 +{
 +	static FILE *file_pointer;
 +	char password[NETWORK_PASSWORD_LENGTH];
-+	char password_file_name[80];
++	std::string password_file_name;
 +
-+	seprintf( password_file_name, lastof(password_file_name), "%u.pwd", _settings_game.game_creation.generation_seed );
++	password_file_name = fmt::format("{}.pwd", _settings_game.game_creation.generation_seed);
 +	file_pointer = FioFOpenFile( password_file_name, "rb", SAVE_DIR );
 +	if (file_pointer != NULL) {
 +		Debug( net, 0, "Loading password from %s", password_file_name );
@@ -115,8 +115,8 @@
 +++ src/settings_type.h
 @@ -296,6 +296,7 @@ struct NetworkSettings {
  	std::string last_joined;                              ///< Last joined server
- 	bool        no_http_content_downloads;                ///< do not do content downloads over HTTP
- 	UseRelayService use_relay_service;                        ///< Use relay service?
+ 	UseRelayService use_relay_service;                    ///< Use relay service?
+ 	ParticipateSurvey participate_survey;                 ///< Participate in the automated survey
 +	bool   save_password;                                 ///< If password file is used
  };
  
@@ -124,9 +124,9 @@
 --- src/table/settings/network_settings.ini.orig	2021-10-17 09:31:25 UTC
 +++ src/table/settings/network_settings.ini
 @@ -265,3 +265,8 @@ str      = STR_CONFIG_SETTING_USE_RELAY_SERVICE
- strhelp  = STR_CONFIG_SETTING_USE_RELAY_SERVICE_HELPTEXT
- strval   = STR_CONFIG_SETTING_USE_RELAY_SERVICE_NEVER
- cat      = SC_BASIC
+ flags    = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY
+ def      = false
+ cat      = SC_EXPERT
 +
 +[SDTC_BOOL]
 +var     = network.save_password
diff --git a/games/openttd/files/patch-CMakeLists.txt b/games/openttd/files/patch-CMakeLists.txt
index d6e569721c72..6ad87864e4c0 100644
--- a/games/openttd/files/patch-CMakeLists.txt
+++ b/games/openttd/files/patch-CMakeLists.txt
@@ -1,6 +1,6 @@
---- CMakeLists.txt.orig	2023-07-29 23:01:44 UTC
+--- CMakeLists.txt.orig	2024-04-13 12:55:23 UTC
 +++ CMakeLists.txt
-@@ -129,11 +129,14 @@ if(NOT OPTION_DEDICATED)
+@@ -143,11 +143,14 @@ if(NOT OPTION_DEDICATED)
          find_package(Allegro)
          if(NOT APPLE)
              find_package(Freetype)
@@ -13,16 +13,21 @@
 +if(WITH_FLUIDSYNTH)
              find_package(Fluidsynth)
 +endif()
-             find_package(Fontconfig)
-             find_package(ICU OPTIONAL_COMPONENTS i18n lx)
-         endif()
-@@ -260,7 +263,9 @@ link_package(LIBLZMA TARGET LibLZMA::LibLZMA ENCOURAGE
- link_package(LZO)
+             if(Freetype_FOUND)
+                 find_package(Fontconfig)
+             endif()
+@@ -323,9 +326,14 @@ if(NOT EMSCRIPTEN)
+ endif()
  
  if(NOT OPTION_DEDICATED)
 +  if(WITH_FLUIDSYNTH)
      link_package(Fluidsynth)
 +  endif()
++  if(NOT WITH_SDL2)
      link_package(SDL)
++  else()
      link_package(SDL2 TARGET SDL2::SDL2)
++  endif()
      link_package(Allegro)
+     link_package(FREETYPE TARGET Freetype::Freetype)
+     link_package(Fontconfig TARGET Fontconfig::Fontconfig)
diff --git a/games/openttd/files/patch-cmake_InstallAndPackage.cmake b/games/openttd/files/patch-cmake_InstallAndPackage.cmake
index 270b498a63db..e313ef9e824a 100644
--- a/games/openttd/files/patch-cmake_InstallAndPackage.cmake
+++ b/games/openttd/files/patch-cmake_InstallAndPackage.cmake
@@ -12,8 +12,8 @@
              COMPONENT manual)
  endif()
  
--if(UNIX AND NOT APPLE)
-+if(UNIX AND NOT APPLE AND NOT OPTION_DEDICATED)
+-if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN)
++if(UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT OPTION_DEDICATED)
      install(DIRECTORY
                      ${CMAKE_BINARY_DIR}/media/icons
                      ${CMAKE_BINARY_DIR}/media/pixmaps
diff --git a/games/openttd/pkg-plist b/games/openttd/pkg-plist
index 1301465a3592..63a33f92e99b 100644
--- a/games/openttd/pkg-plist
+++ b/games/openttd/pkg-plist
@@ -1,9 +1,24 @@
 bin/openttd
 share/man/man6/openttd.6.gz
+%%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTING.md
+%%PORTDOCS%%%%DOCSDIR%%/CREDITS.md
 %%PORTDOCS%%%%DOCSDIR%%/README.md
 %%PORTDOCS%%%%DOCSDIR%%/changelog.txt
 %%PORTDOCS%%%%DOCSDIR%%/known-bugs.txt
-%%PORTDOCS%%%%DOCSDIR%%/multiplayer.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/admin_network.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/debugging_desyncs.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/desync.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/directory_structure.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/eints.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/game_coordinator.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/linkgraph.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/logging_and_performance_metrics.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/multiplayer.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/obg_format.txt
+%%PORTDOCS%%%%DOCSDIR%%/docs/obm_format.txt
+%%PORTDOCS%%%%DOCSDIR%%/docs/obs_format.txt
+%%PORTDOCS%%%%DOCSDIR%%/docs/savegame_format.md
+%%PORTDOCS%%%%DOCSDIR%%/docs/symbol_server.md
 %%DATADIR%%/ai/compat_0.7.nut
 %%DATADIR%%/ai/compat_1.0.nut
 %%DATADIR%%/ai/compat_1.1.nut
@@ -19,6 +34,12 @@ share/man/man6/openttd.6.gz
 %%DATADIR%%/ai/compat_1.11.nut
 %%DATADIR%%/ai/compat_12.nut
 %%DATADIR%%/ai/compat_13.nut
+%%DATADIR%%/ai/compat_14.nut
+%%DATADIR%%/game/compat_14.nut
+%%DATADIR%%/baseset/OpenTTD-Mono.ttf
+%%DATADIR%%/baseset/OpenTTD-Sans.ttf
+%%DATADIR%%/baseset/OpenTTD-Serif.ttf
+%%DATADIR%%/baseset/OpenTTD-Small.ttf
 %%DATADIR%%/baseset/no_music.obm
 %%DATADIR%%/baseset/no_sound.obs
 %%DATADIR%%/baseset/openttd.32.bmp



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202405110632.44B6W9w2026102>