diff options
-rw-r--r-- | net-nntp/pan/files/pan-0.139-r2-fix_crash_at_startup.patch | 75 | ||||
-rw-r--r-- | net-nntp/pan/pan-0.139-r2.ebuild | 58 |
2 files changed, 133 insertions, 0 deletions
diff --git a/net-nntp/pan/files/pan-0.139-r2-fix_crash_at_startup.patch b/net-nntp/pan/files/pan-0.139-r2-fix_crash_at_startup.patch new file mode 100644 index 000000000000..dfc1a362a09b --- /dev/null +++ b/net-nntp/pan/files/pan-0.139-r2-fix_crash_at_startup.patch @@ -0,0 +1,75 @@ +From 366372076042687a0bf21cf72c7693e4a7c2b3d6 Mon Sep 17 00:00:00 2001 +From: Detlef Graef <detlef.graef@yahoo.de> +Date: Wed, 13 Jan 2016 16:59:35 +0100 +Subject: Fix crash at PanTreeStore::get_iter() + +--- + pan/gui/gui.cc | 2 +- + pan/gui/prefs-ui.cc | 2 +- + pan/gui/prefs.cc | 6 ++++-- + pan/gui/prefs.h | 2 +- + 4 files changed, 7 insertions(+), 5 deletions(-) + +diff --git a/pan/gui/gui.cc b/pan/gui/gui.cc +index d709608..da7b5e7 100644 +--- a/pan/gui/gui.cc ++++ b/pan/gui/gui.cc +@@ -2022,7 +2022,7 @@ void GUI :: do_read_selected_group () + // update iconv handler + const char * from = g_mime_charset_iconv_name(local.c_str()); + char buf[256]; +- g_snprintf(buf, sizeof(buf), "%s//IGNORE", _prefs.get_string("default-charset", "UTF-8").c_str()); ++ g_snprintf(buf, sizeof(buf), "%s//IGNORE", _prefs.get_string("default-charset", "UTF-8").str); + const char * to = g_mime_charset_iconv_name(buf); + { + if (iconv_inited) +diff --git a/pan/gui/prefs-ui.cc b/pan/gui/prefs-ui.cc +index 23dc212..57f45bf 100644 +--- a/pan/gui/prefs-ui.cc ++++ b/pan/gui/prefs-ui.cc +@@ -343,7 +343,7 @@ namespace pan + { + GtkWidget * t = gtk_entry_new(); + g_object_set_data_full (G_OBJECT(t), PREFS_KEY, g_strdup(key), g_free); +- gtk_entry_set_text (GTK_ENTRY(t), prefs.get_string (key, fallback).c_str()); ++ gtk_entry_set_text (GTK_ENTRY(t), prefs.get_string (key, fallback).str); + g_signal_connect (t, "changed", G_CALLBACK(entry_changed_cb), &prefs); + return t; + } +diff --git a/pan/gui/prefs.cc b/pan/gui/prefs.cc +index 5d21af7..95700a8 100644 +--- a/pan/gui/prefs.cc ++++ b/pan/gui/prefs.cc +@@ -324,12 +324,14 @@ Prefs :: set_long64 (const StringView& key, uint64_t value) + **** STRINGS + ***/ + +-std::string ++StringView + Prefs :: get_string (const StringView& key, const StringView& fallback) const + { ++ StringView prefs_string; + if (!_strings.count (key)) + _strings[key] = fallback; +- return _strings[key]; ++ prefs_string = _strings[key]; ++ return prefs_string; + } + + void +diff --git a/pan/gui/prefs.h b/pan/gui/prefs.h +index 748834a..eac865e 100644 +--- a/pan/gui/prefs.h ++++ b/pan/gui/prefs.h +@@ -103,7 +103,7 @@ namespace pan + uint64_t get_long64 (const StringView& key, uint64_t fallback) const; + void set_long64 (const StringView& key, uint64_t value); + +- std::string get_string (const StringView& key, const StringView& fallback) const; ++ StringView get_string (const StringView& key, const StringView& fallback) const; + void set_string (const StringView& key, const StringView&); + + void set_color (const StringView& key, const GdkColor& color); +-- +cgit v0.12 + diff --git a/net-nntp/pan/pan-0.139-r2.ebuild b/net-nntp/pan/pan-0.139-r2.ebuild new file mode 100644 index 000000000000..2e64f8ef3c5e --- /dev/null +++ b/net-nntp/pan/pan-0.139-r2.ebuild @@ -0,0 +1,58 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI="5" + +inherit eutils + +DESCRIPTION="A newsreader for GNOME" +HOMEPAGE="http://pan.rebelbase.com/" +SRC_URI="http://pan.rebelbase.com/download/releases/${PV}/source/${P}.tar.bz2" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="dbus gnome-keyring libnotify spell ssl" + +RDEPEND=">=dev-libs/glib-2.26:2 + >=x11-libs/gtk+-2.16:2 + dev-libs/gmime:2.6 + gnome-keyring? ( >=gnome-base/libgnome-keyring-3.2 ) + libnotify? ( >=x11-libs/libnotify-0.4.1:0= ) + spell? ( + >=app-text/enchant-1.6 + >=app-text/gtkspell-2.0.7:2 ) + ssl? ( >=net-libs/gnutls-3:0= )" + +DEPEND="${RDEPEND} + app-text/gnome-doc-utils + >=dev-util/intltool-0.35.5 + sys-devel/gettext + virtual/pkgconfig" + +DOCS="AUTHORS ChangeLog NEWS README" + +src_prepare() { + # in next release + epatch "${FILESDIR}/${P}-pan.desktop.patch" + + # g++-5 fix, https://bugzilla.gnome.org/show_bug.cgi?id=754698 + epatch "${FILESDIR}"/${PN}-0.139-get_pan_home.patch + + # Fix crash at startup: #570108 + epatch "${FILESDIR}"/${PN}-0.139-r2-fix_crash_at_startup.patch + + # upstream release was in 2012 - users may want to apply patches + epatch_user +} + +src_configure() { + econf \ + --without-gtk3 \ + $(use_with dbus) \ + $(use_enable gnome-keyring gkr) \ + $(use_with spell gtkspell) \ + $(use_enable libnotify) \ + $(use_with ssl gnutls) +} |