summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--dev-libs/apr-util/ChangeLog8
-rw-r--r--dev-libs/apr-util/Manifest3
-rw-r--r--dev-libs/apr-util/apr-util-0.9.6-r1.ebuild69
-rw-r--r--dev-libs/apr-util/files/apr-util-0.9.x-161086:161087.patch140
-rw-r--r--dev-libs/apr-util/files/digest-apr-util-0.9.6-r11
5 files changed, 220 insertions, 1 deletions
diff --git a/dev-libs/apr-util/ChangeLog b/dev-libs/apr-util/ChangeLog
index 151d5e6df9aa..81826e01cc8f 100644
--- a/dev-libs/apr-util/ChangeLog
+++ b/dev-libs/apr-util/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for dev-libs/apr-util
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.17 2005/04/10 21:37:05 trapni Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/ChangeLog,v 1.18 2005/04/13 22:33:03 trapni Exp $
+
+*apr-util-0.9.6-r1 (13 Apr 2005)
+
+ 13 Apr 2005; Christian Parpart <trapni@gentoo.org>
+ +files/apr-util-0.9.x-161086:161087.patch, +apr-util-0.9.6-r1.ebuild:
+ adding backport-patch so that depending pkgs on it will compile well
*apr-util-1.1.2 (10 Apr 2005)
diff --git a/dev-libs/apr-util/Manifest b/dev-libs/apr-util/Manifest
index a21af1c18698..ed88c8612d32 100644
--- a/dev-libs/apr-util/Manifest
+++ b/dev-libs/apr-util/Manifest
@@ -1,3 +1,4 @@
+MD5 56b52c1537f6894b4470c82d9c1dc3c2 apr-util-0.9.6-r1.ebuild 1843
MD5 fbea52b143a7cf05cef9f69d488f29ff apr-util-1.1.2.ebuild 1753
MD5 4c63d013eac0fe64a546df77bdeb8dd3 apr-util-0.9.6.ebuild 1692
MD5 4a99f75aea4d2380821b4cc9ab1ccbf7 ChangeLog 2215
@@ -5,4 +6,6 @@ MD5 0d18f0fe5d603b41b988373892caf195 metadata.xml 226
MD5 86819cf0885f13ed5df725419cd4809f apr-util-0.9.5.ebuild 1696
MD5 c46881efc10b92ab7b6189cdc9070929 files/digest-apr-util-1.1.2 66
MD5 467e8ba98a938b691d27ec9971dbfe12 files/digest-apr-util-0.9.6 66
+MD5 467e8ba98a938b691d27ec9971dbfe12 files/digest-apr-util-0.9.6-r1 66
+MD5 8f1a2f7022b0e175bd2d9fbd3c4adf2f files/apr-util-0.9.x-161086:161087.patch 5084
MD5 4e443d47db271d53344974fe62da6692 files/digest-apr-util-0.9.5 66
diff --git a/dev-libs/apr-util/apr-util-0.9.6-r1.ebuild b/dev-libs/apr-util/apr-util-0.9.6-r1.ebuild
new file mode 100644
index 000000000000..d6be5904233b
--- /dev/null
+++ b/dev-libs/apr-util/apr-util-0.9.6-r1.ebuild
@@ -0,0 +1,69 @@
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-0.9.6-r1.ebuild,v 1.1 2005/04/13 22:33:03 trapni Exp $
+
+inherit eutils
+
+DESCRIPTION="Apache Portable Runtime Library"
+HOMEPAGE="http://apr.apache.org/"
+SRC_URI="mirror://apache/apr/${P}.tar.gz"
+
+LICENSE="Apache-2.0"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86"
+IUSE="berkdb gdbm ldap"
+
+DEPEND="dev-libs/expat
+ ~dev-libs/apr-0.9.6
+ berkdb? ( sys-libs/db )
+ gdbm? ( sys-libs/gdbm )
+ ldap? ( =net-nds/openldap-2* )"
+
+src_unpack() {
+ unpack ${A} || die "unpack"
+
+ cd ${S} || die
+
+ epatch "${FILESDIR}/apr-util-0.9.x-161086:161087.patch" \
+ || die "patching failed"
+}
+
+src_compile() {
+ local myconf=""
+ if use ldap; then
+ myconf="${myconf} --with-ldap"
+ fi
+
+ if use berkdb; then
+ if has_version '=sys-libs/db-4.2*'; then
+ myconf="${myconf} --with-dbm=db42 --with-berkely-db=/usr"
+ elif has_version '=sys-libs/db-4*'; then
+ myconf="${myconf} --with-dbm=db4 --with-berkely-db=/usr"
+ elif has_version '=sys-libs/db-3*'; then
+ myconf="${myconf} --with-dbm=db3 --with-berkely-db=/usr"
+ elif has_version '=sys-libs/db-2'; then
+ myconf="${myconf} --with-dbm=db2 --with-berkely-db=/usr"
+ fi
+ fi
+
+ econf \
+ --datadir=/usr/share/apr-util-0 \
+ --with-apr=/usr \
+ --with-expat=/usr \
+ $myconf || die
+
+ emake || die
+}
+
+src_install() {
+ make DESTDIR="${D}" installbuilddir=/usr/share/apr-util-0/build install || die
+
+ #bogus values pointing at /var/tmp/portage
+ sed -i -e 's:APU_SOURCE_DIR=.*:APU_SOURCE_DIR=:g' ${D}/usr/bin/apu-config
+ sed -i -e 's:APU_BUILD_DIR=.*:APU_BUILD_DIR=/usr/share/apr-util-0/build:g' ${D}/usr/bin/apu-config
+
+ dodoc CHANGES NOTICE
+
+ # Will install as portage user when using userpriv. Fixing
+ chown -R root:root ${D}/usr/include/apr-0/
+}
diff --git a/dev-libs/apr-util/files/apr-util-0.9.x-161086:161087.patch b/dev-libs/apr-util/files/apr-util-0.9.x-161086:161087.patch
new file mode 100644
index 000000000000..9cca25d358ce
--- /dev/null
+++ b/dev-libs/apr-util/files/apr-util-0.9.x-161086:161087.patch
@@ -0,0 +1,140 @@
+Index: include/apr_reslist.h
+===================================================================
+--- include/apr_reslist.h (revision 161086)
++++ include/apr_reslist.h (revision 161087)
+@@ -112,6 +112,24 @@
+ APU_DECLARE(apr_status_t) apr_reslist_release(apr_reslist_t *reslist,
+ void *resource);
+
++/**
++ * Set the timeout the acquire will wait for a free resource
++ * when the maximum number of resources is exceeded.
++ * @param reslist The resource list.
++ * @param timeout Timeout to wait. The zero waits forewer.
++ */
++APU_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist,
++ apr_interval_time_t timeout);
++
++/**
++ * Invalidate a resource in the pool - e.g. a database connection
++ * that returns a "lost connection" error and can't be restored.
++ * Use this instead of apr_reslist_release if the resource is bad.
++ */
++APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist,
++ void *resource);
++
++
+ #ifdef __cplusplus
+ }
+ #endif
+Index: misc/apr_reslist.c
+===================================================================
+--- misc/apr_reslist.c (revision 161086)
++++ misc/apr_reslist.c (revision 161087)
+@@ -50,6 +50,7 @@
+ int smax; /* soft maximum on the total number of resources */
+ int hmax; /* hard maximum on the total number of resources */
+ apr_interval_time_t ttl; /* TTL when we have too many resources */
++ apr_interval_time_t timeout; /* Timeout for waiting on resource */
+ apr_reslist_constructor constructor;
+ apr_reslist_destructor destructor;
+ void *params; /* opaque data passed to constructor and destructor calls */
+@@ -119,12 +120,9 @@
+ res = apr_pcalloc(reslist->pool, sizeof(*res));
+
+ rv = reslist->constructor(&res->opaque, reslist->params, reslist->pool);
+- if (rv != APR_SUCCESS) {
+- return rv;
+- }
+
+ *ret_res = res;
+- return APR_SUCCESS;
++ return rv;
+ }
+
+ /**
+@@ -133,14 +131,7 @@
+ */
+ static apr_status_t destroy_resource(apr_reslist_t *reslist, apr_res_t *res)
+ {
+- apr_status_t rv;
+-
+- rv = reslist->destructor(res->opaque, reslist->params, reslist->pool);
+- if (rv != APR_SUCCESS) {
+- return rv;
+- }
+-
+- return APR_SUCCESS;
++ return reslist->destructor(res->opaque, reslist->params, reslist->pool);
+ }
+
+ static apr_status_t reslist_cleanup(void *data_)
+@@ -188,6 +179,7 @@
+ /* Create the resource */
+ rv = create_resource(reslist, &res);
+ if (rv != APR_SUCCESS) {
++ free_container(reslist, res);
+ apr_thread_mutex_unlock(reslist->listlock);
+ return rv;
+ }
+@@ -314,7 +306,15 @@
+ * a new one, or something becomes free. */
+ else while (reslist->ntotal >= reslist->hmax
+ && reslist->nidle <= 0) {
+- apr_thread_cond_wait(reslist->avail, reslist->listlock);
++ if (reslist->timeout) {
++ if ((rv = apr_thread_cond_timedwait(reslist->avail,
++ reslist->listlock, reslist->timeout)) != APR_SUCCESS) {
++ apr_thread_mutex_unlock(reslist->listlock);
++ return rv;
++ }
++ }
++ else
++ apr_thread_cond_wait(reslist->avail, reslist->listlock);
+ }
+ /* If we popped out of the loop, first try to see if there
+ * are new resources available for immediate use. */
+@@ -330,17 +330,13 @@
+ * a resource to fill the slot and use it. */
+ else {
+ rv = create_resource(reslist, &res);
+-
+- if (rv != APR_SUCCESS) {
+- apr_thread_mutex_unlock(reslist->listlock);
+- return rv;
++ if (rv == APR_SUCCESS) {
++ reslist->ntotal++;
++ *resource = res->opaque;
+ }
+-
+- reslist->ntotal++;
+- *resource = res->opaque;
+ free_container(reslist, res);
+ apr_thread_mutex_unlock(reslist->listlock);
+- return APR_SUCCESS;
++ return rv;
+ }
+ }
+
+@@ -359,4 +355,21 @@
+ return reslist_maint(reslist);
+ }
+
++APU_DECLARE(void) apr_reslist_timeout_set(apr_reslist_t *reslist,
++ apr_interval_time_t timeout)
++{
++ reslist->timeout = timeout;
++}
++
++APU_DECLARE(apr_status_t) apr_reslist_invalidate(apr_reslist_t *reslist,
++ void *resource)
++{
++ apr_status_t ret;
++ apr_thread_mutex_lock(reslist->listlock);
++ ret = reslist->destructor(resource, reslist->params, reslist->pool);
++ reslist->ntotal--;
++ apr_thread_mutex_unlock(reslist->listlock);
++ return ret;
++}
++
+ #endif /* APR_HAS_THREADS */
diff --git a/dev-libs/apr-util/files/digest-apr-util-0.9.6-r1 b/dev-libs/apr-util/files/digest-apr-util-0.9.6-r1
new file mode 100644
index 000000000000..906aebbf651a
--- /dev/null
+++ b/dev-libs/apr-util/files/digest-apr-util-0.9.6-r1
@@ -0,0 +1 @@
+MD5 a3a2671368e47b7efcb381e991451a9f apr-util-0.9.6.tar.gz 724680