diff options
| author | Adam Vandenberg | 2010-06-13 14:12:08 -0700 |
|---|---|---|
| committer | Adam Vandenberg | 2010-06-13 14:12:08 -0700 |
| commit | 975d8928af601104c69b04f04d8144c8aba675f3 (patch) | |
| tree | 95cd5725bbea8e83fbdd615fdf0074d46294f007 /Library/Formula | |
| parent | 67ed6a3fd77528af2f25424774174e15305bc2ba (diff) | |
| download | homebrew-975d8928af601104c69b04f04d8144c8aba675f3.tar.bz2 | |
hllib - use inreplace block form
Diffstat (limited to 'Library/Formula')
| -rw-r--r-- | Library/Formula/hllib.rb | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Library/Formula/hllib.rb b/Library/Formula/hllib.rb index 9b91c7d4e..43c0666cf 100644 --- a/Library/Formula/hllib.rb +++ b/Library/Formula/hllib.rb @@ -11,18 +11,18 @@ class Hllib <Formula cd 'HLLib' do # Set perms so we can replace the strings chmod 0777, 'Makefile' - # Set prefix correctly - inreplace 'Makefile', '/usr/local', prefix - # Remove -soname directive - inreplace 'Makefile', '-shared -Wl,-soname,libhl.so.2', '-shared -Wl' - # Ownership isn't needed here - inreplace 'Makefile', ' -g root', '' - inreplace 'Makefile', ' -o root', '' - # .dylib is the OS X equivalent of .so - inreplace 'Makefile', 'libhl.so.$(HLLIB_VERS)', 'libhl.$(HLLIB_VERS).dylib' - inreplace 'Makefile', 'rm -f \#* *~ *.o *.so.*', 'rm -f \#* *~ *.o *.dylib' - inreplace 'Makefile', '$(PREFIX)/lib/libhl.so.2', '$(PREFIX)/lib/libhl.2.dylib' - inreplace 'Makefile', '$(PREFIX)/lib/libhl.so', '$(PREFIX)/lib/libhl.dylib' + inreplace 'Makefile' do |s| + # Set prefix correctly + s.gsub! '/usr/local', prefix + # Remove -soname directive + s.gsub! '-shared -Wl,-soname,libhl.so.2', '-shared -Wl' + # Ownership isn't needed here + s.gsub! %r{ -[og] root}, '' + # .dylib is the OS X equivalent of .so + s.gsub! 'libhl.so.$(HLLIB_VERS)', 'libhl.$(HLLIB_VERS).dylib' + s.gsub! '$(PREFIX)/lib/libhl.so.2', '$(PREFIX)/lib/libhl.2.dylib' + s.gsub! '$(PREFIX)/lib/libhl.so', '$(PREFIX)/lib/libhl.dylib' + end # Install system "make install" end |
