Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebrew thingy for Mac #55

Open
cancel opened this issue Jan 31, 2020 · 9 comments
Open

Homebrew thingy for Mac #55

cancel opened this issue Jan 31, 2020 · 9 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@cancel
Copy link
Collaborator

cancel commented Jan 31, 2020

It seems like the only reasonable way to get a command-line/terminal program in a usable state onto people's Macs is with Homebrew. I don't really know how Homebrew works internally, though the tool build script I made for orca will check to see if ncurses and portmidi have been installed via Homebrew.

It would be nice if someone could help create a Homebrew thingy (formula? cask? uhh) so that people only have to run 1 command to orca and its dependencies installed and working on a Mac.

@cancel cancel added enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers labels Jan 31, 2020
@cancel
Copy link
Collaborator Author

cancel commented Feb 1, 2020

Apparently there's also still MacPorts. I should test the build tool script against that.

@neauoire
Copy link
Member

neauoire commented Feb 1, 2020

I managed to build on OSX back then without installing anything, I think osx comes with curses installed. I don't have any device with OSX anymore tho--

@cancel
Copy link
Collaborator Author

cancel commented Feb 3, 2020

As of macOS 10.15 (or 10.14?) the version of ncurses that the OS (or Xcode?) ships with has lots of stuff removed from it. For example, it can't handle A_DIM, even though it compiles. Maybe that's a terminfo issue? But, more importantly, it also lacks the 'menu' extension that ncurses typically has, which means that orca-c won't compile, since it relies on that. So 'complete' version of ncurses/curses needs to be installed by another method, such as homebrew or MacPorts. (Nixpkgs might also work, but I have no idea how to deal with that from a simple build script -- I think the nix user would have to deal with it.)

So that's why I think it might be a good idea for someone to make a homebrew thingy for it. Of course, it's not a requirement.

@wraybowling
Copy link

wraybowling commented Feb 10, 2020

I installed Orca-C on MacOS and needed to run brew install ncurses portmidi in order to build. (I had the same trouble on a very stripped down Linux device, The Pocket CHIP, this past weekend. brew works on Linux too and that would've been a lot easier than fighting with Debian 8 package lists) A good place to start would be hosting pre-compiled binaries as part of a github release at https://github.com/hundredrabbits/Orca-c/releases under 'assets' I'm researching how to submit new formulae..

@wraybowling
Copy link

Here's a really basic formula we can copy from. https://github.com/Homebrew/homebrew-core/blob/master/Formula/ansiweather.rb

@cancel
Copy link
Collaborator Author

cancel commented Feb 10, 2020

Orca-c dynamically links against libc and ncurses (plus some other stuff) on Mac, so you can't just post the binary for people to download and run.

I don't think the comments here are good place for documenting how to do this from scratch as you learn. I'd recommend not leaving a series of incremental comments about the topic, and instead post a longer and fleshed-out one once you are ready, if you are going to do this.

Asking questions or pointing out specific things is OK, though.

@wraybowling
Copy link

I started working on this again. Turns out you just use brew create. I've got what I think is a formula that would work, but Homebrew won't accept Orca-c without a stable release.

brewaudit --new-formula Orca-c
orca-c:
  * Head-only (no stable download)
Error: 1 problem in 1 formula detected

@mjrusso
Copy link

mjrusso commented Oct 18, 2022

I (think) the stable release requirement can be sidestepped by using a tap.

Installation would look something like this:

brew install hundredrabbits/tap/orca-c

This particular incantation would require a repository on GitHub named "homebrew-tap", belonging to the hundredrabbits org, with orca-c.rb in the root of the repo. (Official docs; here's an example.)

A few notes:

  • GitHub isn't a requirement; this could live at https://git.sr.ht/~rabbits/homebrew-tap (assuming there's a desire to make this "official")
  • Homebrew is a thing on Linux now too; this could be a handy way to distribute uxn, etc.

@dfischer
Copy link

Hi is my issue helpful or just noise? I created a new one for separation: #86

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

5 participants