2014-10-05 17:19:04 +00:00
|
|
|
class Hh < Formula
|
|
|
|
homepage "https://github.com/dvorka/hstr"
|
2015-01-23 09:24:17 +00:00
|
|
|
url "https://github.com/dvorka/hstr/releases/download/1.15/hh-1.15-src.tgz"
|
|
|
|
sha1 "c97d27687512d1e26828062df300d56159dfa05b"
|
2014-10-05 17:19:04 +00:00
|
|
|
|
2014-11-04 20:02:56 +00:00
|
|
|
bottle do
|
|
|
|
cellar :any
|
2015-01-23 09:34:29 +00:00
|
|
|
sha1 "59c41d99d39acb84ef835312816cff5be669caa3" => :yosemite
|
|
|
|
sha1 "a9cadc7c3cd27290bdaf3d388735795eb394d475" => :mavericks
|
|
|
|
sha1 "2cf6414834cf8dc214cf8ef2c1427e2b37a177a8" => :mountain_lion
|
2014-11-04 20:02:56 +00:00
|
|
|
end
|
|
|
|
|
2014-10-05 17:19:04 +00:00
|
|
|
head do
|
|
|
|
url "https://github.com/dvorka/hstr.git"
|
2014-12-04 17:01:24 +00:00
|
|
|
depends_on "autoconf" => :build
|
|
|
|
depends_on "automake" => :build
|
|
|
|
depends_on "libtool" => :build
|
2014-10-05 17:19:04 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
depends_on "readline"
|
|
|
|
|
|
|
|
def install
|
2015-01-23 09:24:17 +00:00
|
|
|
system "autoreconf", "-fvi" if build.head?
|
2014-10-05 17:19:04 +00:00
|
|
|
# Upstream bug report for curses/ncursesw:
|
|
|
|
# https://github.com/dvorka/hstr/issues/103
|
2015-01-23 09:24:17 +00:00
|
|
|
inreplace %w[src/hstr.c src/include/hstr_curses.h], "ncursesw/", ""
|
2014-10-05 17:19:04 +00:00
|
|
|
inreplace "configure", "ncursesw", "ncurses"
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
|
|
|
system "make", "install"
|
|
|
|
end
|
|
|
|
|
|
|
|
test do
|
|
|
|
path = testpath/".hh_test"
|
|
|
|
path.write "test\n"
|
|
|
|
ENV["HISTFILE"] = path
|
|
|
|
assert_equal "test\n", `#{bin}/hh -n`
|
|
|
|
end
|
|
|
|
end
|