diff options
| author | Adam Vandenberg | 2010-02-19 11:19:01 -0800 |
|---|---|---|
| committer | Adam Vandenberg | 2010-02-21 23:37:49 -0800 |
| commit | aad4dc23ece5869165b23f9637475503d2491db8 (patch) | |
| tree | 733f6c214af986df9db5c04728588fadaae2fbb2 /Library/Formula/shapefile.rb | |
| parent | a6caeff4507f4502f5b9d9435ba009564e7c0669 (diff) | |
| download | homebrew-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/shapefile.rb')
| -rw-r--r-- | Library/Formula/shapefile.rb | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Library/Formula/shapefile.rb b/Library/Formula/shapefile.rb index a7dbf8e06..5d53507a8 100644 --- a/Library/Formula/shapefile.rb +++ b/Library/Formula/shapefile.rb @@ -8,7 +8,9 @@ class Shapefile <Formula def install dylib = lib+"libshp.#{version}.dylib" - inreplace 'Makefile', /CFLAGS\s+=\s+-g/, "CFLAGS = #{ENV['CFLAGS']}" + inreplace 'Makefile' do |s| + s.change_make_var! "CFLAGS", ENV['CFLAGS'] + end system "make all" system "make shptree.o" @@ -22,8 +24,9 @@ class Shapefile <Formula include.install 'shapefil.h' - Dir.chdir lib - FileUtils.ln_s "libshp.#{version}.dylib", "libshp.#{version.split('.').first}.dylib" - FileUtils.ln_s "libshp.#{version}.dylib", "libshp.dylib" + Dir.chdir lib do + FileUtils.ln_s "libshp.#{version}.dylib", "libshp.#{version.split('.').first}.dylib" + FileUtils.ln_s "libshp.#{version}.dylib", "libshp.dylib" + end end end |
