Latest htop src now compiles almost out-of-the-box on Mac - re: htop-osx.rb #45197
Comments
We don't allow formulae in core with mandatory (or even recommended) dependencies on taps, so
Yep. You'd also want to remove the alias that currently points |
I tried this with ncurses installed and I get a error on 10.11:
|
@StarDuster you forgot to patch darwin/Platform.h? It should look like this after you modify it:
|
@edrozenberg I'm sorry for my stupid mistake,it works now |
As the header files are autogenerated one should better patch darwin/Platform.c (the header definitions are in there). I already made a pullrequest to the htop repo with this fix. |
@kaefer thanks for following up on that, the htop developer recently fixed the issue via hishamhm/htop@a7fcbba so patching Platform.c/.h is no longer necessary. |
I think it should be possible to get unicode support enabled without a duplicate ncurses. OS X's ncurses does have wide-character support, even though it doesn't install an ncursesw; I see that htop's configure.ac just checks to see the library name, rather than for function availability, so it's mistakenly rejecting OS X's ncurses. |
Thanks Misty, I created a new issue at the htop project based on your feedback. The Mac's ncurses is version 5.x, and homebrew ncurses is 6.x - I also mentioned this in the htop issue in case it's relevant. |
@mistydemeo htop developer fixed the ncurses issue via recent commit hishamhm/htop@3471415 htop now compiles out-of-the-box on Mac with:
I still need to put together a brew formula for this, should be easy since it doesn't need to do anything special now. |
@edrozenberg If you do: ask him for a new tag and then we can build a new release. |
Note regarding building htop with default ncurses (version 5) from Mac OS X vs. ncurses (version 6) from homebrew:
For reference see hishamhm/htop#322 |
@MikeMcQuaid Waiting on a release tag from htop, looks like will happen later this month (Jan 2016). |
@edrozenberg Great! |
@MikeMcQuaid @edrozenberg As promised in FOSDEM, here's the release of htop 2.0! http://hisham.hm/htop/releases/2.0.0/ Thank you for your patience! :) |
Thanks for letting us known @hishamhm! |
Closing in favor of #49057. |
htop now supports OS X. This replaces the alias to htop-osx. Fixes Homebrew#45197. Fixes Homebrew#49054. Closes Homebrew#49057. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Regarding htop-osx.rb
The htop author has put work into making htop work on the Mac. I compiled the latest github htop source and it worked fine, with a couple of fixes from hishamhm/htop#292 (comment) -> all credit to @skabashnyuk for figuring this out.
Specifically:
Patched darwin/Platform.h to add "SignalsPanel.h" headers:
Install ncurses from homebrew/dupes to support unicode (otherwise can pass --disable-unicode to configure):
And then the htop compile for the github source:
I'm not a formula expert but could take a try at doing an htop formula for this recent source code, would it then be a new formula htop.rb rather than the htop-osx.rb which is very mac specific?
The text was updated successfully, but these errors were encountered: