rthornton128 / goncurses

NCurses Library for Go
Other
383 stars 51 forks source link

Add build support for Mac OSX and OpenBSD #33

Closed sid77 closed 8 years ago

sid77 commented 8 years ago

Hi! This PR adds native build support for both Mac OSX and OpenBSD (and any other UNIXes with system installed ncurses can just follow along). One small issue: since both of these operating systems still have ncurses 5.8, I wasn't able to find a good substitute for the is_subwin(win) function though.

rthornton128 commented 8 years ago

I am not a BSD user but from what I can see pkg-config is available and often installed on those systems. Is this dependency a real problem for users running various BSD's?

OSX, to my knowledge, doesn't have it installed by default but most devs install it via homebrew or Macports.

My problem with this request isn't the request itself, as I have been contemplating doing this very thing, but whether it shouldn't be done for all architectures.

sid77 commented 8 years ago

These two BSDs have system installed ncurses in /usr/lib and /usr/include, the main issue with pkg-config is that it's a third party tool which doesn't ship with .pc files for system libraries (and obviously shouldn't) and the two OSes don't have them since pkg-config is not part of their distribution.

tevino commented 8 years ago

Works great on El Capitan, OS X 10.11.4 (15E65) without extra .pc files.

Related: http://mrcook.uk/how-to-install-go-ncurses-on-mac-osx