diff options
author | jgh <jgh@FreeBSD.org> | 2012-01-26 01:56:43 +0800 |
---|---|---|
committer | jgh <jgh@FreeBSD.org> | 2012-01-26 01:56:43 +0800 |
commit | a521ad2d0cd40b5942874c73ba9a343211d49d33 (patch) | |
tree | 8f5e430e44c66eccf8d04db31c700bdb3086274d /databases/memcacheq | |
parent | 56d07716e6c01794b5cacce83a1c40db8ea1cf5e (diff) | |
download | freebsd-ports-graphics-a521ad2d0cd40b5942874c73ba9a343211d49d33.tar.gz freebsd-ports-graphics-a521ad2d0cd40b5942874c73ba9a343211d49d33.tar.zst freebsd-ports-graphics-a521ad2d0cd40b5942874c73ba9a343211d49d33.zip |
- Integrate a upstream patch to fix lock bug when creating queue
- Switch to DB5
- Add a patch to fix configure to proper handling of --enable-threads
- Add LICENSE
- Bump PORTREVISION
- Move to plist to account for package installations
PR: ports/164442
Submitted by: maintainer, m.tsatsenko at gmail.com
Approved by: crees (mentor)
Diffstat (limited to 'databases/memcacheq')
-rw-r--r-- | databases/memcacheq/Makefile | 8 | ||||
-rw-r--r-- | databases/memcacheq/files/patch-bdb.c | 41 | ||||
-rw-r--r-- | databases/memcacheq/files/patch-configure | 11 | ||||
-rw-r--r-- | databases/memcacheq/pkg-plist | 2 |
4 files changed, 59 insertions, 3 deletions
diff --git a/databases/memcacheq/Makefile b/databases/memcacheq/Makefile index eda8c05a443..082b5a3568a 100644 --- a/databases/memcacheq/Makefile +++ b/databases/memcacheq/Makefile @@ -7,7 +7,7 @@ PORTNAME= memcacheq PORTVERSION= 0.2.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= databases MASTER_SITES= ${MASTER_SITE_GOOGLE_CODE} \ ${MASTER_SITE_GENTOO} @@ -16,6 +16,8 @@ MASTER_SITE_SUBDIR= distfiles MAINTAINER= m.tsatsenko@gmail.com COMMENT= Simple queue service over Memcache +LICENSE= BSD + LIB_DEPENDS= event-1.4:${PORTSDIR}/devel/libevent USE_CSTD= gnu89 @@ -23,14 +25,14 @@ CFLAGS+= -I"${BDB_INCLUDE_DIR}" LDFLAGS+= -l"${BDB_LIB_NAME}" -L"${LOCALBASE}/lib" USE_RC_SUBR= memcacheq -USE_BDB= 47+ +USE_BDB= 5 GNU_CONFIGURE= YES CONFIGURE_ARGS= --with-libevent=${LOCALBASE} --with-bdb=${LOCALBASE} --enable-threads -PLIST_FILES= bin/memcacheq PORTDOCS= README MCQDIR?= /var/db/memcacheq +PLIST_SUB= MCQDIR=${MCQDIR} .include <bsd.port.pre.mk> diff --git a/databases/memcacheq/files/patch-bdb.c b/databases/memcacheq/files/patch-bdb.c new file mode 100644 index 00000000000..042f37c2dd1 --- /dev/null +++ b/databases/memcacheq/files/patch-bdb.c @@ -0,0 +1,41 @@ +--- bdb.c.orig 2012-01-24 14:49:12.248201883 +0400 ++++ bdb.c 2012-01-24 14:50:35.801194396 +0400 +@@ -264,8 +264,6 @@ + } + + int bdb_create_queue(char *queue_name) { +- pthread_rwlock_wrlock(&qlist_ht_lock); +- + char *k = strdup(queue_name); + assert(k != NULL); + queue_t *q = (queue_t *)calloc(1, sizeof(queue_t)); +@@ -309,14 +307,12 @@ + CHECK_DB_RET(ret); + int result = hashtable_insert(qlist_htp, (void *)k, (void *)q); + assert(result != 0); +- pthread_rwlock_unlock(&qlist_ht_lock); + return 0; + dberr: + if (txnp != NULL){ + txnp->abort(txnp); + } + fprintf(stderr, "bdb_create_queue: %s %s\n", queue_name, db_strerror(ret)); +- pthread_rwlock_unlock(&qlist_ht_lock); + return -1; + } + +@@ -554,12 +550,13 @@ + + if (NULL == q) { + pthread_rwlock_unlock(&qlist_ht_lock); ++ /* switch to write lock */ ++ pthread_rwlock_wrlock(&qlist_ht_lock); + ret = bdb_create_queue(key); + if (0 != ret){ + return -1; + } + /* search again */ +- pthread_rwlock_rdlock(&qlist_ht_lock); + q = (queue_t *)hashtable_search(qlist_htp, (void *)key); + } + diff --git a/databases/memcacheq/files/patch-configure b/databases/memcacheq/files/patch-configure new file mode 100644 index 00000000000..c06952420e9 --- /dev/null +++ b/databases/memcacheq/files/patch-configure @@ -0,0 +1,11 @@ +--- configure.orig 2011-10-14 14:34:47.367393592 +0400 ++++ configure 2011-10-14 14:34:57.769420421 +0400 +@@ -5505,7 +5505,7 @@ + enableval=$enable_threads; + fi + +-if test "x$enable_threads" == "xyes"; then ++if test "x$enable_threads" = "xyes"; then + { echo "$as_me:$LINENO: checking for library containing pthread_create" >&5 + echo $ECHO_N "checking for library containing pthread_create... $ECHO_C" >&6; } + if test "${ac_cv_search_pthread_create+set}" = set; then diff --git a/databases/memcacheq/pkg-plist b/databases/memcacheq/pkg-plist new file mode 100644 index 00000000000..35314fddba6 --- /dev/null +++ b/databases/memcacheq/pkg-plist @@ -0,0 +1,2 @@ +bin/memcacheq +@exec /usr/bin/install -d -o nobody -g nobody %%MCQDIR%% || true |