dex 1.0 (new formula)

dex is a small and easy to use text editor

Closes Homebrew/homebrew#40477.

Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
Alex Zinchenko 2015-06-07 18:31:00 +03:00 committed by Mike McQuaid
parent 7c4b52aabc
commit eb083bfd3f

27
Formula/dex.rb Normal file
View file

@ -0,0 +1,27 @@
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