diff options
author | Michael Stewart <vericgar@gentoo.org> | 2006-04-16 22:12:00 +0000 |
---|---|---|
committer | Michael Stewart <vericgar@gentoo.org> | 2006-04-16 22:12:00 +0000 |
commit | 96fae200109f59a844f37fcc03fd8e735c667886 (patch) | |
tree | a04f41a6b9a86f939ca7ede36bf4de9b630525ff /dev-libs/apr-util | |
parent | dev-libs/eb stable on ppc. (diff) | |
download | gentoo-2-96fae200109f59a844f37fcc03fd8e735c667886.tar.gz gentoo-2-96fae200109f59a844f37fcc03fd8e735c667886.tar.bz2 gentoo-2-96fae200109f59a844f37fcc03fd8e735c667886.zip |
General cleanup. Use a saner filename for the patch for apr-util-0.9.6-r2. Remove outdated/unsupported apr-util-1.1.2.
(Portage version: 2.1_pre6)
Diffstat (limited to 'dev-libs/apr-util')
-rw-r--r-- | dev-libs/apr-util/apr-util-0.9.6-r2.ebuild | 6 | ||||
-rw-r--r-- | dev-libs/apr-util/apr-util-1.1.2.ebuild | 69 | ||||
-rw-r--r-- | dev-libs/apr-util/files/apr-util-0.9.x-161086-161087.patch | 140 | ||||
-rw-r--r-- | dev-libs/apr-util/files/digest-apr-util-1.1.2 | 1 |
4 files changed, 143 insertions, 73 deletions
diff --git a/dev-libs/apr-util/apr-util-0.9.6-r2.ebuild b/dev-libs/apr-util/apr-util-0.9.6-r2.ebuild index 67d0c982ee24..f6f7030cee22 100644 --- a/dev-libs/apr-util/apr-util-0.9.6-r2.ebuild +++ b/dev-libs/apr-util/apr-util-0.9.6-r2.ebuild @@ -1,6 +1,6 @@ -# Copyright 1999-2005 Gentoo Foundation +# Copyright 1999-2006 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-r2.ebuild,v 1.15 2005/10/21 14:15:53 ka0ttic Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-libs/apr-util/apr-util-0.9.6-r2.ebuild,v 1.16 2006/04/16 22:12:00 vericgar Exp $ inherit eutils @@ -25,7 +25,7 @@ src_unpack() { cd ${S} || die - epatch "${FILESDIR}/apr-util-0.9.x-161086:161087.patch" \ + epatch "${FILESDIR}/apr-util-0.9.x-161086-161087.patch" \ || die "patching failed" } diff --git a/dev-libs/apr-util/apr-util-1.1.2.ebuild b/dev-libs/apr-util/apr-util-1.1.2.ebuild deleted file mode 100644 index 9f8346d96c25..000000000000 --- a/dev-libs/apr-util/apr-util-1.1.2.ebuild +++ /dev/null @@ -1,69 +0,0 @@ -# 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-1.1.2.ebuild,v 1.6 2005/10/10 03:23:15 matsuu Exp $ - -inherit multilib - -DESCRIPTION="Apache Portable Runtime Library" -HOMEPAGE="http://apr.apache.org/" -SRC_URI="mirror://apache/apr/${P}.tar.gz" - -LICENSE="Apache-2.0" -KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc-macos ~ppc64 ~s390 ~sh ~sparc ~x86" -SLOT="1" -RESTRICT="test" - -IUSE="berkdb gdbm ldap" - -DEPEND="dev-libs/expat - >=dev-libs/apr-1.1.0 - berkdb? ( sys-libs/db ) - gdbm? ( sys-libs/gdbm ) - ldap? ( =net-nds/openldap-2* )" - -src_compile() { - 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-berkeley-db=/usr/include/db4.2:/usr/$(get_libdir)" - elif has_version '=sys-libs/db-4*'; then - myconf="${myconf} --with-dbm=db4 - --with-berkeley-db=/usr/include/db4:/usr/$(get_libdir)" - elif has_version '=sys-libs/db-3*'; then - myconf="${myconf} --with-dbm=db3 - --with-berkeley-db=/usr/include/db3:/usr/$(get_libdir)" - elif has_version '=sys-libs/db-2'; then - myconf="${myconf} --with-dbm=db2 - --with-berkely-db=/usr/include/db2:/usr/$(get_libdir)" - fi - fi - - ./configure \ - --prefix=/usr \ - --host=${CHOST} \ - --mandir=/usr/share/man \ - --infodir=/usr/share/info \ - --datadir=/usr/share/apr-util-1 \ - --sysconfdir=/etc \ - --localstatedir=/var/lib \ - --with-apr=/usr \ - $myconf || die - - emake || die -} - -src_install() { - einstall installbuilddir=${D}/usr/share/apr-util-1/build - - #bogus values pointing at /var/tmp/portage - sed -i -e 's:APU_SOURCE_DIR=.*:APU_SOURCE_DIR=:g' ${D}/usr/bin/apu-1-config - sed -i -e 's:APU_BUILD_DIR=.*:APU_BUILD_DIR=/usr/share/apr-util-1/build:g' ${D}/usr/bin/apu-1-config - - dodoc CHANGES LICENSE NOTICE -} 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-1.1.2 b/dev-libs/apr-util/files/digest-apr-util-1.1.2 deleted file mode 100644 index 159e5d96cf74..000000000000 --- a/dev-libs/apr-util/files/digest-apr-util-1.1.2 +++ /dev/null @@ -1 +0,0 @@ -MD5 e82f933c065ccd1c7d910da67bc77825 apr-util-1.1.2.tar.gz 615019 |