Skip to content
This repository has been archived by the owner on Jul 4, 2023. It is now read-only.

teensy_loader_cli: add HEAD patch to avoid libusb access error on Mac OS #45558

Closed
wants to merge 5 commits into from
Closed
Changes from 4 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
14 changes: 11 additions & 3 deletions Library/Formula/teensy_loader_cli.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
class TeensyLoaderCli < Formula
desc "Command-line integration for Teensy USB development boards"
homepage "https://www.pjrc.com/teensy/loader_cli.html"
depends_on "libusb-compat"
Copy link
Contributor

Choose a reason for hiding this comment

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

This should be down below the head block.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but to compile 2.1 with OS=LINUX also require libusb

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, not in the head block, just below it and above the install block. Otherwise brew audit --strict teensy_loader_cli will complain.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it. fixed


url "https://www.pjrc.com/teensy/teensy_loader_cli.2.1.zip"
sha256 "dafd040d6748b52e0d4a01846d4136f3354ca27ddc36a55ed00d0a0af0902d46"
head "https://github.com/PaulStoffregen/teensy_loader_cli.git"

bottle do
cellar :any_skip_relocation
Expand All @@ -12,9 +13,16 @@ class TeensyLoaderCli < Formula
sha256 "dcd10140babb4d2937ce376c89e9c24a2e8046d2cabdad2cfdbc2542afa14471" => :mavericks
end

head do
url "https://github.com/PaulStoffregen/teensy_loader_cli.git"
patch do
Copy link
Member

Choose a reason for hiding this comment

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

Please submit this patch upstream (or at least a bug report) and use that link. We don't particularly want to use a commit from an unofficial repo.

url "https://github.com/rixtox/teensy_loader_cli/commit/747f3a249722eb07b494b2db8c7f872e603448f3.diff"
sha256 "be47f352d6f54a88db0bc8a88062f9ec470cab2c675655cfec14a9c238492677"
end
end

def install
ENV["OS"] = "MACOSX"
ENV["SDK"] = MacOS.sdk_path || "/"
ENV["OS"] = "LINUX"
system "make"
bin.install "teensy_loader_cli"
end
Expand Down