forked from keitheis/homebrew-dupes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgrep.rb
26 lines (22 loc) · 796 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
26
require 'formula'
class Grep < Formula
homepage 'http://www.gnu.org/software/grep/'
url 'http://ftpmirror.gnu.org/grep/grep-2.14.tar.xz'
mirror 'http://ftp.gnu.org/gnu/grep/grep-2.14.tar.xz'
sha256 'e70e801d4fbb16e761654a58ae48bf5020621c95c8e35bd864742577685872e1'
depends_on 'xz' => :build
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