summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wendler <polynomial-c@gentoo.org>2017-08-11 21:57:22 +0200
committerLars Wendler <polynomial-c@gentoo.org>2017-08-11 21:57:41 +0200
commitdbd1e3e95fcff251b6232544a313873a24a3de9b (patch)
tree3d2903f26d863f3d8b4ed144d9ea0d6244253dce /mail-client
parentsci-mathematics/gmm: fix homepage, src_uri (diff)
downloadgentoo-dbd1e3e95fcff251b6232544a313873a24a3de9b.tar.gz
gentoo-dbd1e3e95fcff251b6232544a313873a24a3de9b.tar.bz2
gentoo-dbd1e3e95fcff251b6232544a313873a24a3de9b.zip
mail-client/claws-mail: Revbump to fix segfault (bug #618376).
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'mail-client')
-rw-r--r--mail-client/claws-mail/claws-mail-3.15.0-r1.ebuild (renamed from mail-client/claws-mail/claws-mail-3.15.0.ebuild)8
-rw-r--r--mail-client/claws-mail/files/claws-mail-3.15.0-old_profile_segfault.patch80
2 files changed, 86 insertions, 2 deletions
diff --git a/mail-client/claws-mail/claws-mail-3.15.0.ebuild b/mail-client/claws-mail/claws-mail-3.15.0-r1.ebuild
index 190562439d12..c92913afd868 100644
--- a/mail-client/claws-mail/claws-mail-3.15.0.ebuild
+++ b/mail-client/claws-mail/claws-mail-3.15.0-r1.ebuild
@@ -85,6 +85,10 @@ RDEPEND="${COMMONDEPEND}
net-misc/curl
)"
+PATCHES=(
+ "${FILESDIR}/${P}-old_profile_segfault.patch"
+)
+
pkg_setup() {
use python && python-single-r1_pkg_setup
}
@@ -148,7 +152,7 @@ src_configure() {
)
# libetpan is needed if user wants nntp or imap functionality
- if use imap || use nntp; then
+ if use imap || use nntp ; then
myeconfargs+=( --enable-libetpan )
else
myeconfargs+=( --disable-libetpan )
@@ -183,7 +187,7 @@ src_install() {
doexe tb2claws-mail update-po uudec uuooffice
# kill useless files
- rm -f "${D}"/usr/lib*/claws-mail/plugins/*.{a,la}
+ rm -f "${ED%/}"/usr/lib*/claws-mail/plugins/*.{a,la}
}
pkg_preinst() {
diff --git a/mail-client/claws-mail/files/claws-mail-3.15.0-old_profile_segfault.patch b/mail-client/claws-mail/files/claws-mail-3.15.0-old_profile_segfault.patch
new file mode 100644
index 000000000000..b19bf8f39d67
--- /dev/null
+++ b/mail-client/claws-mail/files/claws-mail-3.15.0-old_profile_segfault.patch
@@ -0,0 +1,80 @@
+From: Ricardo Mones <ricardo@mones.org>
+Date: Wed, 9 Aug 2017 14:48:38 +0000 (+0200)
+Subject: Fix bug #3855: segfault at startup with old profile and IMAP account
+X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=667c9d3eaf0487193cc7873e6d3a63959a03d7f9;hp=63677adb68c57479f6bc7534cfbf2f234b1f4fb1
+
+Fix bug #3855: segfault at startup with old profile and IMAP account
+
+Revert "Remove duplicated code and include".
+
+This reverts commit 300f811f3bbf10455ca55d9b01da6705dd1e07bb.
+---
+
+diff --git a/src/imap.c b/src/imap.c
+index 0e1e777..25bb283 100644
+--- a/src/imap.c
++++ b/src/imap.c
+@@ -77,6 +77,8 @@ typedef struct _IMAPSession IMAPSession;
+ typedef struct _IMAPNameSpace IMAPNameSpace;
+ typedef struct _IMAPFolderItem IMAPFolderItem;
+
++#include "prefs_account.h"
++
+ #define IMAP_FOLDER(obj) ((IMAPFolder *)obj)
+ #define IMAP_FOLDER_ITEM(obj) ((IMAPFolderItem *)obj)
+ #define IMAP_SESSION(obj) ((IMAPSession *)obj)
+@@ -425,6 +427,7 @@ static gint imap_get_flags (Folder *folder,
+ FolderItem *item,
+ MsgInfoList *msglist,
+ GHashTable *msgflags);
++static gchar *imap_folder_get_path (Folder *folder);
+ static gchar *imap_item_get_path (Folder *folder,
+ FolderItem *item);
+ static MsgInfo *imap_parse_msg(const gchar *file, FolderItem *item);
+@@ -3042,6 +3045,35 @@ static FolderItem *imap_create_special_folder(Folder *folder,
+ return new_item;
+ }
+
++static gchar *imap_folder_get_path(Folder *folder)
++{
++ gchar *folder_path;
++
++ g_return_val_if_fail(folder != NULL, NULL);
++ g_return_val_if_fail(folder->account != NULL, NULL);
++
++#ifdef G_OS_WIN32
++ gchar *sanitized_dirname = g_strdup(folder->account->recv_server);
++ g_strdelimit(sanitized_dirname, ":", ',');
++#endif
++
++ folder_path = g_strconcat(get_imap_cache_dir(),
++ G_DIR_SEPARATOR_S,
++#ifdef G_OS_WIN32
++ sanitized_dirname,
++#else
++ folder->account->recv_server,
++#endif
++ G_DIR_SEPARATOR_S,
++ folder->account->userid,
++ NULL);
++
++#ifdef G_OS_WIN32
++ g_free(sanitized_dirname);
++#endif
++ return folder_path;
++}
++
+ #ifdef G_OS_WIN32
+ static gchar *imap_encode_unsafe_chars(const gchar *str)
+ {
+@@ -3078,9 +3110,8 @@ static gchar *imap_item_get_path(Folder *folder, FolderItem *item)
+ gchar *item_path = NULL;
+
+ g_return_val_if_fail(folder != NULL, NULL);
+- g_return_val_if_fail(folder->account != NULL, NULL);
+ g_return_val_if_fail(item != NULL, NULL);
+- folder_path = prefs_account_cache_dir(folder->account, FALSE);
++ folder_path = imap_folder_get_path(folder);
+
+ g_return_val_if_fail(folder_path != NULL, NULL);
+