Index: head/databases/memcached/Makefile =================================================================== --- head/databases/memcached/Makefile (revision 390729) +++ head/databases/memcached/Makefile (revision 390730) @@ -1,76 +1,77 @@ # Created by: Sean Chittenden # $FreeBSD$ PORTNAME= memcached -PORTVERSION= 1.4.22 +PORTVERSION= 1.4.24 CATEGORIES= databases MASTER_SITES= http://www.memcached.org/files/ \ GOOGLE_CODE \ GENTOO MAINTAINER= swills@FreeBSD.org COMMENT= High-performance distributed memory object cache system LICENSE= BSD3CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libevent.so:${PORTSDIR}/devel/libevent2 CONFLICTS= memcached-1.2* # Dtrace option disabled until it is fixed upstream OPTIONS_DEFINE= SASL DOCS DTRACE OPTIONS_DEFAULT= SASL DOCS DTRACE_DESC= Enable dtrace probes SASL_DESC= Enable SASL Authentication USE_RC_SUBR= memcached SUB_LIST+= RC_SUBR_SUFFIX=${RC_SUBR_SUFFIX} -USES= cpe shebangfix +USES= cpe shebangfix autoreconf:build +USE_AUTOTOOLS= aclocal SHEBANG_FILES= scripts/memcached-tool USE_CSTD= c99 GNU_CONFIGURE= yes CONFIGURE_ARGS= --with-libevent=${LOCALBASE} \ --program-prefix= \ --disable-coverage DTRACE_CONFIGURE_ENABLE= dtrace SASL_LIB_DEPENDS= libsasl2.so:${PORTSDIR}/security/cyrus-sasl2 SASL_CONFIGURE_ENABLE= sasl SASL_CFLAGS= -I${LOCALBASE}/include SASL_CPPFLAGS+= ${CFLAGS} SASL_LDFLAGS= -L${LOCALBASE}/lib .include .if ${ARCH} == amd64 CONFIGURE_ARGS+= --enable-64bit .endif .if ${PORT_OPTIONS:MDTRACE} BROKEN= DTRACE broken with gcc/clang - reported upstream .endif .if ${PORT_OPTIONS:MDOCS} BUILD_DEPENDS= xml2rfc:${PORTSDIR}/textproc/xml2rfc .endif post-install: ${INSTALL_SCRIPT} ${WRKSRC}/scripts/memcached-tool ${STAGEDIR}${PREFIX}/bin .if ${PORT_OPTIONS:MDOCS} @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in protocol-binary-range.txt protocol-binary.txt protocol.txt \ readme.txt threads.txt ${INSTALL_DATA} ${WRKSRC}/doc/${i} ${STAGEDIR}${DOCSDIR} .endfor .endif regression-test: test test: build ${MAKE} -C ${WRKSRC} test .include Index: head/databases/memcached/distinfo =================================================================== --- head/databases/memcached/distinfo (revision 390729) +++ head/databases/memcached/distinfo (revision 390730) @@ -1,2 +1,2 @@ -SHA256 (memcached-1.4.22.tar.gz) = cfcc470c57079914aca6e565b2daeed1d13356ad492909d9aafd6eefac538c2a -SIZE (memcached-1.4.22.tar.gz) = 346632 +SHA256 (memcached-1.4.24.tar.gz) = 08a426c504ecf64633151eec1058584754d2f54e62e5ed2d6808559401617e55 +SIZE (memcached-1.4.24.tar.gz) = 354917 Index: head/databases/memcached/files/memcached.in =================================================================== --- head/databases/memcached/files/memcached.in (revision 390729) +++ head/databases/memcached/files/memcached.in (revision 390730) @@ -1,99 +1,111 @@ #!/bin/sh # $FreeBSD$ # # PROVIDE: memcached # REQUIRE: LOGIN # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to run memcached: # # memcached_enable (bool): Set it to "YES" to enable memcached. # Default is "NO". # memcached_flags (flags): Set extra flags here. More options in memcached(1) # Default is empty "". # memcached_user (user): Set user to run memcached. # Default is "nobody". # memcached_profiles (str): Set to "" by default. # Define your profiles here. +# memcached_post_start (str): Set extra commands that should be executed after memcached was successfully +# started here. +# Default is empty "". . /etc/rc.subr name="memcached" rcvar=memcached_enable _piddir="/var/run/memcached" pidfile="${_piddir}/memcached.pid" load_rc_config ${name} if [ -n "$2" ]; then profile="$2" if [ -n "${memcached_profiles}" ]; then pidfile="${_piddir}/memcached.${profile}.pid" eval memcached_enable="\${memcached_${profile}_enable:-${memcached_enable}}" eval memcached_flags="\${memcached_${profile}_flags:-${memcached_flags}}" + eval memcached_post_start="\${memcached_${profile}_post_start:-${memcached_post_start}}" else echo "%%PREFIX%%/etc/rc.d/memcached%%RC_SUBR_SUFFIX%%: extra argument ignored" fi else if [ -n "${memcached_profiles}" -a -n "$1" ]; then for profile in ${memcached_profiles}; do eval _enable="\${memcached_${profile}_enable}" case "${_enable:-${memcached_enable}}" in [Nn][Oo]|[Ff][Aa][Ll][Ss][Ee]|[Oo][Ff][Ff]|0) continue ;; [Yy][Ee][Ss]|[Tt][Rr][Uu][Ee]|[Oo][Nn]|1) ;; *) if test -z "$_enable"; then _var=memcached_enable else _var=memcached_"${profile}"_enable fi warn "Bad value" \ "'${_enable:-${memcached_enable}}'" \ "for ${_var}. " \ "Profile ${profile} skipped." continue ;; esac echo "===> memcached profile: ${profile}" if %%PREFIX%%/etc/rc.d/memcached%%RC_SUBR_SUFFIX%% $1 ${profile} ; then success="${profile} ${success:-}" else failed="${profile} (${retcode}) ${failed:-}" fi done exit 0 fi fi +memcached_poststart() +{ + if [ -n "$memcached_post_start" ]; then + eval $memcached_post_start + fi +} + memcached_poststop() { if [ -n "${profile}" ]; then [ -e "$pidfile" ] && unlink $pidfile else local file for file in ${_piddir}/* ; do case "$file" in *\*) continue ;; esac unlink $file done fi } : ${memcached_enable="NO"} : ${memcached_user="nobody"} command=%%PREFIX%%/bin/memcached command_args="-d -u ${memcached_user} -P ${pidfile} " start_precmd="install -d -o $memcached_user -g $memcached_user -m 755 $_piddir" +start_postcmd="${name}_poststart" stop_postcmd="${name}_poststop" run_rc_command "$1" Index: head/databases/memcached/files/patch-configure.ac =================================================================== --- head/databases/memcached/files/patch-configure.ac (nonexistent) +++ head/databases/memcached/files/patch-configure.ac (revision 390730) @@ -0,0 +1,11 @@ +--- configure.ac.orig 2015-06-27 18:28:54 UTC ++++ configure.ac +@@ -581,7 +581,7 @@ then + elif test "$GCC" = "yes" + then + GCC_VERSION=`$CC -dumpversion` +- CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls" ++ CFLAGS="$CFLAGS -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls" + case $GCC_VERSION in + 4.4.*) + CFLAGS="$CFLAGS -fno-strict-aliasing" Property changes on: head/databases/memcached/files/patch-configure.ac ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/databases/memcached/files/patch-memcached.c =================================================================== --- head/databases/memcached/files/patch-memcached.c (revision 390729) +++ head/databases/memcached/files/patch-memcached.c (revision 390730) @@ -1,74 +1,74 @@ ---- memcached.c.orig 2014-10-13 03:33:10.000000000 +0000 -+++ memcached.c 2015-01-16 16:21:34.000000000 +0000 -@@ -280,7 +280,7 @@ +--- memcached.c.orig 2015-04-20 05:34:19 UTC ++++ memcached.c +@@ -288,7 +288,7 @@ static int add_msghdr(conn *c) c->msgbytes = 0; c->msgused++; - if (IS_UDP(c->transport)) { + if IS_UDP(c->transport) { /* Leave room for the UDP header, which we'll fill in later. */ return add_iov(c, NULL, UDP_HEADER_SIZE); } -@@ -424,7 +424,7 @@ +@@ -432,7 +432,7 @@ conn *conn_new(const int sfd, enum conn_ if (init_state == conn_listening) { fprintf(stderr, "<%d server listening (%s)\n", sfd, prot_text(c->protocol)); - } else if (IS_UDP(transport)) { + } else if IS_UDP(transport) { fprintf(stderr, "<%d server listening (udp)\n", sfd); } else if (c->protocol == negotiating_prot) { fprintf(stderr, "<%d new auto-negotiating client connection\n", -@@ -523,7 +523,7 @@ +@@ -531,7 +531,7 @@ static void conn_cleanup(conn *c) { c->sasl_conn = NULL; } - if (IS_UDP(c->transport)) { + if IS_UDP(c->transport) { conn_set_state(c, conn_read); } } -@@ -593,7 +593,7 @@ +@@ -601,7 +601,7 @@ static void conn_close(conn *c) { static void conn_shrink(conn *c) { assert(c != NULL); - if (IS_UDP(c->transport)) + if IS_UDP(c->transport) return; if (c->rsize > READ_BUFFER_HIGHWAT && c->rbytes < DATA_BUFFER_SIZE) { -@@ -3989,7 +3989,7 @@ +@@ -4022,7 +4022,7 @@ static enum transmit_result transmit(con if (settings.verbose > 0) perror("Failed to write, and not due to blocking"); - if (IS_UDP(c->transport)) + if IS_UDP(c->transport) conn_set_state(c, conn_read); else conn_set_state(c, conn_closing); -@@ -4313,7 +4313,7 @@ +@@ -4346,7 +4346,7 @@ static void drive_machine(conn *c) { break; case conn_closing: - if (IS_UDP(c->transport)) + if IS_UDP(c->transport) conn_cleanup(c); else conn_close(c); -@@ -4473,7 +4473,7 @@ +@@ -4506,7 +4506,7 @@ static int server_socket(const char *int #endif setsockopt(sfd, SOL_SOCKET, SO_REUSEADDR, (void *)&flags, sizeof(flags)); - if (IS_UDP(transport)) { + if IS_UDP(transport) { maximize_sndbuf(sfd); } else { error = setsockopt(sfd, SOL_SOCKET, SO_KEEPALIVE, (void *)&flags, sizeof(flags)); -@@ -4528,7 +4528,7 @@ +@@ -4561,7 +4561,7 @@ static int server_socket(const char *int } } - if (IS_UDP(transport)) { + if IS_UDP(transport) { int c; for (c = 0; c < settings.num_threads_per_udp; c++) { Index: head/databases/memcached/files/patch-thread.c =================================================================== --- head/databases/memcached/files/patch-thread.c (revision 390729) +++ head/databases/memcached/files/patch-thread.c (revision 390730) @@ -1,11 +1,11 @@ ---- thread.c.orig 2015-01-16 16:22:19.000000000 +0000 -+++ thread.c 2015-01-16 16:22:27.000000000 +0000 -@@ -409,7 +409,7 @@ +--- thread.c.orig 2015-04-20 05:34:19 UTC ++++ thread.c +@@ -402,7 +402,7 @@ static void thread_libevent_process(int conn *c = conn_new(item->sfd, item->init_state, item->event_flags, item->read_buffer_size, item->transport, me->base); if (c == NULL) { - if (IS_UDP(item->transport)) { + if IS_UDP(item->transport) { fprintf(stderr, "Can't listen for events on UDP socket\n"); exit(1); } else {