summaryrefslogtreecommitdiff
path: root/homebrew/tpp/.make.sh-auto
blob: ca0742c289861d6f128c1ca3e87ab46bfc2d001f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
pkg:setup
lib_ncurses = libexec+"ncurses-ruby"
inreplace "tpp.rb", 'require "ncurses"', <<~EOS
require File.expand_path('#{lib_ncurses}/ncurses_bin.bundle', __FILE__)
require File.expand_path('#{lib_ncurses}/ncurses_sugar.rb', __FILE__)
EOS
bin.install "tpp.rb" => "tpp"
share.install "contrib", "examples"
man1.install "doc/tpp.1"
doc.install "README", "CHANGES", "DESIGN", "COPYING", "THANKS", "README.de"
resource("ncurses-ruby").stage do
inreplace "ncurses_wrap.c", '#include "ncurses_wrap.h"', "#include \"ncurses_wrap.h\"\n#include <sys/time.h>"
inreplace "extconf.rb", '$CFLAGS  += " -g"', '$CFLAGS  += " -g -DNCURSES_OPAQUE=0"'
ruby extconf.rb
make
lib_ncurses.install "lib/ncurses_sugar.rb", "ncurses_bin.bundle"