[packages/nemiver] - added patches to support building with vte 0.38 - rel 5
baggins
baggins at pld-linux.org
Wed Nov 19 20:52:14 CET 2014
commit baafd8c45d5aeeb7f34d7e2b1c2838c4252a397c
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Wed Nov 19 20:51:46 2014 +0100
- added patches to support building with vte 0.38
- rel 5
GErrorSafePtr.patch | 119 +++++++++++++++++++++++++++++++++++++++++++++
NativeGObjectSafePtr.patch | 90 ++++++++++++++++++++++++++++++++++
nemiver.spec | 10 +++-
vte-0.38.patch | 96 ++++++++++++++++++++++++++++++++++++
4 files changed, 313 insertions(+), 2 deletions(-)
---
diff --git a/nemiver.spec b/nemiver.spec
index 2f97726..00ccda3 100644
--- a/nemiver.spec
+++ b/nemiver.spec
@@ -2,11 +2,14 @@ Summary: C/C++ debugger for GNOME
Summary(pl.UTF-8): Debugger C/C++ dla GNOME
Name: nemiver
Version: 0.9.5
-Release: 3
+Release: 5
License: GPL
Group: X11/Applications
Source0: http://ftp.gnome.org/pub/GNOME/sources/nemiver/0.9/%{name}-%{version}.tar.xz
# Source0-md5: eb181de2e92a850982987c1960fc4454
+Patch0: GErrorSafePtr.patch
+Patch1: NativeGObjectSafePtr.patch
+Patch2: vte-0.38.patch
URL: http://home.gna.org/nemiver/
BuildRequires: autoconf >= 2.64
BuildRequires: automake >= 1:1.11.1
@@ -30,7 +33,7 @@ BuildRequires: pkgconfig
BuildRequires: rpmbuild(find_lang) >= 1.23
BuildRequires: rpmbuild(macros) >= 1.311
BuildRequires: sqlite3-devel >= 3.0
-BuildRequires: vte-devel >= 0.12.0
+BuildRequires: vte-devel >= 0.38.0
BuildRequires: yelp-tools
Requires(post,postun): glib2 >= 1:2.26.0
Requires(post,postun): gtk-update-icon-cache
@@ -70,6 +73,9 @@ Pliki nagłówkowe do rozwijania nowych backendów dla Nemivera.
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%build
%{__glib_gettextize}
diff --git a/GErrorSafePtr.patch b/GErrorSafePtr.patch
new file mode 100644
index 0000000..5c364db
--- /dev/null
+++ b/GErrorSafePtr.patch
@@ -0,0 +1,119 @@
+From ce7b6454f3da80d19c7952fb125729f8ee61e7f6 Mon Sep 17 00:00:00 2001
+From: Debarshi Ray <debarshir at gnome.org>
+Date: Fri, 16 May 2014 14:15:04 +0200
+Subject: 730243 Consolidate GErrorSafePtr definitions
+
+ * src/common/nmv-ustring.cc: Remove local copy of GErrorSafePtr.
+ (wstring_to_ustring): Use GErrorSafePtr from nmv-error.h
+ instead of local copy.
+ (ustring_to_wstring): Likewise.
+ * src/confmgr/nmv-gconf-mgr.cc: Remove local copy of
+ GErrorSafePtr.
+ * src/common/nmv-safe-ptr-utils.h: Move the copy of
+ GErrorSafePtr definition here.
+
+Signed-off-by: Dodji Seketeli <dodji at seketeli.org>
+
+diff --git a/src/common/nmv-safe-ptr-utils.h b/src/common/nmv-safe-ptr-utils.h
+index 27b0f85..fdeb350 100644
+--- a/src/common/nmv-safe-ptr-utils.h
++++ b/src/common/nmv-safe-ptr-utils.h
+@@ -99,13 +99,29 @@ struct DelUnicharsUnref {
+ }
+ };
+
++struct GErrorRef {
++ void
++ operator () (GError *)
++ {}
++};
++
++struct GErrorUnref {
++ void
++ operator () (GError *a_error)
++ {
++ if (a_error) {
++ g_error_free (a_error);
++ }
++ }
++};
++
+ typedef SafePtr <gchar, CharsRef, GCharUnref> GCharSafePtr;
+ typedef SafePtr <Object, ObjectRef, ObjectUnref> ObjectSafePtr;
+ typedef SafePtr <gchar, CharsRef, DelCharsUnref> CharSafePtr;
+ typedef SafePtr <gunichar, UnicharsRef, DelUnicharsUnref> UnicharSafePtr;
++typedef SafePtr<GError, GErrorRef, GErrorUnref> GErrorSafePtr;
+
+ NEMIVER_END_NAMESPACE(common)
+ NEMIVER_END_NAMESPACE(nemiver)
+
+ #endif
+-
+diff --git a/src/common/nmv-ustring.cc b/src/common/nmv-ustring.cc
+index f5dfe49..41a1a26 100644
+--- a/src/common/nmv-ustring.cc
++++ b/src/common/nmv-ustring.cc
+@@ -479,21 +479,6 @@ WString::assign (super_type::size_type a_n, gunichar a_c)
+ return *this;
+ }
+
+-struct GErrorRef {
+- void operator () (GError *)
+- {
+- }
+-};
+-
+-struct GErrorUnref {
+- void operator () (GError *a_err)
+- {
+- if (a_err) {
+- g_error_free (a_err);
+- }
+- }
+-};
+-
+ bool
+ wstring_to_ustring (const WString &a_wstr,
+ UString &a_ustr)
+@@ -504,7 +489,7 @@ wstring_to_ustring (const WString &a_wstr,
+ utf8_buf.reset (g_ucs4_to_utf8 (a_wstr.c_str (),
+ a_wstr.size (), &wstr_len,
+ &utf8_bytes_len, &err));
+- SafePtr<GError, GErrorRef, GErrorUnref> error;
++ GErrorSafePtr error;
+ error.reset (err);
+ if (error) {
+ LOG_ERROR ("got error conversion error: '" << error->message << "'");
+@@ -531,7 +516,7 @@ ustring_to_wstring (const UString &a_ustr,
+ &utf8_bytes_len,
+ &wstr_len,
+ &err));
+- SafePtr<GError, GErrorRef, GErrorUnref> error;
++ GErrorSafePtr error;
+ error.reset (err);
+ if (error) {
+ LOG_ERROR ("got error conversion error: '" << error->message << "'");
+diff --git a/src/confmgr/nmv-gconf-mgr.cc b/src/confmgr/nmv-gconf-mgr.cc
+index fd7ff1c..672935b 100644
+--- a/src/confmgr/nmv-gconf-mgr.cc
++++ b/src/confmgr/nmv-gconf-mgr.cc
+@@ -92,16 +92,6 @@ public:
+
+ //static const char * NEMIVER_KEY_DIR = "/app/nemiver";
+
+-struct GErrorRef {
+- void operator () (GError *a_error) {if (a_error) {}}
+-};
+-
+-struct GErrorUnref {
+- void operator () (GError *a_error) {if (a_error) {g_error_free (a_error);}}
+-};
+-
+-typedef SafePtr<GError, GErrorRef, GErrorUnref> GErrorSafePtr;
+-
+ void
+ client_notify_func (GConfClient *a_client,
+ const char* a_key,
+--
+cgit v0.10.1
+
diff --git a/NativeGObjectSafePtr.patch b/NativeGObjectSafePtr.patch
new file mode 100644
index 0000000..b1e5846
--- /dev/null
+++ b/NativeGObjectSafePtr.patch
@@ -0,0 +1,90 @@
+From 33749faf4b0b9b13e4e7e186a6237ca6ad916378 Mon Sep 17 00:00:00 2001
+From: Dodji Seketeli <dodji at seketeli.org>
+Date: Mon, 7 Jul 2014 13:42:04 +0200
+Subject: Consolidate NativeGObjectSafePtr definitions
+
+ * src/persp/dbgperspective/nmv-dbg-perspective.cc
+ (RefGObjectNative, UnrefGObjectNative): Move the definition of
+ these functors ...
+ * src/common/nmv-safe-ptr-utils.h: ... here.
+
+Signed-off-by: Dodji Seketeli <dodji at seketeli.org>
+
+diff --git a/src/common/nmv-safe-ptr-utils.h b/src/common/nmv-safe-ptr-utils.h
+index fdeb350..72211e8 100644
+--- a/src/common/nmv-safe-ptr-utils.h
++++ b/src/common/nmv-safe-ptr-utils.h
+@@ -30,7 +30,7 @@
+ #ifndef __NMV_SAFE_PTR_UTILS_H__
+ #define __NMV_SAFE_PTR_UTILS_H__
+
+-#include <glib.h>
++#include <glib-object.h>
+ #include "nmv-object.h"
+ #include "nmv-safe-ptr.h"
+ #include "nmv-namespace.h"
+@@ -115,11 +115,32 @@ struct GErrorUnref {
+ }
+ };
+
++struct RefGObjectNative {
++ void operator () (void *a_object)
++ {
++ if (a_object && G_IS_OBJECT (a_object)) {
++ g_object_ref (G_OBJECT (a_object));
++ }
++ }
++};
++
++struct UnrefGObjectNative {
++ void operator () (void *a_object)
++ {
++ if (a_object && G_IS_OBJECT (a_object)) {
++ g_object_unref (G_OBJECT (a_object));
++ }
++ }
++};
++
+ typedef SafePtr <gchar, CharsRef, GCharUnref> GCharSafePtr;
+ typedef SafePtr <Object, ObjectRef, ObjectUnref> ObjectSafePtr;
+ typedef SafePtr <gchar, CharsRef, DelCharsUnref> CharSafePtr;
+ typedef SafePtr <gunichar, UnicharsRef, DelUnicharsUnref> UnicharSafePtr;
+ typedef SafePtr<GError, GErrorRef, GErrorUnref> GErrorSafePtr;
++typedef SafePtr<void*,
++ RefGObjectNative,
++ UnrefGObjectNative> NativeGObjectSafePtr;
+
+ NEMIVER_END_NAMESPACE(common)
+ NEMIVER_END_NAMESPACE(nemiver)
+diff --git a/src/persp/dbgperspective/nmv-dbg-perspective.cc b/src/persp/dbgperspective/nmv-dbg-perspective.cc
+index 6e07ce7..6a7ff1b 100644
+--- a/src/persp/dbgperspective/nmv-dbg-perspective.cc
++++ b/src/persp/dbgperspective/nmv-dbg-perspective.cc
+@@ -836,24 +836,6 @@ struct UnrefGObject {
+ }
+ };
+
+-struct RefGObjectNative {
+- void operator () (void *a_object)
+- {
+- if (a_object && G_IS_OBJECT (a_object)) {
+- g_object_ref (G_OBJECT (a_object));
+- }
+- }
+-};
+-
+-struct UnrefGObjectNative {
+- void operator () (void *a_object)
+- {
+- if (a_object && G_IS_OBJECT (a_object)) {
+- g_object_unref (G_OBJECT (a_object));
+- }
+- }
+-};
+-
+ static
+ void gio_file_monitor_cb (const Glib::RefPtr<Gio::File>& file,
+ const Glib::RefPtr<Gio::File>& other_file,
+--
+cgit v0.10.1
+
diff --git a/vte-0.38.patch b/vte-0.38.patch
new file mode 100644
index 0000000..ba7b38e
--- /dev/null
+++ b/vte-0.38.patch
@@ -0,0 +1,96 @@
+diff --git a/configure.ac b/configure.ac
+index d3fc668..94d3a40 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -359,10 +359,29 @@ AC_SUBST(NEMIVERCOMMON_LIBS)
+ AC_SUBST(NEMIVERCOMMON_CFLAGS)
+
+ dnl library dependencies for the nemiver common UI module
++
++dnl first what vte should we use?
++PKG_CHECK_EXISTS([vte-2.90 >= $LIBVTE_VERSION],
++ [HAS_VTE_2_90=yes],
++ [HAS_VTR_2_90=no])
++
++PKG_CHECK_EXISTS([vte-2.91 >= $LIBVTE_VERSION],
++ [HAS_VTE_2_91=yes],
++ [HAS_VTE_2_91=no])
++
++if test x$HAS_VTE_2_91 = xyes; then
++ VTE_TO_USE=vte-2.91
++ AC_DEFINE(HAS_VTE_2_91,1,[libvte 2.91 support])
++else
++ VTE_TO_USE=vte-2.90
++ AC_DEFINE(HAS_VTE_2_90,1,[libvtr 2.90 support])
++fi
++
++dnl then the other libraries of uicommon module.
+ DEP_UICOMMON=" gtkmm-3.0 >= $LIBGTKMM_VERSION \
+ gtk+-3.0 >= $LIBGTK_VERSION \
+ gtksourceviewmm-3.0 >= $LIBGTKSOURCEVIEWMM_VERSION \
+- vte-2.90 >= $LIBVTE_VERSION"
++ $VTE_TO_USE >= $LIBVTE_VERSION"
+
+ PKG_CHECK_MODULES(NEMIVERUICOMMON, $DEP_UICOMMON $DEP_COMMON $DEP_MEMORYVIEW)
+ NEMIVERUICOMMON_CFLAGS="$NEMIVERUICOMMON_CFLAGS $CPPUNIT_CFLAGS"
+@@ -385,7 +404,7 @@ AC_SUBST(NEMIVERWORKBENCH_CFLAGS)
+
+ dnl library dependencies for the nemiver debug perspective plugin
+ DEP_PERSP="gtksourceviewmm-3.0 >= $LIBGTKSOURCEVIEWMM_VERSION \
+- vte-2.90 >= $LIBVTE_VERSION"
++ $VTE_TO_USE >= $LIBVTE_VERSION"
+
+ PKG_CHECK_MODULES(NEMIVERDBGPERSP, $DEP_UICOMMON $DEP_VFS $DEP_PERSP $DEP_MEMORYVIEW $DEP_DYNAMICLAYOUT)
+ NEMIVERDBGPERSP_LIBS="$NEMIVERDBGPERSP_LIBS $CPPUNIT_LIBS"
+diff --git a/src/uicommon/nmv-terminal.cc b/src/uicommon/nmv-terminal.cc
+index 9985e6b..42408c7 100644
+--- a/src/uicommon/nmv-terminal.cc
++++ b/src/uicommon/nmv-terminal.cc
+@@ -46,6 +46,7 @@
+ #include <gtkmm/menu.h>
+ #include <gtkmm/builder.h>
+ #include <gtkmm/uimanager.h>
++#include <pangomm/fontdescription.h>
+ #include <vte/vte.h>
+ #include <glib/gi18n.h>
+ #include "common/nmv-exception.h"
+@@ -137,11 +137,18 @@ struct Terminal::Priv {
+ THROW_IF_FAIL (vte);
+
+ // Mandatory for vte 0.14
++#ifdef HAS_VTE_2_91
++ Pango::FontDescription font_desc ("monospace");
++ vte_terminal_set_font (vte, font_desc.gobj());
++#else // HAS_VTE_2_90
+ vte_terminal_set_font_from_string (vte, "monospace");
++#endif
+
+ vte_terminal_set_scroll_on_output (vte, TRUE);
+ vte_terminal_set_scrollback_lines (vte, 1000);
++#ifdef HAS_VTE_2_90
+ vte_terminal_set_emulation (vte, "xterm");
++#endif
+
+ widget = Glib::wrap (w);
+ THROW_IF_FAIL (widget);
+@@ -267,7 +274,17 @@ struct Terminal::Priv {
+ THROW_IF_FAIL (slave_pty);
+ THROW_IF_FAIL (master_pty);
+
++#ifdef HAS_VTE_2_91
++ GError *err = 0;
++ VtePty *p = vte_pty_new_foreign_sync (master_pty, 0, &err);
++ GErrorSafePtr error (err);
++ SafePtr<VtePty, RefGObjectNative, UnrefGObjectNative> pty (p);
++ THROW_IF_FAIL2 (!error, error->message);
++
++ vte_terminal_set_pty (vte, pty.get());
++#else //HAS_VTE_2_90
+ vte_terminal_set_pty (vte, master_pty);
++#endif
+ return true;
+ }
+ };//end Terminal::Priv--
+--
+cgit v0.10.1
+
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/nemiver.git/commitdiff/baafd8c45d5aeeb7f34d7e2b1c2838c4252a397c
More information about the pld-cvs-commit
mailing list