2009-10-27 23:02:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Binutils < Formula
|
2011-01-10 01:06:05 +00:00
|
|
|
url 'http://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.gz'
|
2009-10-27 23:02:05 +00:00
|
|
|
homepage 'http://www.gnu.org/software/binutils/binutils.html'
|
2011-01-10 01:06:05 +00:00
|
|
|
md5 'f11e10f312a58d82f14bf571dd9ff91c'
|
2009-10-27 23:02:05 +00:00
|
|
|
|
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
|
2011-02-24 23:37:56 +00:00
|
|
|
args = ["--disable-debug", "--disable-dependency-tracking",
|
|
|
|
"--prefix=#{prefix}",
|
2010-08-08 17:20:15 +00:00
|
|
|
"--infodir=#{info}",
|
2010-07-26 05:13:54 +00:00
|
|
|
"--mandir=#{man}",
|
2011-02-24 23:37:56 +00:00
|
|
|
"--disable-werror",
|
2011-01-10 01:06:05 +00:00
|
|
|
"--enable-interwork",
|
|
|
|
"--enable-multilib",
|
|
|
|
"--enable-targets=x86_64-elf",
|
|
|
|
"--enable-targets=arm-none-eabi"]
|
2010-07-26 05:13:54 +00:00
|
|
|
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
|