aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula
diff options
context:
space:
mode:
authorOri Livneh2014-10-05 10:19:04 -0700
committerMike McQuaid2014-11-05 11:20:39 +0000
commit212e68ffef22fab99e49c887a6ea8de4871de10c (patch)
tree1798f95cf69b8736e04d7e6f4e40b7f307e42a6b /Library/Formula
parent0b7028d983a326af32cab486151aca11f0df3c97 (diff)
downloadhomebrew-212e68ffef22fab99e49c887a6ea8de4871de10c.tar.bz2
hh 1.13
Closes #32947. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Formula')
-rw-r--r--Library/Formula/hh.rb36
1 files changed, 36 insertions, 0 deletions
diff --git a/Library/Formula/hh.rb b/Library/Formula/hh.rb
new file mode 100644
index 000000000..95734c60f
--- /dev/null
+++ b/Library/Formula/hh.rb
@@ -0,0 +1,36 @@
+require "formula"
+
+class Hh < Formula
+ homepage "https://github.com/dvorka/hstr"
+ url "https://github.com/dvorka/hstr/releases/download/1.13/hh-1.13-src.tgz"
+ sha1 "09fee6d687a8b8a7c6f508ced071fb88b0a9bb28"
+
+ head do
+ url "https://github.com/dvorka/hstr.git"
+ depends_on :autoconf
+ depends_on :automake
+ depends_on :libtool
+ end
+
+ depends_on "readline"
+
+ def install
+ # Upstream bug report for curses/ncursesw:
+ # https://github.com/dvorka/hstr/issues/103
+ if build.head?
+ inreplace %w(src/hstr.c src/include/hstr_curses.h), "ncursesw/", ""
+ system "autoreconf", "-fvi"
+ end
+ 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