diff options
author | Robin Gareus <robin@gareus.org> | 2020-02-23 14:51:56 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2020-02-23 16:21:50 +0100 |
commit | 96ef1dc0ed9862bf4937d182f789edd20c17581f (patch) | |
tree | 6851918f213f836e3e4de0bb6cccfa5a270b0ca2 /tools | |
parent | 3e77680a57ee28571ec5558845df2ad82246741a (diff) |
Cleanup cource tree: collect patches
Diffstat (limited to 'tools')
-rw-r--r-- | tools/patches/GdkQuartzWindow.patch | 44 | ||||
-rw-r--r-- | tools/patches/boost-1.55-ptr-debug.patch (renamed from tools/boost-1.55-ptr-debug.patch) | 0 | ||||
-rw-r--r-- | tools/patches/boost-1.62-ptr-debug.patch (renamed from tools/boost-1.62-ptr-debug.patch) | 0 | ||||
-rw-r--r-- | tools/patches/boost-ptr-debug.patch (renamed from tools/boost-ptr-debug.patch) | 0 | ||||
-rw-r--r-- | tools/patches/gtk-osx.patch | 542 | ||||
-rw-r--r-- | tools/patches/gtkdnd-quartz.patch | 55 | ||||
-rw-r--r-- | tools/patches/shared_ptr.patch | 275 | ||||
-rw-r--r-- | tools/patches/waf-str.patch (renamed from tools/waf-str.patch) | 0 | ||||
-rw-r--r-- | tools/patches/waflib-tar.patch (renamed from tools/waflib-tar.patch) | 0 | ||||
-rw-r--r-- | tools/patches/waflib.patch (renamed from tools/waflib.patch) | 0 |
10 files changed, 916 insertions, 0 deletions
diff --git a/tools/patches/GdkQuartzWindow.patch b/tools/patches/GdkQuartzWindow.patch new file mode 100644 index 0000000000..217c010ffb --- /dev/null +++ b/tools/patches/GdkQuartzWindow.patch @@ -0,0 +1,44 @@ +--- old/gtk+-2.24.23/gdk/quartz/GdkQuartzWindow.c 2013-10-16 11:29:55.000000000 -0400 ++++ new/gtk+-2.24.23/gdk/quartz/GdkQuartzWindow.c 2015-07-20 15:05:40.000000000 -0400 +@@ -625,6 +625,41 @@ + event.dnd.send_event = FALSE; + event.dnd.context = _gdk_quartz_drag_source_context; + ++ /* Check to see if the coordinates are inside a known GdkWindow */ ++ ++ GdkScreen* screen = gdk_window_get_screen (event.dnd.window); ++ ++ if (screen) ++ { ++ GList* windows, *list; ++ gint gx, gy; ++ ++ event.dnd.context->dest_window = NULL; ++ ++ windows = gdk_screen_get_toplevel_windows (screen); ++ _gdk_quartz_window_nspoint_to_gdk_xy (aPoint, &gx, &gy); ++ ++ for (list = windows; list; list = list->next) ++ { ++ GdkWindow* win = (GdkWindow*) list->data; ++ gint wx, wy; ++ gint ww, wh; ++ ++ gdk_window_get_root_origin (win, &wx, &wy); ++ ww = gdk_window_get_width (win); ++ wh = gdk_window_get_height (win); ++ ++ if (gx > wx && ++ gy > wy && ++ gx <= wx + ww && ++ gy <= wy + wh) ++ { ++ /* found a toplevel GdkWindow at the drop position */ ++ event.dnd.context->dest_window = win; ++ } ++ } ++ } ++ + (*_gdk_event_func) (&event, _gdk_event_data); + + g_object_unref (event.dnd.window); diff --git a/tools/boost-1.55-ptr-debug.patch b/tools/patches/boost-1.55-ptr-debug.patch index 83f20a5154..83f20a5154 100644 --- a/tools/boost-1.55-ptr-debug.patch +++ b/tools/patches/boost-1.55-ptr-debug.patch diff --git a/tools/boost-1.62-ptr-debug.patch b/tools/patches/boost-1.62-ptr-debug.patch index 057c587a2b..057c587a2b 100644 --- a/tools/boost-1.62-ptr-debug.patch +++ b/tools/patches/boost-1.62-ptr-debug.patch diff --git a/tools/boost-ptr-debug.patch b/tools/patches/boost-ptr-debug.patch index e32975ab2b..e32975ab2b 100644 --- a/tools/boost-ptr-debug.patch +++ b/tools/patches/boost-ptr-debug.patch diff --git a/tools/patches/gtk-osx.patch b/tools/patches/gtk-osx.patch new file mode 100644 index 0000000000..013e4561bb --- /dev/null +++ b/tools/patches/gtk-osx.patch @@ -0,0 +1,542 @@ +Index: gtk/gtktreeview.c +=================================================================== +--- gtk/gtktreeview.c (revision 21770) ++++ gtk/gtktreeview.c (working copy) +@@ -2534,6 +2534,7 @@ + gboolean row_double_click = FALSE; + gboolean rtl; + gboolean node_selected; ++ gboolean edits_allowed; + + /* Empty tree? */ + if (tree_view->priv->tree == NULL) +@@ -2643,9 +2644,17 @@ + + tree_view->priv->focus_column = column; + ++ /* ARDOUR HACK */ ++ ++ if (g_object_get_data (G_OBJECT(tree_view), "mouse-edits-require-mod1")) { ++ edits_allowed = (event->state & GDK_MOD1_MASK); ++ } else { ++ /* regular GTK design: do edits if none of the default modifiers are active */ ++ edits_allowed = !(event->state & gtk_accelerator_get_default_mod_mask ()); ++ } ++ + /* decide if we edit */ +- if (event->type == GDK_BUTTON_PRESS && event->button == 1 && +- !(event->state & gtk_accelerator_get_default_mod_mask ())) ++ if (event->type == GDK_BUTTON_PRESS && event->button == 1 && edits_allowed) + { + GtkTreePath *anchor; + GtkTreeIter iter; +Index: gtk/gtkquartz.c +=================================================================== +--- gtk/gtkquartz.c (revision 21770) ++++ gtk/gtkquartz.c (working copy) +@@ -24,6 +24,23 @@ + #include "gtkalias.h" + + NSImage * ++_gtk_quartz_create_image_from_drawable (GdkDrawable* drawable) ++{ ++ GdkPixbuf* pixbuf; ++ NSImage* image = NULL; ++ ++ pixbuf = gdk_pixbuf_get_from_drawable (NULL, drawable, NULL, ++ 0, 0, /* src */ ++ 0, 0, /* dst */ ++ -1, -1); ++ if (pixbuf) ++ image = _gtk_quartz_create_image_from_pixbuf (pixbuf); ++ ++ return image; ++} ++ ++ ++NSImage * + _gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf) + { + CGColorSpaceRef colorspace; +Index: gtk/gtkquartz.h +=================================================================== +--- gtk/gtkquartz.h (revision 21770) ++++ gtk/gtkquartz.h (working copy) +@@ -41,6 +41,7 @@ + GtkSelectionData *selection_data); + + NSImage *_gtk_quartz_create_image_from_pixbuf (GdkPixbuf *pixbuf); ++NSImage *_gtk_quartz_create_image_from_drawable (GdkDrawable *drawable); + + G_END_DECLS + +Index: gtk/gtktooltip.c +=================================================================== +--- gtk/gtktooltip.c (revision 21770) ++++ gtk/gtktooltip.c (working copy) +@@ -426,6 +426,7 @@ + gtk_tooltip_trigger_tooltip_query (GdkDisplay *display) + { + gint x, y; ++ gint rx, ry; + GdkWindow *window; + GdkEvent event; + +@@ -434,10 +435,14 @@ + if (!window) + return; + ++ gdk_window_get_origin (window, &rx, &ry); ++ + event.type = GDK_MOTION_NOTIFY; + event.motion.window = window; + event.motion.x = x; ++ event.motion.x_root = rx + x; + event.motion.y = y; ++ event.motion.y_root = ry + y; + event.motion.is_hint = FALSE; + + _gtk_tooltip_handle_event (&event); +Index: gtk/gtkdnd-quartz.c +=================================================================== +--- gtk/gtkdnd-quartz.c (revision 21770) ++++ gtk/gtkdnd-quartz.c (working copy) +@@ -63,6 +63,11 @@ + gboolean create); + static void gtk_drag_source_site_destroy (gpointer data); + ++static GtkDragSourceInfo *gtk_drag_get_source_info (GdkDragContext *context, ++ gboolean create); ++ ++extern GdkDragContext *gdk_quartz_drag_source_context(); /* gdk/quartz/gdkdnd-quartz.c */ ++ + struct _GtkDragSourceSite + { + GdkModifierType start_button_mask; +@@ -89,13 +94,16 @@ + + struct _GtkDragSourceInfo + { ++ GtkWidget *source_widget; + GtkWidget *widget; + GtkTargetList *target_list; /* Targets for drag data */ + GdkDragAction possible_actions; /* Actions allowed by source */ + GdkDragContext *context; /* drag context */ +- ++ NSEvent *nsevent; /* what started it */ + gint hot_x, hot_y; /* Hot spot for drag */ + GdkPixbuf *icon_pixbuf; ++ gboolean success; ++ gboolean delete; + }; + + struct _GtkDragDestSite +@@ -223,7 +231,9 @@ + selection_data, + 0, time); + } ++ + ++ + if (site && site->flags & GTK_DEST_DEFAULT_DROP) + { + gtk_drag_finish (context, +@@ -233,19 +243,24 @@ + } + } + +- +-GtkWidget * +-gtk_drag_get_source_widget (GdkDragContext *context) +-{ +- return NULL; +-} +- + void + gtk_drag_finish (GdkDragContext *context, + gboolean success, + gboolean del, + guint32 time) + { ++ GtkDragSourceInfo *info; ++ GdkDragContext* source_context = gdk_quartz_drag_source_context (); ++ ++ if (source_context) ++ { ++ info = gtk_drag_get_source_info (source_context, FALSE); ++ if (info) ++ { ++ info->success = success; ++ info->delete = del; ++ } ++ } + } + + static void +@@ -307,6 +322,22 @@ + g_object_set_qdata (G_OBJECT (context), dest_info_quark, NULL); + } + ++GtkWidget * ++gtk_drag_get_source_widget (GdkDragContext *context) ++{ ++ GtkDragSourceInfo *info; ++ GdkDragContext* real_source_context = gdk_quartz_drag_source_context(); ++ ++ if (!real_source_context) ++ return NULL; ++ ++ info = gtk_drag_get_source_info (real_source_context, FALSE); ++ if (!info) ++ return NULL; ++ ++ return info->source_widget; ++} ++ + /************************************************************* + * gtk_drag_highlight_expose: + * Callback for expose_event for highlighted widgets. +@@ -857,6 +888,8 @@ + gtk_drag_get_data (widget, context, target, time); + } + ++ /* leave a note for the source-side context about the action chosen */ ++ + g_signal_emit_by_name (widget, "drag-drop", + context, x, y, time, &retval); + +@@ -1031,6 +1064,45 @@ + return GDK_NONE; + } + ++static gboolean ++gtk_drag_begin_idle (gpointer arg) ++{ ++ GdkDragContext* context = (GdkDragContext*) arg; ++ GtkDragSourceInfo* info = gtk_drag_get_source_info (context, FALSE); ++ NSWindow *nswindow; ++ NSPasteboard *pasteboard; ++ GtkDragSourceOwner *owner; ++ NSPoint point; ++ ++ g_assert (info != NULL); ++ ++ pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard]; ++ owner = [[GtkDragSourceOwner alloc] initWithInfo:info]; ++ ++ [pasteboard declareTypes:_gtk_quartz_target_list_to_pasteboard_types (info->target_list) owner:owner]; ++ ++ if ((nswindow = get_toplevel_nswindow (info->source_widget)) == NULL) ++ return FALSE; ++ ++ /* Ref the context. It's unreffed when the drag has been aborted */ ++ g_object_ref (info->context); ++ ++ /* FIXME: If the event isn't a mouse event, use the global cursor position instead */ ++ point = [info->nsevent locationInWindow]; ++ ++ [nswindow dragImage:_gtk_quartz_create_image_from_pixbuf (info->icon_pixbuf) ++ at:point ++ offset:NSMakeSize(0, 0) ++ event:info->nsevent ++ pasteboard:pasteboard ++ source:nswindow ++ slideBack:YES]; ++ ++ [info->nsevent release]; ++ ++ return FALSE; ++} ++ + static GdkDragContext * + gtk_drag_begin_internal (GtkWidget *widget, + GtkDragSourceSite *site, +@@ -1042,16 +1114,13 @@ + GtkDragSourceInfo *info; + GdkDragContext *context; + NSWindow *nswindow; +- NSPasteboard *pasteboard; +- GtkDragSourceOwner *owner; +- NSEvent *nsevent; +- NSPoint point; + + context = gdk_drag_begin (NULL, NULL); + context->is_source = TRUE; + + info = gtk_drag_get_source_info (context, TRUE); + ++ info->source_widget = g_object_ref (widget); + info->widget = g_object_ref (widget); + info->target_list = target_list; + gtk_target_list_ref (target_list); +@@ -1086,13 +1155,13 @@ + GdkPixbuf *pixbuf; + + pixbuf = gdk_pixbuf_new (GDK_COLORSPACE_RGB, FALSE, 8, 1, 1); +- gdk_pixbuf_fill (pixbuf, 0xffffff); +- +- gtk_drag_set_icon_pixbuf (context, +- pixbuf, ++ gdk_pixbuf_fill (pixbuf, 0xffffff); ++ ++ gtk_drag_set_icon_pixbuf (context, ++ pixbuf, + 0, 0); + +- g_object_unref (pixbuf); ++ g_object_unref (pixbuf); + } + break; + case GTK_IMAGE_PIXBUF: +@@ -1117,31 +1186,17 @@ + } + } + +- gdk_pointer_ungrab (0); +- +- pasteboard = [NSPasteboard pasteboardWithName:NSDragPboard]; +- owner = [[GtkDragSourceOwner alloc] initWithInfo:info]; ++ nswindow = get_toplevel_nswindow (widget); ++ info->nsevent = [nswindow currentEvent]; ++ [info->nsevent retain]; + +- [pasteboard declareTypes:_gtk_quartz_target_list_to_pasteboard_types (target_list) owner:owner]; ++ /* drag will begin in an idle handler to avoid nested run loops */ + +- /* Ref the context. It's unreffed when the drag has been aborted */ +- g_object_ref (info->context); ++ g_idle_add_full (G_PRIORITY_HIGH_IDLE, gtk_drag_begin_idle, context, NULL); + +- nswindow = get_toplevel_nswindow (widget); ++ gdk_pointer_ungrab (0); + +- /* FIXME: If the event isn't a mouse event, use the global cursor position instead */ +- nsevent = [nswindow currentEvent]; +- point = [nsevent locationInWindow]; +- +- [nswindow dragImage:_gtk_quartz_create_image_from_pixbuf (info->icon_pixbuf) +- at:point +- offset:NSMakeSize(0, 0) +- event:nsevent +- pasteboard:pasteboard +- source:nswindow +- slideBack:YES]; +- +- return info->context; ++ return context; + } + + GdkDragContext * +@@ -1668,7 +1723,20 @@ + gint hot_x, + gint hot_y) + { +- g_warning ("gtk_drag_set_icon_pixmap is not supported on Mac OS X"); ++ GdkPixbuf *pixbuf; ++ ++ g_return_if_fail (GDK_IS_DRAG_CONTEXT (context)); ++ g_return_if_fail (context->is_source); ++ g_return_if_fail (GDK_IS_COLORMAP (colormap)); ++ g_return_if_fail (GDK_IS_PIXMAP (pixmap)); ++ ++ pixbuf = gdk_pixbuf_get_from_drawable (NULL, pixmap, colormap, ++ 0, 0, /* src */ ++ 0, 0, /* dst */ ++ -1, -1); ++ ++ gtk_drag_set_icon_pixbuf (context, pixbuf, hot_x, hot_y); ++ g_object_unref (pixbuf); + } + + /** +@@ -1760,6 +1828,9 @@ + g_signal_emit_by_name (info->widget, "drag-end", + info->context); + ++ if (info->source_widget) ++ g_object_unref (info->source_widget); ++ + if (info->widget) + g_object_unref (info->widget); + +@@ -1781,6 +1852,10 @@ + static void + gtk_drag_drop_finished (GtkDragSourceInfo *info) + { ++ if (info->success && info->delete) ++ g_signal_emit_by_name (info->source_widget, "drag-data-delete", ++ info->context); ++ + /* Workaround for the fact that the NS API blocks until the drag is + * over. This way the context is still valid when returning from + * drag_begin, even if it will still be quite useless. See bug #501588. +Index: gdk/quartz/gdkevents-quartz.c +=================================================================== +--- gdk/quartz/gdkevents-quartz.c (revision 21770) ++++ gdk/quartz/gdkevents-quartz.c (working copy) +@@ -112,6 +112,18 @@ + return ((GdkEventPrivate *) event)->windowing_data; + } + ++/* A category that exposes the protected carbon event for an NSEvent. */ ++@interface NSEvent (GdkQuartzNSEvent) ++- (void *)gdk_quartz_event_ref; ++@end ++ ++@implementation NSEvent (GdkQuartzNSEvent) ++- (void *)gdk_quartz_event_ref ++{ ++ return _eventRef; ++} ++@end ++ + void + _gdk_events_init (void) + { +@@ -1668,6 +1680,65 @@ + } + + static gboolean ++_gdk_quartz_possibly_forward_accelerator (NSEvent* nsevent) ++{ ++ /* Special-case menu shortcut events. We create command events for ++ * those and forward to the corresponding menu. ++ */ ++ if ((!_gdk_quartz_keyboard_grab_window || ++ (_gdk_quartz_keyboard_grab_window && keyboard_grab_owner_events)) && ++ [nsevent type] == NSKeyDown) ++ { ++ EventRef event_ref; ++ MenuRef menu_ref; ++ MenuItemIndex index; ++ ++ event_ref = [nsevent gdk_quartz_event_ref]; ++ if (IsMenuKeyEvent (NULL, event_ref, ++ kMenuEventQueryOnly, ++ &menu_ref, &index)) ++ { ++ MenuCommand menu_command; ++ HICommand hi_command; ++ ++ if (GetMenuItemCommandID (menu_ref, index, &menu_command) != noErr) ++ return FALSE; ++ ++ hi_command.commandID = menu_command; ++ hi_command.menu.menuRef = menu_ref; ++ hi_command.menu.menuItemIndex = index; ++ ++ CreateEvent (NULL, kEventClassCommand, kEventCommandProcess, ++ 0, kEventAttributeUserEvent, &event_ref); ++ SetEventParameter (event_ref, kEventParamDirectObject, ++ typeHICommand, ++ sizeof (HICommand), &hi_command); ++ ++ SendEventToEventTarget (event_ref, GetMenuEventTarget (menu_ref)); ++ ++ ReleaseEvent (event_ref); ++ ++ return TRUE; ++ } ++ } ++ return FALSE; ++} ++ ++gboolean ++gdk_quartz_possibly_forward (GdkEvent* event) ++{ ++ NSEvent *nsevent; ++ g_return_val_if_fail (event != NULL, FALSE); ++ ++ nsevent = ((GdkEventPrivate*)event)->windowing_data; ++ ++ if (nsevent) ++ return _gdk_quartz_possibly_forward_accelerator (nsevent); ++ ++ return FALSE; ++} ++ ++static gboolean + gdk_event_translate (NSEvent *nsevent) + { + NSWindow *nswindow; +Index: gdk/quartz/gdkdnd-quartz.c +=================================================================== +--- gdk/quartz/gdkdnd-quartz.c (revision 21770) ++++ gdk/quartz/gdkdnd-quartz.c (working copy) +@@ -101,6 +101,12 @@ + + GdkDragContext *_gdk_quartz_drag_source_context = NULL; + ++GdkDragContext* ++gdk_quartz_drag_source_context() ++{ ++ return _gdk_quartz_drag_source_context; ++} ++ + GdkDragContext * + gdk_drag_begin (GdkWindow *window, + GList *targets) +Index: gdk/quartz/GdkQuartzWindow.c +=================================================================== +--- gdk/quartz/GdkQuartzWindow.c (revision 21770) ++++ gdk/quartz/GdkQuartzWindow.c (working copy) +@@ -461,8 +461,29 @@ + { + GdkDragAction result = 0; + ++ /* GDK and Quartz drag operations do not map 1:1. ++ This mapping represents about the best that we ++ can come up. ++ ++ Note that NSDragOperationPrivate and GDK_ACTION_PRIVATE ++ have almost opposite meanings: the GDK one means that the ++ destination is solely responsible for the action; the Quartz ++ one means that the source and destination will agree ++ privately on the action. NSOperationGeneric is close in meaning ++ to GDK_ACTION_PRIVATE but there is a problem: it will be ++ sent for any ordinary drag, and likely not understood ++ by any intra-widget drag (since the source & dest are the ++ same) ++ */ ++ + if (operation & NSDragOperationGeneric) ++ result |= GDK_ACTION_MOVE; ++ if (operation & NSDragOperationCopy) + result |= GDK_ACTION_COPY; ++ if (operation & NSDragOperationMove) ++ result |= GDK_ACTION_MOVE; ++ if (operation & NSDragOperationLink) ++ result |= GDK_ACTION_LINK; + + return result; + } +@@ -474,6 +495,10 @@ + + if (action & GDK_ACTION_COPY) + result |= NSDragOperationCopy; ++ if (action & GDK_ACTION_LINK) ++ result |= NSDragOperationLink; ++ if (action & GDK_ACTION_MOVE) ++ result |= NSDragOperationMove; + + return result; + } +@@ -485,6 +510,7 @@ + + GDK_DRAG_CONTEXT_PRIVATE (current_context)->dragging_info = sender; + current_context->suggested_action = drag_operation_to_drag_action ([sender draggingSourceOperationMask]); ++ current_context->actions = current_context->suggested_action; + } + + - (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender +@@ -510,6 +536,10 @@ + + - (void)draggingEnded:(id <NSDraggingInfo>)sender + { ++ /* leave a note for the source about what action was taken */ ++ if (_gdk_quartz_drag_source_context && current_context) ++ _gdk_quartz_drag_source_context->action = current_context->action; ++ + if (current_context) + g_object_unref (current_context); + current_context = NULL; diff --git a/tools/patches/gtkdnd-quartz.patch b/tools/patches/gtkdnd-quartz.patch new file mode 100644 index 0000000000..07723ad533 --- /dev/null +++ b/tools/patches/gtkdnd-quartz.patch @@ -0,0 +1,55 @@ +--- old/gtk+-2.24.23/gtk/gtkdnd-quartz.c 2013-10-16 11:29:55.000000000 -0400 ++++ new/gtk+-2.24.23/gtk/gtkdnd-quartz.c 2015-07-20 14:53:33.000000000 -0400 +@@ -1928,16 +1928,29 @@ + static gboolean + drag_drop_finished_idle_cb (gpointer data) + { +- gtk_drag_source_info_destroy (data); ++ GtkDragSourceInfo* info = (GtkDragSourceInfo*) data; ++ if (info->success) ++ { ++ gtk_drag_source_info_destroy (data); ++ } + return FALSE; + } + + static void +-gtk_drag_drop_finished (GtkDragSourceInfo *info) ++gtk_drag_drop_finished (GtkDragSourceInfo *info, GtkDragResult result) + { +- if (info->success && info->delete) +- g_signal_emit_by_name (info->source_widget, "drag-data-delete", +- info->context); ++ gboolean success = (result == GTK_DRAG_RESULT_SUCCESS); ++ ++ if (!success) { ++ g_signal_emit_by_name (info->source_widget, "drag-failed", ++ info->context, GTK_DRAG_RESULT_NO_TARGET, &success); ++ } ++ ++ if (success && info->delete) { ++ g_signal_emit_by_name (info->source_widget, "drag-data-delete", ++ info->context); ++ } ++ + + /* Workaround for the fact that the NS API blocks until the drag is + * over. This way the context is still valid when returning from +@@ -1963,6 +1976,7 @@ + { + GtkDragSourceInfo *info; + GdkDragContext *context; ++ GtkDragResult result; + + g_return_if_fail (widget != NULL); + g_return_if_fail (event != NULL); +@@ -1975,7 +1989,8 @@ + switch (event->type) + { + case GDK_DROP_FINISHED: +- gtk_drag_drop_finished (info); ++ result = (gdk_drag_context_get_dest_window (context) != NULL) ? GTK_DRAG_RESULT_SUCCESS : GTK_DRAG_RESULT_NO_TARGET; ++ gtk_drag_drop_finished (info, result); + break; + default: + g_assert_not_reached (); diff --git a/tools/patches/shared_ptr.patch b/tools/patches/shared_ptr.patch new file mode 100644 index 0000000000..ff397b5e85 --- /dev/null +++ b/tools/patches/shared_ptr.patch @@ -0,0 +1,275 @@ +--- shared_ptr.hpp.KEEP 2011-02-09 11:54:05.203963701 -0500 ++++ shared_ptr.hpp 2011-02-10 08:27:24.643133773 -0500 +@@ -55,6 +55,13 @@ + # pragma warning(disable:4284) // odd return type for operator-> + #endif + ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++void boost_debug_shared_ptr_operator_equals (void const *, void const *, int, void const*, int); ++void boost_debug_shared_ptr_reset (void const *, void const *, int, void const*, int); ++void boost_debug_shared_ptr_destructor (void const *, void const *, int); ++void boost_debug_shared_ptr_constructor (void const *, void const *, int); ++#endif ++ + namespace boost + { + +@@ -181,12 +188,31 @@ + + shared_ptr(): px(0), pn() // never throws in 1.30+ + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif ++ } ++ ++ ~shared_ptr() ++ { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_destructor (this, get(), use_count()); ++#endif ++ } ++ ++ shared_ptr(const shared_ptr<T>& r ) : px (r.px), pn (r.pn) { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> + explicit shared_ptr( Y * p ): px( p ), pn( p ) // Y must be complete + { + boost::detail::sp_enable_shared_from_this( this, p, p ); ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + // +@@ -197,7 +223,10 @@ + + template<class Y, class D> shared_ptr(Y * p, D d): px(p), pn(p, d) + { +- boost::detail::sp_enable_shared_from_this( this, p, p ); ++ boost::detail::sp_enable_shared_from_this( this, p, p ); ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, 9249 /*use_count()*/); ++#endif + } + + // As above, but with allocator. A's copy constructor shall not throw. +@@ -205,6 +234,9 @@ + template<class Y, class D, class A> shared_ptr( Y * p, D d, A a ): px( p ), pn( p, d, a ) + { + boost::detail::sp_enable_shared_from_this( this, p, p ); ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + // generated copy constructor, destructor are fine +@@ -214,6 +246,9 @@ + { + // it is now safe to copy r.px, as pn(r.pn) did not throw + px = r.px; ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> +@@ -223,6 +258,9 @@ + { + px = r.px; + } ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> +@@ -237,22 +275,34 @@ + #endif + : px( r.px ), pn( r.pn ) // never throws + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + // aliasing + template< class Y > + shared_ptr( shared_ptr<Y> const & r, T * p ): px( p ), pn( r.pn ) // never throws + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> + shared_ptr(shared_ptr<Y> const & r, boost::detail::static_cast_tag): px(static_cast<element_type *>(r.px)), pn(r.pn) + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> + shared_ptr(shared_ptr<Y> const & r, boost::detail::const_cast_tag): px(const_cast<element_type *>(r.px)), pn(r.pn) + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> +@@ -262,6 +312,9 @@ + { + pn = boost::detail::shared_count(); + } ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> +@@ -271,6 +324,9 @@ + { + boost::throw_exception(std::bad_cast()); + } ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + #ifndef BOOST_NO_AUTO_PTR +@@ -281,6 +337,9 @@ + Y * tmp = r.get(); + pn = boost::detail::shared_count(r); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + #if !defined( BOOST_NO_SFINAE ) && !defined( BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION ) +@@ -291,6 +350,9 @@ + typename Ap::element_type * tmp = r.get(); + pn = boost::detail::shared_count( r ); + boost::detail::sp_enable_shared_from_this( this, tmp, tmp ); ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + +@@ -302,6 +364,9 @@ + + shared_ptr & operator=( shared_ptr const & r ) // never throws + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count()); ++#endif + this_type(r).swap(*this); + return *this; + } +@@ -311,6 +376,9 @@ + template<class Y> + shared_ptr & operator=(shared_ptr<Y> const & r) // never throws + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count()); ++#endif + this_type(r).swap(*this); + return *this; + } +@@ -322,6 +390,9 @@ + template<class Y> + shared_ptr & operator=( std::auto_ptr<Y> & r ) + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count()); ++#endif + this_type(r).swap(*this); + return *this; + } +@@ -348,6 +419,9 @@ + { + pn.swap( r.pn ); + r.px = 0; ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + template<class Y> +@@ -364,10 +438,16 @@ + { + pn.swap( r.pn ); + r.px = 0; ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_constructor (this, px, use_count()); ++#endif + } + + shared_ptr & operator=( shared_ptr && r ) // never throws + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count()); ++#endif + this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); + return *this; + } +@@ -375,6 +455,9 @@ + template<class Y> + shared_ptr & operator=( shared_ptr<Y> && r ) // never throws + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_operator_equals (this, get(), use_count(), r.get(), r.use_count()); ++#endif + this_type( static_cast< shared_ptr<Y> && >( r ) ).swap( *this ); + return *this; + } +@@ -383,27 +466,42 @@ + + void reset() // never throws in 1.30+ + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_reset (this, get(), use_count(), 0, 0); ++#endif + this_type().swap(*this); + } + + template<class Y> void reset(Y * p) // Y must be complete + { + BOOST_ASSERT(p == 0 || p != px); // catch self-reset errors ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_reset (this, get(), use_count(), p, 0); ++#endif + this_type(p).swap(*this); + } + + template<class Y, class D> void reset( Y * p, D d ) + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_reset (this, get(), use_count(), p, 0); ++#endif + this_type( p, d ).swap( *this ); + } + + template<class Y, class D, class A> void reset( Y * p, D d, A a ) + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_reset (this, get(), use_count(), p, 0); ++#endif + this_type( p, d, a ).swap( *this ); + } + + template<class Y> void reset( shared_ptr<Y> const & r, T * p ) + { ++#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS ++ boost_debug_shared_ptr_reset (this, get(), use_count(), r.get(), r.use_count()); ++#endif + this_type( r, p ).swap( *this ); + } + diff --git a/tools/waf-str.patch b/tools/patches/waf-str.patch index 8d37f68d32..8d37f68d32 100644 --- a/tools/waf-str.patch +++ b/tools/patches/waf-str.patch diff --git a/tools/waflib-tar.patch b/tools/patches/waflib-tar.patch index 9858590d56..9858590d56 100644 --- a/tools/waflib-tar.patch +++ b/tools/patches/waflib-tar.patch diff --git a/tools/waflib.patch b/tools/patches/waflib.patch index c5f2f18c83..c5f2f18c83 100644 --- a/tools/waflib.patch +++ b/tools/patches/waflib.patch |