2011-01-06 13:45:40 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Cdecl < Formula
|
2011-01-06 13:45:40 +00:00
|
|
|
url 'http://cdecl.org/files/cdecl-blocks-2.5.tar.gz'
|
|
|
|
homepage 'http://cdecl.org/'
|
|
|
|
md5 'c1927e146975b1c7524cbaf07a7c10f8'
|
|
|
|
|
|
|
|
def install
|
2011-08-29 02:02:22 +00:00
|
|
|
# Fix namespace clash with Lion's getline
|
|
|
|
inreplace "cdecl.c", "getline", "cdecl_getline"
|
|
|
|
|
2011-01-06 13:45:40 +00:00
|
|
|
inreplace "Makefile" do |s|
|
|
|
|
s.change_make_var! "CC", ENV.cc
|
|
|
|
s.change_make_var! "CFLAGS", "#{ENV.cflags} -DBSD -DUSE_READLINE"
|
|
|
|
s.change_make_var! "LIBS", "-lreadline"
|
|
|
|
s.change_make_var! "BINDIR", bin
|
|
|
|
s.change_make_var! "MANDIR", man1
|
|
|
|
end
|
2011-08-29 02:02:22 +00:00
|
|
|
|
2011-01-06 13:45:40 +00:00
|
|
|
system "make"
|
|
|
|
bin.mkdir
|
|
|
|
man1.mkpath
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|