Date: Thu, 15 Jan 2026 05:01:10 +0000 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: cb6731b84d0e - main - games/openttd: update OpenTTD to the latest version 15.0 Message-ID: <69687496.270ce.5cf48634@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=cb6731b84d0ec3c8c7d52e4e8d599a76a7d6305e commit cb6731b84d0ec3c8c7d52e4e8d599a76a7d6305e Author: Alexey Dokuchaev <danfe@FreeBSD.org> AuthorDate: 2026-01-15 04:57:30 +0000 Commit: Alexey Dokuchaev <danfe@FreeBSD.org> CommitDate: 2026-01-15 04:57:30 +0000 games/openttd: update OpenTTD to the latest version 15.0 - Companies in multiplayer no longer have passwords, remove the user-contributed patch to save them between server restarts which was also raising concerns over storing them clear-text - Sadly, SDL 1.2 support had been dropped in January 2025 - Added support for sound effects in Ogg Opus format PR: 278117 --- games/openttd/Makefile | 24 ++--- games/openttd/distinfo | 10 +- games/openttd/files/extra-patch-save-passwords | 134 ------------------------- games/openttd/files/patch-CMakeLists.txt | 17 +--- games/openttd/pkg-plist | 22 ++-- 5 files changed, 24 insertions(+), 183 deletions(-) diff --git a/games/openttd/Makefile b/games/openttd/Makefile index 8b9f68d28199..d2c98a85d7d5 100644 --- a/games/openttd/Makefile +++ b/games/openttd/Makefile @@ -1,16 +1,11 @@ PORTNAME= openttd -DISTVERSION= 14.1 -PORTREVISION= 1 +DISTVERSION= 15.0 CATEGORIES= games MASTER_SITES= https://cdn.openttd.org/openttd-releases/${DISTVERSION}/ DISTNAME= ${PORTNAME}-${DISTVERSION}-source -PATCH_SITES= https://github.com/OpenTTD/OpenTTD/commit/ -PATCHFILES= db36e61807955c896267d6585de0577efd30465d.patch:-p1 \ - 14fac2ad37bfb9cec56b4f9169d864f6f1c7b96e.patch:-p1 - MAINTAINER= danfe@FreeBSD.org -COMMENT= Open source clone of Microprose Transport Tycoon Deluxe +COMMENT= Open-source clone of Microprose Transport Tycoon Deluxe WWW= https://www.openttd.org/ LICENSE= GPLv2 @@ -25,28 +20,21 @@ CMAKE_ARGS= -DCMAKE_INSTALL_BINDIR:PATH=bin \ WRKSRC= ${WRKDIR}/${PORTNAME}-${DISTVERSION} -OPTIONS_DEFINE= DOCS FLUIDSYNTH SAVE_PASSWORDS SDL1 SERVER +OPTIONS_DEFINE= DOCS FLUIDSYNTH SERVER SERVER_PREVENTS= FLUIDSYNTH FLUIDSYNTH_LIB_DEPENDS= libfluidsynth.so:audio/fluidsynth FLUIDSYNTH_CMAKE_ON= -DWITH_FLUIDSYNTH:BOOL=ON -SAVE_PASSWORDS_DESC= Save passwords between server restarts -SAVE_PASSWORDS_EXTRA_PATCHES= ${FILESDIR}/extra-patch-save-passwords - -SDL1_DESC= Use SDL v1.2 instead of v2 for GUI -SDL1_VARS= _SDL_VERSION=sdl -SDL1_CMAKE_OFF= -DWITH_SDL2:BOOL=ON -SDL1_VARS_OFF= _SDL_VERSION=sdl2 - SERVER_DESC= Build dedicated server only (no GUI) SERVER_USES_OFF= sdl -SERVER_USE_OFF= SDL=${_SDL_VERSION} +SERVER_USE_OFF= SDL=sdl2 SERVER_CMAKE_ON= -DOPTION_DEDICATED:BOOL=ON SERVER_LIB_DEPENDS_OFF= libfontconfig.so:x11-fonts/fontconfig \ libfreetype.so:print/freetype2 \ libharfbuzz.so:print/harfbuzz \ - libicui18n.so:devel/icu + libicui18n.so:devel/icu \ + libopusfile.so:audio/opusfile SERVER_VARS= USE_RC_SUBR=${PORTNAME} post-install-SERVER-on: diff --git a/games/openttd/distinfo b/games/openttd/distinfo index e52182bfb34e..7a375fa255fe 100644 --- a/games/openttd/distinfo +++ b/games/openttd/distinfo @@ -1,7 +1,3 @@ -TIMESTAMP = 1736018646 -SHA256 (openttd-14.1-source.tar.xz) = 2c14c8f01f44148c4f2c88c169a30abcdb002eb128a92b9adb76baa76b013494 -SIZE (openttd-14.1-source.tar.xz) = 8015032 -SHA256 (db36e61807955c896267d6585de0577efd30465d.patch) = 4faaf0fdc4989194e47512f91288c62aa031fc6449d87b985fb20d1cc27705c9 -SIZE (db36e61807955c896267d6585de0577efd30465d.patch) = 1076 -SHA256 (14fac2ad37bfb9cec56b4f9169d864f6f1c7b96e.patch) = 7ab95cc1719614a9e5470d06001efd27bab9db917eb8456872aa1505440881a6 -SIZE (14fac2ad37bfb9cec56b4f9169d864f6f1c7b96e.patch) = 1089 +TIMESTAMP = 1767288352 +SHA256 (openttd-15.0-source.tar.xz) = 3552d774bb246f360b0a0d35436946007fcd48b2698ef1d7dfa30032ac3135c1 +SIZE (openttd-15.0-source.tar.xz) = 8540368 diff --git a/games/openttd/files/extra-patch-save-passwords b/games/openttd/files/extra-patch-save-passwords deleted file mode 100644 index ac4fa72b2e5e..000000000000 --- a/games/openttd/files/extra-patch-save-passwords +++ /dev/null @@ -1,134 +0,0 @@ ---- src/network/network_func.h.orig 2021-10-17 09:31:25 UTC -+++ src/network/network_func.h -@@ -73,7 +73,8 @@ void NetworkServerShowStatusToConsole(); - bool NetworkServerStart(); - void NetworkServerNewCompany(const Company *company, NetworkClientInfo *ci); - bool NetworkServerChangeClientName(ClientID client_id, const std::string &new_name); -- -+void NetworkSavePassword(); -+void NetworkLoadPassword(); - - void NetworkServerDoMove(ClientID client_id, CompanyID company_id); - void NetworkServerSendRcon(ClientID client_id, TextColour colour_code, const std::string &string); ---- src/network/network_server.cpp.orig 2021-10-17 09:31:25 UTC -+++ src/network/network_server.cpp -@@ -32,6 +32,7 @@ - #include <mutex> - #include <condition_variable> - -+#include "../fileio_func.h" - #include "../safeguards.h" - - -@@ -439,6 +440,7 @@ NetworkRecvStatus ServerNetworkGameSocketHandler::Send - /* Reset 'lag' counters */ - this->last_frame = this->last_frame_server = _frame_counter; - -+ Debug( net, 1, "requesting GAME password" ); - 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); - _network_company_states[c->index].months_empty = 0; - NetworkServerUpdateCompanyPassworded(c->index, false); -+ if (_settings_client.network.save_password) { -+ NetworkSavePassword( ); -+ } - } - /* Is the company empty for autoclean_novehicles-months, and has no vehicles? */ - if (_settings_client.network.autoclean_novehicles != 0 && _network_company_states[c->index].months_empty > _settings_client.network.autoclean_novehicles && vehicles_in_company[c->index] == 0) { -@@ -1656,6 +1661,9 @@ void NetworkServerSetCompanyPassword(CompanyID company - } - - NetworkServerUpdateCompanyPassworded(company_id, !_network_company_states[company_id].password.empty()); -+ if (_settings_client.network.save_password) { -+ NetworkSavePassword( ); -+ } - } - - /** -@@ -2022,6 +2030,49 @@ bool NetworkCompanyHasClients(CompanyID company) - if (ci->client_playas == company) return true; - } - return false; -+} -+ -+void NetworkSavePassword( ) -+{ -+ static FILE *file_pointer; -+ std::string password_file_name; -+ -+ 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 ); -+ -+ if (file_pointer != NULL) { -+ for( CompanyID l_company = (CompanyID)0; l_company < MAX_COMPANIES; l_company++ ) { -+ if (NetworkCompanyIsPassworded(l_company)) { -+ fwrite(_network_company_states[l_company].password.c_str(), _network_company_states[l_company].password.size(), 1, file_pointer); -+ } -+ fwrite( "\n", 1, 1, file_pointer ); -+ } -+ fclose(file_pointer); -+ } -+} -+ -+void NetworkLoadPassword( ) -+{ -+ static FILE *file_pointer; -+ char password[NETWORK_PASSWORD_LENGTH]; -+ std::string password_file_name; -+ -+ 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 ); -+ for( CompanyID l_company = (CompanyID)0; l_company < MAX_COMPANIES; l_company++ ) { -+ fgets( password, sizeof( password), file_pointer); -+ if (strlen(password)>1) { -+ fseek( file_pointer, 1L, SEEK_CUR ); -+ _network_company_states[l_company].password = password; -+ NetworkServerUpdateCompanyPassworded(l_company, !_network_company_states[l_company].password.empty()); -+ } -+ } -+ } else { -+ Debug( net, 0, "Password file %s not found", password_file_name ); -+ } - } - - ---- src/openttd.cpp.orig 2021-10-17 09:31:25 UTC -+++ src/openttd.cpp -@@ -1046,6 +1046,10 @@ void SwitchToMode(SwitchMode new_mode) - OnStartGame(_network_dedicated); - /* Decrease pause counter (was increased from opening load dialog) */ - Command<CMD_PAUSE>::Post(PM_PAUSED_SAVELOAD, false); -+ // Try to load password -+ if (_settings_client.network.save_password) { -+ NetworkLoadPassword( ); -+ } - } - break; - } ---- src/settings_type.h.orig 2021-10-17 09:31:25 UTC -+++ src/settings_type.h -@@ -296,6 +296,7 @@ struct NetworkSettings { - std::string last_joined; ///< Last joined server - UseRelayService use_relay_service; ///< Use relay service? - ParticipateSurvey participate_survey; ///< Participate in the automated survey -+ bool save_password; ///< If password file is used - }; - - /** Settings related to the creation of games. */ ---- 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 - flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC | SF_NETWORK_ONLY - def = false - cat = SC_EXPERT -+ -+[SDTC_BOOL] -+var = network.save_password -+flags = SF_NOT_IN_SAVE | SF_NO_NETWORK_SYNC -+def = false diff --git a/games/openttd/files/patch-CMakeLists.txt b/games/openttd/files/patch-CMakeLists.txt index 6ad87864e4c0..cdcd99beb8b1 100644 --- a/games/openttd/files/patch-CMakeLists.txt +++ b/games/openttd/files/patch-CMakeLists.txt @@ -1,33 +1,22 @@ ---- CMakeLists.txt.orig 2024-04-13 12:55:23 UTC +--- CMakeLists.txt.orig 2025-08-31 18:53:32 UTC +++ CMakeLists.txt -@@ -143,11 +143,14 @@ if(NOT OPTION_DEDICATED) - find_package(Allegro) +@@ -143,7 +143,9 @@ if(NOT OPTION_DEDICATED) if(NOT APPLE) find_package(Freetype) -+if(WITH_SDL2) find_package(SDL2) -- if(NOT SDL2_FOUND) -+else() - find_package(SDL) - endif() +if(WITH_FLUIDSYNTH) find_package(Fluidsynth) +endif() if(Freetype_FOUND) find_package(Fontconfig) endif() -@@ -323,9 +326,14 @@ if(NOT EMSCRIPTEN) +@@ -317,7 +319,9 @@ 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/pkg-plist b/games/openttd/pkg-plist index 63a33f92e99b..b63fbc5e6f7d 100644 --- a/games/openttd/pkg-plist +++ b/games/openttd/pkg-plist @@ -1,15 +1,16 @@ bin/openttd -share/man/man6/openttd.6.gz +share/applications/openttd.desktop %%PORTDOCS%%%%DOCSDIR%%/CONTRIBUTING.md %%PORTDOCS%%%%DOCSDIR%%/CREDITS.md %%PORTDOCS%%%%DOCSDIR%%/README.md -%%PORTDOCS%%%%DOCSDIR%%/changelog.txt -%%PORTDOCS%%%%DOCSDIR%%/known-bugs.txt +%%PORTDOCS%%%%DOCSDIR%%/changelog.md +%%PORTDOCS%%%%DOCSDIR%%/known-bugs.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/fonts.md %%PORTDOCS%%%%DOCSDIR%%/docs/game_coordinator.md %%PORTDOCS%%%%DOCSDIR%%/docs/linkgraph.md %%PORTDOCS%%%%DOCSDIR%%/docs/logging_and_performance_metrics.md @@ -19,6 +20,13 @@ share/man/man6/openttd.6.gz %%PORTDOCS%%%%DOCSDIR%%/docs/obs_format.txt %%PORTDOCS%%%%DOCSDIR%%/docs/savegame_format.md %%PORTDOCS%%%%DOCSDIR%%/docs/symbol_server.md +share/icons/hicolor/16x16/apps/openttd.png +share/icons/hicolor/32x32/apps/openttd.png +share/icons/hicolor/48x48/apps/openttd.png +share/icons/hicolor/64x64/apps/openttd.png +share/icons/hicolor/128x128/apps/openttd.png +share/icons/hicolor/256x256/apps/openttd.png +share/man/man6/openttd.6.gz %%DATADIR%%/ai/compat_0.7.nut %%DATADIR%%/ai/compat_1.0.nut %%DATADIR%%/ai/compat_1.1.nut @@ -108,6 +116,7 @@ share/man/man6/openttd.6.gz %%DATADIR%%/lang/macedonian.lng %%DATADIR%%/lang/malay.lng %%DATADIR%%/lang/maltese.lng +%%DATADIR%%/lang/maori.lng %%DATADIR%%/lang/marathi.lng %%DATADIR%%/lang/norwegian_bokmal.lng %%DATADIR%%/lang/norwegian_nynorsk.lng @@ -140,12 +149,5 @@ share/man/man6/openttd.6.gz %%DATADIR%%/scripts/pre_dedicated.scr.example %%DATADIR%%/scripts/pre_server.scr.example %%DATADIR%%/scripts/readme.txt -share/applications/openttd.desktop -share/icons/hicolor/16x16/apps/openttd.png -share/icons/hicolor/32x32/apps/openttd.png -share/icons/hicolor/48x48/apps/openttd.png -share/icons/hicolor/64x64/apps/openttd.png -share/icons/hicolor/128x128/apps/openttd.png -share/icons/hicolor/256x256/apps/openttd.png share/pixmaps/openttd.32.xpm share/pixmaps/openttd.64.xpmhome | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69687496.270ce.5cf48634>
