From 21d06c2be096adfc0632658b9d974c5665aa24bd Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Wed, 10 Dec 2008 18:40:54 +0000 Subject: Add a couple of patches from stable svn to fix SpamAssassin plugin, filtering, crashes in the account prefs dialog, and more (GNOME bugs 552583 and 560420) (Portage version: 2.2_rc17/cvs/Linux 2.6.27.5 i686) --- mail-client/evolution/ChangeLog | 12 +- mail-client/evolution/evolution-2.24.2-r1.ebuild | 159 +++++++++++++++++++++ .../evolution-2.24.2-mail-config-crash-fix.patch | 154 ++++++++++++++++++++ .../evolution-2.24.2-spamassassin-plugin-fix.patch | 11 ++ 4 files changed, 335 insertions(+), 1 deletion(-) create mode 100644 mail-client/evolution/evolution-2.24.2-r1.ebuild create mode 100644 mail-client/evolution/files/evolution-2.24.2-mail-config-crash-fix.patch create mode 100644 mail-client/evolution/files/evolution-2.24.2-spamassassin-plugin-fix.patch (limited to 'mail-client/evolution') diff --git a/mail-client/evolution/ChangeLog b/mail-client/evolution/ChangeLog index 83405ebabf69..8dfb04ab64f2 100644 --- a/mail-client/evolution/ChangeLog +++ b/mail-client/evolution/ChangeLog @@ -1,6 +1,16 @@ # ChangeLog for mail-client/evolution # Copyright 2002-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-client/evolution/ChangeLog,v 1.251 2008/12/08 22:04:37 dang Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-client/evolution/ChangeLog,v 1.252 2008/12/10 18:40:54 ford_prefect Exp $ + +*evolution-2.24.2-r1 (10 Dec 2008) + + 10 Dec 2008; Arun Raghavan + +files/evolution-2.24.2-mail-config-crash-fix.patch, + +files/evolution-2.24.2-spamassassin-plugin-fix.patch, + +evolution-2.24.2-r1.ebuild: + Add a couple of patches from stable svn to fix SpamAssassin plugin, + filtering, crashes in the account prefs dialog, and more (GNOME bugs + 552583 and 560420) 08 Dec 2008; Daniel Gryniewicz evolution-2.24.2.ebuild: evo 2.24 doesn't need gnome-spell for spell checking anymore. Bug #250000 diff --git a/mail-client/evolution/evolution-2.24.2-r1.ebuild b/mail-client/evolution/evolution-2.24.2-r1.ebuild new file mode 100644 index 000000000000..732a30ce3ed1 --- /dev/null +++ b/mail-client/evolution/evolution-2.24.2-r1.ebuild @@ -0,0 +1,159 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-client/evolution/evolution-2.24.2-r1.ebuild,v 1.1 2008/12/10 18:40:54 ford_prefect Exp $ + +inherit gnome2 flag-o-matic libtool + +DESCRIPTION="Integrated mail, addressbook and calendaring functionality" +HOMEPAGE="http://www.gnome.org/projects/evolution/" +SRC_URI="${SRC_URI} + mirror://gentoo/${P}-libtool-hack.patch.bz2" + +LICENSE="GPL-2 FDL-1.1" +SLOT="2.0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~x86-fbsd" +IUSE="crypt dbus debug hal ipv6 kerberos krb4 ldap mono networkmanager nntp pda profile ssl" + +# Pango dependency required to avoid font rendering problems +RDEPEND=">=dev-libs/glib-2.16 + >=x11-libs/gtk+-2.12 + >=gnome-extra/evolution-data-server-2.23.91 + >=x11-themes/gnome-icon-theme-2.20 + >=gnome-base/libbonobo-2.20.3 + >=gnome-base/libbonoboui-2.4.2 + >=gnome-extra/gtkhtml-3.23.5 + >=gnome-base/gconf-2 + >=gnome-base/libglade-2 + >=gnome-base/libgnomecanvas-2 + >=gnome-base/libgnomeui-2 + >=dev-libs/libxml2-2 + >=x11-misc/shared-mime-info-0.22 + dbus? ( dev-libs/dbus-glib ) + hal? ( >=sys-apps/hal-0.5.4 ) + x11-libs/libnotify + pda? ( + >=app-pda/gnome-pilot-2.0.15 + >=app-pda/gnome-pilot-conduits-2 ) + dev-libs/atk + ssl? ( + >=dev-libs/nspr-4.6.1 + >=dev-libs/nss-3.11 ) + networkmanager? ( net-misc/networkmanager ) + >=net-libs/libsoup-2.4 + kerberos? ( virtual/krb5 ) + krb4? ( virtual/krb5 ) + >=gnome-base/orbit-2.9.8 + crypt? ( || ( >=app-crypt/gnupg-2.0.1-r2 =app-crypt/gnupg-1.4* ) ) + ldap? ( >=net-nds/openldap-2 ) + mono? ( >=dev-lang/mono-1 )" +# gstreamer? ( +# >=media-libs/gstreamer-0.10 +# >=media-libs/gst-plugins-base-0.10 ) + +DEPEND="${RDEPEND} + >=dev-util/pkgconfig-0.16 + >=dev-util/intltool-0.35.5 + sys-devel/gettext + sys-devel/bison + app-text/scrollkeeper + >=gnome-base/gnome-common-2.12.0 + >=app-text/gnome-doc-utils-0.9.1" + +DOCS="AUTHORS ChangeLog* HACKING MAINTAINERS NEWS* README" +ELTCONF="--reverse-deps" + +pkg_setup() { + G2CONF="--without-kde-applnk-path + --enable-plugins=experimental + $(use_enable ssl nss) + $(use_enable ssl smime) + $(use_enable ipv6) + $(use_enable mono) + $(use_enable nntp) + $(use_enable pda pilot-conduits) + $(use_enable profile profiling) + $(use_with ldap openldap) + $(use_with kerberos krb5 /usr)" + + # We need a graphical pinentry frontend to be able to ask for the GPG + # password from inside evolution, bug 160302 + if use crypt && has_version '>=app-crypt/gnupg-2.0.1-r2'; then + if ! built_with_use -o app-crypt/pinentry gtk qt3; then + die "You must build app-crypt/pinentry with GTK or QT3 support" + fi + fi + + if use krb4 && ! built_with_use virtual/krb5 krb4; then + ewarn + ewarn "In order to add kerberos 4 support, you have to emerge" + ewarn "virtual/krb5 with the 'krb4' USE flag enabled as well." + ewarn + ewarn "Skipping for now." + ewarn + G2CONF="${G2CONF} --without-krb4" + else + G2CONF="${G2CONF} $(use_with krb4 krb4 /usr)" + fi + + # dang - I've changed this to do --enable-plugins=experimental. This will + # autodetect new-mail-notify and exchange, but that cannot be helped for the + # moment. They should be changed to depend on a --enable- like mono + # is. This cleans up a ton of crap from this ebuild. +} + +src_unpack() { + gnome2_src_unpack + + # Fix timezone offsets on fbsd. bug #183708 + epatch "${FILESDIR}"/${PN}-2.21.3-fbsd.patch + + # Fix delete keyboard shortcut + epatch "${FILESDIR}"/${PN}-2.23.3.1-delete-key.patch + + # Ugly hack, bug #235154 + epatch "${WORKDIR}/${P}-libtool-hack.patch" + + # Fix crasher in prefs, filtering bug and then some, from GNOME bug #552583 + epatch "${FILESDIR}"/${P}-mail-config-crash-fix.patch + + # Fix SpamAssassing plugin return value checking + epatch "${FILESDIR}"/${P}-spamassassin-plugin-fix.patch +} + +src_compile() { + # Use NSS/NSPR only if 'ssl' is enabled. + if use ssl ; then + sed -i -e "s|mozilla-nss|nss| + s|mozilla-nspr|nspr|" "${S}"/configure + G2CONF="${G2CONF} --enable-nss=yes" + else + G2CONF="${G2CONF} --without-nspr-libs --without-nspr-includes \ + --without-nss-libs --without-nss-includes" + fi + + # problems with -O3 on gcc-3.3.1 + replace-flags -O3 -O2 + + # Bug #? + if [ "${ARCH}" = "hppa" ]; then + append-flags "-fPIC -ffunction-sections" + export LDFLAGS="-ffunction-sections -Wl,--stub-group-size=25000" + fi + + gnome2_src_compile +} + +pkg_postinst() { + gnome2_pkg_postinst + + elog "To change the default browser if you are not using GNOME, do:" + elog "gconftool-2 --set /desktop/gnome/url-handlers/http/command -t string 'mozilla %s'" + elog "gconftool-2 --set /desktop/gnome/url-handlers/https/command -t string 'mozilla %s'" + elog "" + elog "Replace 'mozilla %s' with which ever browser you use." + elog "" + elog "Junk filters are now a run-time choice. You will get a choice of" + elog "bogofilter or spamassassin based on which you have installed" + elog "" + elog "You have to install one of these for the spam filtering to actually work" +} diff --git a/mail-client/evolution/files/evolution-2.24.2-mail-config-crash-fix.patch b/mail-client/evolution/files/evolution-2.24.2-mail-config-crash-fix.patch new file mode 100644 index 000000000000..4deb64bee159 --- /dev/null +++ b/mail-client/evolution/files/evolution-2.24.2-mail-config-crash-fix.patch @@ -0,0 +1,154 @@ +--- branches/gnome-2-24/mail/mail-config.c 2008/11/07 06:34:14 36759 ++++ branches/gnome-2-24/mail/mail-config.c 2008/12/08 05:56:00 36840 +@@ -778,53 +778,64 @@ + return (EAccount *) e_account_list_find (config->accounts, E_ACCOUNT_FIND_UID, uid); + } + ++static gboolean ++mail_config_account_url_equal (const CamelURL *u1, ++ const CamelURL *u2) ++{ ++ /* For the purpose of matching a URL to an EAccount, only compare ++ * the protocol, user, host and port and disregard the rest. */ ++ ++ if (g_strcmp0 (u1->protocol, u2->protocol) != 0) ++ return FALSE; ++ ++ if (g_strcmp0 (u1->user, u2->user) != 0) ++ return FALSE; ++ ++ if (g_strcmp0 (u1->host, u2->host) != 0) ++ return FALSE; ++ ++ return (u1->port == u2->port); ++} ++ + EAccount * + mail_config_get_account_by_source_url (const char *source_url) + { + EAccount *account = NULL; + EIterator *iter; ++ CamelURL *url; + + g_return_val_if_fail (source_url != NULL, NULL); + ++ url = camel_url_new (source_url, NULL); ++ g_return_val_if_fail (url != NULL, NULL); ++ + iter = e_list_get_iterator ((EList *) config->accounts); +- while (e_iterator_is_valid (iter)) { +- CamelURL *url; +- gchar *string; ++ while (account == NULL && e_iterator_is_valid (iter)) { ++ CamelURL *account_url; + + account = (EAccount *) e_iterator_get (iter); + + e_iterator_next (iter); + +- if (account->source == NULL) +- continue; +- +- else if (account->source->url == NULL) +- continue; +- +- else if (*account->source->url == '\0') ++ if ( !account || (account->source == NULL) || ++ (account->source->url == NULL) || (*account->source->url == '\0')) { ++ account = NULL; + continue; ++ } + +- url = camel_url_new (account->source->url, NULL); +- if (url == NULL) ++ account_url = camel_url_new (account->source->url, NULL); ++ if (account_url == NULL) + continue; + +- /* Simplify the account URL for comparison. */ +- string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL); +- if (string == NULL || strcmp (string, source_url) != 0) ++ if (!mail_config_account_url_equal (url, account_url)) + account = NULL; /* not a match */ + +- camel_url_free (url); +- g_free (string); +- +- if (account != NULL) { +- g_object_unref (iter); +- return account; +- } ++ camel_url_free (account_url); + } + + g_object_unref (iter); + +- return NULL; ++ return account; + } + + EAccount * +@@ -832,48 +843,40 @@ + { + EAccount *account = NULL; + EIterator *iter; ++ CamelURL *url; + + g_return_val_if_fail (transport_url != NULL, NULL); + ++ url = camel_url_new (transport_url, NULL); ++ g_return_val_if_fail (url != NULL, NULL); ++ + iter = e_list_get_iterator ((EList *) config->accounts); +- while (e_iterator_is_valid (iter)) { +- CamelURL *url; +- gchar *string; ++ while (account == NULL && e_iterator_is_valid (iter)) { ++ CamelURL *account_url; + + account = (EAccount *) e_iterator_get (iter); + + e_iterator_next (iter); + +- if (account->transport == NULL) +- continue; +- +- else if (account->transport->url == NULL) +- continue; +- +- else if (*account->transport->url == '\0') +- continue; ++ if ( !account || (account->transport == NULL) || ++ (account->transport->url == NULL) || (*account->transport->url == '\0')) { ++ account = NULL; ++ continue; ++ } + +- url = camel_url_new (account->transport->url, NULL); +- if (url == NULL) ++ account_url = camel_url_new (account->transport->url, NULL); ++ if (account_url == NULL) + continue; + +- /* Simplify the account URL for comparison. */ +- string = camel_url_to_string (url, CAMEL_URL_HIDE_ALL); +- if (string == NULL || strcmp (string, transport_url) != 0) ++ if (!mail_config_account_url_equal (url, account_url)) + account = NULL; /* not a match */ + + camel_url_free (url); +- g_free (string); +- +- if (account != NULL) { +- g_object_unref (iter); +- return account; +- } + } + + g_object_unref (iter); + +- return NULL; ++ return account; + } + + int diff --git a/mail-client/evolution/files/evolution-2.24.2-spamassassin-plugin-fix.patch b/mail-client/evolution/files/evolution-2.24.2-spamassassin-plugin-fix.patch new file mode 100644 index 000000000000..b791f73408af --- /dev/null +++ b/mail-client/evolution/files/evolution-2.24.2-spamassassin-plugin-fix.patch @@ -0,0 +1,11 @@ +--- branches/gnome-2-24/plugins/sa-junk-plugin/em-junk-filter.c 2008/12/03 21:48:56 36828 ++++ branches/gnome-2-24/plugins/sa-junk-plugin/em-junk-filter.c 2008/12/03 21:52:13 36829 +@@ -250,7 +250,7 @@ + else + res = rv_err; + +- if (res != 0) ++ if (res >= 64) + g_set_error (error, EM_JUNK_ERROR, res, _("Pipe to SpamAssassin failed, error code: %d"), res); + + return res; -- cgit v1.2.3-65-gdbad