summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnthony G. Basile <blueness@gentoo.org>2011-01-18 12:48:44 +0000
committerAnthony G. Basile <blueness@gentoo.org>2011-01-18 12:48:44 +0000
commitc66b47a326b938fb4963c25ede0f06bab82d0d65 (patch)
tree52191451bd217c819a399d148160e6b93351c393 /app-misc/beanstalkd
parentVersion bump. Drop older. (diff)
downloadgentoo-2-c66b47a326b938fb4963c25ede0f06bab82d0d65.tar.gz
gentoo-2-c66b47a326b938fb4963c25ede0f06bab82d0d65.tar.bz2
gentoo-2-c66b47a326b938fb4963c25ede0f06bab82d0d65.zip
Added patch to compile against libevent-2, bug #333091
(Portage version: 2.1.9.25/cvs/Linux x86_64)
Diffstat (limited to 'app-misc/beanstalkd')
-rw-r--r--app-misc/beanstalkd/ChangeLog10
-rw-r--r--app-misc/beanstalkd/beanstalkd-1.4.6-r1.ebuild50
-rw-r--r--app-misc/beanstalkd/files/beanstalkd-dbgprintf.patch110
3 files changed, 168 insertions, 2 deletions
diff --git a/app-misc/beanstalkd/ChangeLog b/app-misc/beanstalkd/ChangeLog
index 9a0b6528acbf..f1557ed7d4fd 100644
--- a/app-misc/beanstalkd/ChangeLog
+++ b/app-misc/beanstalkd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for app-misc/beanstalkd
-# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/beanstalkd/ChangeLog,v 1.21 2010/11/02 18:41:53 patrick Exp $
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/beanstalkd/ChangeLog,v 1.22 2011/01/18 12:48:43 blueness Exp $
+
+*beanstalkd-1.4.6-r1 (18 Jan 2011)
+
+ 18 Jan 2011; Anthony G. Basile <blueness@gentoo.org>
+ +beanstalkd-1.4.6-r1.ebuild, +files/beanstalkd-dbgprintf.patch:
+ Added patch to compile against libevent-2, bug #333091
02 Nov 2010; Patrick Lauer <patrick@gentoo.org> -files/init-1.4.2,
-files/Makefile.install.patch, -files/beanstalkd-werror.patch:
diff --git a/app-misc/beanstalkd/beanstalkd-1.4.6-r1.ebuild b/app-misc/beanstalkd/beanstalkd-1.4.6-r1.ebuild
new file mode 100644
index 000000000000..64e7e2d6c506
--- /dev/null
+++ b/app-misc/beanstalkd/beanstalkd-1.4.6-r1.ebuild
@@ -0,0 +1,50 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/beanstalkd/beanstalkd-1.4.6-r1.ebuild,v 1.1 2011/01/18 12:48:44 blueness Exp $
+
+EAPI="3"
+
+inherit eutils
+
+DESCRIPTION="A fast, distributed, in-memory workqueue service"
+HOMEPAGE="http://xph.us/software/beanstalkd/"
+SRC_URI="http://xph.us/dist/beanstalkd/${P}.tar.gz"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~mips ~x86 ~sparc-fbsd ~x86-fbsd ~amd64-linux ~x64-macos ~x86-macos"
+
+RDEPEND="dev-libs/libevent"
+DEPEND="${RDEPEND}
+ test? ( dev-lang/python )"
+
+IUSE="debug test"
+
+pkg_setup() {
+ enewuser beanstalk -1 -1 /var/lib/beanstalkd daemon
+}
+
+src_prepare() {
+ epatch "$FILESDIR/beanstalkd-werror-v2.patch"
+ epatch "$FILESDIR/beanstalkd-dbgprintf.patch"
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}"/usr/share/${PF} \
+ --with-event="${EPREFIX}"/usr \
+ $(use_enable debug)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed."
+
+ DATADIR=/var/lib/${PN}
+ dodir ${DATADIR} || die "Install failed"
+ fowners beanstalk:daemon ${DATADIR}
+
+ dodoc README TODO doc/*.txt
+
+ newconfd "${FILESDIR}/conf-1.4.2" beanstalkd
+ newinitd "${FILESDIR}/init-${PV}" beanstalkd
+}
diff --git a/app-misc/beanstalkd/files/beanstalkd-dbgprintf.patch b/app-misc/beanstalkd/files/beanstalkd-dbgprintf.patch
new file mode 100644
index 000000000000..91d418e5f1ba
--- /dev/null
+++ b/app-misc/beanstalkd/files/beanstalkd-dbgprintf.patch
@@ -0,0 +1,110 @@
+diff -Naur beanstalkd-1.4.6.orig/prot.c beanstalkd-1.4.6/prot.c
+--- beanstalkd-1.4.6.orig/prot.c 2010-05-23 03:37:28.000000000 -0400
++++ beanstalkd-1.4.6/prot.c 2011-01-10 19:44:05.000000000 -0500
+@@ -305,7 +305,7 @@
+ c->reply_len = len;
+ c->reply_sent = 0;
+ c->state = state;
+- dprintf("sending reply: %.*s", len, line);
++ dbgprintf("sending reply: %.*s", len, line);
+ }
+
+ #define reply_msg(c,m) reply((c),(m),CONSTSTRLEN(m),STATE_SENDWORD)
+@@ -382,10 +382,10 @@
+ size_t i;
+ job j = NULL, candidate;
+
+- dprintf("tubes.used = %zu\n", tubes.used);
++ dbgprintf("tubes.used = %zu\n", tubes.used);
+ for (i = 0; i < tubes.used; i++) {
+ t = tubes.items[i];
+- dprintf("for %s t->waiting.used=%zu t->ready.used=%d t->pause=%" PRIu64 "\n",
++ dbgprintf("for %s t->waiting.used=%zu t->ready.used=%d t->pause=%" PRIu64 "\n",
+ t->name, t->waiting.used, t->ready.used, t->pause);
+ if (t->pause) {
+ if (t->deadline_at > now) continue;
+@@ -395,7 +395,7 @@
+ candidate = pq_peek(&t->ready);
+ if (!j || job_pri_cmp(candidate, j) < 0) j = candidate;
+ }
+- dprintf("i = %zu, tubes.used = %zu\n", i, tubes.used);
++ dbgprintf("i = %zu, tubes.used = %zu\n", i, tubes.used);
+ }
+
+ return j;
+@@ -407,9 +407,9 @@
+ job j;
+ usec now = now_usec();
+
+- dprintf("processing queue\n");
++ dbgprintf("processing queue\n");
+ while ((j = next_eligible_job(now))) {
+- dprintf("got eligible job %llu in %s\n", j->id, j->tube->name);
++ dbgprintf("got eligible job %llu in %s\n", j->id, j->tube->name);
+ j = pq_take(&j->tube->ready);
+ ready_ct--;
+ if (j->pri < URGENT_THRESHOLD) {
+@@ -462,7 +462,7 @@
+
+ if (j && (!deadline_at || j->deadline_at < deadline_at)) deadline_at = j->deadline_at;
+
+- dprintf("deadline_at=%" PRIu64 "\n", deadline_at);
++ dbgprintf("deadline_at=%" PRIu64 "\n", deadline_at);
+ set_main_timeout(deadline_at);
+ }
+
+@@ -1178,7 +1178,7 @@
+ }
+
+ type = which_cmd(c);
+- dprintf("got %s command: \"%s\"\n", op_names[(int) type], c->cmd);
++ dbgprintf("got %s command: \"%s\"\n", op_names[(int) type], c->cmd);
+
+ switch (type) {
+ case OP_PUT:
+@@ -1578,10 +1578,10 @@
+ }
+
+ if (should_timeout) {
+- dprintf("conn_waiting(%p) = %d\n", c, conn_waiting(c));
++ dbgprintf("conn_waiting(%p) = %d\n", c, conn_waiting(c));
+ return reply_msg(remove_waiting_conn(c), MSG_DEADLINE_SOON);
+ } else if (conn_waiting(c) && c->pending_timeout >= 0) {
+- dprintf("conn_waiting(%p) = %d\n", c, conn_waiting(c));
++ dbgprintf("conn_waiting(%p) = %d\n", c, conn_waiting(c));
+ c->pending_timeout = -1;
+ return reply_msg(remove_waiting_conn(c), MSG_TIMED_OUT);
+ }
+@@ -1773,7 +1773,7 @@
+ for (i = 0; i < tubes.used; i++) {
+ t = tubes.items[i];
+
+- dprintf("h_delay for %s t->waiting.used=%zu t->ready.used=%d t->pause=%" PRIu64 "\n",
++ dbgprintf("h_delay for %s t->waiting.used=%zu t->ready.used=%d t->pause=%" PRIu64 "\n",
+ t->name, t->waiting.used, t->ready.used, t->pause);
+ if (t->pause && t->deadline_at <= now) {
+ t->pause = 0;
+@@ -1811,7 +1811,7 @@
+ c = make_conn(cfd, STATE_WANTCOMMAND, default_tube, default_tube);
+ if (!c) return twarnx("make_conn() failed"), close(cfd), brake();
+
+- dprintf("accepted conn, fd=%d\n", cfd);
++ dbgprintf("accepted conn, fd=%d\n", cfd);
+ r = conn_set_evq(c, EV_READ | EV_PERSIST, (evh) h_conn);
+ if (r == -1) return twarnx("conn_set_evq() failed"), close(cfd), brake();
+ }
+diff -Naur beanstalkd-1.4.6.orig/util.h beanstalkd-1.4.6/util.h
+--- beanstalkd-1.4.6.orig/util.h 2010-05-22 17:23:16.000000000 -0400
++++ beanstalkd-1.4.6/util.h 2011-01-10 19:43:44.000000000 -0500
+@@ -43,9 +43,9 @@
+ __FILE__, __LINE__, __func__, ##args)
+
+ #ifdef DEBUG
+-#define dprintf(fmt, args...) ((void) fprintf(stderr, fmt, ##args))
++#define dbgprintf(fmt, args...) ((void) fprintf(stderr, fmt, ##args))
+ #else
+-#define dprintf(fmt, ...) ((void) 0)
++#define dbgprintf(fmt, ...) ((void) 0)
+ #endif
+
+ typedef uint64_t usec;