require 'formula' class Screen 'master' def patches unless ARGV.build_head? # fixes stropts.h compile error (patch from MacPorts: # https://trac.macports.org/ticket/13009), not necessary with --HEAD { :p0 => "https://trac.macports.org/raw-attachment/ticket/13009/patch-pty.c" } end end def install if ARGV.build_head? ENV['CC'] = "gcc" cd 'src' system "autoheader" system "autoconf" end system "./configure", "--enable-colors256", "--mandir=#{man}", "--infodir=#{info}", "--prefix=#{prefix}" system "make" system "make install" end end