public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/betagarden:master commit in: mail-filter/dovecot-metadata/files/, mail-filter/dovecot-metadata/
@ 2013-03-07  8:54 Alexey Shvetsov
  0 siblings, 0 replies; only message in thread
From: Alexey Shvetsov @ 2013-03-07  8:54 UTC (permalink / raw
  To: gentoo-commits

commit:     17f26a3890837e29c0d5e63ea36f8024da860a8f
Author:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
AuthorDate: Thu Mar  7 08:54:17 2013 +0000
Commit:     Alexey Shvetsov <alexxy <AT> gentoo <DOT> org>
CommitDate: Thu Mar  7 08:54:17 2013 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/betagarden.git;a=commit;h=17f26a38

Add patch for dovecot-2.1.x

Package-Manager: portage-2.2.0_alpha166

---
 mail-filter/dovecot-metadata/ChangeLog             |    4 +
 .../dovecot-metadata/dovecot-metadata-11.ebuild    |   11 ++-
 .../files/dovecot-metadata-11-2.1.patch            |   75 ++++++++++++++++++++
 3 files changed, 87 insertions(+), 3 deletions(-)

diff --git a/mail-filter/dovecot-metadata/ChangeLog b/mail-filter/dovecot-metadata/ChangeLog
index 114ab15..a63a1f1 100644
--- a/mail-filter/dovecot-metadata/ChangeLog
+++ b/mail-filter/dovecot-metadata/ChangeLog
@@ -1,3 +1,7 @@
+  07 Mar 2013; Alexey Shvetsov <alexxy@gentoo.org>
+  +files/dovecot-metadata-11-2.1.patch, dovecot-metadata-11.ebuild:
+  Add patch for dovecot-2.1.x
+
 *dovecot-metadata-11 (07 Mar 2013)
 
   07 Mar 2013; Alexey Shvetsov <alexxy@gentoo.org> +dovecot-metadata-11.ebuild,

diff --git a/mail-filter/dovecot-metadata/dovecot-metadata-11.ebuild b/mail-filter/dovecot-metadata/dovecot-metadata-11.ebuild
index f274a0f..d494799 100644
--- a/mail-filter/dovecot-metadata/dovecot-metadata-11.ebuild
+++ b/mail-filter/dovecot-metadata/dovecot-metadata-11.ebuild
@@ -1,10 +1,10 @@
 # Copyright 1999-2013 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/mail-filter/dovecot-antispam/dovecot-antispam-2.0_pre20120226.ebuild,v 1.1 2012/03/03 19:51:09 radhermit Exp $
+# $Header: $
 
-EAPI="4"
+EAPI="5"
 
-inherit autotools
+inherit autotools eutils
 
 DESCRIPTION="A dovecot metadata plugin"
 HOMEPAGE="http://hg.dovecot.org/dovecot-metadata-plugin"
@@ -18,6 +18,11 @@ IUSE=""
 DEPEND=">=net-mail/dovecot-2.1.0"
 RDEPEND="${DEPEND}"
 
+PATCHES=(
+	"${FILESDIR}/${PN}-11-2.1.patch"
+	)
+
 src_prepare() {
+	epatch ${PATCHES[@]}
 	eautoreconf
 }

diff --git a/mail-filter/dovecot-metadata/files/dovecot-metadata-11-2.1.patch b/mail-filter/dovecot-metadata/files/dovecot-metadata-11-2.1.patch
new file mode 100644
index 0000000..9320ca4
--- /dev/null
+++ b/mail-filter/dovecot-metadata/files/dovecot-metadata-11-2.1.patch
@@ -0,0 +1,75 @@
+diff -urN dovecot-metadata-11.orig/src/imap-annotatemore-plugin.c dovecot-metadata-11/src/imap-annotatemore-plugin.c
+--- dovecot-metadata-11.orig/src/imap-annotatemore-plugin.c	2012-10-13 13:45:54.000000000 +0400
++++ dovecot-metadata-11/src/imap-annotatemore-plugin.c	2013-03-07 12:50:14.000000000 +0400
+@@ -520,11 +520,7 @@
+ 		}
+ 	} else {
+ 		i_debug("metadata: Mailbox '%s' does not contain wildcards", mailbox_name);
+-#if DOVECOT_PREREQ(2,1)
+ 		struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, mailbox_name);
+-#else
+-		struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, &mailbox_name);
+-#endif
+ 		if (ns == NULL) {
+ 			client_send_tagline(cmd,
+ 					"NO Mailbox not found.");
+@@ -661,11 +657,7 @@
+ 	if (!pair_extract_value(cmd, &args[2], &value, &private))
+ 		return TRUE;
+ 
+-#if DOVECOT_PREREQ(2,1)
+ 	struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, mailbox_name);
+-#else
+-	struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, &mailbox_name);
+-#endif
+ 	if (ns == NULL) {
+ 		client_send_tagline(cmd, "NO Mailbox not found.");
+ 		return TRUE;
+diff -urN dovecot-metadata-11.orig/src/imap-metadata-plugin.c dovecot-metadata-11/src/imap-metadata-plugin.c
+--- dovecot-metadata-11.orig/src/imap-metadata-plugin.c	2012-10-13 13:45:54.000000000 +0400
++++ dovecot-metadata-11/src/imap-metadata-plugin.c	2013-03-07 12:49:35.000000000 +0400
+@@ -520,11 +520,7 @@
+ 		struct mailbox *box = NULL;
+ 		/* empty mailbox_name -> box=NULL -> server scope */
+ 		if (*mailbox_name != '\0') {
+-#if DOVECOT_PREREQ(2,1)
+ 			struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, mailbox_name);
+-#else
+-			struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, &mailbox_name);
+-#endif
+ 			if (ns == NULL) {
+ 				client_send_tagline(cmd, "NO Mailbox not found.");
+ 				return true;
+@@ -685,11 +681,7 @@
+ 	struct mailbox *box = NULL;
+ 	/* empty name -> box=NULL -> server scope */
+ 	if (*mailbox_name != '\0') {
+-#if DOVECOT_PREREQ(2,1)
+ 		struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, mailbox_name);
+-#else
+-		struct mail_namespace *ns = mail_namespace_find(cmd->client->user->namespaces, &mailbox_name);
+-#endif
+ 		if (ns == NULL) {
+ 			client_send_tagline(cmd, "NO Mailbox not found.");
+ 			return true;
+diff -urN dovecot-metadata-11.orig/src/mailbox-ext.c dovecot-metadata-11/src/mailbox-ext.c
+--- dovecot-metadata-11.orig/src/mailbox-ext.c	2012-10-13 13:45:54.000000000 +0400
++++ dovecot-metadata-11/src/mailbox-ext.c	2013-03-07 12:49:51.000000000 +0400
+@@ -22,17 +22,9 @@
+ 
+ const char *
+ mailbox_get_guid_string(struct mailbox *box) {
+-#if DOVECOT_PREREQ(2,1)
+ 	struct mailbox_metadata metadata;
+ 	if (mailbox_get_metadata(box, MAILBOX_METADATA_GUID, &metadata) < 0)
+ 		return NULL;
+ 
+ 	return guid_128_to_string(metadata.guid);
+-#else
+-	uint8_t guid[MAIL_GUID_128_SIZE];
+-	if (mailbox_get_guid(box, guid) < 0)
+-		return NULL;
+-
+-	return binary_to_hex(guid, sizeof(guid));
+-#endif
+ }


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-07  8:54 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-07  8:54 [gentoo-commits] proj/betagarden:master commit in: mail-filter/dovecot-metadata/files/, mail-filter/dovecot-metadata/ Alexey Shvetsov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox