Skip to content
This repository has been archived by the owner on Jan 16, 2025. It is now read-only.

teensy_loader_cli 2.1 (devel) #48252

Conversation

oskargargas
Copy link

Update to allow use of devel repository instead of outdated (2013-ish) zip source distribution and expose libusb compilation flags.

…outdated (2013-ish) zip source distribution and expose libusb compilation flags.
@oskargargas
Copy link
Author

It is similar update to https://github.com/Homebrew/homebrew/pull/45558/files?diff=unified but after providing patches to upstream which were accepted.

I'm not sure if providing --with-xxx option which is available only for --devel or --HEAD builds is a proper way. Couldn't find anything in the docs about providing --with-xxx for devel only. If it should be done in some different way please advise.

Upstream unfortunately doesn't version this app so I wasn't sure if updating base installation to newest commit is a good choice and left the original zip source distribution as standard way of install... thou it is hell outdated and doesn't support many of development boards supported by newest git version.

@oskargargas
Copy link
Author

I just saw that tests failed for --develop. How should I approach testing when stable and develop don't have a common output?

@dunn
Copy link
Contributor

dunn commented Jan 20, 2016

If it's not possible to write a test that passes both, you can use build.stable? and build.devel?

@oskargargas
Copy link
Author

Thanks for the answer. I can't find any documentation on how to do it. If I place if build.devel/stable? then inside test block it looks like it never goes into the statement. Could you direct me to some example of such case?

@dunn
Copy link
Contributor

dunn commented Jan 20, 2016

Actually, I may be wrong. We allow build.with? in test blocks, but I'm not sure if the test block has access to build.stable? and build.devel?. We may fix that (feel free to submit a PR!) but in the meantime I'm afraid you'll need a compatible test.

version "2.1.devel"
end

option "with-libusb-compat", "Uses libusb instead od OS X HID api to connect with teensy boards. Available only for --devel and upwards."
Copy link
Member

Choose a reason for hiding this comment

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

Can cut this option.

Copy link
Author

Choose a reason for hiding this comment

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

Done

@oskargargas
Copy link
Author

Fixed all checks and review comments. Please merge or advise what to do next.

if build.with? "libusb-compat"
ENV["USE_LIBUSB"] = "YES"
else
ENV["SDK"] = MacOS.sdk_path || "/"
Copy link
Member

Choose a reason for hiding this comment

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

Can you explain why SDK doesn't need to be set when using libusb? Thanks!

Copy link
Author

Choose a reason for hiding this comment

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

teensy_loader_cli codebase is a bit outdated. There is a lot #ifdefs inside. Pure OSX codebase is not fully implemented. Using libusb allows use of Linux codepath which is fully implemented, especially allows for use of soft reboots of connected board.

@MikeMcQuaid
Copy link
Member

@oskargargas I merged this by mistake and have removed the devel in d8838fa as it's not a tagged version. If there's a tag for that: please open a new pull request for it.

Thanks for your contribution to Homebrew, though! Without people like you submitting PRs we couldn't run this project. You rock!

@oskargargas
Copy link
Author

@MikeMcQuaid it's not probable that upstream will tag versions anytime soon. I understand why you removed the devel. Current HEAD will do as long as something doesn't change. Is there any way to let's say self tag something for Homebrew?

FYI #45558 is a duplicate and after this merge could be closed as well.

@MikeMcQuaid
Copy link
Member

FYI #45558 is a duplicate and after this merge could be closed as well.

Thanks, closed.

Is there any way to let's say self tag something for Homebrew?

Unfortunately not; we only use upstream versions.

flier pushed a commit to flier/homebrew that referenced this pull request Feb 17, 2016
Closes Homebrew#48252.

Signed-off-by: Mike McQuaid <[email protected]>
@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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants