From c0c7ccb526330c3e399c9ed7c95acb147eeebf17 Mon Sep 17 00:00:00 2001 From: Daniel Nelson Date: Wed, 14 Mar 2012 00:34:00 -0700 Subject: The Silver Searcher 0.3 The Silver Searcher (ag) is a faster, smarter, replacement for ack (and grep), written in C. Closes #10933. Signed-off-by: Adam Vandenberg --- Library/Formula/the_silver_searcher.rb | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 Library/Formula/the_silver_searcher.rb (limited to 'Library') diff --git a/Library/Formula/the_silver_searcher.rb b/Library/Formula/the_silver_searcher.rb new file mode 100644 index 000000000..da6c4a68f --- /dev/null +++ b/Library/Formula/the_silver_searcher.rb @@ -0,0 +1,34 @@ +require 'formula' + +class TheSilverSearcher < Formula + homepage 'https://github.com/ggreer/the_silver_searcher' + url 'https://github.com/ggreer/the_silver_searcher/tarball/0.3' + md5 'd45bf240e3219f9392b5b3cc7a66056c' + head 'https://github.com/ggreer/the_silver_searcher.git' + + if MacOS.xcode_version >= '4.3' + depends_on 'automake' => :build + depends_on 'autoconf' => :build + end + depends_on 'pkg-config' => :build + depends_on 'pcre' + + + def install + # Stable tarball does not include pre-generated configure script + system "aclocal -I /usr/local/share/aclocal" + system "autoconf" + system "autoheader" + system "automake --add-missing" + + system "./configure", "--disable-debug", + "--disable-dependency-tracking", + "--prefix=#{prefix}" + system "make" + system "make install" + end + + def test + system "#{bin}/ag --version" + end +end -- cgit v1.2.3