Update to 1.6.9 and switch to libevent2

From Moritz Buhl
This commit is contained in:
giovanni 2020-12-13 08:19:19 +00:00
parent 81d8336390
commit 22fadb5298
8 changed files with 90 additions and 20 deletions

View File

@ -1,8 +1,8 @@
# $OpenBSD: Makefile,v 1.49 2019/09/20 21:40:41 giovanni Exp $
# $OpenBSD: Makefile,v 1.50 2020/12/13 08:19:19 giovanni Exp $
COMMENT= distributed memory object caching system
DISTNAME= memcached-1.5.18
DISTNAME= memcached-1.6.9
CATEGORIES= misc
HOMEPAGE= https://www.memcached.org/
@ -13,7 +13,7 @@ MAINTAINER= Giovanni Bechis <giovanni@openbsd.org>
PERMIT_PACKAGE= Yes
# uses pledge()
WANTLIB += c crypto event pthread ssl
WANTLIB += c crypto event pthread ssl event_core
FLAVOR?=
FLAVORS= sasl
@ -23,16 +23,16 @@ MASTER_SITES= http://memcached.org/files/
CONFIGURE_STYLE= gnu
CONFIGURE_ENV= CPPFLAGS="-I${LOCALBASE}/include" \
LDFLAGS="-L${LOCALBASE}/lib"
CONFIGURE_ARGS= --with-libevent=/usr \
--disable-coverage \
CONFIGURE_ARGS= --disable-coverage \
--disable-docs \
--enable-tls
TEST_TARGET= test
TEST_DEPENDS= devel/p5-Test-MockSleep
LIB_DEPENDS= devel/libevent2
.if ${FLAVOR:Msasl}
CONFIGURE_ARGS+= --enable-sasl
LIB_DEPENDS= security/cyrus-sasl2
LIB_DEPENDS+= security/cyrus-sasl2
WANTLIB+= sasl2
.else
CONFIGURE_ARGS+= --disable-sasl

View File

@ -1,2 +1,2 @@
SHA256 (memcached-1.5.18.tar.gz) = nr3WcFsG2nDrb2gkVoZVSxy2ifALm/9uM2csGgEl74g=
SIZE (memcached-1.5.18.tar.gz) = 502185
SHA256 (memcached-1.6.9.tar.gz) = 1aYs43cxTb/9s3xEZ+d2Pjq643ahYXHmE8vmmVbwktE=
SIZE (memcached-1.6.9.tar.gz) = 556137

View File

@ -1,13 +1,49 @@
$OpenBSD: patch-configure,v 1.13 2019/05/14 16:49:05 giovanni Exp $
$OpenBSD: patch-configure,v 1.14 2020/12/13 08:19:19 giovanni Exp $
Index: configure
--- configure.orig
+++ configure
@@ -6818,7 +6818,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
@@ -5773,7 +5773,7 @@ else
le_found=no
for ledir in $trylibeventdir "" $prefix /usr/local ; do
LDFLAGS="$saved_LDFLAGS"
- LIBS="-levent $saved_LIBS"
+ LIBS="-levent_core $saved_LIBS"
# Skip the directory if it isn't there.
if test ! -z "$ledir" -a ! -d "$ledir" ; then
@@ -5796,7 +5796,7 @@ else
/* end confdefs.h. */
#include <sys/time.h>
#include <sys/types.h>
-#include <event.h>
+#include <event2/event.h>
int
main ()
{
@@ -5843,7 +5843,7 @@ fi
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libevent_dir" >&5
$as_echo "$ac_cv_libevent_dir" >&6; }
-LIBS="-levent $LIBS"
+LIBS="-levent_core $LIBS"
if test $ac_cv_libevent_dir != "(system)"; then
if test -d "$ac_cv_libevent_dir/lib" ; then
LDFLAGS="-L$ac_cv_libevent_dir/lib $LDFLAGS"
@@ -5866,7 +5866,7 @@ else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
-#include <event.h>
+#include <event2/event.h>
int
main ()
@@ -7254,7 +7254,7 @@ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
elif test "$GCC" = "yes"
then
GCC_VERSION=`$CC -dumpversion`
- CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
+ CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -pedantic -Wmissing-declarations"
case $GCC_VERSION in
4.4.*)
CFLAGS="$CFLAGS -fno-strict-aliasing"
if test "x$enable_asan" = "xyes"; then
CFLAGS="$CFLAGS -fsanitize=address"
fi

