Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Commit

Permalink
htop 2.0.0 (new formula)
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
tamird authored and flier committed Feb 17, 2016
1 parent 29c5829 commit e7bf85c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 4 deletions.
1 change: 0 additions & 1 deletion Library/Aliases/htop

This file was deleted.

7 changes: 4 additions & 3 deletions Library/Formula/htop-osx.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ class HtopOsx < Formula
depends_on "automake" => :build
depends_on "libtool" => :build

conflicts_with "htop", :because => "both install an `htop` binary"

def install
# Otherwise htop will segfault when resizing the terminal
ENV.no_optimization if ENV.compiler == :clang
Expand All @@ -24,15 +26,14 @@ def install
end

def caveats; <<-EOS.undent
htop-osx requires root privileges to correctly display all running processes.
htop-osx requires root privileges to correctly display all running processes,
so you will need to run `sudo htop`.
You should be certain that you trust any software you grant root privileges.
EOS
end

test do
ENV["TERM"] = "xterm"
pipe_output("#{bin}/htop", "q")
assert $?.success?
pipe_output("#{bin}/htop", "q", 0)
end
end
30 changes: 30 additions & 0 deletions Library/Formula/htop.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
class Htop < Formula
desc "Improved top (interactive process viewer)"
homepage "https://github.com/hishamhm/htop"
url "https://github.com/hishamhm/htop/archive/2.0.0.tar.gz"
sha256 "2522a93792dfee188bfaff23f30332d1173460c95f9869588398e9bdd3a0491b"

depends_on "autoconf" => :build
depends_on "automake" => :build
depends_on "libtool" => :build

conflicts_with "htop-osx", :because => "both install an `htop` binary"

def install
system "./autogen.sh"
system "./configure", "--prefix=#{prefix}"
system "make", "install"
end

def caveats; <<-EOS.undent
htop requires root privileges to correctly display all running processes,
so you will need to run `sudo htop`.
You should be certain that you trust any software you grant root privileges.
EOS
end

test do
ENV["TERM"] = "xterm"
pipe_output("#{bin}/htop", "q", 0)
end
end

0 comments on commit e7bf85c

Please sign in to comment.