2010-08-04 04:29:47 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Lemon < Formula
|
2010-08-04 04:29:47 +00:00
|
|
|
homepage 'http://www.hwaci.com/sw/lemon/'
|
2013-01-29 05:35:16 +00:00
|
|
|
url 'http://tx97.net/pub/distfiles/lemon-1.69.tar.bz2'
|
2012-09-03 18:33:56 +00:00
|
|
|
sha1 '3f368f5f93c37890a025c3d803b3598a939d615f'
|
2010-08-04 04:29:47 +00:00
|
|
|
|
|
|
|
def install
|
2013-01-29 05:35:16 +00:00
|
|
|
(share/'lemon').install 'lempar.c'
|
2010-08-04 04:29:47 +00:00
|
|
|
|
|
|
|
# patch the parser generator to look for the 'lempar.c' template file where we've installed it
|
2013-01-29 05:35:16 +00:00
|
|
|
inreplace 'lemon.c', / = pathsearch\([^)]*\);/, " = \"#{share}/lemon/lempar.c\";"
|
2010-08-04 04:29:47 +00:00
|
|
|
|
|
|
|
system ENV.cc, '-o', 'lemon', 'lemon.c'
|
|
|
|
bin.install 'lemon'
|
|
|
|
end
|
|
|
|
end
|