On Tue, Nov 16, 2010 at 09:55:47AM -0600, George McCollister wrote:
> I added a new packet libmemcached. A client library for memcached.
> Signed-off-by: George McCollister <[email protected]>
> ---
> patches/libmemcached-0.37/autogen.sh | 1 +
> patches/libmemcached-0.37/m4_byteorder.diff | 11 +++
> patches/libmemcached-0.37/m4_pod2man.diff | 10 +++
> patches/libmemcached-0.37/m4_podchecker.diff | 10 +++
> patches/libmemcached-0.37/m4_protocol_binary.diff | 21 +++++
> patches/libmemcached-0.37/m4_setsockopt.diff | 58 ++++++++++++++
> patches/libmemcached-0.37/no_docs.diff | 21 +++++
> patches/libmemcached-0.37/series | 6 ++
> rules/libmemcached.in | 36 +++++++++
> rules/libmemcached.make | 85
> +++++++++++++++++++++
> 10 files changed, 259 insertions(+), 0 deletions(-)
> create mode 120000 patches/libmemcached-0.37/autogen.sh
> create mode 100644 patches/libmemcached-0.37/m4_byteorder.diff
> create mode 100644 patches/libmemcached-0.37/m4_pod2man.diff
> create mode 100644 patches/libmemcached-0.37/m4_podchecker.diff
> create mode 100644 patches/libmemcached-0.37/m4_protocol_binary.diff
> create mode 100644 patches/libmemcached-0.37/m4_setsockopt.diff
> create mode 100644 patches/libmemcached-0.37/no_docs.diff
> create mode 100644 patches/libmemcached-0.37/series
> create mode 100644 rules/libmemcached.in
> create mode 100644 rules/libmemcached.make
>
> diff --git a/patches/libmemcached-0.37/autogen.sh
> b/patches/libmemcached-0.37/autogen.sh
> new file mode 120000
> index 0000000..9f8a4cb
> --- /dev/null
> +++ b/patches/libmemcached-0.37/autogen.sh
> @@ -0,0 +1 @@
> +../autogen.sh
> \ No newline at end of file
> diff --git a/patches/libmemcached-0.37/m4_byteorder.diff
> b/patches/libmemcached-0.37/m4_byteorder.diff
> new file mode 100644
> index 0000000..ffba511
> --- /dev/null
> +++ b/patches/libmemcached-0.37/m4_byteorder.diff
Patch headers for all patches please.
> @@ -0,0 +1,11 @@
> +--- libmemcached-0.37/m4/byteorder.m4 2009-12-17 16:58:30.000000000
> -0600
> ++++ libmemcached-0.37.new/m4/byteorder.m4 2010-11-08 13:52:27.000000000
> -0600
> +@@ -1,7 +1,7 @@
> + AC_DEFUN([DETECT_BYTEORDER],
> + [
> + AC_REQUIRE([AC_C_BIGENDIAN])
> +- AC_CACHE_CHECK([for htonll],[av_cv_have_htonll],[
> ++ AC_CACHE_CHECK([for htonll],[ac_cv_have_htonll],[
Why this patch? This is certainly something to sent upstream but we try to
keep the patches in ptxdist at a minimum.
> +
> + AC_RUN_IFELSE([
> + AC_LANG_PROGRAM([[
> diff --git a/patches/libmemcached-0.37/m4_pod2man.diff
> b/patches/libmemcached-0.37/m4_pod2man.diff
> new file mode 100644
> index 0000000..fa9692e
> --- /dev/null
> +++ b/patches/libmemcached-0.37/m4_pod2man.diff
> @@ -0,0 +1,10 @@
> +--- libmemcached-0.37/m4/pod2man.m4 2010-11-09 11:47:44.000000000 -0600
> ++++ libmemcached-0.37.new/m4/pod2man.m4 2010-11-09 11:48:03.000000000
> -0600
> +@@ -1,7 +1,2 @@
> + AC_DEFUN([REQUIRE_POD2MAN],[
> +- AC_PATH_PROG([POD2MAN], [pod2man],
> +- "no", [$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin])
> +- AS_IF([test "x$POD2MAN" = "xno"],
> +- AC_MSG_ERROR(["Could not find pod2man anywhere in path"]))
> +- AC_SUBST(POD2MAN)
what's the side effect of removing this check? I'm sure it's there for a
reason.
> + ])
> diff --git a/patches/libmemcached-0.37/m4_podchecker.diff
> b/patches/libmemcached-0.37/m4_podchecker.diff
> new file mode 100644
> index 0000000..2f08267
> --- /dev/null
> +++ b/patches/libmemcached-0.37/m4_podchecker.diff
> @@ -0,0 +1,10 @@
> +--- libmemcached-0.37/m4/podchecker.m4 2009-12-20 13:29:42.000000000
> -0600
> ++++ libmemcached-0.37.new/m4/podchecker.m4 2010-11-09 11:49:40.000000000
> -0600
> +@@ -1,7 +1,2 @@
> + AC_DEFUN([REQUIRE_PODCHECKER],[
> +- AC_PATH_PROG([PODCHECKER], [podchecker],
> +- "no", [$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin])
> +- AS_IF([test "x$PODCHECKER" = "xno"],
> +- AC_MSG_ERROR(["Could not find podchecker anywhere in path"]))
> +- AC_SUBST(PODCHECKER)
same here.
> + ])
> diff --git a/patches/libmemcached-0.37/m4_protocol_binary.diff
> b/patches/libmemcached-0.37/m4_protocol_binary.diff
> new file mode 100644
> index 0000000..9c269a8
> --- /dev/null
> +++ b/patches/libmemcached-0.37/m4_protocol_binary.diff
> @@ -0,0 +1,21 @@
> +--- libmemcached-0.37/m4/protocol_binary.m4 2009-12-17 16:58:30.000000000
> -0600
> ++++ libmemcached-0.37.new/m4/protocol_binary.m4 2010-11-08
> 13:58:49.000000000 -0600
> +@@ -3,18 +3,6 @@
> + dnl
> ---------------------------------------------------------------------------
> + AC_DEFUN([PROTOCOL_BINARY_TEST],
> + [AC_LANG_PUSH([C])
> +- save_CFLAGS="$CFLAGS"
> +- CFLAGS="$CFLAGS -I${srcdir}"
> +- AC_RUN_IFELSE([
AC_COMPILE_IFELSE
> +- AC_LANG_PROGRAM([[
> +-#include "libmemcached/memcached/protocol_binary.h"
#define COMPILE_TIME_ASSERT(expr) \
struct { unsigned int bf : (expr); };
protocol_binary_request_set request;
COMPILE_TIME_ASSERT(sizeof(request) == sizeof(request.bytes));
> +- ]],[[
> +- protocol_binary_request_set request;
> +- if (sizeof(request) != sizeof(request.bytes)) {
> +- return 1;
> +- }
> +- ]])],, AC_MSG_ERROR([Unsupported struct padding done by compiler.]))
> +- CFLAGS="$save_CFLAGS"
> + AC_LANG_POP
> + ])
> +
> diff --git a/patches/libmemcached-0.37/m4_setsockopt.diff
> b/patches/libmemcached-0.37/m4_setsockopt.diff
> new file mode 100644
> index 0000000..da760b6
> --- /dev/null
> +++ b/patches/libmemcached-0.37/m4_setsockopt.diff
> @@ -0,0 +1,58 @@
> +--- libmemcached-0.37/m4/setsockopt.m4 2009-12-17 16:58:30.000000000
> -0600
> ++++ libmemcached-0.37.new/m4/setsockopt.m4 2010-11-08 13:55:41.000000000
> -0600
> +@@ -3,53 +3,8 @@
> + dnl
> ---------------------------------------------------------------------------
> + AC_DEFUN([SETSOCKOPT_SANITY],[
> + AC_LANG_PUSH([C])
> +- AC_RUN_IFELSE([
> +- AC_LANG_PROGRAM([[
> +-#include <sys/types.h>
> +-#include <sys/socket.h>
> +-#include <time.h>
> +-#include <sys/time.h>
> +-#include <errno.h>
> +- ]],[[
> +- int sock = socket(AF_INET, SOCK_STREAM, 0);
> +- struct timeval waittime;
> +-
> +- waittime.tv_sec= 0;
> +- waittime.tv_usec= 500;
> +-
> +- if (setsockopt(sock, SOL_SOCKET, SO_SNDTIMEO,
> +- &waittime, (socklen_t)sizeof(struct timeval)) == -1) {
> +- if (errno == ENOPROTOOPT) {
> +- return 1;
> +- }
> +- }
> +- return 0;
> +- ]])],
> +- [AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working
> SO_SNDTIMEO])])
> +-
> +- AC_RUN_IFELSE([
> +- AC_LANG_PROGRAM([[
> +-#include <sys/types.h>
> +-#include <sys/socket.h>
> +-#include <time.h>
> +-#include <sys/time.h>
> +-#include <errno.h>
> +- ]],[[
> +- int sock = socket(AF_INET, SOCK_STREAM, 0);
> +- struct timeval waittime;
> +-
> +- waittime.tv_sec= 0;
> +- waittime.tv_usec= 500;
> +-
> +- if (setsockopt(sock, SOL_SOCKET, SO_RCVTIMEO,
> +- &waittime, (socklen_t)sizeof(struct timeval)) == -1) {
> +- if (errno == ENOPROTOOPT) {
> +- return 1;
> +- }
> +- }
> +- return 0;
> +- ]])], [AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working
> SO_RCVTIMEO])])
> +-
> ++ AC_DEFINE(HAVE_SNDTIMEO, 1, [Define to 1 if you have a working
> SO_SNDTIMEO])
> ++ AC_DEFINE(HAVE_RCVTIMEO, 1, [Define to 1 if you have a working
> SO_RCVTIMEO])
> + AC_LANG_POP
> + ])
change it to use AC_CACHE_CHECK
> + dnl
> ---------------------------------------------------------------------------
> diff --git a/patches/libmemcached-0.37/no_docs.diff
> b/patches/libmemcached-0.37/no_docs.diff
> new file mode 100644
> index 0000000..5a9cd1c
> --- /dev/null
> +++ b/patches/libmemcached-0.37/no_docs.diff
> @@ -0,0 +1,21 @@
> +diff -Naur libmemcached-0.37/Makefile.in libmemcached-0.37.new/Makefile.in
> +--- libmemcached-0.37/Makefile.in 2010-01-11 18:22:25.000000000 -0600
> ++++ libmemcached-0.37.new/Makefile.in 2010-11-04 11:25:17.000000000
> -0500
> +@@ -645,8 +645,6 @@
> + PANDORA_HEX_VERSION = @PANDORA_HEX_VERSION@
> + PATH_SEPARATOR = @PATH_SEPARATOR@
> + PERL = @PERL@
> +-POD2MAN = @POD2MAN@
> +-PODCHECKER = @PODCHECKER@
> + PROTOSKIP_WARNINGS = @PROTOSKIP_WARNINGS@
> + PTHREAD_CC = @PTHREAD_CC@
> + PTHREAD_CFLAGS = @PTHREAD_CFLAGS@
> +@@ -776,7 +774,7 @@
> + tests/t/memrm.test tests/t/memslap.test tests/t/memstat.test \
> + support/libmemcached.spec support/libmemcached-fc.spec.in \
> + support/set_benchmark.sh
> +-SUBDIRS = docs
> ++SUBDIRS =
> + libmemcached_libmemcachedprotocol_la_SOURCES = \
> +
> libmemcached/protocol/ascii_handler.c \
> +
> libmemcached/protocol/binary_handler.c \
> diff --git a/patches/libmemcached-0.37/series
> b/patches/libmemcached-0.37/series
> new file mode 100644
> index 0000000..d032d33
> --- /dev/null
> +++ b/patches/libmemcached-0.37/series
> @@ -0,0 +1,6 @@
> +m4_byteorder.diff
> +m4_protocol_binary.diff
> +m4_setsockopt.diff
> +m4_pod2man.diff
> +m4_podchecker.diff
> +no_docs.diff
> diff --git a/rules/libmemcached.in b/rules/libmemcached.in
> new file mode 100644
> index 0000000..fa12ba6
> --- /dev/null
> +++ b/rules/libmemcached.in
> @@ -0,0 +1,36 @@
> +## SECTION=system_libraries
> +
> +menuconfig LIBMEMCACHED
> + tristate
> + prompt "libmemcached"
> + help
> + libmemcached is a C client library for interfacing to a memcached
> + server. It has been designed to be light on memory usage, thread
> + safe and to provide full access to server side methods. It also
> + implements several command line tools: memcat, memflush, memrm,
> + memstat, and memslap (for load generation). The library has been
> + designed to allow for different hashing methods on keys,
> + partitioning by keys, and to use consistent hashing for
> + distribution.
> + You can find more information here:
> http://tangent.org/552/libmemcached.html
> +
> + config LIBMEMCACHED_LIBHASHKIT
> + depends on LIBMEMCACHED
> + bool
> + prompt "install libhashkit"
> + help
> + If selected libhashkit will be included in the package.
> +
> + config LIBMEMCACHED_LIBMEMCACHEDUTIL
> + depends on LIBMEMCACHED
> + bool
> + prompt "install libmemcachedutil"
> + help
> + If selected libmemcachedutil will be included in the package.
> +
> + config LIBMEMCACHED_LIBMEMCACHEDPROTOCOL
> + depends on LIBMEMCACHED
> + bool
> + prompt "install libmemcachedprotocol"
> + help
> + If selected libmemcachedprotocol will be included in the
> package.
> diff --git a/rules/libmemcached.make b/rules/libmemcached.make
> new file mode 100644
> index 0000000..1a03fae
> --- /dev/null
> +++ b/rules/libmemcached.make
> @@ -0,0 +1,85 @@
> +# -*-makefile-*-
> +#
> +# Copyright (C) 2010 by NovaTech-LLC
> +#
> +# See CREDITS for details about who has contributed to this project.
> +#
> +# For further information about the PTXdist project and license conditions
> +# see the README file.
> +#
> +
> +#
> +# We provide this package
> +#
> +PACKAGES-$(PTXCONF_LIBMEMCACHED) += libmemcached
> +
> +#
> +# Paths and names
> +#
> +LIBMEMCACHED_VERSION := 0.37
> +LIBMEMCACHED := libmemcached-$(LIBMEMCACHED_VERSION)
> +LIBMEMCACHED_SUFFIX := tar.gz
> +LIBMEMCACHED_URL :=
> http://launchpad.net/libmemcached/1.0/$(LIBMEMCACHED_VERSION)/+download/$(LIBMEMCACHED).$(LIBMEMCACHED_SUFFIX)
> +LIBMEMCACHED_SOURCE :=
> $(SRCDIR)/$(LIBMEMCACHED).$(LIBMEMCACHED_SUFFIX)
> +LIBMEMCACHED_DIR := $(BUILDDIR)/$(LIBMEMCACHED)
> +LIBMEMCACHED_DEP :=
remove this
> +
> +#
> ----------------------------------------------------------------------------
> +# Prepare
> +#
> ----------------------------------------------------------------------------
> +
like this:
LIBMEMCACHED_ENV := \
$(CROSS_ENV) \
ac_cv_c_alignment=need \
ac_cv_time_t_unsigned=no \
ac_cv_c_stack_direction=0 \
ac_cv_gcc_atomic_builtins=no \
ac_cv_have_htonll=no \
pandora_cv_use_pipe=yes
> +
> +#We have libevent but disable it so clients/memslap doesn't build.
> +#It fails to link because __sync_fetch_and_sub_4 is missing.
> +LIBMEMCACHED_ENV += ac_cv_libevent=no
> +
> +#
> +# autoconf
> +#
> +LIBMEMCACHED_AUTOCONF := $(CROSS_AUTOCONF_USR)
> +
> +LIBMEMCACHED_AUTOCONF += --without-memcached \
> + --disable-libevent
same format here.
> +
> +#
> ----------------------------------------------------------------------------
> +# Target-Install
> +#
> ----------------------------------------------------------------------------
> +
> +$(STATEDIR)/libmemcached.targetinstall:
> + @$(call targetinfo, $@)
s/, $@//
> +
> + @$(call install_init, libmemcached)
> + @$(call install_fixup,libmemcached,PACKAGE,libmemcached)
remove this
and one ' ' after ',' in all lines.
> + @$(call install_fixup,libmemcached,PRIORITY,optional)
> + @$(call install_fixup,libmemcached,VERSION,$(LIBMEMCACHED_VERSION))
remove this
> + @$(call install_fixup,libmemcached,SECTION,base)
> + @$(call install_fixup,libmemcached,AUTHOR,"NovaTech-LLC")
> + @$(call install_fixup,libmemcached,DEPENDS,"$(LIBMEMCACHED_DEP)")
remove this
> + @$(call install_fixup,libmemcached,DESCRIPTION,missing)
> +
> + @$(call install_lib, libmemcached, 0, 0, 0644, libmemcached)
> +
> +ifdef PTXCONF_LIBMEMCACHED_LIBHASHKIT
> + @$(call install_lib, libmemcached, 0, 0, 0644, libhashkit)
> +endif
> +
> +ifdef PTXCONF_LIBMEMCACHED_LIBMEMCACHEDUTIL
> + @$(call install_lib, libmemcached, 0, 0, 0644, libmemcachedutil)
> +endif
> +
> +ifdef PTXCONF_LIBMEMCACHED_LIBMEMCACHEDPROTOCOL
> + @$(call install_lib, libmemcached, 0, 0, 0644, libmemcachedprotocol)
> +endif
> +
> + @$(call install_finish,libmemcached)
> +
> + @$(call touch, $@)
s/, $@//
Michael
> +
> +# vim: syntax=make
> --
> 1.6.4.2
>
>
> --
> ptxdist mailing list
> [email protected]
>
--
Pengutronix e.K. | |
Industrial Linux Solutions | http://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
--
ptxdist mailing list
[email protected]