I added a new packet libmemcached. A client library for memcached.
Signed-off-by: George McCollister <[email protected]>
---
 patches/libmemcached-0.37/configure.diff |   72 +++++++++++++
 patches/libmemcached-0.37/no_docs.diff   |  132 ++++++++++++++++++++++++
 patches/libmemcached-0.37/series         |    2 +
 rules/libmemcached.in                    |   36 +++++++
 rules/libmemcached.make                  |  165 ++++++++++++++++++++++++++++++
 5 files changed, 407 insertions(+), 0 deletions(-)
 create mode 100644 patches/libmemcached-0.37/configure.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/configure.diff 
b/patches/libmemcached-0.37/configure.diff
new file mode 100644
index 0000000..8319338
--- /dev/null
+++ b/patches/libmemcached-0.37/configure.diff
@@ -0,0 +1,72 @@
+diff -Naur libmemcached-0.37/configure libmemcached-0.37.new/configure
+--- libmemcached-0.37/configure        2010-01-11 18:22:27.000000000 -0600
++++ libmemcached-0.37.new/configure    2010-01-28 09:39:57.000000000 -0600
+@@ -26416,7 +26416,7 @@
+ 
+     { $as_echo "$as_me:$LINENO: checking for htonll" >&5
+ $as_echo_n "checking for htonll... " >&6; }
+-if test "${av_cv_have_htonll+set}" = set; then
++if test "${ac_cv_have_htonll+set}" = set; then
+   $as_echo_n "(cached) " >&6
+ else
+ 
+@@ -26494,8 +26494,8 @@
+ 
+ 
+ fi
+-{ $as_echo "$as_me:$LINENO: result: $av_cv_have_htonll" >&5
+-$as_echo "$av_cv_have_htonll" >&6; }
++{ $as_echo "$as_me:$LINENO: result: $ac_cv_have_htonll" >&5
++$as_echo "$ac_cv_have_htonll" >&6; }
+ 
+     if test "x$ac_cv_have_htonll" = "xyes"; then
+ 
+@@ -26555,13 +26555,9 @@
+ ac_compiler_gnu=$ac_cv_c_compiler_gnu
+ 
+   if test "$cross_compiling" = yes; then
+-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross 
compiling
+-See \`config.log' for more details." >&5
+-$as_echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }; }
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_SNDTIMEO 1
++_ACEOF
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ 
+@@ -26639,13 +26635,9 @@
+ 
+ 
+   if test "$cross_compiling" = yes; then
+-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross 
compiling
+-See \`config.log' for more details." >&5
+-$as_echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }; }
++cat >>confdefs.h <<\_ACEOF
++#define HAVE_RCVTIMEO 1
++_ACEOF
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ 
+@@ -26866,13 +26858,7 @@
+    save_CFLAGS="$CFLAGS"
+    CFLAGS="$CFLAGS -I${srcdir}"
+    if test "$cross_compiling" = yes; then
+-  { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+-$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+-{ { $as_echo "$as_me:$LINENO: error: cannot run test program while cross 
compiling
+-See \`config.log' for more details." >&5
+-$as_echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }; }
++donothing=donothing
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ 
diff --git a/patches/libmemcached-0.37/no_docs.diff 
b/patches/libmemcached-0.37/no_docs.diff
new file mode 100644
index 0000000..74e010f
--- /dev/null
+++ b/patches/libmemcached-0.37/no_docs.diff
@@ -0,0 +1,132 @@
+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 -Naur libmemcached-0.37/configure libmemcached-0.37.new/configure
+--- libmemcached-0.37/configure        2010-11-04 11:22:15.000000000 -0500
++++ libmemcached-0.37.new/configure    2010-11-04 11:24:12.000000000 -0500
+@@ -26748,107 +26748,6 @@
+ 
+ 
+ 
+-  # Extract the first word of "pod2man", so it can be a program name with 
args.
+-set dummy pod2man; ac_word=$2
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_POD2MAN+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $POD2MAN in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_POD2MAN="$POD2MAN" # Let the user override the test with a path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-as_dummy="$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin"
+-for as_dir in $as_dummy
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_POD2MAN="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-IFS=$as_save_IFS
+-
+-  test -z "$ac_cv_path_POD2MAN" && ac_cv_path_POD2MAN=""no""
+-  ;;
+-esac
+-fi
+-POD2MAN=$ac_cv_path_POD2MAN
+-if test -n "$POD2MAN"; then
+-  { $as_echo "$as_me:$LINENO: result: $POD2MAN" >&5
+-$as_echo "$POD2MAN" >&6; }
+-else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-  if test "x$POD2MAN" = "xno"; then
+-  { { $as_echo "$as_me:$LINENO: error: \"Could not find pod2man anywhere in 
path\"" >&5
+-$as_echo "$as_me: error: \"Could not find pod2man anywhere in path\"" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-
+-
+-
+-  # Extract the first word of "podchecker", so it can be a program name with 
args.
+-set dummy podchecker; ac_word=$2
+-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+-$as_echo_n "checking for $ac_word... " >&6; }
+-if test "${ac_cv_path_PODCHECKER+set}" = set; then
+-  $as_echo_n "(cached) " >&6
+-else
+-  case $PODCHECKER in
+-  [\\/]* | ?:[\\/]*)
+-  ac_cv_path_PODCHECKER="$PODCHECKER" # Let the user override the test with a 
path.
+-  ;;
+-  *)
+-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+-as_dummy="$PATH:/usr/bin:/usr/local/bin:/usr/perl5/bin"
+-for as_dir in $as_dummy
+-do
+-  IFS=$as_save_IFS
+-  test -z "$as_dir" && as_dir=.
+-  for ac_exec_ext in '' $ac_executable_extensions; do
+-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+-    ac_cv_path_PODCHECKER="$as_dir/$ac_word$ac_exec_ext"
+-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+-    break 2
+-  fi
+-done
+-done
+-IFS=$as_save_IFS
+-
+-  test -z "$ac_cv_path_PODCHECKER" && ac_cv_path_PODCHECKER=""no""
+-  ;;
+-esac
+-fi
+-PODCHECKER=$ac_cv_path_PODCHECKER
+-if test -n "$PODCHECKER"; then
+-  { $as_echo "$as_me:$LINENO: result: $PODCHECKER" >&5
+-$as_echo "$PODCHECKER" >&6; }
+-else
+-  { $as_echo "$as_me:$LINENO: result: no" >&5
+-$as_echo "no" >&6; }
+-fi
+-
+-
+-  if test "x$PODCHECKER" = "xno"; then
+-  { { $as_echo "$as_me:$LINENO: error: \"Could not find podchecker anywhere 
in path\"" >&5
+-$as_echo "$as_me: error: \"Could not find podchecker anywhere in path\"" >&2;}
+-   { (exit 1); exit 1; }; }
+-fi
+-
+-
+-
+ ac_ext=c
+ ac_cpp='$CPP $CPPFLAGS'
+ ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
diff --git a/patches/libmemcached-0.37/series b/patches/libmemcached-0.37/series
new file mode 100644
index 0000000..484fc9d
--- /dev/null
+++ b/patches/libmemcached-0.37/series
@@ -0,0 +1,2 @@
+configure.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..b0a7377
--- /dev/null
+++ b/rules/libmemcached.make
@@ -0,0 +1,165 @@
+# -*-makefile-*-
+# $Id$
+#
+# 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               := 
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+libmemcached_get: $(STATEDIR)/libmemcached.get
+
+$(STATEDIR)/libmemcached.get: $(libmemcached_get_deps_default)
+       @$(call targetinfo, $@)
+       @$(call touch, $@)
+
+$(LIBMEMCACHED_SOURCE):
+       @$(call targetinfo, $@)
+       @$(call get, LIBMEMCACHED)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+libmemcached_extract: $(STATEDIR)/libmemcached.extract
+
+$(STATEDIR)/libmemcached.extract: $(libmemcached_extract_deps_default)
+       @$(call targetinfo, $@)
+       @$(call clean, $(LIBMEMCACHED_DIR))
+       @$(call extract, LIBMEMCACHED)
+       @$(call patchin, LIBMEMCACHED)
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+libmemcached_prepare: $(STATEDIR)/libmemcached.prepare
+
+LIBMEMCACHED_PATH      := PATH=$(CROSS_PATH)
+LIBMEMCACHED_ENV       := $(CROSS_ENV)
+
+LIBMEMCACHED_ENV       += LDFLAGS+='-L$(SYSROOT)/lib 
-Wl,-rpath-link,$(SYSROOT)/lib -L$(SYSROOT)/usr/lib 
-Wl,-rpath-link,$(SYSROOT)/usr/lib'
+
+ifdef PTXCONF_ENDIAN_LITTLE
+       LIBMEMCACHED_ENV += ac_cv_c_endian=little
+else
+       LIBMEMCACHED_ENV += ac_cv_c_endian=big
+endif
+LIBMEMCACHED_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
+
+$(STATEDIR)/libmemcached.prepare: $(libmemcached_prepare_deps_default)
+       @$(call targetinfo, $@)
+       @$(call clean, $(LIBMEMCACHED_DIR)/config.cache)
+       cd $(LIBMEMCACHED_DIR) && \
+               $(LIBMEMCACHED_PATH) $(LIBMEMCACHED_ENV) \
+               ./configure $(LIBMEMCACHED_AUTOCONF)
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+libmemcached_compile: $(STATEDIR)/libmemcached.compile
+
+$(STATEDIR)/libmemcached.compile: $(libmemcached_compile_deps_default)
+       @$(call targetinfo, $@)
+       cd $(LIBMEMCACHED_DIR) && $(LIBMEMCACHED_ENV) $(LIBMEMCACHED_PATH) make
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+libmemcached_install: $(STATEDIR)/libmemcached.install
+
+$(STATEDIR)/libmemcached.install: $(libmemcached_install_deps_default)
+       @$(call targetinfo, $@)
+       @$(call install, LIBMEMCACHED)
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+libmemcached_targetinstall: $(STATEDIR)/libmemcached.targetinstall
+
+$(STATEDIR)/libmemcached.targetinstall: 
$(libmemcached_targetinstall_deps_default)
+       @$(call targetinfo, $@)
+
+       @$(call install_init, libmemcached)
+       @$(call install_fixup,libmemcached,PACKAGE,libmemcached)
+       @$(call install_fixup,libmemcached,PRIORITY,optional)
+       @$(call install_fixup,libmemcached,VERSION,$(LIBMEMCACHED_VERSION))
+       @$(call install_fixup,libmemcached,SECTION,base)
+       @$(call install_fixup,libmemcached,AUTHOR,"NovaTech-LLC")
+       @$(call install_fixup,libmemcached,DEPENDS,"$(LIBMEMCACHED_DEP)")
+       @$(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, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+libmemcached_clean:
+       rm -rf $(STATEDIR)/libmemcached.*
+       rm -rf $(IMAGEDIR)/libmemcached.*
+       rm -rf $(LIBMEMCACHED_DIR)
+       rm -rf $(SYSROOT)/usr/lib/liblibmemcached*
+
+# vim: syntax=make
-- 
1.6.4.2


-- 
ptxdist mailing list
[email protected]

Reply via email to