git: 8f9dbd3cb9af - main - games/trx: Update to 1.9

From: Nuno Teixeira <eduardo_at_FreeBSD.org>
Date: Sun, 12 Jul 2026 17:14:44 UTC
The branch main has been updated by eduardo:

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

commit 8f9dbd3cb9af815c04eb639d2bde27a46d98ddcd
Author:     Nuno Teixeira <eduardo@FreeBSD.org>
AuthorDate: 2026-07-12 14:50:44 +0000
Commit:     Nuno Teixeira <eduardo@FreeBSD.org>
CommitDate: 2026-07-12 17:14:33 +0000

    games/trx: Update to 1.9
    
    ChangeLog: https://github.com/LostArtefacts/TRX/releases/tag/trx-1.9
---
 games/trx/Makefile         |   2 +-
 games/trx/distinfo         |   6 +-
 games/trx/files/patch-5792 | 211 ---------------------------------------------
 games/trx/files/patch-5793 |  95 --------------------
 4 files changed, 4 insertions(+), 310 deletions(-)

diff --git a/games/trx/Makefile b/games/trx/Makefile
index a018fd714fdd..b3a9c6e749ad 100644
--- a/games/trx/Makefile
+++ b/games/trx/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	TRX
 DISTVERSIONPREFIX=	trx-
-DISTVERSION=	1.8.1
+DISTVERSION=	1.9
 CATEGORIES=	games
 
 MAINTAINER=	eduardo@FreeBSD.org
