Don't strip all symbols from dylibs

This commit is contained in:
Max Howell 2009-05-23 18:15:58 +01:00
parent dad6dbc6f7
commit d40718f4de

View File

@ -25,7 +25,8 @@ end
def ohai title def ohai title
puts "\033[0;34m==>\033[0;0;1m #{title} \033[0;0m" n=`tput cols`.strip.to_i-4
puts "\033[0;34m==>\033[0;0;1m #{title[0,n]}\033[0;0m"
end end
@ -114,9 +115,15 @@ class Formula
prefix.find do |path| prefix.find do |path|
if path==prefix #rubysucks if path==prefix #rubysucks
next next
elsif path.file? and `file -h #{path}` =~ /Mach-O/ elsif path.file?
puts "strip #{path}" if ARGV.include? '--verbose' fo=`file -h #{path}`
`strip #{path}` args=nil
args='-SxX' if fo =~ /Mach-O dynamically linked shared library/
args='' if fo =~ /Mach-O executable/ #defaults strip everything
if args
puts "Stripping: #{path}" if ARGV.include? '--verbose'
`strip #{args} #{path}`
end
elsif path.directory? and path!=prefix+'bin' and path!=prefix+'lib' elsif path.directory? and path!=prefix+'bin' and path!=prefix+'lib'
Find.prune Find.prune
end end