2009-10-27 23:02:05 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-03-10 05:11:03 +00:00
|
|
|
class Binutils < Formula
|
2011-09-12 16:31:30 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/binutils/binutils-2.21.1a.tar.bz2'
|
2009-10-27 23:02:05 +00:00
|
|
|
homepage 'http://www.gnu.org/software/binutils/binutils.html'
|
2011-08-26 21:41:06 +00:00
|
|
|
md5 'bde820eac53fa3a8d8696667418557ad'
|
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
|