forked from keitheis/homebrew-dupes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrep.rb
25 lines (21 loc) · 733 Bytes
/
grep.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
require 'formula'
class Grep < Formula
homepage 'http://www.gnu.org/software/grep/'
url 'http://ftpmirror.gnu.org/grep/grep-2.12.tar.xz'
mirror 'http://ftp.gnu.org/gnu/grep/grep-2.12.tar.xz'
md5 '8d2f0346d08b13c18afb81f0e8aa1e2f'
depends_on 'pcre'
def install
# find the correct libpcre
pcre = Formula.factory('pcre')
ENV.append 'LDFLAGS', "-L#{pcre.lib} -lpcre"
ENV.append 'CPPFLAGS', "-I#{pcre.include}"
system "./configure", "--disable-dependency-tracking",
"--disable-nls",
"--prefix=#{prefix}",
"--infodir=#{info}",
"--mandir=#{man}"
system "make"
system "make install"
end
end