eb083bfd3f
dex is a small and easy to use text editor Closes Homebrew/homebrew#40477. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
27 lines
705 B
Ruby
27 lines
705 B
Ruby
class Dex < Formula
|
|
desc "Dextrous text editor"
|
|
homepage "https://github.com/tihirvon/dex"
|
|
url "https://github.com/tihirvon/dex/archive/v1.0.tar.gz"
|
|
sha256 "4468b53debe8da6391186dccb78288a8a77798cb4c0a00fab9a7cdc711cd2123"
|
|
|
|
head "https://github.com/tihirvon/dex.git"
|
|
|
|
depends_on "homebrew/dupes/ncurses" => :optional
|
|
depends_on "homebrew/dupes/libiconv" => :optional
|
|
|
|
def install
|
|
args = ["prefix=#{prefix}",
|
|
"CC=#{ENV.cc}",
|
|
"HOST_CC=#{ENV.cc}"]
|
|
|
|
args << "VERSION=#{version}" if build.head?
|
|
|
|
inreplace "Makefile", /-lcurses/, "-lncurses" if build.with? "ncurses"
|
|
|
|
system "make", "install", *args
|
|
end
|
|
|
|
test do
|
|
system bin/"dex", "-V"
|
|
end
|
|
end
|