[SCM] inkscape/master: debian/patches/fix-FTBFS.patch: add to fix FTBFS with a glibmm without Glib::ScopedPtr
mattia at users.alioth.debian.org
mattia at users.alioth.debian.org
Tue Apr 26 22:20:07 UTC 2016
The following commit has been merged in the master branch:
commit 598f765645aafe94a3005df08f265109bb9df889
Author: Mattia Rizzolo <mattia at debian.org>
Date: Tue Apr 26 21:54:57 2016 +0000
debian/patches/fix-FTBFS.patch: add to fix FTBFS with a glibmm without Glib::ScopedPtr
Closes: #822392
diff --git a/debian/patches/fix-FTBFS.patch b/debian/patches/fix-FTBFS.patch
new file mode 100644
index 0000000..8cb04c2
--- /dev/null
+++ b/debian/patches/fix-FTBFS.patch
@@ -0,0 +1,71 @@
+Description: Remove inkscape-specific glib clone function (and get rid of deprecated Glib ScopedPtr use)
+Author: Marc Jeanmougin <marcjeanmougin at free.fr>
+Origin: upstream, https://bazaar.launchpad.net/~inkscape.dev/inkscape/trunk/revision/14766
+Bug: https://bugs.launchpad.net/inkscape/+bug/1567485
+Bug-Debian: https://bugs.debian.org/822392
+Acked-By: Mattia Rizzolo <mattia at debian.org>
+Last-Update: 2016-04-26
+
+
+--- a/src/ui/clipboard.cpp
++++ b/src/ui/clipboard.cpp
+@@ -145,8 +145,6 @@
+ void _setClipboardColor(guint32);
+ void _userWarn(SPDesktop *, char const *);
+
+- void _inkscape_wait_for_targets(std::list<Glib::ustring> &);
+-
+ // private properites
+ SPDocument *_clipboardSPDoc; ///< Document that stores the clipboard until someone requests it
+ Inkscape::XML::Node *_defs; ///< Reference to the clipboard document's defs node
+@@ -1222,9 +1220,7 @@
+ */
+ Glib::ustring ClipboardManagerImpl::_getBestTarget()
+ {
+- // GTKmm's wait_for_targets() is broken, see the comment in _inkscape_wait_for_targets()
+- std::list<Glib::ustring> targets; // = _clipboard->wait_for_targets();
+- _inkscape_wait_for_targets(targets);
++ std::list<Glib::ustring> targets = _clipboard->wait_for_targets();
+
+ // clipboard target debugging snippet
+ /*
+@@ -1376,39 +1372,6 @@
+ desktop->messageStack()->flash(Inkscape::WARNING_MESSAGE, msg);
+ }
+
+-
+-// GTKMM's clipboard::wait_for_targets is buggy and might return bogus, see
+-//
+-// https://bugs.launchpad.net/inkscape/+bug/296778
+-// http://mail.gnome.org/archives/gtk-devel-list/2009-June/msg00062.html
+-//
+-// for details. Until this has been fixed upstream we will use our own implementation
+-// of this method, as copied from /gtkmm-2.16.0/gtk/gtkmm/clipboard.cc.
+-void ClipboardManagerImpl::_inkscape_wait_for_targets(std::list<Glib::ustring> &listTargets)
+-{
+- //Get a newly-allocated array of atoms:
+- GdkAtom* targets = NULL;
+- gint n_targets = 0;
+- gboolean test = gtk_clipboard_wait_for_targets( gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), &targets, &n_targets );
+- if (!test || (targets == NULL)) {
+- return;
+- }
+-
+- //Add the targets to the C++ container:
+- for (int i = 0; i < n_targets; i++)
+- {
+- //Convert the atom to a string:
+- gchar* const atom_name = gdk_atom_name(targets[i]);
+-
+- Glib::ustring target;
+- if (atom_name) {
+- target = Glib::ScopedPtr<char>(atom_name).get(); //This frees the gchar*.
+- }
+-
+- listTargets.push_back(target);
+- }
+-}
+-
+ /* #######################################
+ ClipboardManager class
+ ####################################### */
diff --git a/debian/patches/series b/debian/patches/series
index 68af191..7e12e19 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,3 @@
0001-Drop_PS_and_PDF_support_in_MimeType.patch
+fix-FTBFS.patch
reproducible-build.patch
--
inkscape packaging
More information about the pkg-multimedia-commits
mailing list