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

Conversation

rixtox
Copy link
Contributor

@rixtox rixtox commented Oct 31, 2015

According to PaulStoffregen/teensy_loader_cli#11
it's suggested to compile with OS=LINUX and include libusb, and due to an issue described in
https://github.com/PaulStoffregen/teensy_loader_cli/blob/master/teensy_loader_cli.c#L246-L248
libusb behave differently on Mac OS. Thus the patch comments out the lines as described to fix the problem.

@@ -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

@@ -12,9 +12,18 @@ 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.

@bfontaine
Copy link
Contributor

Ping?

@rixtox
Copy link
Contributor Author

rixtox commented Jan 5, 2016

@bfontaine Let's wait for response from upstream. PaulStoffregen/teensy_loader_cli#19

@rixtox
Copy link
Contributor Author

rixtox commented Jan 12, 2016

As responded from the upstream. The patch is just a quick and dirty workaround for the new Mac OS X version, and is using the Linux build codes. Merging the patch to the upstream will break the Linux code. Thus I suggest merge this patch in Homebrew and wait for any solid progress from the upstream to fix the native Mac OS X build.

@bfontaine
Copy link
Contributor

@rixtox I’m afraid we won’t accept a patch if upstream doesn’t want to apply it. Use inreplace instead.

@MikeMcQuaid
Copy link
Member

@rixtox I’m afraid we won’t accept a patch if upstream doesn’t want to apply it. Use inreplace instead.

Even in that case: I'd rather we didn't add new features that rely on patches (inreplace or otherwise) that can't be merged upstream

@MikeMcQuaid
Copy link
Member

Fixed in #48252.

@MikeMcQuaid MikeMcQuaid closed this Feb 4, 2016
@Homebrew Homebrew locked and limited conversation to collaborators Jul 10, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants