2009-10-27 23:02:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
|
|
|
class Binutils <Formula
|
|
|
|
url 'http://ftp.gnu.org/gnu/binutils/binutils-2.20.tar.gz'
|
|
|
|
homepage 'http://www.gnu.org/software/binutils/binutils.html'
|
|
|
|
md5 'e99487e0c4343d6fa68b7c464ff4a962'
|
|
|
|
|
2010-07-26 05:13:54 +00:00
|
|
|
def options
|
|
|
|
[['--default-names', "Do NOT prepend 'g' to the binary; will override system utils."]]
|
|
|
|
end
|
|
|
|
|
2009-10-27 23:02:05 +00:00
|
|
|
def install
|
2010-08-08 17:20:15 +00:00
|
|
|
ENV.append 'CPPFLAGS', "-I#{include}"
|
2010-07-26 05:13:54 +00:00
|
|
|
|
|
|
|
args = ["--prefix=#{prefix}",
|
|
|
|
"--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
2010-08-08 17:20:15 +00:00
|
|
|
"--infodir=#{info}",
|
2010-07-26 05:13:54 +00:00
|
|
|
"--mandir=#{man}",
|
|
|
|
"--disable-werror" ]
|
|
|
|
args << "--program-prefix=g" unless ARGV.include? '--default-names'
|
|
|
|
|
|
|
|
system "./configure", *args
|
2009-10-27 23:02:05 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
|
|
|
end
|