From a88eae5318c0c1ab5bb75dcb2eb076fa39c0d624 Mon Sep 17 00:00:00 2001 From: deepend Date: Thu, 19 Feb 2026 17:19:05 -0700 Subject: [PATCH] Updated macOS CI staging (arm64 + x86_64) to copy locales into $STAGE_PREFIX/locale/ (instead of $STAGE_PREFIX/share/locale) so gtk-mac-bundler can resolve gtk30.mo at the path it expects. Updated both macOS packaging steps to pass BUNDLE_PREFIX with a trailing slash (.../stage//). Replaced cp -a with rsync -aL when staging enchant so symlinks are dereferenced into the staged tree (avoids Homebrew opt symlink pitfalls). Adjusted osx/makebundle.sh to preserve a caller-provided trailing slash when writing the XML default prefix (instead of stripping it), matching the CI fix for malformed x86_64locale path concatenation. --- .github/workflows/macos-build.yml | 16 ++++++++-------- osx/makebundle.sh | 9 ++++----- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/.github/workflows/macos-build.yml b/.github/workflows/macos-build.yml index 708e8d09..4ed1241c 100644 --- a/.github/workflows/macos-build.yml +++ b/.github/workflows/macos-build.yml @@ -59,14 +59,14 @@ jobs: BREW_PREFIX="$(brew --prefix)" ENCHANT_PREFIX="$(brew --prefix enchant)" - mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/share" + mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/locale" rsync -a "$BREW_PREFIX/lib/gtk-3.0" "$STAGE_PREFIX/lib/" rsync -a "$BREW_PREFIX/lib/gdk-pixbuf-2.0" "$STAGE_PREFIX/lib/" - rsync -a "$BREW_PREFIX/share/locale" "$STAGE_PREFIX/share/" + rsync -a "$BREW_PREFIX/share/locale/" "$STAGE_PREFIX/locale/" mkdir -p "$STAGE_PREFIX/opt" rm -rf "$STAGE_PREFIX/opt/enchant" - cp -a "$ENCHANT_PREFIX" "$STAGE_PREFIX/opt/enchant" + rsync -aL "$ENCHANT_PREFIX/" "$STAGE_PREFIX/opt/enchant/" - name: Package unsigned .app (arm64) run: | @@ -76,7 +76,7 @@ jobs: ( cd osx - BUNDLE_PREFIX="$PWD/../stage/arm64" \ + BUNDLE_PREFIX="$PWD/../stage/arm64/" \ ENCHANT_PREFIX="$PWD/../stage/arm64/opt/enchant" \ TARGET_ARCHES="arm64" \ ./makebundle.sh @@ -144,14 +144,14 @@ jobs: BREW_PREFIX="$(brew --prefix)" ENCHANT_PREFIX="$(brew --prefix enchant)" - mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/share" + mkdir -p "$STAGE_PREFIX/lib" "$STAGE_PREFIX/locale" rsync -a "$BREW_PREFIX/lib/gtk-3.0" "$STAGE_PREFIX/lib/" rsync -a "$BREW_PREFIX/lib/gdk-pixbuf-2.0" "$STAGE_PREFIX/lib/" - rsync -a "$BREW_PREFIX/share/locale" "$STAGE_PREFIX/share/" + rsync -a "$BREW_PREFIX/share/locale/" "$STAGE_PREFIX/locale/" mkdir -p "$STAGE_PREFIX/opt" rm -rf "$STAGE_PREFIX/opt/enchant" - cp -a "$ENCHANT_PREFIX" "$STAGE_PREFIX/opt/enchant" + rsync -aL "$ENCHANT_PREFIX/" "$STAGE_PREFIX/opt/enchant/" - name: Package unsigned .app (x86_64) run: | @@ -161,7 +161,7 @@ jobs: ( cd osx - BUNDLE_PREFIX="$PWD/../stage/x86_64" \ + BUNDLE_PREFIX="$PWD/../stage/x86_64/" \ ENCHANT_PREFIX="$PWD/../stage/x86_64/opt/enchant" \ TARGET_ARCHES="x86_64" \ ./makebundle.sh diff --git a/osx/makebundle.sh b/osx/makebundle.sh index 799ceab2..3039018c 100755 --- a/osx/makebundle.sh +++ b/osx/makebundle.sh @@ -58,11 +58,10 @@ if [ -z "$BUNDLE_PREFIX" ]; then BUNDLE_PREFIX="/usr/local" fi -# gtk-mac-bundler translation rebasing can produce off-by-one path slicing -# with a trailing slash in , yielding broken paths like -# ".../x86_64/ocale/...". Keep the XML prefix slashless and let bundle entries -# contribute their own separators. -BUNDLE_PREFIX_XML="${BUNDLE_PREFIX%/}" +# Keep a caller-provided trailing slash so gtk-mac-bundler path concatenation +# does not produce malformed locale paths like ".../x86_64locale/...". +# CI explicitly sets BUNDLE_PREFIX with a trailing slash. +BUNDLE_PREFIX_XML="$BUNDLE_PREFIX" ENCHANT_PREFIX_DEFAULT="${BUNDLE_PREFIX}/opt/enchant" ENCHANT_PREFIX_PATH="${ENCHANT_PREFIX:-$ENCHANT_PREFIX_DEFAULT}"