aboutsummaryrefslogtreecommitdiffstats
path: root/Library/Formula/optipng.rb
diff options
context:
space:
mode:
authorAdam Vandenberg2010-02-19 11:19:01 -0800
committerAdam Vandenberg2010-02-21 23:37:49 -0800
commitaad4dc23ece5869165b23f9637475503d2491db8 (patch)
tree733f6c214af986df9db5c04728588fadaae2fbb2 /Library/Formula/optipng.rb
parenta6caeff4507f4502f5b9d9435ba009564e7c0669 (diff)
downloadhomebrew-aad4dc23ece5869165b23f9637475503d2491db8.tar.bz2
Use more inreplace features.
Update formulas to make more idiomatic use of "inreplace", including its new ability to take a list of files to act on.
Diffstat (limited to 'Library/Formula/optipng.rb')
-rw-r--r--Library/Formula/optipng.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/Library/Formula/optipng.rb b/Library/Formula/optipng.rb
index fa1e4a92e..ea3eaf1de 100644
--- a/Library/Formula/optipng.rb
+++ b/Library/Formula/optipng.rb
@@ -6,8 +6,10 @@ class Optipng <Formula
md5 '6cef405197a878acff4c6216cf38e871'
def install
- inreplace 'src/scripts/gcc.mak.in', '/usr/local', prefix
- inreplace 'src/scripts/gcc.mak.in', 'mandir=$(prefix)/man', 'mandir=$(prefix)/share/man'
+ inreplace 'src/scripts/gcc.mak.in' do |s|
+ s.gsub! '/usr/local', prefix
+ s.change_make_var! 'mandir', man
+ end
system "./configure", "-with-system-zlib"
system "make install"
end