tpp 1.3.1 (new formula)
Closes Homebrew/homebrew#23311. Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
This commit is contained in:
parent
5e82d01b89
commit
a696982626
1 changed files with 40 additions and 0 deletions
40
Formula/tpp.rb
Normal file
40
Formula/tpp.rb
Normal file
|
@ -0,0 +1,40 @@
|
|||
require 'formula'
|
||||
|
||||
class Tpp < Formula
|
||||
homepage 'http://synflood.at/tpp.html'
|
||||
url 'http://synflood.at/tpp/tpp-1.3.1.tar.gz'
|
||||
sha1 'e99fca1d7819c23d4562e3abdacea7ff82563754'
|
||||
|
||||
depends_on 'figlet' => :optional
|
||||
|
||||
resource 'ncurses-ruby' do
|
||||
url 'https://downloads.sf.net/project/ncurses-ruby.berlios/ncurses-ruby-1.3.1.tar.bz2'
|
||||
sha1 'e50018fc906e5048403b277a898117e782e267c4'
|
||||
end
|
||||
|
||||
def install
|
||||
lib_ncurses = libexec+'ncurses-ruby'
|
||||
inreplace 'tpp.rb', 'require "ncurses"', <<-EOS.undent
|
||||
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 'extconf.rb', '$CFLAGS += " -g"',
|
||||
'$CFLAGS += " -g -DNCURSES_OPAQUE=0"'
|
||||
system 'ruby', 'extconf.rb'
|
||||
system 'make'
|
||||
lib_ncurses.install 'lib/ncurses_sugar.rb', 'ncurses_bin.bundle'
|
||||
end
|
||||
end
|
||||
|
||||
test do
|
||||
assert `#{bin}/tpp --version`.chomp ==
|
||||
"tpp - text presentation program #{version}"
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue