memcached: update to 1.6.1

This commit is contained in:
Leonid Pliushch 2020-03-20 13:38:06 +02:00
parent 0fd10eba3c
commit 560769ff95
3 changed files with 25 additions and 20 deletions

View File

@ -1,9 +1,9 @@
TERMUX_PKG_HOMEPAGE=https://memcached.org/
TERMUX_PKG_DESCRIPTION="Free & open source, high-performance, distributed memory object caching system"
TERMUX_PKG_LICENSE="GPL-2.0"
TERMUX_PKG_VERSION=1.5.22
TERMUX_PKG_VERSION=1.6.1
TERMUX_PKG_SRCURL=https://www.memcached.org/files/memcached-$TERMUX_PKG_VERSION.tar.gz
TERMUX_PKG_SHA256=c2b47e9d20575a2367087c229636ffc3fb699a6c3a7f3a22f44402f25f5f1f93
TERMUX_PKG_SHA256=881c30a222e019657e53b12230aaf629d7b5c080e4b74378c2eb5e78800d57d6
TERMUX_PKG_DEPENDS="libevent, libsasl"
TERMUX_PKG_BREAKS="memcached-dev"
TERMUX_PKG_REPLACES="memcached-dev"
@ -11,12 +11,14 @@ TERMUX_PKG_BUILD_IN_SRC=true
TERMUX_PKG_EXTRA_CONFIGURE_ARGS="--enable-sasl --disable-coverage"
termux_step_pre_configure() {
export ac_cv_c_endian=little
CPPFLAGS+=" -D__USE_GNU"
# fix SASL configuration path
perl -p -i -e "s#/etc/sasl#$TERMUX_PREFIX/etc/sasl#" $TERMUX_PKG_BUILDDIR/sasl_defs.c
export ac_cv_c_endian=little
# getsubopt() taken from https://github.com/lxc/lxc/blob/master/src/include/getsubopt.c
cp $TERMUX_PKG_BUILDER_DIR/getsubopt.c $TERMUX_PKG_SRCDIR
cp $TERMUX_PKG_BUILDER_DIR/getsubopt.h $TERMUX_PKG_SRCDIR
# fix SASL configuration path
perl -p -i -e "s#/etc/sasl#$TERMUX_PREFIX/etc/sasl#" $TERMUX_PKG_BUILDDIR/sasl_defs.c
# getsubopt() taken from https://github.com/lxc/lxc/blob/master/src/include/getsubopt.c
cp $TERMUX_PKG_BUILDER_DIR/getsubopt.c $TERMUX_PKG_SRCDIR
cp $TERMUX_PKG_BUILDER_DIR/getsubopt.h $TERMUX_PKG_SRCDIR
}

View File

@ -1,6 +1,6 @@
diff -u -r ../memcached-1.5.5/memcached.c ./memcached.c
--- ../memcached-1.5.5/memcached.c 2018-02-13 05:09:37.000000000 +0000
+++ ./memcached.c 2018-02-13 14:15:00.622511540 +0000
diff -uNr memcached-1.6.1/memcached.c memcached-1.6.1.mod/memcached.c
--- memcached-1.6.1/memcached.c 2020-03-17 04:49:39.000000000 +0200
+++ memcached-1.6.1.mod/memcached.c 2020-03-20 13:32:09.829964421 +0200
@@ -14,6 +14,7 @@
* Brad Fitzpatrick <brad@danga.com>
*/
@ -9,12 +9,3 @@ diff -u -r ../memcached-1.5.5/memcached.c ./memcached.c
#ifdef EXTSTORE
#include "storage.h"
#endif
@@ -57,7 +58,7 @@
/* FreeBSD 4.x doesn't have IOV_MAX exposed. */
#ifndef IOV_MAX
-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__GNU__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__GNU__) || defined(__ANDROID__)
# define IOV_MAX 1024
/* GNU/Hurd don't set MAXPATHLEN
* http://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL */

View File

@ -0,0 +1,12 @@
diff -uNr memcached-1.6.1/memcached.h memcached-1.6.1.mod/memcached.h
--- memcached-1.6.1/memcached.h 2020-03-17 04:49:39.000000000 +0200
+++ memcached-1.6.1.mod/memcached.h 2020-03-20 13:32:32.461293519 +0200
@@ -27,7 +27,7 @@
#include <limits.h>
/* FreeBSD 4.x doesn't have IOV_MAX exposed. */
#ifndef IOV_MAX
-#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__GNU__)
+#if defined(__FreeBSD__) || defined(__APPLE__) || defined(__GNU__) || defined(__ANDROID__)
# define IOV_MAX 1024
/* GNU/Hurd don't set MAXPATHLEN
* http://www.gnu.org/software/hurd/hurd/porting/guidelines.html#PATH_MAX_tt_MAX_PATH_tt_MAXPATHL */