diff --git a/games/trx/distinfo b/games/trx/distinfo
index e8f2e1903a1c..8db02aed06d3 100644
--- a/games/trx/distinfo
+++ b/games/trx/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1783804834
-SHA256 (LostArtefacts-TRX-trx-1.8.1_GH0.tar.gz) = 055b21c88e04c964af7416bf7ea2b1a32302a4cc18dae187d9ff5516066094a7
-SIZE (LostArtefacts-TRX-trx-1.8.1_GH0.tar.gz) = 25772356
+TIMESTAMP = 1783866050
+SHA256 (LostArtefacts-TRX-trx-1.9_GH0.tar.gz) = 74acf9706966707e95a183c23d07d28c028611998f21379e86b4feed4dd96570
+SIZE (LostArtefacts-TRX-trx-1.9_GH0.tar.gz) = 27789624
diff --git a/games/trx/files/patch-5792 b/games/trx/files/patch-5792
deleted file mode 100644
index bb61872aa9e7..000000000000
--- a/games/trx/files/patch-5792
+++ /dev/null
@@ -1,211 +0,0 @@
-From c76754814027adb1609aa20822c8f891986941e9 Mon Sep 17 00:00:00 2001
-From: Dash <dash@bad.pink>
-Date: Sat, 11 Jul 2026 22:35:42 +0200
-Subject: [PATCH] src/meson: improve packaging build overrides
-
-Add Meson options to override the generated TRX version string and the
-Lua dependency name for packaged builds.
-
-When no explicit version is provided, Meson now resolves it through the
-shared versioning tool instead of duplicating the git describe logic in
-the build file. The generated build files still receive the resolved
-version override, while Meson's own project version remains unchanged.
-
-This lets packagers inject a release version and versioned Lua package
-name without maintaining local patches for the build.
-
-Resolves #5789.
----
- src/meson.build       | 36 ++++++++++++++++++++++++++++++++----
- src/meson.options     |  2 ++
- tools/generate_init   | 19 ++++++++++++-------
- tools/generate_rcfile |  3 ++-
- tools/get_version     | 11 +++--------
- 5 files changed, 51 insertions(+), 20 deletions(-)
-
-diff --git meson.build meson.build
-index 6acb09d765..de4c3c9a55 100644
---- meson.build
-+++ meson.build
-@@ -1,6 +1,7 @@
- project(
-   'TRX',
-   'c',
-+  version: 'undefined',
-   default_options: [
-     'c_std=c2x',
-     'warning_level=3',
-@@ -12,15 +13,28 @@ project(
- fs = import('fs')
- 
- staticdeps = get_option('staticdeps')
-+trx_version = get_option('trx_version')
- # Always dynamically link on macOS
- if host_machine.system() == 'darwin'
-   staticdeps = false
- endif
- 
- c_compiler = meson.get_compiler('c')
--git = find_program('git', required: true)
- python3 = find_program('python3', required: true)
- 
-+if trx_version == ''
-+  version_result = run_command(
-+    python3,
-+    meson.project_source_root() + '/../tools/get_version',
-+    check: false,
-+  )
-+  if version_result.returncode() == 0
-+    trx_version = version_result.stdout().strip()
-+  else
-+    trx_version = '?'
-+  endif
-+endif
-+
- trx_lua_embed = custom_target(
-   'trx_lua_embed',
-   input: [
-@@ -94,7 +108,7 @@ dep_pcre2 = dependency('libpcre2-8', static: staticdeps)
- dep_backtrace = c_compiler.find_library('backtrace', static: true, required: false)
- dep_swscale = dependency('libswscale', static: staticdeps)
- dep_swresample = dependency('libswresample', static: staticdeps)
--dep_lua = dependency('lua', static: staticdeps)
-+dep_lua = dependency(get_option('lua_dep'), static: staticdeps)
- c_compiler.check_header('uthash.h', required: true)
- dep_mathlibrary = c_compiler.find_library('m', static: staticdeps, required: false)
- 
-@@ -853,13 +867,27 @@ endif
- trx_init = custom_target(
-   'trx_fake_init',
-   output: ['trx_init.c'],
--  command: [python3, meson.project_source_root() + '/../tools/generate_init', '-o', meson.current_build_dir() / '@OUTPUT0@'],
-+  command: [
-+    python3,
-+    meson.project_source_root() + '/../tools/generate_init',
-+    '--version',
-+    trx_version,
-+    '-o',
-+    meson.current_build_dir() / '@OUTPUT0@',
-+  ],
-   build_always_stale: true,
- )
- trx_version_rc = custom_target(
-   'trx_fake_version',
-   output: ['trx_version.rc'],
--  command: [python3, meson.project_source_root() + '/../tools/generate_rcfile', '-o', '@OUTPUT0@'],
-+  command: [
-+    python3,
-+    meson.project_source_root() + '/../tools/generate_rcfile',
-+    '--version',
-+    trx_version,
-+    '-o',
-+    '@OUTPUT0@',
-+  ],
-   build_always_stale: true,
- )
- trx_icon_rc = custom_target(
-diff --git meson.options meson.options
-index 5577c45766..dd9880b109 100644
---- meson.options
-+++ meson.options
-@@ -1 +1,3 @@
- option('staticdeps', type: 'boolean', value: true, description: 'Try to build against static dependencies. default: true')
-+option('trx_version', type: 'string', value: '', description: 'Override the TRX version string used by Meson and generated build files.')
-+option('lua_dep', type: 'string', value: 'lua', description: 'Override the dependency() name used for Lua.')
-diff --git ../tools/generate_init ../tools/generate_init
-index 34c6dec2c4..45e955acda 100755
---- ../tools/generate_init
-+++ ../tools/generate_init
-@@ -1,6 +1,5 @@
- #!/usr/bin/env python3
- import argparse
--import re
- from pathlib import Path
- 
- from shared.versioning import generate_version
-@@ -13,27 +12,33 @@ const char *g_TRXVersion = "TRX {version}";
- def parse_args() -> argparse.Namespace:
-     parser = argparse.ArgumentParser()
-     parser.add_argument("-o", "--output", type=Path)
-+    parser.add_argument("--version", type=str, default="")
-     return parser.parse_args()
- 
- 
--def get_init_c() -> str:
-+def get_init_c(version: str) -> str:
-     return TEMPLATE.format(
--        version=generate_version()
-+        version=version
-     )
- 
- 
--def update_init_c(output_path: Path) -> None:
--    new_text = get_init_c()
-+def update_init_c(output_path: Path, version: str) -> None:
-+    new_text = get_init_c(version=version)
-     if not output_path.exists() or output_path.read_text() != new_text:
-         output_path.write_text(new_text)
- 
- 
-+def get_version(args: argparse.Namespace) -> str:
-+    return args.version or generate_version()
-+
-+
- def main() -> None:
-     args = parse_args()
-+    version = get_version(args)
-     if args.output:
--        update_init_c(output_path=args.output)
-+        update_init_c(output_path=args.output, version=version)
-     else:
--        print(get_init_c(), end="")
-+        print(get_init_c(version=version), end="")
- 
- 
- if __name__ == "__main__":
-diff --git ../tools/generate_rcfile ../tools/generate_rcfile
-index 60bdae3e67..daeb3ae066 100755
---- ../tools/generate_rcfile
-+++ ../tools/generate_rcfile
-@@ -9,6 +9,7 @@ from shared.versioning import generate_version
- def parse_args() -> argparse.Namespace:
-     parser = argparse.ArgumentParser()
-     parser.add_argument("-o", "--output", type=Path, nargs="+")
-+    parser.add_argument("--version", type=str, default="")
-     return parser.parse_args()
- 
- 
-@@ -25,7 +26,7 @@ def write_rc_template(
- 
- def main() -> None:
-     args = parse_args()
--    version = generate_version()
-+    version = args.version or generate_version()
- 
-     for output_path in args.output or []:
-         write_rc_template(
-diff --git ../tools/get_version ../tools/get_version
-index f96ae1d116..c88b5386ad 100755
---- ../tools/get_version
-+++ ../tools/get_version
-@@ -1,17 +1,12 @@
- #!/usr/bin/env python3
--import argparse
-+from pathlib import Path
- 
- from shared.versioning import generate_version
- 
- 
--def parse_args() -> argparse.Namespace:
--    parser = argparse.ArgumentParser()
--    return parser.parse_args()
--
--
- def main() -> None:
--    args = parse_args()
--    print(generate_version(), end="")
-+    repo_dir = Path(__file__).resolve().parent.parent
-+    print(generate_version(repo_dir=repo_dir))
- 
- 
- if __name__ == "__main__":
diff --git a/games/trx/files/patch-5793 b/games/trx/files/patch-5793
deleted file mode 100644
index 6d2f1d2d7571..000000000000
--- a/games/trx/files/patch-5793
+++ /dev/null
@@ -1,95 +0,0 @@
-From 7a98316fd14a3a8022e4705daa6b61c4c8a0a881 Mon Sep 17 00:00:00 2001
-From: Dash <dash@bad.pink>
-Date: Sun, 12 Jul 2026 08:38:10 +0200
-Subject: [PATCH 1/2] shell/paths: fix split-install paths
-
-Honor `TRX_CONFIG_DIR` when loading shader files and honor
-`TRX_SCREENSHOTS_DIR` when writing screenshots. This keeps split
-installs working when the executable lives outside the main TRX data
-folder.
-
-Resolves #5789.
----
- src/trx/game/shell/paths.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git trx/game/shell/paths.c trx/game/shell/paths.c
-index 4581e16fbd..b38d53e7f3 100644
---- trx/game/shell/paths.c
-+++ trx/game/shell/paths.c
-@@ -210,15 +210,15 @@ static const M_DYNAMIC_PATH_POLICY m_PathPolicies[TRX_DYNAMIC_PATH_NUMBER_OF] =
-             "%mod_dir%/shaders/%rel%",
-             "%base_mod_dir%/shaders/%rel%",
-             "%trx_dir%/shaders/%rel%",
--            "%trx_dir%/cfg/shaders/%rel%",
-+            "%config_dir%/shaders/%rel%",
-             nullptr,
-         },
-         .check_exists = true,
-     },
-     [TRX_DYNAMIC_PATH_SCREENSHOT_WRITE_FILE] = {
-         .patterns = {
--            "%trx_dir%/screenshots/%mod%/%rel%",
--            "%trx_dir%/screenshots/%rel%",
-+            "%screenshots_dir%/%mod%/%rel%",
-+            "%screenshots_dir%/%rel%",
-             nullptr,
-         },
-         .check_exists = false,
-
-From e0407cfb601157b8d218405f20a87df5742ef639 Mon Sep 17 00:00:00 2001
-From: Dash <dash@bad.pink>
-Date: Sun, 12 Jul 2026 08:38:26 +0200
-Subject: [PATCH 2/2] docs: document path overrides
-
-Add a short install guide section describing the runtime path
-environment variables used by split installs and package-managed
-wrappers.
----
- docs/trx/INSTALLING.md | 33 +++++++++++++++++++++++++++++++++
- 1 file changed, 33 insertions(+)
-
-diff --git ../docs/trx/INSTALLING.md ../docs/trx/INSTALLING.md
-index cee27da4d0..275243cd19 100644
---- ../docs/trx/INSTALLING.md
-+++ ../docs/trx/INSTALLING.md
-@@ -30,6 +30,39 @@
-    to ["Manually copying original game files"](#manually-copying-original-game-files)
-    section in this document.
- 
-+## Split installs and custom paths
-+
-+By default, TRX expects a bundled layout where the executable sits next to
-+the `cfg/` and `games/` directories. If you want to keep the executable in a
-+different location, such as `/usr/local/bin`, you can override the runtime
-+paths with environment variables:
-+
-+- `TRX_CONFIG_DIR`  
-+  Defaults to `<trx_dir>/cfg`.
-+- `TRX_CACHE_DIR`  
-+  Defaults to `<trx_dir>/cache`.
-+- `TRX_GAMES_DIR`  
-+  Defaults to `<trx_dir>/games`.
-+- `TRX_SCREENSHOTS_DIR`  
-+  Defaults to `<trx_dir>/screenshots`.
-+- `TRX_SAVES_DIR`  
-+  Defaults to `<trx_dir>/saves`.
-+
-+For example, a wrapper script can keep the binary in one location while
-+pointing TRX at a separate game-data directory:
-+
-+```sh
-+#!/bin/sh
-+export TRX_GAMES_DIR="$HOME/Work/TRX/games"
-+export TRX_CONFIG_DIR="$HOME/Work/TRX/cfg"
-+export TRX_SAVES_DIR="$HOME/Work/TRX/saves"
-+export TRX_SCREENSHOTS_DIR="$HOME/Work/TRX/screenshots"
-+exec /usr/local/bin/TRX.bin "$@"
-+```
-+
-+This is especially useful for package managers and ports that install the
-+binary outside the main TRX data tree.
-+
- ## Verifying the installation
- 
- If you install everything correctly, your game directory should look more or less like this (click to expand):