2011-02-14 19:21:59 +00:00
|
|
|
require 'formula'
|
|
|
|
|
2011-04-14 02:46:01 +00:00
|
|
|
class Gdb < Formula
|
2011-02-14 19:21:59 +00:00
|
|
|
homepage 'http://www.gnu.org/software/gdb/'
|
2012-12-03 20:47:31 +00:00
|
|
|
url 'http://ftpmirror.gnu.org/gdb/gdb-7.5.1.tar.bz2'
|
|
|
|
mirror 'http://ftp.gnu.org/gnu/gdb/gdb-7.5.1.tar.bz2'
|
|
|
|
sha1 'd04c832698ac470a88788e719d19ca7c1d4d803d'
|
2011-02-14 19:21:59 +00:00
|
|
|
|
2012-03-17 20:13:36 +00:00
|
|
|
depends_on 'readline'
|
2011-05-01 02:20:20 +00:00
|
|
|
|
2012-03-17 20:13:36 +00:00
|
|
|
def install
|
|
|
|
system "./configure", "--prefix=#{prefix}",
|
|
|
|
"--disable-debug",
|
|
|
|
"--disable-dependency-tracking",
|
|
|
|
"--with-python=/usr",
|
|
|
|
"--with-system-readline"
|
2011-02-14 19:21:59 +00:00
|
|
|
system "make"
|
|
|
|
system "make install"
|
|
|
|
end
|
2011-05-01 02:20:20 +00:00
|
|
|
|
2012-12-03 20:47:31 +00:00
|
|
|
def patches
|
|
|
|
[
|
|
|
|
# Support for new Mach-O load commands backported from trunk. This should
|
|
|
|
# be unnecessary in GDB 7.6.
|
|
|
|
"https://raw.github.com/gist/4197567/dad208436d69ba591200098c91a94fa9e1cdc160/loadcommands.patch",
|
|
|
|
|
|
|
|
# This is a suplemental patch that fixes a small bug in the above patch.
|
|
|
|
# It's not in trunk yet, but it has been submitted upstream, okayed, and
|
|
|
|
# hopefully a version of it will be committed by the time 7.6 comes out.
|
|
|
|
# If you're updating this formula for 7.6, email davidbalbert@gmail.com,
|
|
|
|
# and I'll let you know if the change has made it into the release.
|
|
|
|
"https://raw.github.com/gist/4197567/e53221895da6bf0e8b307db6e774c24f543db1c3/startaddress.patch"
|
|
|
|
]
|
|
|
|
end
|
|
|
|
|
2011-05-01 02:20:20 +00:00
|
|
|
def caveats; <<-EOS.undent
|
2011-10-27 01:05:10 +00:00
|
|
|
gdb requires special privileges to access Mach ports.
|
|
|
|
You will need to codesign the binary. For instructions, see:
|
2011-05-01 02:20:20 +00:00
|
|
|
|
2011-10-27 01:05:10 +00:00
|
|
|
http://sourceware.org/gdb/wiki/BuildingOnDarwin
|
2011-05-01 02:20:20 +00:00
|
|
|
EOS
|
|
|
|
end
|
2011-02-14 19:21:59 +00:00
|
|
|
end
|