aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/grep.rb
blob: 7dd4d0afa725c8caf80c24c4d13381fa13b42e29 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require 'formula'

class Grep <Formula
  homepage 'http://www.gnu.org/software/grep/'
  url 'http://mirror.its.uidaho.edu/pub/gnu/grep/grep-2.5.4.tar.bz2'
  md5 '5650ee2ae6ea4b39e9459d7d0585b315'

  depends_on 'gettext'
  depends_on 'pcre'

  def install
    system "./configure", "--prefix=#{prefix}", "--disable-debug",
                          "--disable-dependency-tracking",
                          "--disable-nls",
                          "--infodir=#{info}",
                          "--mandir=#{man}"

    # Configure gives me 2 copies of -lpcre and no -lintl, so fix that
    inreplace "src/Makefile", /^LIBS = .*$/, "LIBS = -lintl  -lpcre"

    system "make"
    system "make install"
  end
end