Skip to content

macOS: Fix the Homebrew Based Build.#4734

Merged
mikeller merged 1 commit intosubsurface:masterfrom
mikeller:fix_homebrew_build
Mar 2, 2026
Merged

macOS: Fix the Homebrew Based Build.#4734
mikeller merged 1 commit intosubsurface:masterfrom
mikeller:fix_homebrew_build

Conversation

@mikeller
Copy link
Member

Describe the pull request:

  • Bug fix
  • Functional change
  • New feature
  • Code cleanup
  • Build system change
  • Documentation change
  • Language translation

Pull request long description:

Update the libmtp library version dependency to what is currently being
installed by homebrew. In a way this is backwards, but since homebrew
does not have a reasonable way to install non-latest versions this seems
to be the path of least resistance to keep this working, as long as the
version updates don't break anything else.

Changes made:

  1. update the libmtp library version dependency to what is currently being installed by homebrew. In a way this is backwards;
  2. fix a pathing issue in the homebrew build script.

Related issues:

Additional information:

Documentation change:

Mentions:

Copilot AI review requested due to automatic review settings February 28, 2026 22:12
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the macOS Homebrew-based build setup by aligning the pinned libmtp dependency version with Homebrew’s current package version and correcting a build-script pathing issue to use the computed build output directory.

Changes:

  • Bump the pinned libmtp source dependency version from v1.1.22 to v1.1.23.
  • Fix the Homebrew local build script to cd into the computed $BUILDDIR before signing.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
scripts/get-dep-lib.sh Updates the pinned libmtp version tag to v1.1.23.
packaging/macosx/homebrew-local-build.sh Fixes the working directory used for codesign by switching to $BUILDDIR.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 90 to 93
cd $BUILDDIR
codesign --force --deep --sign - Subsurface.app

echo "Run Subsurface with 'open subsurface/build/Subsurface.app'"
Copy link

Copilot AI Feb 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cd $BUILDDIR is unquoted and unchecked. If the working directory path contains spaces (common on macOS), this will fail and the subsequent codesign will run in the wrong directory. Consider cd "$BUILDDIR" || croak "can't cd to $BUILDDIR" and also update the final open subsurface/build/Subsurface.app message to reflect the actual $BUILDDIR (since it can be $(pwd)/build/ when subsurface is a symlink).

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

Artifacts:
Subsurface-Linux-AppImage-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

@github-actions
Copy link

Artifacts:
Subsurface-Android-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

@github-actions
Copy link

Artifacts:
Subsurface-Windows-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

@github-actions
Copy link

Artifacts:
Subsurface-Windows-MSVC-qt-6-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

Update the libmtp library version dependency to what is currently being
installed by homebrew. In a way this is backwards, but since homebrew
does not have a reasonable way to install non-latest versions this seems
to be the path of least resistance to keep this working, as long as the
version updates don't break anything else.
Also fix a pathing issue in the homebrew build script.

Signed-off-by: Michael Keller <github@ike.ch>
@github-actions
Copy link

Artifacts:
Subsurface-Linux-AppImage-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

@github-actions
Copy link

Artifacts:
Subsurface-Android-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

@github-actions
Copy link

Artifacts:
Subsurface-Windows-MSVC-qt-6-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

@github-actions
Copy link

Artifacts:
Subsurface-Windows-6.0.5553-patch.1.pull-request.fix-homebrew-build
WARNING: Use at your own risk.

@mikeller mikeller merged commit 9bd43b5 into subsurface:master Mar 2, 2026
26 checks passed
@mikeller mikeller deleted the fix_homebrew_build branch March 2, 2026 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants