homebrew-core/Formula/gdb.rb
David Albert 2628f3237f GDB 7.5.1
This includes two patches to BFD related to new Mach-O load commands
added in 10.8 (and possibly 10.7 depending on what version of the
devtools you have installed). The first patch is from upstream and will
be released as part of GDB 7.6. The second patch fixes a bug in the
upstream patch to make GDB properly read a binary's start address.  The
second patch is not yet upstream because I don't have a copyright
assignment agreement with the FSF yet, but it has been approved and some
version of it should find itself in GDB 7.6 as well.  You can find the
related email thread here:
http://sourceware.org/ml/binutils/2012-11/msg00320.html

Closes Homebrew/homebrew#126.

Signed-off-by: Jack Nagel <jacknagel@gmail.com>
2015-11-19 19:50:21 -08:00

43 lines
1.5 KiB
Ruby

require 'formula'
class Gdb < Formula
homepage 'http://www.gnu.org/software/gdb/'
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'
depends_on 'readline'
def install
system "./configure", "--prefix=#{prefix}",
"--disable-debug",
"--disable-dependency-tracking",
"--with-python=/usr",
"--with-system-readline"
system "make"
system "make install"
end
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
def caveats; <<-EOS.undent
gdb requires special privileges to access Mach ports.
You will need to codesign the binary. For instructions, see:
http://sourceware.org/gdb/wiki/BuildingOnDarwin
EOS
end
end