colormake 0.9

Upgrade colormake to version 0.9.
Use `EOS.undent` to clean up the formatting.
Change the location of the perl file from `share` to `libexec`.
Tested on Lion with XCode-4.3.3 by compiling gawk using `colormake`
in place of the command `make`.

Closes Homebrew/homebrew#12815.
Closes Homebrew/homebrew#12828.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
master
nibbles 2bits 2012-06-13 22:26:59 -07:00 committed by Jack Nagel
parent 62203cdef8
commit a520200829
1 changed files with 15 additions and 16 deletions

View File

@ -1,28 +1,27 @@
require 'formula' require 'formula'
class Colormake < Formula class Colormake < Formula
url 'http://bre.klaki.net/programs/colormake/colormake-0.2.tar.gz'
homepage 'http://bre.klaki.net/programs/colormake/' homepage 'http://bre.klaki.net/programs/colormake/'
md5 '1029dae70e7a23cff0f6a11f3ceffbe1' url 'http://bre.klaki.net/programs/colormake/colormake-0.9.tar.gz'
sha1 '6c5ab4be23d60ec79ed4c43cbeb142bfd4a4e626'
def install def install
where_to = (share+'colormake') libexec.install 'colormake.pl'
where_to.install 'colormake.pl'
# The following two scripts are not the ones shipped with colormake, # The following two scripts are not the ones shipped with colormake,
# but heavily based on the ones used by Debian. # but heavily based on the ones used by Debian.
(bin+'colormake').write <<-EOS (bin+'colormake').write <<-EOS.undent
#!/bin/sh #!/bin/sh
/usr/bin/make \"$@\" 2>&1 | #{where_to}/colormake.pl /usr/bin/make \"$@\" 2>&1 | #{libexec}/colormake.pl
exit ${PIPESTATUS[0]} exit ${PIPESTATUS[0]}
EOS EOS
(bin+'clmake').write <<-EOS (bin+'clmake').write <<-EOS.undent
#!/bin/sh #!/bin/sh
SIZE=`/bin/stty size` SIZE=`/bin/stty size`
[ -z "${CLMAKE_OPTS}" ] && CLMAKE_OPTS='-r -pError' [ -z "${CLMAKE_OPTS}" ] && CLMAKE_OPTS='-r -pError'
/usr/bin/make \"$@\" 2>&1 | #{where_to}/colormake.pl $SIZE | /usr/bin/less ${CLMAKE_OPTS} /usr/bin/make \"$@\" 2>&1 | #{libexec}/colormake.pl $SIZE | /usr/bin/less ${CLMAKE_OPTS}
exit ${PIPESTATUS[0]} exit ${PIPESTATUS[0]}
EOS EOS
end end
end end