From 06b0fc302fa57dfb9a662de3f2b9a73c10cb0036 Mon Sep 17 00:00:00 2001 From: Alex Dunn Date: Wed, 12 Aug 2015 22:40:20 -0700 Subject: [PATCH] crush-tools 20150716 Closes Homebrew/homebrew#42887. --- Formula/crush-tools.rb | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/Formula/crush-tools.rb b/Formula/crush-tools.rb index 6f9fe0f58b..c8746951fc 100644 --- a/Formula/crush-tools.rb +++ b/Formula/crush-tools.rb @@ -1,22 +1,29 @@ -require 'formula' - class CrushTools < Formula desc "Command-line tools for processing delimited text data" - homepage 'http://crush-tools.googlecode.com/' - url 'https://crush-tools.googlecode.com/files/crush-tools-2013-04.tar.gz' - version '2013-04' - sha1 'a03a9d4719e8e049d836413598b636fd00f6a4cc' + homepage "https://github.com/google/crush-tools" + url "https://github.com/google/crush-tools/releases/download/20150716/crush-tools-20150716.tar.gz" + sha256 "ef2f9c919536a2f13b3065af3a9a9756c90ede53ebd67d3e169c90ad7cd1fb05" - depends_on 'pcre' + head do + url "https://github.com/google/crush-tools.git" + depends_on "automake" => :build + depends_on "autoconf" => :build + depends_on "libtool" => :build + end - conflicts_with 'aggregate', :because => 'both install an `aggregate` binary' + conflicts_with "aggregate", :because => "both install an `aggregate` binary" + + depends_on "pcre" def install - # find Homebrew's libpcre - ENV.append 'LDFLAGS', "-L#{HOMEBREW_PREFIX}/lib" - + system "./bootstrap" if build.head? system "./configure", "--disable-dependency-tracking", "--prefix=#{prefix}" - system "make install" + system "make", "install" + end + + test do + assert_equal "1 2 6 7 8 9 10", shell_output("#{bin}/range 1,2,6-10").strip + assert_equal "o", shell_output("#{bin}/tochar 111") end end