From e3d3f960bf9c8b8356d7174ccb8d28f2df8dc2ed Mon Sep 17 00:00:00 2001 From: Jack Nagel Date: Thu, 15 Sep 2011 13:10:46 -0500 Subject: xaw3d: use a block inreplace This is a little more tidy. Signed-off-by: Jack Nagel --- Library/Formula/xaw3d.rb | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Library/Formula/xaw3d.rb b/Library/Formula/xaw3d.rb index 95fc2a133..e6960651c 100644 --- a/Library/Formula/xaw3d.rb +++ b/Library/Formula/xaw3d.rb @@ -22,10 +22,12 @@ class Xaw3d < Formula # force usage of /usr/X11/lib when linking, and install into the Cellar # apparently s.change_make_var! silently fails when Makefile variables # are preceded by whitespace, so do it manually - inreplace 'Makefile', 'LDPRELIB = -L$(USRLIBDIR)', 'LDPRELIB = -L$(USRLIBDIR) $(LDFLAGS)' - inreplace 'Makefile', 'USRLIBDIR = /usr/local/lib', "USRLIBDIR = #{lib}" - inreplace 'Makefile', 'SHLIBDIR = /usr/local/lib', "SHLIBDIR = #{lib}" - inreplace 'Makefile', 'INCROOT = /usr/local/include', "INCROOT = #{include}" + inreplace 'Makefile' do |s| + s.gsub! 'LDPRELIB = -L$(USRLIBDIR)', 'LDPRELIB = -L$(USRLIBDIR) $(LDFLAGS)' + s.gsub! 'USRLIBDIR = /usr/local/lib', "USRLIBDIR = #{lib}" + s.gsub! 'SHLIBDIR = /usr/local/lib', "SHLIBDIR = #{lib}" + s.gsub! 'INCROOT = /usr/local/include', "INCROOT = #{include}" + end system 'make' system 'make install' -- cgit v1.2.3