diff options
| author | Jack Nagel | 2014-03-24 20:52:08 -0500 |
|---|---|---|
| committer | Jack Nagel | 2014-03-24 20:52:08 -0500 |
| commit | 0d454d2c03a088a0beccb07b5782d01386cdcf18 (patch) | |
| tree | 086866ba3b13653208bc7edc7e832bb3dbe149ad /Library/Formula | |
| parent | 5a83b1a68eed67b4ab89832d23ee5f69384e33cd (diff) | |
| download | homebrew-0d454d2c03a088a0beccb07b5782d01386cdcf18.tar.bz2 | |
shapelib: use install_symlink, drop inreplace
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/shapelib.rb | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/Library/Formula/shapelib.rb b/Library/Formula/shapelib.rb index 4cd90bfa5..48cfac495 100644 --- a/Library/Formula/shapelib.rb +++ b/Library/Formula/shapelib.rb @@ -8,29 +8,22 @@ class Shapelib < Formula def install dylib = lib+"libshp.#{version}.dylib" - inreplace 'Makefile' do |s| - s.change_make_var! 'CFLAGS', ENV.cflags - s.change_make_var! 'PREFIX', prefix - s.gsub! '#CC = g++', "CC = #{ENV.cc}" - end - system 'make' + system "make", "CC=#{ENV.cc}", + "CFLAGS=#{ENV.cflags}", + "PREFIX=#{prefix}" lib.mkpath - system ENV.cc, *%W(-dynamiclib -all_load - -install_name #{dylib} - -headerpad_max_install_names - -compatibility_version #{version} + system ENV.cc, *%W[-dynamiclib -Wl,-all_load + -Wl,-install_name,#{dylib} + -Wl,-headerpad_max_install_names + -Wl,-compatibility_version,#{version} -o #{dylib} - shpopen.o shptree.o dbfopen.o safileio.o) + shpopen.o shptree.o dbfopen.o safileio.o] - include.install 'shapefil.h' - bin.install %w( - shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptreedump - ) + include.install "shapefil.h" + bin.install %w[shpcreate shpadd shpdump shprewind dbfcreate dbfadd dbfdump shptreedump] - cd lib do - ln_s "libshp.#{version}.dylib", "libshp.#{version.to_s.split('.').first}.dylib" - ln_s "libshp.#{version}.dylib", "libshp.dylib" - end + lib.install_symlink dylib.basename => "libshp.#{version.to_s.split(".").first}.dylib" + lib.install_symlink dylib.basename => "libshp.dylib" end end |
