From d37bb862eb30647b660472d3c938cd637e6198c1 Mon Sep 17 00:00:00 2001 From: Dan Mahoney Date: Wed, 20 May 2026 16:02:46 -0700 Subject: [PATCH] Fix convert_to_utf8 failing on systems where python3 is not in /usr/bin scripts/convert_to_utf8 had a hardcoded #!/usr/bin/python3 shebang which fails on FreeBSD and other systems where Python 3 lives in /usr/local/bin. - Change shebang to #!/usr/bin/env python3 for portability - Add PYTHON= @PYTHON@ to templates/Makefile.in and invoke the script via $(PYTHON) so the build uses the exact interpreter detected by configure, consistent with all other Makefiles in the tree --- scripts/convert_to_utf8 | 2 +- templates/Makefile.in | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/convert_to_utf8 b/scripts/convert_to_utf8 index c788f50..e6e8b2f 100755 --- a/scripts/convert_to_utf8 +++ b/scripts/convert_to_utf8 @@ -1,4 +1,4 @@ -#!/usr/bin/python3 +#!/usr/bin/env python3 import os import sys diff --git a/templates/Makefile.in b/templates/Makefile.in index 3935810..439b69c 100644 --- a/templates/Makefile.in +++ b/templates/Makefile.in @@ -31,6 +31,7 @@ CC= @CC@ CHMOD= @CHMOD@ INSTALL= @INSTALL@ TRUE= @TRUE@ +PYTHON= @PYTHON@ DEFS= @DEFS@ @@ -61,7 +62,7 @@ all: converttemplates # Use a stamp file to track conversion, so it only happens once .converted.stamp: - ../scripts/convert_to_utf8 -d . + $(PYTHON) ../scripts/convert_to_utf8 -d . touch .converted.stamp converttemplates: .converted.stamp