Skip to content

Commit

Permalink
iconsur: add dependency for xcodebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
cho-m committed Nov 21, 2024
1 parent b94937d commit b87deff
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Formula/i/iconsur.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class Iconsur < Formula
# this causes issues if a user has Homebrew Python installed (EXTERNALLY-MANAGED).
# We instead prepare a virtualenv with all missing packages.
on_monterey :or_newer do
depends_on xcode: :build # for xcodebuild
depends_on "[email protected]"
end

Expand All @@ -43,12 +44,15 @@ def install
system "npm", "install", *std_npm_args

if MacOS.version >= :monterey
# help `pyobjc-framework-cocoa` run xcodebuild when xcode-select is set to CLT
ENV["DEVELOPER_DIR"] = ENV["HOMEBREW_DEVELOPER_DIR"]

venv = virtualenv_create(libexec/"venv", "python3.13")
venv.pip_install resources
bin.install Dir["#{libexec}/bin/*"]
bin.install libexec.glob("bin/*")
bin.env_script_all_files libexec/"bin", PATH: "#{venv.root}/bin:${PATH}"
else
bin.install_symlink Dir["#{libexec}/bin/*"]
bin.install_symlink libexec.glob("bin/*")
end
end

Expand Down

0 comments on commit b87deff

Please sign in to comment.