Skip to content

visp: update postinstall to support API #208554

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 2, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions Formula/v/visp.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class Visp < Formula

Check warning on line 1 in Formula/v/visp.rb

View workflow job for this annotation

GitHub Actions / macOS 15-arm64

No bottle built for visp!

visp has unbottled dependencies, so a bottle will not be built.
desc "Visual Servoing Platform library"
homepage "https://visp.inria.fr/"
url "https://visp-doc.inria.fr/download/releases/visp-3.6.0.tar.gz"
Expand Down Expand Up @@ -154,13 +154,19 @@
# Replace SDK paths in bottle when pouring on different OS version than bottle OS.
# This avoids error like https://github.com/orgs/Homebrew/discussions/5853
# TODO: Consider handling this in brew, e.g. as part of keg cleaner or bottle relocation
if OS.mac? && Tab.for_formula(self).poured_from_bottle && MacOS.version != bottle&.tag&.to_macos_version
if OS.mac? && (tab = Tab.for_formula(self)).poured_from_bottle
bottle_os = bottle&.tag&.to_macos_version
if bottle_os.nil? && (os_version = tab.built_on.fetch("os_version", "")[/\d+(?:\.\d+)*$/])
bottle_os = MacOSVersion.new(os_version).strip_patch
end
return if bottle_os.nil? || MacOS.version == bottle_os

sdk_path_files = [
lib/"cmake/visp/VISPConfig.cmake",
lib/"cmake/visp/VISPModules.cmake",
lib/"pkgconfig/visp.pc",
]
bottle_sdk_path = MacOS.sdk_for_formula(self, bottle&.tag&.to_macos_version).path
bottle_sdk_path = MacOS.sdk_for_formula(self, bottle_os).path
inreplace sdk_path_files, bottle_sdk_path, MacOS.sdk_for_formula(self).path, audit_result: false
end
end
Expand Down
Loading