summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-devel/gdb-apple')
-rw-r--r--sys-devel/gdb-apple/Manifest12
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1344-darwin8.patch131
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch128
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch22
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch87
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch128
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch22
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch11
-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-darwin64.patch17
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-962-darwin8.patch15
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-962-demangle.patch22
-rw-r--r--sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch23
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1344.ebuild61
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1346.ebuild61
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1461.ebuild65
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1518.ebuild63
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1705.ebuild74
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1708.ebuild74
-rw-r--r--sys-devel/gdb-apple/gdb-apple-1752.ebuild74
-rw-r--r--sys-devel/gdb-apple/gdb-apple-563.ebuild51
-rw-r--r--sys-devel/gdb-apple/gdb-apple-768-r1.ebuild50
-rw-r--r--sys-devel/gdb-apple/gdb-apple-960.ebuild50
-rw-r--r--sys-devel/gdb-apple/gdb-apple-962.ebuild64
-rw-r--r--sys-devel/gdb-apple/gdb-apple-966.ebuild64
-rw-r--r--sys-devel/gdb-apple/metadata.xml5
29 files changed, 1528 insertions, 0 deletions
diff --git a/sys-devel/gdb-apple/Manifest b/sys-devel/gdb-apple/Manifest
new file mode 100644
index 000000000000..ffcf54bec7fc
--- /dev/null
+++ b/sys-devel/gdb-apple/Manifest
@@ -0,0 +1,12 @@
+DIST gdb-1344.tar.gz 17916770 SHA256 96c37c4bd4e8446e7f22411ca3972ccb240e5cfc256fe0593b012f12fdbcb7a1
+DIST gdb-1346.tar.gz 17913352 SHA256 1bda1693366e052150ce680d80a81df70cb8e61fe29fb3f9f3556e52ae141387
+DIST gdb-1461.2.tar.gz 17951571 SHA256 91d8cdbcd9cf36377d9c2d425921141085b5c79a6dce312a3dc0b6960f8e02f9
+DIST gdb-1518.tar.gz 17966113 SHA256 c3050f0be9cb60d86ffc5fd174da78bf986511a442526ef8b0eec1e77161f607
+DIST gdb-1705.tar.gz 17919005 SHA256 f0c4c145f2ef795c4742e0cd8b3f6a95f06c9985eee04a82260b62bdd8293d37
+DIST gdb-1708.tar.gz 17922049 SHA256 6ef5a8e09a28c78d3b7cee32b2886f72206ce519acaff5791fa08b90c9f0e327
+DIST gdb-1752.tar.gz 17922994 SHA256 8685227243cedc26954d175f28ed56ba5889410420aa888323e1eeaffb204ccf
+DIST gdb-563.tar.gz 17130626 SHA256 a41177e2edbac8982e01ca01dbd52bef65bd1604fb3a65278dd0f44509bb7179
+DIST gdb-768.tar.gz 17727326 SHA256 2342cbbf7c57dcc08011736c9823d5ca374156666ba73c4b67d9984ed944f24d
+DIST gdb-960.tar.gz 17875803 SHA256 921cb5317b934008bd5f7669cca811a0377c40b779277e9326198f4919f22d97
+DIST gdb-962.tar.gz 17876280 SHA256 b0b98aaf864797c6ffeab61b8a3d2b05d544d872969245825e257aa421f30700
+DIST gdb-966.tar.gz 17769429 SHA256 fc51d13dd4153e4ac6140fa5199699dc26387189fb0e37277bb50944410a445f
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1344-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1344-darwin8.patch
new file mode 100644
index 000000000000..c95f02e0fe2e
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1344-darwin8.patch
@@ -0,0 +1,131 @@
+--- src/gdb/symfile.c.orig 2009-09-25 09:00:15 +0200
++++ src/gdb/symfile.c 2009-09-25 09:00:18 +0200
+@@ -67,7 +67,6 @@
+ #include <ctype.h>
+ #include <time.h>
+ #include <sys/time.h>
+-#include <libgen.h>
+
+ #include <sys/mman.h>
+
+--- src/gdb/utils.c.orig 2009-09-25 09:06:29 +0200
++++ src/gdb/utils.c 2009-09-25 09:46:24 +0200
+@@ -27,7 +27,6 @@
+ #include "gdb_string.h"
+ #include "event-top.h"
+ #include "exceptions.h"
+-#include <execinfo.h>
+
+ #ifdef TUI
+ #include "tui/tui.h" /* For tui_get_command_dimension. */
+@@ -878,6 +877,7 @@
+ target_terminal_ours ();
+ begin_line ();
+
++#if 0
+ /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely
+ to get useful bug reports. */
+ {
+@@ -886,6 +886,7 @@
+ fprintf (stderr, "gdb stack crawl at point of internal error:\n");
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
+ }
++#endif
+
+ /* Create a string containing the full error/warning message. Need
+ to call query with this full string, as otherwize the reason
+--- src/gdb/remote.c.orig 2009-09-25 09:31:58 +0200
++++ src/gdb/remote.c 2009-09-25 09:48:18 +0200
+@@ -61,7 +61,6 @@
+ #ifdef MACOSX_DYLD
+ #include "macosx-nat-dyld.h"
+ #endif
+-#include <execinfo.h>
+
+ /* Prototypes for local functions. */
+ static void cleanup_sigint_signal_handler (void *dummy);
+@@ -483,10 +482,12 @@
+ static void
+ remote_backtrace_self ()
+ {
++#if 0
+ void *bt_buffer[10];
+ int count = backtrace (bt_buffer, 10);
+ fprintf_filtered (gdb_stderr, "gdb stack crawl at point of invalid hex digit:\n");
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
++#endif
+ }
+
+ static void
+--- src/gdb/macosx/macosx-tdep.c.orig 2009-09-25 09:09:00 +0200
++++ src/gdb/macosx/macosx-tdep.c 2009-09-25 09:09:12 +0200
+@@ -61,7 +61,6 @@
+ #include "exceptions.h"
+
+ #include <dirent.h>
+-#include <libgen.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/param.h>
+--- src/gdb/macosx/macosx-nat-inferior.c.orig 2009-09-25 09:12:44 +0200
++++ src/gdb/macosx/macosx-nat-inferior.c 2009-09-25 09:13:24 +0200
+@@ -62,8 +62,10 @@
+ #include <semaphore.h>
+
+ #include <dlfcn.h>
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-inferior.h"
+@@ -3261,8 +3263,10 @@
+ int_flags |= RTLD_NOLOAD;
+ if (strstr (flags, "RTLD_NODELETE") != NULL)
+ int_flags |= RTLD_NODELETE;
++#ifdef RTLD_FIRST
+ if (strstr (flags, "RTLD_FIRST") != NULL)
+ int_flags |= RTLD_FIRST;
++#endif
+ }
+
+ /* If the user didn't pass in anything, set some sensible defaults. */
+--- src/gdb/macosx/macosx-nat-infthread.c.orig 2009-09-25 09:14:01 +0200
++++ src/gdb/macosx/macosx-nat-infthread.c 2009-09-25 09:14:19 +0200
+@@ -36,8 +36,10 @@
+ #include <sys/dir.h>
+ #include <inttypes.h>
+
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-util.h"
+--- src/gdb/macosx/macosx-nat-info.c.orig 2009-09-25 09:16:50 +0200
++++ src/gdb/macosx/macosx-nat-info.c 2009-09-25 09:31:12 +0200
+@@ -45,6 +45,22 @@
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-debug.h"
+
++#ifdef __ppc__
++#ifndef __darwin_ppc_thread_state
++#define __darwin_ppc_thread_state ppc_thread_state
++#define __r0 r0
++#define __srr0 srr0
++#define __srr1 srr1
++#define __cr cr
++#define __xer xer
++#define __lr lr
++#define __ctr ctr
++#endif
++#ifndef __darwin_ppc_exception_state
++#define __darwin_ppc_exception_state ppc_exception_state
++#endif
++#endif
++
+ extern macosx_inferior_status *macosx_status;
+
+ #define CHECK_ARGS(what, args) \
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch
new file mode 100644
index 000000000000..40ef761e8f70
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1461-darwin8.patch
@@ -0,0 +1,128 @@
+--- gdb-1461.2/src/gdb/macosx/macosx-nat-inferior.c
++++ gdb-1461.2/src/gdb/macosx/macosx-nat-inferior.c
+@@ -60,13 +60,17 @@
+ #include <sys/sysctl.h>
+ #include <sys/proc.h>
+ #include <mach/mach_error.h>
++#if defined(TARGET_ARM)
+ #include <spawn.h>
++#endif
+
+ #include <semaphore.h>
+
+ #include <dlfcn.h>
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-inferior.h"
+--- gdb-1461.2/src/gdb/macosx/macosx-nat-info.c
++++ gdb-1461.2/src/gdb/macosx/macosx-nat-info.c
+@@ -45,6 +45,22 @@
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-debug.h"
+
++#ifdef __ppc__
++#ifndef __darwin_ppc_thread_state
++#define __darwin_ppc_thread_state ppc_thread_state
++#define __r0 r0
++#define __srr0 srr0
++#define __srr1 srr1
++#define __cr cr
++#define __xer xer
++#define __lr lr
++#define __ctr ctr
++#endif
++#ifndef __darwin_ppc_exception_state
++#define __darwin_ppc_exception_state ppc_exception_state
++#endif
++#endif
++
+ extern macosx_inferior_status *macosx_status;
+
+ #define CHECK_ARGS(what, args) \
+--- gdb-1461.2/src/gdb/macosx/macosx-nat-infthread.c
++++ gdb-1461.2/src/gdb/macosx/macosx-nat-infthread.c
+@@ -36,8 +36,10 @@
+ #include <sys/dir.h>
+ #include <inttypes.h>
+
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-util.h"
+--- gdb-1461.2/src/gdb/macosx/macosx-tdep.c
++++ gdb-1461.2/src/gdb/macosx/macosx-tdep.c
+@@ -63,7 +63,6 @@
+ #include "gdbcore.h"
+
+ #include <dirent.h>
+-#include <libgen.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/param.h>
+--- gdb-1461.2/src/gdb/remote.c
++++ gdb-1461.2/src/gdb/remote.c
+@@ -62,7 +62,6 @@
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-dyld-process.h"
+ #endif
+-#include <execinfo.h>
+
+ /* Prototypes for local functions. */
+ static void cleanup_sigint_signal_handler (void *dummy);
+@@ -474,11 +473,13 @@
+ static void
+ remote_backtrace_self (const char *message)
+ {
++#if 0
+ void *bt_buffer[100];
+ int count = backtrace (bt_buffer, 100);
+ if (message && message[0])
+ fprintf_filtered (gdb_stderr, "%s", message);
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
++#endif
+ }
+
+ static void
+--- gdb-1461.2/src/gdb/symfile.c
++++ gdb-1461.2/src/gdb/symfile.c
+@@ -67,7 +67,6 @@
+ #include <ctype.h>
+ #include <time.h>
+ #include <sys/time.h>
+-#include <libgen.h>
+
+ #include <sys/mman.h>
+
+--- gdb-1461.2/src/gdb/utils.c
++++ gdb-1461.2/src/gdb/utils.c
+@@ -27,7 +27,6 @@
+ #include "gdb_string.h"
+ #include "event-top.h"
+ #include "exceptions.h"
+-#include <execinfo.h>
+
+ #ifdef TUI
+ #include "tui/tui.h" /* For tui_get_command_dimension. */
+@@ -874,6 +873,7 @@
+ target_terminal_ours ();
+ begin_line ();
+
++#if 0
+ /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely
+ to get useful bug reports. */
+ {
+@@ -882,6 +882,7 @@
+ fprintf (stderr, "gdb stack crawl at point of internal error:\n");
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
+ }
++#endif
+
+ /* Create a string containing the full error/warning message. Need
+ to call query with this full string, as otherwize the reason
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch b/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch
new file mode 100644
index 000000000000..75b910432278
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1461-dyld-info.patch
@@ -0,0 +1,22 @@
+If dyld-info is not available, don't try to compile unreachable code
+using it either.
+
+--- gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c
++++ gdb-1461.2/src/gdb/macosx/macosx-nat-dyld.c
+@@ -731,7 +731,7 @@
+ {
+ #if !defined (TASK_DYLD_INFO) || !defined (NM_NEXTSTEP)
+ return 0;
+-#endif
++#else
+
+ if (target_is_remote () || value == NULL)
+ return 0;
+@@ -791,6 +791,7 @@
+ }
+ #endif /* NM_NEXTSTEP */
+ return 0;
++#endif
+ }
+
+ /* Searches the target address space for dyld itself, returning it in
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch
new file mode 100644
index 000000000000..a05169cec25d
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8-9.patch
@@ -0,0 +1,87 @@
+--- src/gdb/macosx/macosx-nat-dyld.c
++++ src/gdb/macosx/macosx-nat-dyld.c
+@@ -2083,7 +2083,9 @@
+ case MH_DYLIB:
+ case MH_DYLINKER:
+ case MH_BUNDLE:
++#ifdef MH_KEXT_BUNDLE
+ case MH_KEXT_BUNDLE:
++#endif
+ break;
+ case MH_FVMLIB:
+ case MH_PRELOAD:
+@@ -2412,7 +2414,9 @@
+ break;
+ case MH_DYLINKER:
+ case MH_BUNDLE:
++#ifdef MH_KEXT_BUNDLE
+ case MH_KEXT_BUNDLE:
++#endif
+ entry->reason = dyld_reason_dyld;
+ break;
+ default:
+--- src/gdb/macosx/macosx-nat-dyld-process.c
++++ src/gdb/macosx/macosx-nat-dyld-process.c
+@@ -407,7 +407,9 @@
+ case MH_DYLIB:
+ break;
+ case MH_BUNDLE:
++#ifdef MH_KEXT_BUNDLE
+ case MH_KEXT_BUNDLE:
++#endif
+ break;
+ default:
+ return;
+ return;
+--- src/gdb/macosx/macosx-nat-inferior.c
++++ src/gdb/macosx/macosx-nat-inferior.c
+@@ -2692,6 +2692,7 @@
+ if (tp->private == NULL || tp->private->app_thread_port == 0)
+ return NULL;
+
++#ifdef THREAD_IDENTIFIER_INFO_COUNT
+ thread_identifier_info_data_t tident;
+ unsigned int info_count;
+ kern_return_t kret;
+@@ -2719,6 +2720,7 @@
+ }
+ }
+ }
++#endif
+ return buf;
+ }
+
+--- src/gdb/macosx/macosx-nat-infthread.c
++++ src/gdb/macosx/macosx-nat-infthread.c
+@@ -809,6 +809,7 @@
+ print_stack_frame (get_selected_frame (NULL), 0, LOCATION);
+ switch_to_thread (current_ptid);
+
++#ifdef THREAD_IDENTIFIER_INFO_COUNT
+ thread_identifier_info_data_t tident;
+ info_count = THREAD_IDENTIFIER_INFO_COUNT;
+ kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident,
+@@ -878,6 +879,7 @@
+ printf_filtered ("\tcurrent priority: %d\n", pth.pth_priority);
+ printf_filtered ("\tmax priority: %d\n", pth.pth_maxpriority);
+ }
++#endif
+
+ printf_filtered ("\tsuspend count: %d", info.suspend_count);
+
+@@ -1175,6 +1177,7 @@
+ ui_out_field_fmt (uiout, "mach-port-number", "0x%s",
+ paddr_nz (app_thread_name));
+
++#ifdef THREAD_IDENTIFIER_INFO_COUNT
+ thread_identifier_info_data_t tident;
+ info_count = THREAD_IDENTIFIER_INFO_COUNT;
+ kret = thread_info (tid, THREAD_IDENTIFIER_INFO, (thread_info_t) &tident,
+@@ -1207,6 +1210,7 @@
+ paddr_nz (struct_addr));
+ }
+ }
++#endif
+ }
+
+
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch
new file mode 100644
index 000000000000..f8ecc30be7f6
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1518-darwin8.patch
@@ -0,0 +1,128 @@
+--- src/gdb/macosx/macosx-nat-inferior.c
++++ src/gdb/macosx/macosx-nat-inferior.c
+@@ -60,13 +60,17 @@
+ #include <sys/sysctl.h>
+ #include <sys/proc.h>
+ #include <mach/mach_error.h>
++#if defined(TARGET_ARM)
+ #include <spawn.h>
++#endif
+
+ #include <semaphore.h>
+
+ #include <dlfcn.h>
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-inferior.h"
+--- src/gdb/macosx/macosx-nat-info.c
++++ src/gdb/macosx/macosx-nat-info.c
+@@ -45,6 +45,22 @@
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-debug.h"
+
++#ifdef __ppc__
++#ifndef __darwin_ppc_thread_state
++#define __darwin_ppc_thread_state ppc_thread_state
++#define __r0 r0
++#define __srr0 srr0
++#define __srr1 srr1
++#define __cr cr
++#define __xer xer
++#define __lr lr
++#define __ctr ctr
++#endif
++#ifndef __darwin_ppc_exception_state
++#define __darwin_ppc_exception_state ppc_exception_state
++#endif
++#endif
++
+ extern macosx_inferior_status *macosx_status;
+
+ #define CHECK_ARGS(what, args) \
+--- src/gdb/macosx/macosx-nat-infthread.c
++++ src/gdb/macosx/macosx-nat-infthread.c
+@@ -36,8 +36,10 @@
+ #include <sys/dir.h>
+ #include <inttypes.h>
+
++#if 0
+ #include <libproc.h>
+ #include <sys/proc_info.h>
++#endif
+
+ #include "macosx-nat-inferior.h"
+ #include "macosx-nat-inferior-util.h"
+--- src/gdb/macosx/macosx-tdep.c
++++ src/gdb/macosx/macosx-tdep.c
+@@ -64,7 +64,6 @@
+ #include "gdbcore.h"
+
+ #include <dirent.h>
+-#include <libgen.h>
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ #include <sys/param.h>
+--- src/gdb/remote.c
++++ src/gdb/remote.c
+@@ -63,7 +63,6 @@
+ #include "macosx-nat-dyld.h"
+ #include "macosx-nat-dyld-process.h"
+ #endif
+-#include <execinfo.h>
+
+ /* Prototypes for local functions. */
+ static void cleanup_sigint_signal_handler (void *dummy);
+@@ -475,11 +474,13 @@
+ static void
+ remote_backtrace_self (const char *message)
+ {
++#if 0
+ void *bt_buffer[100];
+ int count = backtrace (bt_buffer, 100);
+ if (message && message[0])
+ fprintf_filtered (gdb_stderr, "%s", message);
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
++#endif
+ }
+
+ static void
+--- src/gdb/symfile.c
++++ src/gdb/symfile.c
+@@ -67,7 +67,6 @@
+ #include <ctype.h>
+ #include <time.h>
+ #include <sys/time.h>
+-#include <libgen.h>
+
+ #include <sys/mman.h>
+
+--- src/gdb/utils.c
++++ src/gdb/utils.c
+@@ -28,7 +28,6 @@
+ #include "event-top.h"
+ #include "exceptions.h"
+ #include "bfd.h"
+-#include <execinfo.h>
+ #include <sys/resource.h>
+ #include <uuid/uuid.h>
+
+@@ -879,6 +878,7 @@
+ target_terminal_ours ();
+ begin_line ();
+
++#if 0
+ /* APPLE LOCAL: Do a stack crawl of how we got here so we're more likely
+ to get useful bug reports. */
+ {
+@@ -887,6 +887,7 @@
+ fprintf (stderr, "gdb stack crawl at point of internal error:\n");
+ backtrace_symbols_fd (bt_buffer, count, STDERR_FILENO);
+ }
++#endif
+
+ /* Create a string containing the full error/warning message. Need
+ to call query with this full string, as otherwize the reason
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch b/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch
new file mode 100644
index 000000000000..633a36a7a048
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1518-task_dyld_info.patch
@@ -0,0 +1,22 @@
+If dyld-info is not available, don't try to compile unreachable code
+using it either.
+
+--- gdb-1518/src/gdb/macosx/macosx-nat-dyld.c
++++ gdb-1518/src/gdb/macosx/macosx-nat-dyld.c
+@@ -779,7 +779,7 @@
+ {
+ #if !defined (TASK_DYLD_INFO)
+ return 0;
+-#endif
++#else
+ if (macosx_status->task == TASK_NULL)
+ return 0;
+
+@@ -799,6 +799,7 @@
+ task_dyld_info.all_image_info_size == 0)
+ return 0;
+ s->dyld_image_infos = task_dyld_info.all_image_info_addr;
++#endif /* TASK_DYLD_INFO */
+ }
+ #endif /* NM_NEXTSTEP */
+
diff --git a/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch b/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch
new file mode 100644
index 000000000000..32247431fe89
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-1705-darwin8-10.patch
@@ -0,0 +1,11 @@
+--- src/gdb/macosx/macosx-nat-dyld.c
++++ src/gdb/macosx/macosx-nat-dyld.c
+@@ -788,7 +788,7 @@
+ }
+ else
+ {
+-#if defined (NM_NEXTSTEP)
++#if defined (NM_NEXTSTEP) && defined(TASK_DYLD_INFO_COUNT)
+ if (macosx_status->task == TASK_NULL)
+ return 0;
+
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-darwin64.patch b/sys-devel/gdb-apple/files/gdb-apple-962-darwin64.patch
new file mode 100644
index 000000000000..4417cee76e4d
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-962-darwin64.patch
@@ -0,0 +1,17 @@
+* todo: extend for powerpc64 also
+
+--- src/bfd/config.bfd.orig 2009-06-23 11:05:43 +0200
++++ src/bfd/config.bfd 2009-06-23 11:05:47 +0200
+@@ -500,6 +500,12 @@
+ targ_archs="bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
+ targ_underscore=yes
+ ;;
++ x86_64-*-darwin*)
++ targ_defvec=mach_o_le_vec
++ targ_selvecs="mach_o_le_vec mach_o_be_vec mach_o_fat_vec pef_vec pef_xlib_vec sym_vec"
++ targ_archs="bfd_i386_arch bfd_powerpc_arch bfd_rs6000_arch"
++ targ_underscore=yes
++ ;;
+ i[3-7]86-sequent-bsd*)
+ targ_defvec=i386dynix_vec
+ targ_underscore=yes
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/files/gdb-apple-962-demangle.patch b/sys-devel/gdb-apple/files/gdb-apple-962-demangle.patch
new file mode 100644
index 000000000000..a302ce56ec91
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-962-demangle.patch
@@ -0,0 +1,22 @@
+in 32-bits mode this goes /just/ right, in 64-bits mode Portage aborts
+because objc_demangle is implicitly turned into a pointer
+
+--- src/gdb/maint.c.orig 2009-06-23 11:12:15 +0200
++++ src/gdb/maint.c 2009-06-23 11:19:58 +0200
+@@ -31,6 +31,7 @@
+ #include "symtab.h"
+ #include "gdbtypes.h"
+ #include "demangle.h"
++#include "objc-lang.h"
+ #include "gdbcore.h"
+ #include "expression.h" /* For language.h */
+ #include "language.h"
+@@ -167,7 +168,7 @@
+ switch (current_language->la_language)
+ {
+ case language_objc:
+- demangled = objc_demangle (args);
++ demangled = objc_demangle (args, 0);
+ break;
+ case language_objcplus:
+ case language_cplus:
diff --git a/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
new file mode 100644
index 000000000000..0c132ec5b384
--- /dev/null
+++ b/sys-devel/gdb-apple/files/gdb-apple-no-global-gdbinit.patch
@@ -0,0 +1,23 @@
+Sourcing /etc/gdb.conf is annoying mainly because Apple put
+ set history save on
+in there, which means everywhere you run it, you end up with a
+.gdb_history file.
+
+--- src/gdb/main.c
++++ src/gdb/main.c
+@@ -675,6 +675,7 @@
+ memset (&cwdbuf, 0, sizeof (struct stat));
+ /* APPLE LOCAL end move inits up */
+ /* APPLE LOCAL begin global gdbinit */
++#ifdef WANT_GLOBAL_GDBINIT
+ memset (&globalbuf, 0, sizeof (struct stat));
+ stat (gdbinit_global, &globalbuf);
+ if (!inhibit_gdbinit)
+@@ -683,6 +684,7 @@
+ source_file (gdbinit_global, 0);
+ }
+ do_cleanups (ALL_CLEANUPS);
++#endif
+ /* APPLE LOCAL end global gdbinit */
+
+ /* APPLE LOCAL: Set the $_Xcode convenience variable at '0' before sourcing
diff --git a/sys-devel/gdb-apple/gdb-apple-1344.ebuild b/sys-devel/gdb-apple/gdb-apple-1344.ebuild
new file mode 100644
index 000000000000..52b47aed6fd3
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-1344.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 3.2"
+HOMEPAGE="http://sourceware.org/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 ~x64-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_prepare() {
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${PN}-1344-darwin8.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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-1346.ebuild b/sys-devel/gdb-apple/gdb-apple-1346.ebuild
new file mode 100644
index 000000000000..96e7e1ac7f99
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-1346.ebuild
@@ -0,0 +1,61 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 3.2.1"
+HOMEPAGE="http://sourceware.org/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 ~x64-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_prepare() {
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${PN}-1344-darwin8.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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-1461.ebuild b/sys-devel/gdb-apple/gdb-apple-1461.ebuild
new file mode 100644
index 000000000000..44400eff9033
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-1461.ebuild
@@ -0,0 +1,65 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+APPLE_PV=${PV}.2
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 3.2.2"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x64-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-${APPLE_PV}/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-no-global-gdbinit.patch
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${P}-dyld-info.patch
+ [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${P}-darwin8.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ --disable-debug-symbols-framework \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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-1518.ebuild b/sys-devel/gdb-apple/gdb-apple-1518.ebuild
new file mode 100644
index 000000000000..2359b2fed2c6
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-1518.ebuild
@@ -0,0 +1,63 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+APPLE_PV=${PV}
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.0"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x64-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-${APPLE_PV}/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-no-global-gdbinit.patch
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${P}-task_dyld_info.patch
+ epatch "${FILESDIR}"/${P}-darwin8-9.patch
+ [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${P}-darwin8.patch
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ --disable-debug-symbols-framework \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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-1705.ebuild b/sys-devel/gdb-apple/gdb-apple-1705.ebuild
new file mode 100644
index 000000000000..bd5e1b6d0fbb
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-1705.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+APPLE_PV=${PV}
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.1"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x64-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-${APPLE_PV}/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-no-global-gdbinit.patch
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-1518-darwin8-9.patch
+ epatch "${FILESDIR}"/${PN}-1705-darwin8-10.patch
+ [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${PN}-1518-darwin8.patch
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ --disable-debug-symbols-framework \
+ $(use_enable nls) \
+ || die
+}
+
+src_compile() {
+ # unable to work around parallel make issue
+ emake -j2 || die
+}
+
+src_install() {
+ emake -j2 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
+ if use x86-macos || use x64-macos ; then
+ einfo "FSF gdb works on Intel-based OSX platforms, sometimes even"
+ einfo "better than gdb-apple. You can consider installing FSF gdb"
+ einfo "instead of gdb-apple, since the FSF version is surely more"
+ einfo "advanced than this old 6.8 version modified by Apple."
+ fi
+}
diff --git a/sys-devel/gdb-apple/gdb-apple-1708.ebuild b/sys-devel/gdb-apple/gdb-apple-1708.ebuild
new file mode 100644
index 000000000000..75c4feb094b8
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-1708.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+APPLE_PV=${PV}
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.2"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x64-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-${APPLE_PV}/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-no-global-gdbinit.patch
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-1518-darwin8-9.patch
+ epatch "${FILESDIR}"/${PN}-1705-darwin8-10.patch
+ [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${PN}-1518-darwin8.patch
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ --disable-debug-symbols-framework \
+ $(use_enable nls) \
+ || die
+}
+
+src_compile() {
+ # unable to work around parallel make issue
+ emake -j2 || die
+}
+
+src_install() {
+ emake -j2 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
+ if use x86-macos || use x64-macos ; then
+ einfo "FSF gdb works on Intel-based OSX platforms, sometimes even"
+ einfo "better than gdb-apple. You can consider installing FSF gdb"
+ einfo "instead of gdb-apple, since the FSF version is surely more"
+ einfo "advanced than this old 6.8 version modified by Apple."
+ fi
+}
diff --git a/sys-devel/gdb-apple/gdb-apple-1752.ebuild b/sys-devel/gdb-apple/gdb-apple-1752.ebuild
new file mode 100644
index 000000000000..b16018e62489
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-1752.ebuild
@@ -0,0 +1,74 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+APPLE_PV=${PV}
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 4.3"
+HOMEPAGE="http://sourceware.org/gdb/"
+SRC_URI="http://www.opensource.apple.com/darwinsource/tarballs/other/gdb-${APPLE_PV}.tar.gz"
+
+LICENSE="APSL-2 GPL-2"
+SLOT="0"
+
+KEYWORDS="~ppc-macos ~x64-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-${APPLE_PV}/src
+
+src_prepare() {
+ epatch "${FILESDIR}"/${PN}-no-global-gdbinit.patch
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-1518-darwin8-9.patch
+ epatch "${FILESDIR}"/${PN}-1705-darwin8-10.patch
+ [[ ${CHOST} == *-darwin8 ]] && epatch "${FILESDIR}"/${PN}-1518-darwin8.patch
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ --disable-debug-symbols-framework \
+ $(use_enable nls) \
+ || die
+}
+
+src_compile() {
+ # unable to work around parallel make issue
+ emake -j2 || die
+}
+
+src_install() {
+ emake -j2 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
+ if use x86-macos || use x64-macos ; then
+ einfo "FSF gdb works on Intel-based OSX platforms, sometimes even"
+ einfo "better than gdb-apple. You can consider installing FSF gdb"
+ einfo "instead of gdb-apple, since the FSF version is surely more"
+ einfo "advanced than this old 6.8 version modified by Apple."
+ fi
+}
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..791c1779481c
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-563.ebuild
@@ -0,0 +1,51 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Xcode 2.4"
+HOMEPAGE="http://sourceware.org/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_prepare() {
+ 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_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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..11205f7f1084
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-768-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, 10.5"
+HOMEPAGE="http://sourceware.org/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_prepare() {
+ 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_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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..ba19a0d23763
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-960.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Xcode Tools 3.1"
+HOMEPAGE="http://sourceware.org/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_prepare() {
+ 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_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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..87d30dd03219
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-962.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Xcode Tools 3.1.2"
+HOMEPAGE="http://sourceware.org/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 ~x64-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_prepare() {
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-768-darwin-arch.patch
+ epatch "${FILESDIR}"/${PN}-962-darwin8.patch
+ epatch "${FILESDIR}"/${PN}-962-darwin64.patch
+ epatch "${FILESDIR}"/${PN}-962-demangle.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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
+ elog "Due to increased security measures in 10.5 and up, gdb is"
+ elog "not able to get a mach task port when installed by Prefix"
+ elog "Portage, unprivileged. To make gdb fully functional you'll"
+ elog "have to perform the following steps:"
+ elog " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ elog " % 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..b95b7348ce2d
--- /dev/null
+++ b/sys-devel/gdb-apple/gdb-apple-966.ebuild
@@ -0,0 +1,64 @@
+# Copyright 1999-2013 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI="3"
+
+inherit eutils flag-o-matic
+
+DESCRIPTION="Apple branch of the GNU Debugger, Developer Tools 3.1.3"
+HOMEPAGE="http://sourceware.org/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 ~x64-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_prepare() {
+ epatch "${FILESDIR}"/${PN}-768-texinfo.patch
+ epatch "${FILESDIR}"/${PN}-768-darwin-arch.patch
+ epatch "${FILESDIR}"/${PN}-962-darwin8.patch
+ epatch "${FILESDIR}"/${PN}-962-darwin64.patch
+ epatch "${FILESDIR}"/${PN}-962-demangle.patch
+
+ # for FSF gcc / gcc-apple:42
+ sed -e 's/-Wno-long-double//' -i gdb/config/*/macosx.mh
+}
+
+src_configure() {
+ replace-flags -O? -O2
+ econf \
+ --disable-werror \
+ $(use_enable nls) \
+ || die
+}
+
+src_install() {
+ 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
+ elog "Due to increased security measures in 10.5 and up, gdb is"
+ elog "not able to get a mach task port when installed by Prefix"
+ elog "Portage, unprivileged. To make gdb fully functional you'll"
+ elog "have to perform the following steps:"
+ elog " % sudo chgrp procmod ${EPREFIX}/usr/bin/gdb"
+ elog " % 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..4561e552bd04
--- /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>prefix</herd>
+</pkgmetadata>