From 819535679c542507a78bf24b6ab734801db0b7bb Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 19 Feb 2026 16:30:14 -0700 Subject: [PATCH] Fixed macOS bundling prefix rendering by introducing BUNDLE_PREFIX_XML="${BUNDLE_PREFIX%/}/" so the bundle XML always gets a trailing slash, preventing malformed translation paths like .../x86_64locale/... during gtk-mac-bundler translation copy steps. Kept runtime path checks and enchant defaults based on the original BUNDLE_PREFIX, so only the XML-injected default prefix behavior changed. --- osx/makebundle.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/osx/makebundle.sh b/osx/makebundle.sh index 3d401c0f..337c15c4 100755 --- a/osx/makebundle.sh +++ b/osx/makebundle.sh @@ -58,10 +58,15 @@ if [ -z "$BUNDLE_PREFIX" ]; then BUNDLE_PREFIX="/usr/local" fi +# gtk-mac-bundler rebases translation paths using string concatenation on +# ${prefix}. Keep a trailing slash in the bundle metadata to avoid malformed +# paths like ".../x86_64locale/..." when copying locale catalogs. +BUNDLE_PREFIX_XML="${BUNDLE_PREFIX%/}/" + ENCHANT_PREFIX_DEFAULT="${BUNDLE_PREFIX}/opt/enchant" ENCHANT_PREFIX_PATH="${ENCHANT_PREFIX:-$ENCHANT_PREFIX_DEFAULT}" -perl -0pi -e 's|()[^<]+()|$1'"$BUNDLE_PREFIX"'$2|s' "$BUNDLE_DEF" +perl -0pi -e 's|()[^<]+()|$1'"$BUNDLE_PREFIX_XML"'$2|s' "$BUNDLE_DEF" perl -0pi -e 's|()[^<]+()|$1'"$ENCHANT_PREFIX_PATH"'$2|s' "$BUNDLE_DEF" if command -v brew >/dev/null 2>&1; then