2009-10-15 08:07:12 +00:00
|
|
|
require 'formula'
|
2009-09-14 16:31:54 +00:00
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Global < Formula
|
2010-03-12 11:29:55 +00:00
|
|
|
homepage 'http://www.gnu.org/software/global/'
|
2012-12-14 13:06:26 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/global/global-6.2.6.tar.gz'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/global/global-6.2.6.tar.gz'
|
|
|
|
sha1 '9c802a8fdc2d50e2a0780eb7033d5bad258c3f42'
|
2009-09-14 16:31:54 +00:00
|
|
|
|
2012-05-31 18:45:28 +00:00
|
|
|
option "without-rebuilding-php-parser", "Don't rebuild PHP parser; use provied parser"
|
|
|
|
|
2009-09-14 16:31:54 +00:00
|
|
|
def install
|
2012-05-31 18:45:28 +00:00
|
|
|
# Rebuilding the PHP parser, see:
|
|
|
|
# http://comments.gmane.org/gmane.comp.gnu.global.bugs/1439
|
|
|
|
unless build.include? "without-rebuilding-php-parser"
|
|
|
|
system "flex -o libparser/php.c libparser/php.l"
|
|
|
|
end
|
|
|
|
|
|
|
|
system "./configure", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}"
|
2009-09-14 16:31:54 +00:00
|
|
|
system "make install"
|
2010-04-07 05:58:35 +00:00
|
|
|
|
2009-09-14 16:31:54 +00:00
|
|
|
# we copy these in already
|
2012-05-31 18:45:28 +00:00
|
|
|
cd share/'gtags' do
|
2010-04-07 05:58:35 +00:00
|
|
|
rm %w[README COPYING LICENSE INSTALL ChangeLog AUTHORS]
|
2010-02-17 14:10:26 +00:00
|
|
|
end
|
2009-09-14 16:31:54 +00:00
|
|
|
end
|
2012-05-31 18:45:28 +00:00
|
|
|
|
|
|
|
def caveats; <<-EOS.undent
|
|
|
|
GNU GLOBAL is distributed with a PHP parser generated with an
|
|
|
|
old version of flex(1). That parser has some limitation. See:
|
|
|
|
http://comments.gmane.org/gmane.comp.gnu.global.bugs/1439
|
|
|
|
|
|
|
|
Installing GNU GLOBAL with Homebrew will therefor rebuild the
|
|
|
|
PHP parser using Mac OS X' newer version of flex(1) which
|
|
|
|
generates a parser without the limit.
|
|
|
|
|
|
|
|
You can install GNU GLOBAL without rebuilding the PHP parser
|
|
|
|
(and instead use the parser distributed by GNU GLOBAL) by using
|
|
|
|
the option '--without-rebuilding-php-parser':
|
|
|
|
|
|
|
|
brew install global --without-rebuilding-php-parser
|
|
|
|
|
|
|
|
Use i.e. if you want to be sure whether a problem is caused by
|
|
|
|
the rebuild parser or some other thing in GNU GLOBAL.
|
|
|
|
EOS
|
|
|
|
end
|
2009-09-14 16:31:54 +00:00
|
|
|
end
|