aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Vandenberg2011-05-02 14:30:50 -0700
committerAdam Vandenberg2011-05-02 14:30:50 -0700
commit3a77bf28c09798b58897b3c6b45af3ba5be5cad2 (patch)
treed738e5f7c414fc821ee464f8f2093aa7d83d0a4b
parent1abf6327d7b16149c110d37599e3eccdfd56a24b (diff)
downloadhomebrew-3a77bf28c09798b58897b3c6b45af3ba5be5cad2.tar.bz2
figlet: fix compilation
-rw-r--r--Library/Formula/figlet.rb49
1 files changed, 9 insertions, 40 deletions
diff --git a/Library/Formula/figlet.rb b/Library/Formula/figlet.rb
index 165b123d8..19f622244 100644
--- a/Library/Formula/figlet.rb
+++ b/Library/Formula/figlet.rb
@@ -17,58 +17,27 @@ class Figlet < Formula
homepage 'http://www.figlet.org'
md5 'ea048d8d0b56f9c58e55514d4eb04203'
- def fonts
- share + "figlet/fonts"
- end
-
- def patches
- DATA
- end
-
def install
+ share_fonts = share+"figlet/fonts"
+
File.chmod 0666, 'Makefile'
File.chmod 0666, 'showfigfonts'
man6.mkpath
bin.mkpath
- ContribFonts.new.brew { fonts.install Dir['*'] }
- InternationalFonts.new.brew { fonts.install Dir['*'] }
+ ContribFonts.new.brew { share_fonts.install Dir['*'] }
+ InternationalFonts.new.brew { share_fonts.install Dir['*'] }
inreplace "Makefile" do |s|
s.gsub! "/usr/local/", "#{prefix}/"
- s.change_make_var! 'DEFAULTFONTDIR', fonts
+ s.change_make_var! 'DEFAULTFONTDIR', share_fonts
s.change_make_var! 'MANDIR', man6
end
system "make install"
end
-end
-__END__
-diff --git a/showfigfonts b/showfigfonts
-index 643c60b..543379c 100644
---- a/showfigfonts
-+++ b/showfigfonts
-@@ -14,6 +14,7 @@
- DIRSAVE=`pwd`
- cd `dirname "$0"`
- PATH="$PATH":`pwd`
-+FIGDIR=`pwd`
- cd "$DIRSAVE"
-
- # Get figlet version
-@@ -42,12 +43,12 @@ else
- FONTDIR="`figlet -F | sed -e '1d' -e '3,$d' -e 's/Font directory: //'`"
- else
- # figlet 2.1 or later
-- FONTDIR="`figlet -I2`"
-+ FONTDIR="`${FIGDIR}/figlet -I2`"
- fi
- fi
-
- cd "$FONTDIR"
--FONTLIST=`ls *.flf | sed s/\.flf$//`
-+FONTLIST=`ls *.fl* | sed s/\.fl.$//`
- cd $DIRSAVE
- for F in $FONTLIST ; do
- echo "$F" :
+ def test
+ system "figlet -f larry3d hello, figlet"
+ end
+end