diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /net-misc/memcached | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.xz |
proj/gentoo: Initial commit
This commit represents a new era for Gentoo:
Storing the gentoo-x86 tree in Git, as converted from CVS.
This commit is the start of the NEW history.
Any historical data is intended to be grafted onto this point.
Creation process:
1. Take final CVS checkout snapshot
2. Remove ALL ChangeLog* files
3. Transform all Manifests to thin
4. Remove empty Manifests
5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$
5.1. Do not touch files with -kb/-ko keyword flags.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'net-misc/memcached')
25 files changed, 1198 insertions, 0 deletions
diff --git a/net-misc/memcached/Manifest b/net-misc/memcached/Manifest new file mode 100644 index 00000000000..19bc955a880 --- /dev/null +++ b/net-misc/memcached/Manifest @@ -0,0 +1,5 @@ +DIST memcached-1.2.6.tar.gz 217651 SHA256 365c5719997af9477aedf4ff0435fbd83aadf5fa9b1c7a2e0d744f865aac578e SHA512 0e492c0dbd84321533588b9373827c41e90b6ef0ce233e5849c3291c25179947e4e332c7e972285c6899e45317edfcc718e558bf63ce1f2d00180dd95b927c63 WHIRLPOOL 0b08ff9534ac983bbc7f4ec5190d61f7f55d217080d18f406bb655fc6c202ef162a91043070b18875b80af28e5ce5c5ae15cfcbda18044de5f85c9701f3f9b9a +DIST memcached-1.2.8.tar.gz 221285 SHA256 9e36702833a9213d607801a44325d108e6b86abc7af82fe265cce4b96eb2269e SHA512 582a40aa1ebe20232ecb004830919d0ba4fe3d6fa15e6d51d1d929ab13719d90629858ae7fda4f45a78b877a03dd68241938e6b18a48bc5421df99a8437498df WHIRLPOOL f84a494951d95bd14ed43713f8b61425c01cc58efdabb844a2b8092d20ee00afb4dd239e950618bf0e8bc85ec79ecb4f0904f068049e507d653b8be218f5850e +DIST memcached-1.3.3.tar.gz 260203 SHA256 3728c714c3c0194a429f754d739067bea193d66359a03a63437428bf4a2cce84 SHA512 ce05d12b00fbb88d7020073591015ec918fb8e90476e2b1d652349520595416a65634a8d22cc5486a9d723b9fb938493145c8b70b9a3a31f426a6e55a9803eec WHIRLPOOL b4df09679deb9adb9fdf83b23e9d79f116e29d0c26f8f8c102f4fba3b01d939889ded347e98f977ee278072328aadd4079ba34053bbc680203bcc28aea63e519 +DIST memcached-1.4.17.tar.gz 326970 SHA256 d9173ef6d99ba798c982ea4566cb4f0e64eb23859fdbf9926a89999d8cdc0458 SHA512 cf44500f81494efe8b27d2859d160e288260323d9c0ca6f0d0507c131257048012248e6a7639e410cec6765219d4595359d9335281eeb3b238306972a5bd859d WHIRLPOOL 2c9115630e0fd68d42e0771aea7d59f1d296b1f5ff4f2d586095ecd01ded6f4c60d0722a1ba63b926042e304b3e88521b2f862dffecec5c0145b96785c4b2b14 +DIST memcached-1.4.24.tar.gz 354917 SHA256 08a426c504ecf64633151eec1058584754d2f54e62e5ed2d6808559401617e55 SHA512 446676ae7b21d8d9246f38d3df06b167ea93a853f88ac70ae3a99b1a85a4de3d452ee266e77fac599660b9bc6e785bc89224f46e16ff6e216476d50e4706b9f6 WHIRLPOOL 269e920a0d5279786a4f4ef516b71fa7e95cacdf8627a2b692d2387a66d5d9a80618f190cf013bf070aff0f73d70d6e75dc4e3402fe8e64b372026be83170e3d diff --git a/net-misc/memcached/files/1.1.12/conf b/net-misc/memcached/files/1.1.12/conf new file mode 100644 index 00000000000..6609d16bb20 --- /dev/null +++ b/net-misc/memcached/files/1.1.12/conf @@ -0,0 +1,28 @@ +# Copyright 2003 Gentoo Technologies, Inc +# $Id$ +# memcached config file + +MEMCACHED_BINARY="/usr/bin/memcached" + +#Specify memory usage in megabytes (do not use letters) +#64MB is default +MEMUSAGE="64" + +#User to run as +MEMCACHED_RUNAS="memcached" + +#Specify maximum number of concurrent connections +#1024 is default +MAXCONN="1024" + +#Listen for connections on what address? +LISTENON="" + +#Listen for connections on what port? +PORT="11211" + +#PID file location +PIDFILE="/var/run/memcached/memcached-${PORT}.pid" + +#Other Options +MISC_OPTS="" diff --git a/net-misc/memcached/files/1.1.12/init b/net-misc/memcached/files/1.1.12/init new file mode 100644 index 00000000000..30035c39c80 --- /dev/null +++ b/net-misc/memcached/files/1.1.12/init @@ -0,0 +1,48 @@ +#!/sbin/runscript +# $Id$ + +depend() { + need net +} + +checkconfig() { + if [ -z "${LISTENON}" ]; then + ewarn "You should edit /etc/conf.d/memcached and specify an address to listen on." + ewarn "Listening on any address (I hope your firewall is set up properly)" + fi +} + +start() { + ebegin "Starting memcached" + checkconfig + local dir="$(dirname ${PIDFILE})" + if [ ! -d "${dir}" ]; then + einfo " Creating ${dir}" + mkdir -p "${dir}" + fi + chown ${MEMCACHED_RUNAS} "${dir}" + if [ -f ${PIDFILE} ]; then + einfo " Removing stale pidfile ${PIDFILE}" + rm -f ${PIDFILE} 1>/dev/null + fi + + if [ -z "${LISTENON}" ]; then + c_LISTENON="" + else + c_LISTENON="-l ${LISTENON}" + fi + + /sbin/start-stop-daemon --start \ + --exec ${MEMCACHED_BINARY} -- \ + -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \ + -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P ${PIDFILE} ${MISC_OPTS} + eend $? +} + +stop() { + ebegin "Stopping memcached" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + rm -f ${PIDFILE} + eend $? +} + diff --git a/net-misc/memcached/files/1.1.13/conf b/net-misc/memcached/files/1.1.13/conf new file mode 100644 index 00000000000..6609d16bb20 --- /dev/null +++ b/net-misc/memcached/files/1.1.13/conf @@ -0,0 +1,28 @@ +# Copyright 2003 Gentoo Technologies, Inc +# $Id$ +# memcached config file + +MEMCACHED_BINARY="/usr/bin/memcached" + +#Specify memory usage in megabytes (do not use letters) +#64MB is default +MEMUSAGE="64" + +#User to run as +MEMCACHED_RUNAS="memcached" + +#Specify maximum number of concurrent connections +#1024 is default +MAXCONN="1024" + +#Listen for connections on what address? +LISTENON="" + +#Listen for connections on what port? +PORT="11211" + +#PID file location +PIDFILE="/var/run/memcached/memcached-${PORT}.pid" + +#Other Options +MISC_OPTS="" diff --git a/net-misc/memcached/files/1.1.13/init b/net-misc/memcached/files/1.1.13/init new file mode 100644 index 00000000000..1cbb60a7575 --- /dev/null +++ b/net-misc/memcached/files/1.1.13/init @@ -0,0 +1,47 @@ +#!/sbin/runscript +# $Id$ + +depend() { + need net +} + +checkconfig() { + if [ -z "${LISTENON}" ]; then + ewarn "You should edit /etc/conf.d/memcached and specify an address to listen on." + ewarn "Listening on any address (I hope your firewall is set up properly)" + fi +} + +start() { + ebegin "Starting memcached" + checkconfig + local dir="$(dirname ${PIDFILE})" + if [ ! -d "${dir}" ]; then + einfo " Creating ${dir}" + mkdir -p "${dir}" + fi + chown ${MEMCACHED_RUNAS} "${dir}" + if [ -f ${PIDFILE} ]; then + einfo " Removing stale pidfile ${PIDFILE}" + rm -f ${PIDFILE} 1>/dev/null + fi + + if [ -z "${LISTENON}" ]; then + c_LISTENON="" + else + c_LISTENON="-l ${LISTENON}" + fi + + /sbin/start-stop-daemon --start --pidfile ${PIDFILE} \ + --exec ${MEMCACHED_BINARY} -- \ + -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \ + -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P ${PIDFILE} ${MISC_OPTS} + eend $? +} + +stop() { + ebegin "Stopping memcached" + start-stop-daemon --stop --quiet --pidfile ${PIDFILE} + rm -f ${PIDFILE} + eend $? +} diff --git a/net-misc/memcached/files/1.2.6/conf b/net-misc/memcached/files/1.2.6/conf new file mode 100644 index 00000000000..61c3c717652 --- /dev/null +++ b/net-misc/memcached/files/1.2.6/conf @@ -0,0 +1,32 @@ +# Copyright 2003 Gentoo Technologies, Inc +# $Id$ +# memcached config file + +MEMCACHED_BINARY="/usr/bin/memcached" + +#Specify memory usage in megabytes (do not use letters) +#64MB is default +MEMUSAGE="64" + +#User to run as +MEMCACHED_RUNAS="memcached" + +#Specify maximum number of concurrent connections +#1024 is default +MAXCONN="1024" + +#Listen for connections on what address? +# If this is empty, memcached will listen on 0.0.0.0 +# be sure you have a firewall in place! +LISTENON="" + +#Listen for connections on what port? +PORT="11211" + +#PID file location +# '-${PORT}.${CONF}.pid' will be appended to this! +# You do not normally need to change this. +PIDBASE="/var/run/memcached/memcached" + +#Other Options +MISC_OPTS="" diff --git a/net-misc/memcached/files/1.2.6/init b/net-misc/memcached/files/1.2.6/init new file mode 100644 index 00000000000..1c0e59b7664 --- /dev/null +++ b/net-misc/memcached/files/1.2.6/init @@ -0,0 +1,75 @@ +#!/sbin/runscript +# $Id$ + +CONF="${SVCNAME#*.}" +CONFBASE="/etc/conf.d/memcached" + +[ -z "${PIDBASE}" ] && PIDBASE="/var/run/memcached/memcached" +[ "${CONF}" == "memcached" ] && CONF='' + +if [ -n "${CONF}" ]; then + PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid" + CONFSRC="${CONFBASE}.${CONF}" + if [ -f "${CONFSRC}" ]; then + source "${CONFSRC}" + else + eerror "The configuration file $CONFSRC was not found!" + fi +else + PIDFILE="${PIDBASE}-${PORT}.pid" + CONFSRC="${CONFBASE}" +fi + +depend() { + need net +} + +checkconfig() { + if [ -z "${LISTENON}" ]; then + ewarn "You should edit $CONFSRC and specify an address to listen on." + ewarn "Listening on any address (check your firewall!)" + fi +} + +start() { + if [ -n "${CONF}" ]; then + ebegin "Starting memcached (${CONF})" + else + ebegin "Starting memcached" + fi + checkconfig + local dir="$(dirname ${PIDFILE})" + if [ ! -d "${dir}" ]; then + einfo " Creating ${dir}" + mkdir -p "${dir}" + fi + chown ${MEMCACHED_RUNAS} "${dir}" + if [ -f "${PIDFILE}" ]; then + einfo " Removing stale pidfile ${PIDFILE}" + rm -f "${PIDFILE}" 1>/dev/null + fi + + if [ -z "${LISTENON}" ]; then + c_LISTENON="" + else + c_LISTENON="-l ${LISTENON}" + fi + + /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \ + --exec "${MEMCACHED_BINARY}" -- \ + -d -p ${PORT} ${c_LISTENON} -m ${MEMUSAGE} \ + -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \ + ${MISC_OPTS} + eend $? +} + +stop() { + if [ -n "${CONF}" ]; then + ebegin "Stopping memcached (${CONF})" + else + ebegin "Stopping memcached" + fi + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + rm -f "${PIDFILE}" + eend $? +} diff --git a/net-misc/memcached/files/1.3.3/conf b/net-misc/memcached/files/1.3.3/conf new file mode 100644 index 00000000000..341ce57f022 --- /dev/null +++ b/net-misc/memcached/files/1.3.3/conf @@ -0,0 +1,35 @@ +# Copyright 2003 Gentoo Technologies, Inc +# $Id$ +# memcached config file + +MEMCACHED_BINARY="/usr/bin/memcached" + +#Specify memory usage in megabytes (do not use letters) +#64MB is default +MEMUSAGE="64" + +#User to run as +MEMCACHED_RUNAS="memcached" + +#Specify maximum number of concurrent connections +#1024 is default +MAXCONN="1024" + +#Listen for connections on what address? +# If this is empty, memcached will listen on 0.0.0.0 +# be sure you have a firewall in place! +LISTENON="" + +#Listen for connections on what port? +PORT="11211" + +# Listen for UDP connecitons on what port? 0 means turn off UDP +UDPPORT="${PORT}" + +#PID file location +# '-${PORT}.${CONF}.pid' will be appended to this! +# You do not normally need to change this. +PIDBASE="/var/run/memcached/memcached" + +#Other Options +MISC_OPTS="" diff --git a/net-misc/memcached/files/1.3.3/init b/net-misc/memcached/files/1.3.3/init new file mode 100644 index 00000000000..e10adbd7351 --- /dev/null +++ b/net-misc/memcached/files/1.3.3/init @@ -0,0 +1,77 @@ +#!/sbin/runscript + +CONF="${SVCNAME#*.}" +CONFBASE="/etc/conf.d/memcached" + +[ -z "${PIDBASE}" ] && PIDBASE="/var/run/memcached/memcached" +[ "${CONF}" = "memcached" ] && CONF='' + +if [ -n "${CONF}" ]; then + PIDFILE="${PIDBASE}-${PORT}.${CONF}.pid" + CONFSRC="${CONFBASE}.${CONF}" + if [ -f "${CONFSRC}" ]; then + . "${CONFSRC}" + else + eerror "The configuration file $CONFSRC was not found!" + fi +else + PIDFILE="${PIDBASE}-${PORT}.pid" + CONFSRC="${CONFBASE}" +fi + +depend() { + need net + # per bug #269022, accurate time is important for memcached! + # We include the full list of ways it might be set on boot. + after ntp-client ntpd rdate openrdate adjtimex hwclock +} + +checkconfig() { + if [ -z "${LISTENON}" ]; then + ewarn "You should edit $CONFSRC and specify an address to listen on." + ewarn "Listening on any address (check your firewall!)" + fi +} + +start() { + if [ -n "${CONF}" ]; then + ebegin "Starting memcached (${CONF})" + else + ebegin "Starting memcached" + fi + checkconfig + local dir="$(dirname ${PIDFILE})" + if [ ! -d "${dir}" ]; then + einfo " Creating ${dir}" + mkdir -p "${dir}" + fi + chown ${MEMCACHED_RUNAS} "${dir}" + if [ -f "${PIDFILE}" ]; then + einfo " Removing stale pidfile ${PIDFILE}" + rm -f "${PIDFILE}" 1>/dev/null + fi + + if [ -z "${LISTENON}" ]; then + c_LISTENON="" + else + c_LISTENON="-l ${LISTENON}" + fi + + /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \ + --exec "${MEMCACHED_BINARY}" -- \ + -d -p ${PORT} -U ${UDPPORT} ${c_LISTENON} -m ${MEMUSAGE} \ + -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \ + ${MISC_OPTS} + eend $? +} + +stop() { + if [ -n "${CONF}" ]; then + ebegin "Stopping memcached (${CONF})" + else + ebegin "Stopping memcached" + fi + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + rm -f "${PIDFILE}" + eend $? +} diff --git a/net-misc/memcached/files/memcached-1.2.2-fbsd.patch b/net-misc/memcached/files/memcached-1.2.2-fbsd.patch new file mode 100644 index 00000000000..76f237698cf --- /dev/null +++ b/net-misc/memcached/files/memcached-1.2.2-fbsd.patch @@ -0,0 +1,12 @@ +Index: memcached-1.2.2/memcached.h +=================================================================== +--- memcached-1.2.2.orig/memcached.h ++++ memcached-1.2.2/memcached.h +@@ -4,6 +4,7 @@ + #include "config.h" + #include <sys/types.h> + #include <sys/time.h> ++#include <sys/socket.h> + #include <netinet/in.h> + #include <event.h> + diff --git a/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch b/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch new file mode 100644 index 00000000000..5b703502e73 --- /dev/null +++ b/net-misc/memcached/files/memcached-1.3.3-gcc4-slab-fixup.patch @@ -0,0 +1,25 @@ +Compile fix for illegal syntax to make GCC4 happy. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> + +diff -Nuar -Nuar memcached-1.3.3.orig/slabs.c memcached-1.3.3/slabs.c +--- memcached-1.3.3.orig/slabs.c 2009-04-02 12:29:32.000000000 -0700 ++++ memcached-1.3.3/slabs.c 2009-06-03 14:11:04.134757232 -0700 +@@ -419,7 +419,7 @@ + slab = p->slab_list[p->killing - 1]; + slab_end = (char*)slab + POWER_BLOCK; + +- for (iter = slab; iter < slab_end; (char*)iter += p->size) { ++ for (iter = slab; iter < slab_end; iter = (char*)iter + p->size) { + item *it = (item *)iter; + if (it->slabs_clsid) { + if (it->refcount) was_busy = true; +@@ -449,7 +449,7 @@ + dp->end_page_free = dp->perslab; + /* this isn't too critical, but other parts of the code do asserts to + make sure this field is always 0. */ +- for (iter = slab; iter < slab_end; (char*)iter += dp->size) { ++ for (iter = slab; iter < slab_end; iter = (char*)iter + dp->size) { + ((item *)iter)->slabs_clsid = 0; + } + return 1; diff --git a/net-misc/memcached/files/memcached-1.4.0-fix-as-needed-linking.patch b/net-misc/memcached/files/memcached-1.4.0-fix-as-needed-linking.patch new file mode 100644 index 00000000000..d8a8ff295fc --- /dev/null +++ b/net-misc/memcached/files/memcached-1.4.0-fix-as-needed-linking.patch @@ -0,0 +1,47 @@ +Users that try to second-guess us and specify -DNDEBUG are just asking to cause +problems. They cause breakage with the testapp and -debug versions. + +So let's ensure that testapp and -debug use per-object compile flags, and thus +preventing flags leaking between stuff. The #undef at the top of testapp.c is +redundant now, but not removed. + +Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> +X-Gentoo-Bug: 278780 +X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=278780 + +diff -Nuar memcached-1.4.0/testapp.c memcached-1.4.0/testapp.c +--- memcached-1.4.0/testapp.c 2009-07-09 09:43:42.000000000 -0700 ++++ memcached-1.4.0/testapp.c 2009-07-27 16:41:14.468907751 -0700 +@@ -115,12 +115,16 @@ + char old = *(p - 1); + *(p - 1) = 0; + cache_free(cache, p); ++#ifndef NDEBUG + assert(cache_error == -1); ++#endif + *(p - 1) = old; + + p[sizeof(uint32_t)] = 0; + cache_free(cache, p); ++#ifndef NDEBUG + assert(cache_error == 1); ++#endif + + /* restore signal handler */ + sigaction(SIGABRT, &old_action, NULL); +diff -Nuar memcached-1.4.0.orig/Makefile.am memcached-1.4.0/Makefile.am +--- memcached-1.4.0.orig/Makefile.am 2009-07-09 09:43:42.000000000 -0700 ++++ memcached-1.4.0/Makefile.am 2009-07-27 17:45:20.973106097 -0700 +@@ -27,8 +27,12 @@ + + memcached_debug_SOURCES = $(memcached_SOURCES) + memcached_CPPFLAGS = -DNDEBUG ++ + memcached_debug_LDADD = @PROFILER_LDFLAGS@ + memcached_debug_CFLAGS = @PROFILER_FLAGS@ ++memcached_debug_CPPFLAGS = -UNDEBUG ++ ++testapp_CPPFLAGS = -UNDEBUG + + memcached_LDADD = + memcached_DEPENDENCIES = diff --git a/net-misc/memcached/files/memcached-1.4.17-EWOULDBLOCK.patch b/net-misc/memcached/files/memcached-1.4.17-EWOULDBLOCK.patch new file mode 100644 index 00000000000..115c6bbc863 --- /dev/null +++ b/net-misc/memcached/files/memcached-1.4.17-EWOULDBLOCK.patch @@ -0,0 +1,21 @@ +errno.h(0P): + EAGAIN Resource unavailable, try again (may be the same value as [EWOULDBLOCK]). + + [...] + + EWOULDBLOCK + Operation would block (may be the same value as [EAGAIN]). + + +--- a/testapp.c ++++ b/testapp.c +@@ -1840,6 +1840,9 @@ + switch (errno) { + case EINTR: + break; ++#if (EAGAIN != EWOULDBLOCK) ++ case EAGAIN: ++#endif + case ENOMEM: + case EWOULDBLOCK: + more = false;
\ No newline at end of file diff --git a/net-misc/memcached/files/memcached-1.4.4-as-needed.patch b/net-misc/memcached/files/memcached-1.4.4-as-needed.patch new file mode 100644 index 00000000000..f6e5cde1105 --- /dev/null +++ b/net-misc/memcached/files/memcached-1.4.4-as-needed.patch @@ -0,0 +1,31 @@ +diff -Nuar memcached-1.4.4.orig/configure.ac memcached-1.4.4/configure.ac +--- memcached-1.4.4.orig/configure.ac 2009-11-24 16:40:29.000000000 -0800 ++++ memcached-1.4.4/configure.ac 2009-11-27 15:20:38.000000000 -0800 +@@ -115,6 +115,14 @@ + AC_SUBST(ENABLE_SASL) + AC_SUBST(PROFILER_LDFLAGS) + ++dnl Check whether the user's system supports pthread before adding -pthread to CFLAGS ++dnl otherwise we won't get -l{threads} in LIBS ++dnl AFAIK -pthread should be added to LDFLAGS on BSD systems ++AC_SEARCH_LIBS(pthread_create, [pthread pthreads thread threads] ) ++if test "x$ac_cv_search_pthread_create" == "xno"; then ++ AC_MSG_ERROR([Can't enable threads without the POSIX thread library.]) ++fi ++ + AC_ARG_ENABLE(coverage, + [AS_HELP_STRING([--disable-coverage],[Disable code coverage])]) + +@@ -376,12 +384,6 @@ + + AC_C_HTONLL + +-dnl Check whether the user's system supports pthread +-AC_SEARCH_LIBS(pthread_create, pthread) +-if test "x$ac_cv_search_pthread_create" = "xno"; then +- AC_MSG_ERROR([Can't enable threads without the POSIX thread library.]) +-fi +- + AC_CHECK_FUNCS(mlockall) + AC_CHECK_FUNCS(getpagesizes) + AC_CHECK_FUNCS(memcntl) diff --git a/net-misc/memcached/files/memcached.confd b/net-misc/memcached/files/memcached.confd new file mode 100644 index 00000000000..aad80780e75 --- /dev/null +++ b/net-misc/memcached/files/memcached.confd @@ -0,0 +1,40 @@ +# memcached config file + +MEMCACHED_BINARY="/usr/bin/memcached" + +# Specify memory usage in megabytes (do not use letters) +# 64MB is default +MEMUSAGE="64" + +# User to run as +MEMCACHED_RUNAS="memcached" + +# Specify maximum number of concurrent connections +# 1024 is default +MAXCONN="1024" + +# Listen for connections on what address? +# If this is empty, memcached will listen on 0.0.0.0 +# be sure you have a firewall in place! +LISTENON="" + +# Listen for connections on what port? +PORT="11211" + +# Listen for UDP connecitons on what port? 0 means turn off UDP +UDPPORT="${PORT}" + +# PID file location +# '-${PORT}.${CONF}.pid' will be appended to this! +# You do not normally need to change this. +PIDBASE="/var/run/memcached/memcached" + +# Socket to listen on +#SOCKET="/var/run/memcached/memcached.sock" + +# Socket mask +# 0700 is default +#SOCKET_MASK="0700" + +# Other Options +MISC_OPTS="" diff --git a/net-misc/memcached/files/memcached.init b/net-misc/memcached/files/memcached.init new file mode 100644 index 00000000000..dd181ebf3f1 --- /dev/null +++ b/net-misc/memcached/files/memcached.init @@ -0,0 +1,93 @@ +#!/sbin/runscript + +CONF="${SVCNAME#*.}" +CONFBASE="/etc/conf.d/memcached" + +[ -z "${PIDBASE}" ] && PIDBASE="/run/memcached/memcached" +[ "${CONF}" == "memcached" ] && CONF='' + +if [ -n "${CONF}" ]; then + PIDFILE="${PIDBASE}.${CONF}.pid" + CONFSRC="${CONFBASE}.${CONF}" + if [ -f "${CONFSRC}" ]; then + source "${CONFSRC}" + else + eerror "The configuration file $CONFSRC was not found!" + fi +else + PIDFILE="${PIDBASE}.pid" + CONFSRC="${CONFBASE}" +fi + +depend() { + if [ -z "${SOCKET}" ]; then + need net + fi + # per bug #269022, accurate time is important for memcached! + # We include the full list of ways it might be set on boot. + after ntp-client ntpd rdate openrdate adjtimex hwclock +} + +checkconfig() { + if [ -z "${LISTENON}" ] && [ -z "${SOCKET}" ]; then + ewarn "You should edit $CONFSRC and specify an address or socket to listen on." + ewarn "Listening on any address (check your firewall!)" + fi +} + +start() { + if [ -n "${CONF}" ]; then + ebegin "Starting memcached (${CONF})" + else + ebegin "Starting memcached" + fi + checkconfig + local dir="$(dirname ${PIDFILE})" + if [ ! -d "${dir}" ]; then + einfo " Creating ${dir}" + mkdir -p "${dir}" + fi + + chown ${MEMCACHED_RUNAS} "${dir}" + if [ -f "${PIDFILE}" ]; then + einfo " Removing stale pidfile ${PIDFILE}" + rm -f "${PIDFILE}" 1>/dev/null + fi + + + if [ -n "${SOCKET}" ]; then + CONNECTION="-s ${SOCKET}" + + if [ -n "${SOCKET_MASK}" ]; then + CONNECTION="${CONNECTION} -a ${SOCKET_MASK}" + fi + else + CONNECTION="-p ${PORT} -U ${UDPPORT}" + + if [ -n "${LISTENON}" ]; then + CONNECTION="${CONNECTION} -l ${LISTENON}" + fi + fi + + /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \ + --exec "${MEMCACHED_BINARY}" -- \ + -d ${CONNECTION} -m ${MEMUSAGE} \ + -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \ + ${MISC_OPTS} + + eend $? +} + +stop() { + if [ -n "${CONF}" ]; then + ebegin "Stopping memcached (${CONF})" + else + ebegin "Stopping memcached" + fi + + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + + rm -f "${PIDFILE}" + + eend $? +} diff --git a/net-misc/memcached/files/memcached.init2 b/net-misc/memcached/files/memcached.init2 new file mode 100644 index 00000000000..92937810030 --- /dev/null +++ b/net-misc/memcached/files/memcached.init2 @@ -0,0 +1,90 @@ +#!/sbin/runscript + +CONF="${SVCNAME#*.}" +CONFBASE="/etc/conf.d/memcached" + +[ -z "${PIDBASE}" ] && PIDBASE="/run/memcached/memcached" +[ "${CONF}" = "memcached" ] && CONF='' + +if [ -n "${CONF}" ]; then + PIDFILE="${PIDBASE}.${CONF}.pid" + CONFSRC="${CONFBASE}.${CONF}" + if [ -f "${CONFSRC}" ]; then + source "${CONFSRC}" + else + eerror "The configuration file $CONFSRC was not found!" + fi +else + PIDFILE="${PIDBASE}.pid" + CONFSRC="${CONFBASE}" +fi + +depend() { + # per bug #269022, accurate time is important for memcached! + # We include the full list of ways it might be set on boot. + after ntp-client ntpd rdate openrdate adjtimex hwclock +} + +checkconfig() { + if [ -z "${LISTENON}" ] && [ -z "${SOCKET}" ]; then + ewarn "You should edit $CONFSRC and specify an address or socket to listen on." + ewarn "Listening on any address (check your firewall!)" + fi +} + +start() { + if [ -n "${CONF}" ]; then + ebegin "Starting memcached (${CONF})" + else + ebegin "Starting memcached" + fi + checkconfig + local dir="$(dirname ${PIDFILE})" + if [ ! -d "${dir}" ]; then + einfo " Creating ${dir}" + mkdir -p "${dir}" + fi + + chown ${MEMCACHED_RUNAS} "${dir}" + if [ -f "${PIDFILE}" ]; then + einfo " Removing stale pidfile ${PIDFILE}" + rm -f "${PIDFILE}" 1>/dev/null + fi + + + if [ -n "${SOCKET}" ]; then + CONNECTION="-s ${SOCKET}" + + if [ -n "${SOCKET_MASK}" ]; then + CONNECTION="${CONNECTION} -a ${SOCKET_MASK}" + fi + else + CONNECTION="-p ${PORT} -U ${UDPPORT}" + + if [ -n "${LISTENON}" ]; then + CONNECTION="${CONNECTION} -l ${LISTENON}" + fi + fi + + /sbin/start-stop-daemon --start --pidfile "${PIDFILE}" \ + --exec "${MEMCACHED_BINARY}" -- \ + -d ${CONNECTION} -m ${MEMUSAGE} \ + -c ${MAXCONN} -u ${MEMCACHED_RUNAS} -P "${PIDFILE}" \ + ${MISC_OPTS} + + eend $? +} + +stop() { + if [ -n "${CONF}" ]; then + ebegin "Stopping memcached (${CONF})" + else + ebegin "Stopping memcached" + fi + + start-stop-daemon --stop --quiet --pidfile "${PIDFILE}" + + rm -f "${PIDFILE}" + + eend $? +} diff --git a/net-misc/memcached/files/memcached.service b/net-misc/memcached/files/memcached.service new file mode 100644 index 00000000000..f51fd1f3573 --- /dev/null +++ b/net-misc/memcached/files/memcached.service @@ -0,0 +1,12 @@ +[Unit] +After=network.target +Description=High-performance, distributed memory object caching system +Documentation=man:memcached(1) +Documentation=http://code.google.com/p/memcached/ + +[Service] +ExecStart=/usr/bin/memcached +User=memcached + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/memcached/memcached-1.2.6-r1.ebuild b/net-misc/memcached/memcached-1.2.6-r1.ebuild new file mode 100644 index 00000000000..7daad90c407 --- /dev/null +++ b/net-misc/memcached/memcached-1.2.6-r1.ebuild @@ -0,0 +1,59 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils user + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="High-performance, distributed memory object caching system" +HOMEPAGE="http://www.danga.com/memcached/" +SRC_URI="http://www.danga.com/memcached/dist/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc ~sparc-fbsd x86 ~x86-fbsd" +IUSE="nptl test" + +RDEPEND=">=dev-libs/libevent-1.4 + dev-lang/perl" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch" +} + +src_compile() { + econf $(use_enable nptl threads) + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." + dobin scripts/memcached-tool + + dodoc AUTHORS ChangeLog NEWS README TODO doc/{CONTRIBUTORS,*.txt} + + newconfd "${FILESDIR}"/1.2.6/conf memcached + newinitd "${FILESDIR}"/1.2.6/init memcached +} + +pkg_postinst() { + enewuser memcached -1 -1 /dev/null daemon + + elog "With this version of Memcached Gentoo now supports multiple instances." + elog "To enable this you must create a symlink in /etc/init.d/ for each instance" + elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/" + elog "Please see Gentoo bug #122246 for more info" +} + +src_test() { + emake -j1 test || die "Failed testing" +} diff --git a/net-misc/memcached/memcached-1.2.8-r1.ebuild b/net-misc/memcached/memcached-1.2.8-r1.ebuild new file mode 100644 index 00000000000..5d0e6173b70 --- /dev/null +++ b/net-misc/memcached/memcached-1.2.8-r1.ebuild @@ -0,0 +1,61 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils autotools user + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="High-performance, distributed memory object caching system" +HOMEPAGE="http://code.google.com/p/memcached/" +SRC_URI="http://memcached.googlecode.com/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ppc64 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd" +IUSE="nptl test" + +RDEPEND=">=dev-libs/libevent-1.4 + dev-lang/perl" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch" + sed -i -e 's,-Werror,,g' configure.ac || die "sed failed" + eautoreconf +} + +src_compile() { + econf $(use_enable nptl threads) + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." + dobin scripts/memcached-tool + + dodoc AUTHORS ChangeLog NEWS README TODO doc/{CONTRIBUTORS,*.txt} + + newconfd "${FILESDIR}"/1.2.6/conf memcached + newinitd "${FILESDIR}"/1.2.6/init memcached +} + +pkg_postinst() { + enewuser memcached -1 -1 /dev/null daemon + + elog "With this version of Memcached Gentoo now supports multiple instances." + elog "To enable this you must create a symlink in /etc/init.d/ for each instance" + elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/" + elog "Please see Gentoo bug #122246 for more info" +} + +src_test() { + emake -j1 test || die "Failed testing" +} diff --git a/net-misc/memcached/memcached-1.3.3-r5.ebuild b/net-misc/memcached/memcached-1.3.3-r5.ebuild new file mode 100644 index 00000000000..fbe7fa147cd --- /dev/null +++ b/net-misc/memcached/memcached-1.3.3-r5.ebuild @@ -0,0 +1,63 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +inherit eutils autotools flag-o-matic user + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="High-performance, distributed memory object caching system" +HOMEPAGE="http://code.google.com/p/memcached/" +SRC_URI="http://memcached.googlecode.com/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 sh sparc ~sparc-fbsd x86 ~x86-fbsd" +IUSE="test slabs-reassign" + +RDEPEND=">=dev-libs/libevent-1.4 + dev-lang/perl" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )" + +S="${WORKDIR}/${MY_P}" + +src_unpack() { + unpack ${A} + cd "${S}" + + epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch" + epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch" + sed -i -e 's,-Werror,,g' configure.ac || die "sed failed" + eautoreconf + use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN +} + +src_compile() { + econf + emake || die "emake failed." +} + +src_install() { + emake DESTDIR="${D}" install || die "emake install failed." + dobin scripts/memcached-tool + + dodoc AUTHORS ChangeLog NEWS README TODO doc/{CONTRIBUTORS,*.txt} + + newconfd "${FILESDIR}"/1.3.3/conf memcached + newinitd "${FILESDIR}"/1.3.3/init memcached +} + +pkg_postinst() { + enewuser memcached -1 -1 /dev/null daemon + + elog "With this version of Memcached Gentoo now supports multiple instances." + elog "To enable this you should create a symlink in /etc/init.d/ for each instance" + elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/" + elog "Please see Gentoo bug #122246 for more info" +} + +src_test() { + emake -j1 test || die "Failed testing" +} diff --git a/net-misc/memcached/memcached-1.4.17-r3.ebuild b/net-misc/memcached/memcached-1.4.17-r3.ebuild new file mode 100644 index 00000000000..452d75d3e58 --- /dev/null +++ b/net-misc/memcached/memcached-1.4.17-r3.ebuild @@ -0,0 +1,82 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools eutils flag-o-matic systemd user + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="High-performance, distributed memory object caching system" +HOMEPAGE="http://code.google.com/p/memcached/" +SRC_URI="http://www.memcached.org/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="test slabs-reassign debug sasl" # hugetlbfs later + +RDEPEND=">=dev-libs/libevent-1.4 + dev-lang/perl + sasl? ( dev-libs/cyrus-sasl )" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch" + # Handled different upstream + #epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch" + epatch "${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch" + epatch "${FILESDIR}/${PN}-1.4.4-as-needed.patch" + epatch "${FILESDIR}/${PN}-1.4.17-EWOULDBLOCK.patch" + sed -i -e 's,-Werror,,g' configure.ac || die + sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,' configure.ac || die + eautoreconf + use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN +} + +src_configure() { + econf \ + --disable-docs \ + $(use_enable sasl) + # The xml2rfc tool to build the additional docs requires TCL :-( + # `use_enable doc docs` +} + +src_compile() { + # There is a heavy degree of per-object compile flags + # Users do NOT know better than upstream. Trying to compile the testapp and + # the -debug version with -DNDEBUG _WILL_ fail. + append-flags -UNDEBUG -pthread + emake testapp memcached-debug CFLAGS="${CFLAGS}" + filter-flags -UNDEBUG + emake +} + +src_install() { + emake DESTDIR="${D}" install + dobin scripts/memcached-tool + use debug && dobin memcached-debug + + dodoc AUTHORS ChangeLog NEWS README.md doc/{CONTRIBUTORS,*.txt} + + newconfd "${FILESDIR}/memcached.confd" memcached + newinitd "${FILESDIR}/memcached.init" memcached + systemd_dounit "${FILESDIR}/memcached.service" +} + +pkg_postinst() { + enewuser memcached -1 -1 /dev/null daemon + + elog "With this version of Memcached Gentoo now supports multiple instances." + elog "To enable this you should create a symlink in /etc/init.d/ for each instance" + elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/" + elog "Please see Gentoo bug #122246 for more info" +} + +src_test() { + emake -j1 test +} diff --git a/net-misc/memcached/memcached-1.4.17.ebuild b/net-misc/memcached/memcached-1.4.17.ebuild new file mode 100644 index 00000000000..daf71672257 --- /dev/null +++ b/net-misc/memcached/memcached-1.4.17.ebuild @@ -0,0 +1,79 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit eutils autotools flag-o-matic user + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="High-performance, distributed memory object caching system" +HOMEPAGE="http://code.google.com/p/memcached/" +SRC_URI="http://www.memcached.org/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="test slabs-reassign debug sasl" # hugetlbfs later + +RDEPEND=">=dev-libs/libevent-1.4 + dev-lang/perl + sasl? ( dev-libs/cyrus-sasl )" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch" + # Handled different upstream + #epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch" + epatch "${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch" + epatch "${FILESDIR}/${PN}-1.4.4-as-needed.patch" + sed -i -e 's,-Werror,,g' configure.ac || die "sed failed" + eautoreconf + use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN +} + +src_configure() { + econf \ + --disable-docs \ + $(use_enable sasl) + # The xml2rfc tool to build the additional docs requires TCL :-( + # `use_enable doc docs` +} + +src_compile() { + # There is a heavy degree of per-object compile flags + # Users do NOT know better than upstream. Trying to compile the testapp and + # the -debug version with -DNDEBUG _WILL_ fail. + append-flags -UNDEBUG -pthread + emake testapp memcached-debug CFLAGS="${CFLAGS}" + filter-flags -UNDEBUG + emake +} + +src_install() { + emake DESTDIR="${D}" install + dobin scripts/memcached-tool + use debug && dobin memcached-debug + + dodoc AUTHORS ChangeLog NEWS README.md doc/{CONTRIBUTORS,*.txt} + + newconfd "${FILESDIR}/memcached.confd" memcached + newinitd "${FILESDIR}/memcached.init" memcached +} + +pkg_postinst() { + enewuser memcached -1 -1 /dev/null daemon + + elog "With this version of Memcached Gentoo now supports multiple instances." + elog "To enable this you should create a symlink in /etc/init.d/ for each instance" + elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/" + elog "Please see Gentoo bug #122246 for more info" +} + +src_test() { + emake -j1 test +} diff --git a/net-misc/memcached/memcached-1.4.24.ebuild b/net-misc/memcached/memcached-1.4.24.ebuild new file mode 100644 index 00000000000..be9572ba8b0 --- /dev/null +++ b/net-misc/memcached/memcached-1.4.24.ebuild @@ -0,0 +1,83 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 +inherit autotools eutils flag-o-matic systemd user + +MY_PV="${PV/_rc/-rc}" +MY_P="${PN}-${MY_PV}" + +DESCRIPTION="High-performance, distributed memory object caching system" +HOMEPAGE="http://code.google.com/p/memcached/" +SRC_URI="http://www.memcached.org/files/${MY_P}.tar.gz" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 ~s390 ~sh sparc x86 ~sparc-fbsd ~x86-fbsd ~x86-freebsd ~amd64-linux ~x86-linux ~ppc-macos ~x64-macos ~x86-macos" +IUSE="test slabs-reassign debug sasl selinux" # hugetlbfs later + +RDEPEND=">=dev-libs/libevent-1.4 + dev-lang/perl + sasl? ( dev-libs/cyrus-sasl ) + selinux? ( sec-policy/selinux-memcached )" +DEPEND="${RDEPEND} + test? ( virtual/perl-Test-Harness >=dev-perl/Cache-Memcached-1.24 )" + +S="${WORKDIR}/${MY_P}" + +src_prepare() { + epatch "${FILESDIR}/${PN}-1.2.2-fbsd.patch" + # Handled different upstream + #epatch "${FILESDIR}/${PN}-1.3.3-gcc4-slab-fixup.patch" + epatch "${FILESDIR}/${PN}-1.4.0-fix-as-needed-linking.patch" + epatch "${FILESDIR}/${PN}-1.4.4-as-needed.patch" + epatch "${FILESDIR}/${PN}-1.4.17-EWOULDBLOCK.patch" + sed -i -e 's,-Werror,,g' configure.ac || die + sed -i -e 's,AM_CONFIG_HEADER,AC_CONFIG_HEADERS,' configure.ac || die + eautoreconf + use slabs-reassign && append-flags -DALLOW_SLABS_REASSIGN +} + +src_configure() { + econf \ + --disable-docs \ + $(use_enable sasl) + # The xml2rfc tool to build the additional docs requires TCL :-( + # `use_enable doc docs` +} + +src_compile() { + # There is a heavy degree of per-object compile flags + # Users do NOT know better than upstream. Trying to compile the testapp and + # the -debug version with -DNDEBUG _WILL_ fail. + append-flags -UNDEBUG -pthread + emake testapp memcached-debug CFLAGS="${CFLAGS}" + filter-flags -UNDEBUG + emake +} + +src_install() { + emake DESTDIR="${D}" install + dobin scripts/memcached-tool + use debug && dobin memcached-debug + + dodoc AUTHORS ChangeLog NEWS README.md doc/{CONTRIBUTORS,*.txt} + + newconfd "${FILESDIR}/memcached.confd" memcached + newinitd "${FILESDIR}/memcached.init2" memcached + systemd_dounit "${FILESDIR}/memcached.service" +} + +pkg_postinst() { + enewuser memcached -1 -1 /dev/null daemon + + elog "With this version of Memcached Gentoo now supports multiple instances." + elog "To enable this you should create a symlink in /etc/init.d/ for each instance" + elog "to /etc/init.d/memcached and create the matching conf files in /etc/conf.d/" + elog "Please see Gentoo bug #122246 for more info" +} + +src_test() { + emake -j1 test +} diff --git a/net-misc/memcached/metadata.xml b/net-misc/memcached/metadata.xml new file mode 100644 index 00000000000..67d99f9fa5c --- /dev/null +++ b/net-misc/memcached/metadata.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>robbat2@gentoo.org</email> + </maintainer> + <maintainer> + <email>prometheanfire@gentoo.org</email> + </maintainer> + <longdescription>High-performance, distributed memory object caching system, generic in nature, +but intended for use in speeding up dynamic web applications by alleviating +database load. +Danga Interactive developed memcached to enhance the speed of LiveJournal.com, a +site which was already doing 20 million+ dynamic page views per day for 1 +million users with a bunch of webservers and a bunch of database servers. +memcached dropped the database load to almost nothing, yielding faster page load +times for users, better resource utilization, and faster access to the databases +on a memcache miss.</longdescription> + <use> + <flag name="slabs-reassign">Allow manual reassignment of memory slabs at the cost of slab optimizations.</flag> + </use> + <upstream> + <remote-id type="google-code">memcached</remote-id> + </upstream> +</pkgmetadata> |