From nobody Sat May 11 06:32:09 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Vbws5384Wz5JF3t; Sat, 11 May 2024 06:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Vbws52Q3Yz4D4s; Sat, 11 May 2024 06:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715409129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5l5jEAkcr/5o+TBLe1xCNdoMG25qHm4fYS/cWDG4nh4=; b=LX7RxDNn+Vp+d0e/FaWWbDtlLHiCp4Y9OxOcD3g2yboFCSA+g088oQf1EYFjji2BusSKL8 40vfBXxYK2VCeSH7byRapevoGBDLYjeO3HSc8fWIFNJnulegMvVG0+SMFrn9RrG2jnKwxF LX8PMyTYjrQhbpjsDJmNd3ohcUKIlvlobue6hU2GbBR9SSSkzn9a2r6vT1umiX/8zDaDAd IaEM0jvFowkJ/PyH8ud4kjIN03sHaE5QkKP56RExtlfQGDEk0Sb39oC+Akloz29vvwHHye eHvscI1FNDrptESKUm7h/Yw0lO7Y8igYZGeJjR76KAYx65Zi58lwLEFprU6jKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1715409129; a=rsa-sha256; cv=none; b=y25bY16qB5g7COwtremqKeUQEmh7ToZdDpdP1TJ7kLLJDI9uegwuMj86y1Oq0rIGMizeLF AKN/O8nOi22BHlIp+ZMf4CMedTUMGNAAcraOGDBLgQkYIGDNumfHN5xcnJM1Dpj0IUbi4v 6u5ChAqvhRwEfh9nzFQHNLKTN55Q13sLueJY8dOl1NIPEYS/ZIEaSMmXEk7eqGHLMvd2o7 by9MIzgwiLbq79RFOXmHjfKGtp1GqOqFBpACGFWAuw5QRth5+QSOlk6VWjX3M4HtOkAzPG TABVp6Q/9p0NPEvc/epIQetgXV2sE3gM6C62aarYURy0OKJLJf5crw8uM4B2dw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1715409129; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5l5jEAkcr/5o+TBLe1xCNdoMG25qHm4fYS/cWDG4nh4=; b=rV8KGPMKL1qV8kKKYPb7seK6bIUGn1SY0D71/hb2MEKBmIFdQRugQoRUpc22fYLAVXobx0 gtXfUeWVQxfKPzyTRKK4hjJWTHBZ3jHr/rug2gIGUu5E4bfXn2h8jUZZRKZ4EqJsgwmW+f BTVb7hbjT7fmyhAb78Gqk7SPSFQn4iRRdho4reboX96lUe3SOLIw/1Q7HXePw1g3yNTbSM q9G/tXq0fq8fyNnoWp2SPHqYKqBf2PRQnd6kDjQnTsiiGQYOJ2nA50j0MjE506KU1oF4l0 mZma4QpTKg9ADwA527JwmXO4avOVwX8VW11czNZMk7+eZdXo/PJLld2LUADBog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Vbws521Jvz19QZ; Sat, 11 May 2024 06:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44B6W9Ha026105; Sat, 11 May 2024 06:32:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44B6W9w2026102; Sat, 11 May 2024 06:32:09 GMT (envelope-from git) Date: Sat, 11 May 2024 06:32:09 GMT Message-Id: <202405110632.44B6W9w2026102@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: d3c9137c9ed2 - main - games/openttd: update OpenTTD to version 14.1 (major update) List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d3c9137c9ed2d4a1429bc0c507b5b6dce4e136e0 Auto-Submitted: auto-generated The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=d3c9137c9ed2d4a1429bc0c507b5b6dce4e136e0 commit d3c9137c9ed2d4a1429bc0c507b5b6dce4e136e0 Author: Alexey Dokuchaev AuthorDate: 2024-05-11 06:31:20 +0000 Commit: Alexey Dokuchaev 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_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