summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2009-06-21 10:38:26 +0000
committerFabian Groffen <grobian@gentoo.org>2009-06-21 10:38:26 +0000
commit944ef6ce4696ee128f5260f590d68a5a965f2517 (patch)
treeca9303dfe8a0dd374a971629075a9d57aa0938fa /sys-devel
parentdrop tl 2007 install support as all ebuilds are gone now (diff)
downloadhistorical-944ef6ce4696ee128f5260f590d68a5a965f2517.tar.gz
historical-944ef6ce4696ee128f5260f590d68a5a965f2517.tar.bz2
historical-944ef6ce4696ee128f5260f590d68a5a965f2517.zip
add sys-devel/gdb-apple from Gentoo Prefix tree
Package-Manager: portage-2.1.6.13/cvs/Linux x86_64
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/gdb-apple/ChangeLog57
-rw-r--r--sys-devel/gdb-apple/Manifest17
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch110
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch19
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch15
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch10
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch15
-rw-r--r--sys-devel/gdb-apple/gdb-apple-563.ebuild55
-rw-r--r--sys-devel/gdb-apple/gdb-apple-768-r1.ebuild54
-rw-r--r--sys-devel/gdb-apple/gdb-apple-960.ebuild54
-rw-r--r--sys-devel/gdb-apple/gdb-apple-962.ebuild66
-rw-r--r--sys-devel/gdb-apple/gdb-apple-966.ebuild66
-rw-r--r--sys-devel/gdb-apple/metadata.xml5
13 files changed, 543 insertions, 0 deletions
diff --git a/sys-devel/gdb-apple/ChangeLog b/sys-devel/gdb-apple/ChangeLog
new file mode 100644
index 000000000000..3b0b7a08adef
--- /dev/null
+++ b/sys-devel/gdb-apple/ChangeLog
@@ -0,0 +1,57 @@
+# ChangeLog for sys-devel/gdb-apple
+# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/ChangeLog,v 1.1 2009/06/21 10:38:25 grobian Exp $
+
+*gdb-apple-966 (20 Jun 2009)
+
+ 20 Jun 2009; Fabian Groffen <grobian@gentoo.org> +gdb-apple-966.ebuild:
+ Version bump to Developer Tools 3.1.3 version
+
+ 21 Dec 2008; Fabian Groffen <grobian@gentoo.org> gdb-apple-962.ebuild,
+ gdb-apple-962.ebuild, gdb-apple-962.ebuild:
+ Add notice describing how to make gdb useful on 10.5 and up
+
+*gdb-apple-962 (21 Dec 2008)
+
+ 21 Dec 2008; Fabian Groffen <grobian@gentoo.org>
+ +files/gdb-apple-962-darwin8.patch, -gdb-apple-477.ebuild,
+ gdb-apple-960.ebuild, -gdb-apple-961.ebuild, +gdb-apple-962.ebuild:
+ Version bump to Xcode Tools 3.1.2
+
+*gdb-apple-960 (23 Aug 2008)
+
+ 23 Aug 2008; Fabian Groffen <grobian@gentoo.org> +gdb-apple-960.ebuild:
+ Add 960 from Xcode Tools 3.1, since 961 doesn't build on OSX 10.4
+
+*gdb-apple-908 (28 Mar 2008)
+*gdb-apple-768-r1 (28 Mar 2008)
+
+ 28 Mar 2008; Fabian Groffen <grobian@gentoo.org>
+ +files/gdb-apple-768-darwin-arch.patch, -gdb-apple-768.ebuild,
+ +gdb-apple-768-r1.ebuild, +gdb-apple-908.ebuild:
+ Bump to Xcode Tools 3.1 Beta version, add patch for 768 to become actually
+ useful on Leopard systems by using /usr/bin/arch
+
+ 02 Feb 2008; Elias Pipping <pipping@gentoo.org> gdb-apple-563.ebuild,
+ gdb-apple-563.ebuild, gdb-apple-768.ebuild:
+ port texinfo/-Wno-long-double changes back to 563
+
+ 02 Feb 2008; Fabian Groffen <grobian@gentoo.org> gdb-apple-768.ebuild,
+ +files/gdb-apple-768-texinfo.patch:
+ Add patch to work with texinfo 4.11
+
+*gdb-apple-768 (09 Nov 2007)
+
+ 09 Nov 2007; Fabian Groffen <grobian@gentoo.org> +gdb-apple-768.ebuild:
+ New snapshot, as released with 10.5, had to disable no-64-bits patch
+
+ 10 Dec 2006; Fabian Groffen <grobian@gentoo.org> +metadata.xml:
+ Add metadata.xml
+
+ 17 Nov 2006; Fabian Groffen <grobian@gentoo.org>
+ +files/gdb-apple-563-darwin7.patch, +files/gdb-apple-563-no-64bit.patch,
+ gdb-apple-563.ebuild, gdb-apple-563.ebuild, gdb-apple-563.ebuild:
+ Made gdb-apple-563 compile on Darwin 7. Added patch for both conditional
+ support for features only available in OS X 10.4, and for conditional PPC64
+ support for platforms that don't have 64-bits.
+
diff --git a/sys-devel/gdb-apple/Manifest b/sys-devel/gdb-apple/Manifest
new file mode 100644
index 000000000000..b3d116ec16e3
--- /dev/null
+++ b/sys-devel/gdb-apple/Manifest
@@ -0,0 +1,17 @@
+AUX gdb-apple-563-darwin7.patch 3329 RMD160 e6192a08fdd01bdf34f12455a66e7195e2ba9fda SHA1 d5afb3aa2970b22ddd60bb1704a75699bbb3401d SHA256 7d20fb2e241060f220a179a14d14a0062528ddee1ec60ce213ea80a1b85e8921
+AUX gdb-apple-563-no-64bit.patch 767 RMD160 629ef816ec94f95879c161daef4a1a5148e19cb4 SHA1 5a4a886f55498064ca47f4456cdc6f53b8832eaa SHA256 3eb672bb4bc08d74f01bd33008140177b9906fc06969852d013ee9440a8d6c97
+AUX gdb-apple-768-darwin-arch.patch 571 RMD160 c5c0420a96e9ca186e098b44a7d7de34b0571d96 SHA1 143cfddfb451141d6530737b5dd2d4a6042f385d SHA256 afd10f60857900824fb36d3109e2c4fa0c87ca95fab1c4411cd8316d3d566ab6
+AUX gdb-apple-768-texinfo.patch 487 RMD160 8fc4c9da8b4d984ad11dcd496e2c2a0f17382971 SHA1 de8dcded653c28768b2de106403e65c552392c22 SHA256 55d33c8603278687ec92f4b0bdbc7cb8e0b62b2348f1b44ce247d95c7ae14b2d
+AUX gdb-apple-962-darwin8.patch 402 RMD160 240ee95585a819ec0b10147a55a3a053713db77a SHA1 14976942fcbac5a1c326a26da3768d77442e83aa SHA256 885453cb8ea7e39bc5da479ce046e96e113eb150af220b7d61d8f50ebf29d2d6
+DIST gdb-563.tar.gz 17130626 RMD160 cbefa5b829e4e70685cf77c9a0e2171f243cc463 SHA1 913f19713a1bc5de4f96ee2920314e7caad31ac5 SHA256 a41177e2edbac8982e01ca01dbd52bef65bd1604fb3a65278dd0f44509bb7179
+DIST gdb-768.tar.gz 17727326 RMD160 b61164d22e9e9b4f9f0ee2bb20129e8e06531b04 SHA1 adeffd19caf9270a9a297633f716e6485ebc8536 SHA256 2342cbbf7c57dcc08011736c9823d5ca374156666ba73c4b67d9984ed944f24d
+DIST gdb-960.tar.gz 17875803 RMD160 d14638dfda8578110d9525723344665f816d73b1 SHA1 ec4afa508ae451b07c9e1307a2b8eb6212102c46 SHA256 921cb5317b934008bd5f7669cca811a0377c40b779277e9326198f4919f22d97
+DIST gdb-962.tar.gz 17876280 RMD160 53380455ed7c91c4564091f1564926a76ccd4840 SHA1 f5f353a3f9345f1be98e2cc59905972222ec8b0d SHA256 b0b98aaf864797c6ffeab61b8a3d2b05d544d872969245825e257aa421f30700
+DIST gdb-966.tar.gz 17769429 RMD160 427db15223ea2cf09d1d77d9bf80a3fc7bb952be SHA1 0391e88d14e52446c68140d8f05b5cbc01ae17f4 SHA256 fc51d13dd4153e4ac6140fa5199699dc26387189fb0e37277bb50944410a445f
+EBUILD gdb-apple-563.ebuild 1293 RMD160 b1cf11a36467a15f4a2e678b4305ab4ae6e2f31a SHA1 c730696ecb9d037115721c1ae86388855e94d2d5 SHA256 e1707014e4707b44eb807c83ad2b4ac9cd2e36df0899ce8668b0862ff06efac5
+EBUILD gdb-apple-768-r1.ebuild 1248 RMD160 0f09bb596e016555859a09c7091c33fd86cd2d47 SHA1 4bca6a981d813bff36a3f418a6a43ae35117a7bb SHA256 d76b6e6ea60974ff2b3dd042d3b57a63eb0698bcfef7bd09dc8c7cdc14b17394
+EBUILD gdb-apple-960.ebuild 1264 RMD160 2e5877f8a82d494f81ecf46c64fb5fe281d401e7 SHA1 2be3cdaeca9dd20b414f69629448d1470a7339c1 SHA256 10940ebacb156c4605f6eef99bf9541188844e6e9ba9b43f7944b150901f8879
+EBUILD gdb-apple-962.ebuild 1765 RMD160 32fb507d0cea5862861e90f2e8d15b8a45756456 SHA1 e252ef4574028def6e7c961b919375582af2a45a SHA256 ceea12219b307fee6a2445907f33ccc8588297b4691eca9119f8fda14c35d8a8
+EBUILD gdb-apple-966.ebuild 1769 RMD160 383172bd622022127a49ade120b9a0a864276fc2 SHA1 797110cd79f19f5dfd353b76224d17f9bcbda19b SHA256 603b3b6a22124b584db9fb628dc3a914501d7cc47591c55f4e72120216eb428c
+MISC ChangeLog 2308 RMD160 e163123da7b117d81b119917db9650f79b8c6304 SHA1 6cd50ac8a9c6d6b463e790e12b066e73c4792d13 SHA256 0e311b15c2d1366ba898632da10506d20755081a272d0a54fb459f9a35fa6bc4
+MISC metadata.xml 158 RMD160 61ad495b84df949a636009d30b8c3af6d267e469 SHA1 cacd49ab85e7648a81e5dd4791ef9598090ee63d SHA256 6a21555efc71392966785841abafc9b2984d97d75ad574d654db6adc8674b1bd
diff --git a/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch b/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch
new file mode 100644
index 000000000000..bd5061d41fc0
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-563-darwin7.patch
@@ -0,0 +1,110 @@
+* Fabian Groffen <grobian@gentoo.org>
+ Mac OS X Panther (10.3) doesn't have mach_vm_size_t yet, and
+ apparently this was forseen in macosx-nat-inferior-debug.c. However,
+ macosx-nat-inferior-debug.h also uses the provided types, hence we
+ move the backwards-compatibility logic to the .h file.
+
+* Fabian Groffen <grobian@gentoo.org>
+ On Mac OS X Panther (10.3) an older version of the Launch Services is
+ available, which doesn't cover the requirements made by Xcode here.
+ Because it's for Xcode only, and we don't use it on Gentoo, we just
+ enable the functionality that doesn't compile on 10.3.
+
+--- gdb/macosx/macosx-nat-inferior-debug.c
++++ gdb/macosx/macosx-nat-inferior-debug.c
+@@ -53,24 +53,6 @@
+
+ #include <AvailabilityMacros.h>
+
+-#define MACH64 (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)
+-
+-#if MACH64
+-
+-#include <mach/mach_vm.h>
+-
+-#else /* ! MACH64 */
+-
+-#define mach_vm_size_t vm_size_t
+-#define mach_vm_address_t vm_address_t
+-#define mach_vm_read vm_read
+-#define mach_vm_write vm_write
+-#define mach_vm_region vm_region
+-#define VM_REGION_BASIC_INFO_COUNT_64 VM_REGION_BASIC_INFO_COUNT
+-#define VM_REGION_BASIC_INFO_64 VM_REGION_BASIC_INFO
+-
+-#endif /* MACH64 */
+-
+ FILE *inferior_stderr = NULL;
+ int inferior_debug_flag = 0;
+ int timestamps_debug_flag = 0;
+--- gdb/macosx/macosx-nat-inferior-debug.h
++++ gdb/macosx/macosx-nat-inferior-debug.h
+@@ -6,6 +6,24 @@
+
+ #include "defs.h"
+
++#define MACH64 (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)
++
++#if MACH64
++
++#include <mach/mach_vm.h>
++
++#else /* ! MACH64 */
++
++#define mach_vm_size_t vm_size_t
++#define mach_vm_address_t vm_address_t
++#define mach_vm_read vm_read
++#define mach_vm_write vm_write
++#define mach_vm_region vm_region
++#define VM_REGION_BASIC_INFO_COUNT_64 VM_REGION_BASIC_INFO_COUNT
++#define VM_REGION_BASIC_INFO_64 VM_REGION_BASIC_INFO
++
++#endif /* MACH64 */
++
+ extern FILE *inferior_stderr;
+ extern int inferior_debug_flag;
+
+--- gdb/macosx/macosx-tdep.c
++++ gdb/macosx/macosx-tdep.c
+@@ -413,6 +413,7 @@
+ } BabelAESelInfo;
+ #pragma options align=reset
+
++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)
+ static int
+ open_file_with_LS (const char *file_path, int lineno)
+ {
+@@ -538,7 +539,9 @@
+
+ return 1;
+ }
++#endif
+
++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)
+ /* Opens the file pointed to in ARGS with the default editor
+ given by LaunchServices. If ARGS is NULL, opens the current
+ source file & line. You can also supply file:line and it will
+@@ -609,6 +612,7 @@
+
+ open_file_with_LS (filename, line_no);
+ }
++#endif
+
+ void
+ _initialize_macosx_tdep ()
+@@ -618,13 +622,15 @@
+
+ add_info ("trampoline", info_trampoline_command,
+ "Resolve function for DYLD trampoline stub and/or Objective-C call");
++#if (MAC_OS_X_VERSION_MAX_ALLOWED >= 1040)
+ c = add_com ("open", class_support, open_command, _("\
+ Open the named source file in an application determined by LaunchServices.\n\
+ With no arguments, open the currently selected source file.\n\
+ Also takes file:line to hilight the file at the given line."));
+ set_cmd_completer (c, filename_completer);
+ add_com_alias ("op", "open", class_support, 1);
+ add_com_alias ("ope", "open", class_support, 1);
++#endif
+
+ add_com ("flushstack", class_maintenance, stack_flush_command,
+ "Force gdb to flush its stack-frame cache (maintainer command)");
diff --git a/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch b/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch
new file mode 100644
index 000000000000..952f5b337871
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-563-no-64bit.patch
@@ -0,0 +1,19 @@
+* Fabian Groffen <grobian@gentoo.org>
+ On Gentoo, when the user doesn't have a 64-bits capable CPU, we
+ compile GCC without multi-lib support. Hence, 64-bits defines are not
+ available so we better not use them if we don't have __ppc64__
+ defined.
+
+--- gdb/macosx/macosx-nat-dyld.c
++++ gdb/macosx/macosx-nat-dyld.c
+@@ -619,8 +619,10 @@
+ structures. */
+ if (header.cputype == CPU_TYPE_POWERPC || header.cputype == CPU_TYPE_I386)
+ osabi_seen_in_attached_dyld = GDB_OSABI_DARWIN;
++#if defined(__ppc64__)
+ if (header.cputype == CPU_TYPE_POWERPC64 || header.cputype == GDB_CPU_TYPE_X86_64)
+ osabi_seen_in_attached_dyld = GDB_OSABI_DARWIN64;
++#endif
+ }
+
+ /* Once we know the address at which dyld was loaded, we can try to
diff --git a/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch b/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch
new file mode 100644
index 000000000000..5442ba8ba636
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-768-darwin-arch.patch
@@ -0,0 +1,15 @@
+* configure checks for /usr/bin/arch to determine whether "arch" is ok
+ to use, so don't rely on the path at runtime, since GNU arch doesn't
+ understand -arch at all (and only returns the current arch name)
+
+--- src/gdb/fork-child.c
++++ src/gdb/fork-child.c
+@@ -243,7 +243,7 @@
+ arch_string = "x86_64";
+ #endif
+ if (arch_string != NULL)
+- sprintf (shell_command, "%s exec arch -arch %s ", shell_command, arch_string);
++ sprintf (shell_command, "%s exec /usr/bin/arch -arch %s ", shell_command, arch_string);
+ else
+ strcat (shell_command, "exec ");
+ }
diff --git a/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch b/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch
new file mode 100644
index 000000000000..41153d8436de
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-768-texinfo.patch
@@ -0,0 +1,10 @@
+--- src/Makefile.in
++++ src/Makefile.in
+@@ -280,6 +280,6 @@
+ then echo $$r/$(BUILD_SUBDIR)/texinfo/makeinfo/makeinfo ; \
+ else if (${CONFIGURED_MAKEINFO} --version \
+- | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|[5-9])') >/dev/null 2>&1; \
++ | egrep 'texinfo[^0-9]*([1-3][0-9]|4\.[2-9]|4\.[1-9][0-9]|[5-9])') >/dev/null 2>&1; \
+ then echo ${CONFIGURED_MAKEINFO}; else echo $$s/missing makeinfo; fi; fi`
+
+ # This just becomes part of the MAKEINFO definition passed down to
diff --git a/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch
new file mode 100644
index 000000000000..05a088b93fb3
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch
@@ -0,0 +1,15 @@
+* 10.4 doesn't have posix spawn, but fortunately it's only used on ARM
+ (iPhone), so we can still compile it
+
+--- src/gdb/macosx/macosx-nat-inferior.c
++++ src/gdb/macosx/macosx-nat-inferior.c
+@@ -58,7 +58,9 @@
+ #include <sys/sysctl.h>
+ #include <sys/proc.h>
+ #include <mach/mach_error.h>
++#ifdef TARGET_ARM
+ #include <spawn.h>
++#endif
+
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-inferior.h"
diff --git a/sys-devel/gdb-apple/gdb-apple-563.ebuild b/sys-devel/gdb-apple/gdb-apple-563.ebuild
new file mode 100644
index 000000000000..3a7e41fe20d4
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-563.ebuild
@@ -0,0 +1,55 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/gdb-apple-563.ebuild,v 1.1 2009/06/21 10:38:25 grobian Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Xcode 2.4"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x86-macos"
+
+IUSE="nls"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ =dev-db/sqlite-3*"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/gdb-${PV}/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-darwin7.patch
+ epatch "${FILESDIR}"/${P}-no-64bit.patch
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_compile() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+ emake || die
+}
+
+src_install() {
+ local ED=${ED-${D}}
+
+ emake DESTDIR="${D}" libdir=/nukeme includedir=/nukeme install || die
+ rm -r "${D}"/nukeme || die
+ rm -Rf "${ED}"/usr/${CHOST} || die
+ mv "${ED}"/usr/bin/gdb ${ED}/
+ rm -f "${ED}"/usr/bin/*
+ mv "${ED}"/gdb "${ED}"/usr/bin/
+}
diff --git a/sys-devel/gdb-apple/gdb-apple-768-r1.ebuild b/sys-devel/gdb-apple/gdb-apple-768-r1.ebuild
new file mode 100644
index 000000000000..e0c373b94ab6
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-768-r1.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/gdb-apple-768-r1.ebuild,v 1.1 2009/06/21 10:38:25 grobian Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, 10.5"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x86-macos"
+
+IUSE="nls"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ =dev-db/sqlite-3*"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/gdb-${PV}/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${P}-texinfo.patch
+ epatch "${FILESDIR}"/${P}-darwin-arch.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_compile() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+ emake || die
+}
+
+src_install() {
+ local ED=${ED-${D}}
+
+ emake DESTDIR="${D}" libdir=/nukeme includedir=/nukeme install || die
+ rm -r "${D}"/nukeme || die
+ rm -Rf "${ED}"/usr/${CHOST} || die
+ mv "${ED}"/usr/bin/gdb ${ED}/
+ rm -f "${ED}"/usr/bin/*
+ mv "${ED}"/gdb "${ED}"/usr/bin/
+}
diff --git a/sys-devel/gdb-apple/gdb-apple-960.ebuild b/sys-devel/gdb-apple/gdb-apple-960.ebuild
new file mode 100644
index 000000000000..9e2ddced2f5c
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-960.ebuild
@@ -0,0 +1,54 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/gdb-apple-960.ebuild,v 1.1 2009/06/21 10:38:25 grobian Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Xcode Tools 3.1"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x86-macos"
+
+IUSE="nls"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ =dev-db/sqlite-3*"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/gdb-${PV}/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-768-darwin-arch.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_compile() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+ emake || die
+}
+
+src_install() {
+ local ED=${ED-${D}}
+
+ emake DESTDIR="${D}" libdir=/nukeme includedir=/nukeme install || die
+ rm -r "$D"/nukeme || die
+ rm -Rf "${ED}"/usr/${CHOST} || die
+ mv "${ED}"/usr/bin/gdb ${ED}/
+ rm -f "${ED}"/usr/bin/*
+ mv "${ED}"/gdb "${ED}"/usr/bin/
+}
diff --git a/sys-devel/gdb-apple/gdb-apple-962.ebuild b/sys-devel/gdb-apple/gdb-apple-962.ebuild
new file mode 100644
index 000000000000..bbfdcb7d3f7c
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-962.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/gdb-apple-962.ebuild,v 1.1 2009/06/21 10:38:25 grobian Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Xcode Tools 3.1.2"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x86-macos"
+
+IUSE="nls"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ =dev-db/sqlite-3*"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/gdb-${PV}/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-768-darwin-arch.patch
+ epatch "${FILESDIR}"/${PN}-962-darwin8.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_compile() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+ emake || die
+}
+
+src_install() {
+ local ED=${ED-${D}}
+
+ emake DESTDIR="${D}" libdir=/nukeme includedir=/nukeme install || die
+ rm -r "${D}"/nukeme || die
+ rm -Rf "${ED}"/usr/${CHOST} || die
+ mv "${ED}"/usr/bin/gdb ${ED}/
+ rm -f "${ED}"/usr/bin/*
+ mv "${ED}"/gdb "${ED}"/usr/bin/
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -ge 9 ]] ; then
+ ewarn "Due to increased security measures in 10.5 and up, gdb is"
+ ewarn "not able to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb-apple/gdb-apple-966.ebuild b/sys-devel/gdb-apple/gdb-apple-966.ebuild
new file mode 100644
index 000000000000..806549b850db
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-966.ebuild
@@ -0,0 +1,66 @@
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-devel/gdb-apple/gdb-apple-966.ebuild,v 1.1 2009/06/21 10:38:25 grobian Exp $
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 3.1.3"
+HOMEPAGE="http://sources.redhat.com/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x86-macos"
+
+IUSE="nls"
+
+RDEPEND=">=sys-libs/ncurses-5.2-r2
+ =dev-db/sqlite-3*"
+DEPEND="${RDEPEND}
+ nls? ( sys-devel/gettext )"
+
+S=${WORKDIR}/gdb-${PV}/src
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-768-darwin-arch.patch
+ epatch "${FILESDIR}"/${PN}-962-darwin8.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_compile() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+ emake || die
+}
+
+src_install() {
+ local ED=${ED-${D}}
+
+ emake DESTDIR="${D}" libdir=/nukeme includedir=/nukeme install || die
+ rm -R "${D}"/nukeme || die
+ rm -Rf "${ED}"/usr/${CHOST} || die
+ mv "${ED}"/usr/bin/gdb ${ED}/
+ rm -f "${ED}"/usr/bin/*
+ mv "${ED}"/gdb "${ED}"/usr/bin/
+}
+
+pkg_postinst() {
+ if [[ ${CHOST} == *-darwin* && ${CHOST#*-darwin} -ge 9 ]] ; then
+ ewarn "Due to increased security measures in 10.5 and up, gdb is"
+ ewarn "not able to get a mach task port when installed by Prefix"
+ ewarn "Portage, unprivileged. To make gdb fully functional you'll"
+ ewarn "have to perform the following steps:"
+ ewarn " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ ewarn " % sudo chmod g+s ${EPREFIX}/usr/bin/gdb"
+ fi
+}
diff --git a/sys-devel/gdb-apple/metadata.xml b/sys-devel/gdb-apple/metadata.xml
new file mode 100644
index 000000000000..925cf70da957
--- /dev/null
+++ b/sys-devel/gdb-apple/metadata.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+<herd>apple</herd>
+</pkgmetadata>