hundredrabbits / Orca-c

Live Programming Environment(C Port)
http://wiki.xxiivv.com/orca
MIT License
480 stars 48 forks source link

Homebrew thingy for Mac #55

Open cancel opened 4 years ago

cancel commented 4 years ago

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 commented 4 years ago

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

neauoire commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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 commented 4 years ago

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

cancel commented 4 years ago

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 commented 4 years ago

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 commented 1 year ago

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:

dfischer commented 1 year ago

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