Skip to content

Instantly share code, notes, and snippets.

@zeekay
Created April 26, 2012 07:42
Show Gist options
  • Select an option

  • Save zeekay/2497254 to your computer and use it in GitHub Desktop.

Select an option

Save zeekay/2497254 to your computer and use it in GitHub Desktop.
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment