summaryrefslogtreecommitdiff
path: root/homebrew/tpp/.make.sh-auto
diff options
context:
space:
mode:
Diffstat (limited to 'homebrew/tpp/.make.sh-auto')
-rw-r--r--homebrew/tpp/.make.sh-auto16
1 files changed, 16 insertions, 0 deletions
diff --git a/homebrew/tpp/.make.sh-auto b/homebrew/tpp/.make.sh-auto
new file mode 100644
index 000000000..ca0742c28
--- /dev/null
+++ b/homebrew/tpp/.make.sh-auto
@@ -0,0 +1,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"