Fixed broken homebrew formula for Linux.#107
Open
naelstrof wants to merge 3 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Context
Running Bazzite, an atomic read-only OS, requires me to use brew to easily access usb devices with an arbitrary unpackaged binary like footswitch.
Problem
Attempting to install with brew gives the following error:
Analysis
I'm assuming dev packages like hidapi can arbitrarily place their include files depending on the platform. Using
brew list hidapiI can see the include files are actually located within/home/linuxbrew/.linuxbrew/Cellar/hidapi/0.15.0/include/hidapi/ (2 files).My understanding is that it's CMake's purpose to "find" the proper include location regardless of platform. So I tried updating the brew to simply run cmake before make. This didn't actually fix it though, it appears the CMakeLists.txt is misconfigured slightly. (notice the error is with scythe but not footswitch!)
Solution
I've edited the CMakeLists.txt so that it manually specifies target includes per exe, rather than relying on the global include.
Additionally I edited the brew to run
cmake ./before it tries to make install, and added cmake to the build dependencies.I've also added some temp cmake files to the gitignore.
Tested locally it now works for my specific context.

I tried my best to keep the changes as small as possible as to be easy to review, I have no way to test if this also works for mac! Sorry!
Afterword
Thank you so much for making such an awesome tool! Was sweating thinking about booting up a windows VM and forwarding my ports to it just so I can change the key it presses. This is a wonderful and miraculous alternative that I wouldn't have a clue how to make from scratch.