View File

@ -0,0 +1,14 @@
$OpenBSD: patch-doc_Makefile,v 1.1 2020/12/13 08:19:19 giovanni Exp $
Index: doc/Makefile
--- doc/Makefile.orig
+++ doc/Makefile
@@ -184,7 +184,7 @@ INSTALL_SCRIPT = ${INSTALL}
INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
LDFLAGS =
LIBOBJS =
-LIBS = -levent
+LIBS = -levent_core
LTLIBOBJS =
MAKEINFO = ${SHELL} /home/dormando/d/p/danga/git/memcached/missing makeinfo
MKDIR_P = /bin/mkdir -p

View File

@ -1,9 +1,9 @@
$OpenBSD: patch-memcached_c,v 1.17 2019/05/14 16:49:05 giovanni Exp $
$OpenBSD: patch-memcached_c,v 1.18 2020/12/13 08:19:19 giovanni Exp $
Index: memcached.c
--- memcached.c.orig
+++ memcached.c
@@ -7719,8 +7719,8 @@ int main (int argc, char **argv) {
@@ -5309,8 +5309,8 @@ int main (int argc, char **argv) {
start_lru_maintainer = false;
break;
case NO_DROP_PRIVILEGES:

View File

@ -0,0 +1,16 @@
$OpenBSD: patch-memcached_h,v 1.3 2020/12/13 08:19:19 giovanni Exp $
Index: memcached.h
--- memcached.h.orig
+++ memcached.h
@@ -13,7 +13,9 @@
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
-#include <event.h>
+#include <event2/event.h>
+#include <event2/event_struct.h>
+#include <event2/event_compat.h>
#include <netdb.h>
#include <pthread.h>
#include <unistd.h>

View File

@ -1,7 +1,8 @@
$OpenBSD: patch-sasl_defs_c,v 1.1 2014/11/04 15:11:05 giovanni Exp $
--- sasl_defs.c.orig Fri Oct 31 15:09:21 2014
+++ sasl_defs.c Fri Oct 31 15:09:33 2014
@@ -18,10 +18,6 @@ const char * const locations[] = {
$OpenBSD: patch-sasl_defs_c,v 1.2 2020/12/13 08:19:19 giovanni Exp $
Index: sasl_defs.c
--- sasl_defs.c.orig
+++ sasl_defs.c
@@ -35,10 +35,6 @@ const char *const locations_file_path[] = {
};
#endif

View File

@ -1,4 +1,4 @@
@comment $OpenBSD: PLIST,v 1.13 2019/05/14 16:49:05 giovanni Exp $
@comment $OpenBSD: PLIST,v 1.14 2020/12/13 08:19:19 giovanni Exp $
@newgroup _memcached:637
@newuser _memcached:637:_memcached:daemon:memcache daemon:/var/empty:/sbin/nologin
@rcscript ${RCDIR}/memcached
@ -9,7 +9,10 @@ include/memcached/protocol_binary.h
@man man/man1/memcached-tool.1
@man man/man1/memcached.1
share/doc/memcached/
share/doc/memcached/napi_ids.txt
share/doc/memcached/new_lru.txt
share/doc/memcached/protocol-binary-range.txt
share/doc/memcached/protocol-binary.txt
share/doc/memcached/protocol.txt
share/doc/memcached/readme.txt
share/doc/memcached/storage.txt