From 8f1e1908f47d2232ddc8ec1e78fc344e7cae18ac Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Sun, 31 May 2015 10:29:00 -0700 Subject: [PATCH] vifm: new homepage, add HEAD Closes Homebrew/homebrew#40243. Signed-off-by: Baptiste Fontaine --- Formula/vifm.rb | 29 +++++++++++++++++++++-------- 1 file changed, 21 insertions(+), 8 deletions(-) diff --git a/Formula/vifm.rb b/Formula/vifm.rb index 1f4daf35bb..6f1ebd0dff 100644 --- a/Formula/vifm.rb +++ b/Formula/vifm.rb @@ -1,9 +1,14 @@ -require "formula" - class Vifm < Formula - homepage "http://vifm.sourceforge.net/index.html" + homepage "http://vifm.info/" url "https://downloads.sourceforge.net/project/vifm/vifm/vifm-0.7.8.tar.bz2" - sha256 '5dfbb26c2038a58dcff12026dab736e29d547b4aa3ff5912e4d844064c9e7603' + mirror "https://github.com/vifm/vifm/releases/download/v0.7.8/vifm-0.7.8.tar.bz2" + sha256 "5dfbb26c2038a58dcff12026dab736e29d547b4aa3ff5912e4d844064c9e7603" + + head do + url "https://github.com/vifm/vifm.git" + depends_on "automake" => :build + depends_on "autoconf" => :build + end bottle do sha1 "9c91b72060c3fb9abf43cecc1a2304816deb0334" => :yosemite @@ -12,10 +17,18 @@ class Vifm < Formula end def install - system "./configure", "--disable-dependency-tracking", - "--prefix=#{prefix}" - + args = %W[--disable-dependency-tracking --prefix=#{prefix}] + if build.head? + system "./autogen.sh", *args + else + system "./configure", *args + end ENV.deparallelize - system "make install" + system "make", "install" + end + + test do + ENV["TERM"] = "xterm" + system bin/"vifm", "-c", ":q" end end