New formula: lemon

Signed-off-by: Adam Vandenberg <flangy@gmail.com>
master
Josh Pschorr 2010-08-04 00:29:47 -04:00 committed by Adam Vandenberg
parent 9ba6afe3ec
commit a3c823c98b
1 changed files with 20 additions and 0 deletions

20
Formula/lemon.rb Normal file
View File

@ -0,0 +1,20 @@
require 'formula'
class Lemon <Formula
url 'http://tx97.net/pub/distfiles/lemon-1.69.tar.bz2'
homepage 'http://www.hwaci.com/sw/lemon/'
md5 '35aebc84c4f0e186aba1303bbef11a37'
def install
lemon_share = share+'lemon'
lemon_share.install 'lempar.c'
# patch the parser generator to look for the 'lempar.c' template file where we've installed it
lempar_path = lemon_share+'lempar.c'
inreplace 'lemon.c', / = pathsearch\([^)]*\);/, " = \"#{lempar_path}\";"
system ENV.cc, '-o', 'lemon', 'lemon.c'
bin.install 'lemon'
end
end