I added a new packet libmemcache. A client library for memcached.
---
 patches/libmemcache-1.4.0.rc2/configure.diff |   35 +++++++
 patches/libmemcache-1.4.0.rc2/series         |    1 +
 rules/libmemcache.in                         |    9 ++
 rules/libmemcache.make                       |  142 ++++++++++++++++++++++++++
 4 files changed, 187 insertions(+), 0 deletions(-)
 create mode 100644 patches/libmemcache-1.4.0.rc2/configure.diff
 create mode 100644 patches/libmemcache-1.4.0.rc2/series
 create mode 100644 rules/libmemcache.in
 create mode 100644 rules/libmemcache.make

diff --git a/patches/libmemcache-1.4.0.rc2/configure.diff 
b/patches/libmemcache-1.4.0.rc2/configure.diff
new file mode 100644
index 0000000..90ebbc2
--- /dev/null
+++ b/patches/libmemcache-1.4.0.rc2/configure.diff
@@ -0,0 +1,35 @@
+diff -Naur libmemcache-1.4.0.rc2/configure libmemcache-1.4.0.rc2.new/configure
+--- libmemcache-1.4.0.rc2/configure    2006-02-21 02:03:22.000000000 -0600
++++ libmemcache-1.4.0.rc2.new/configure        2010-01-27 12:28:08.000000000 
-0600
+@@ -27143,11 +27143,10 @@
+ echo "$as_me:$LINENO: checking whether to use SO_RCVTIMEO with setsockopt()" 
>&5
+ echo $ECHO_N "checking whether to use SO_RCVTIMEO with setsockopt()... 
$ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+-  { { echo "$as_me:$LINENO: error: cannot run test program while cross 
compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++echo "${ECHO_T}yes" >&6
++cat >>confdefs.h <<\_ACEOF
++#define USE_SO_RCVTIMEO 1
++_ACEOF
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
+@@ -27219,11 +27218,10 @@
+ echo "$as_me:$LINENO: checking whether to use SO_SNDTIMEO with setsockopt()" 
>&5
+ echo $ECHO_N "checking whether to use SO_SNDTIMEO with setsockopt()... 
$ECHO_C" >&6
+ if test "$cross_compiling" = yes; then
+-  { { echo "$as_me:$LINENO: error: cannot run test program while cross 
compiling
+-See \`config.log' for more details." >&5
+-echo "$as_me: error: cannot run test program while cross compiling
+-See \`config.log' for more details." >&2;}
+-   { (exit 1); exit 1; }; }
++echo "${ECHO_T}yes" >&6
++cat >>confdefs.h <<\_ACEOF
++#define USE_SO_SNDTIMEO 1
++_ACEOF
+ else
+   cat >conftest.$ac_ext <<_ACEOF
+ /* confdefs.h.  */
diff --git a/patches/libmemcache-1.4.0.rc2/series 
b/patches/libmemcache-1.4.0.rc2/series
new file mode 100644
index 0000000..dbd8a0a
--- /dev/null
+++ b/patches/libmemcache-1.4.0.rc2/series
@@ -0,0 +1 @@
+configure.diff
diff --git a/rules/libmemcache.in b/rules/libmemcache.in
new file mode 100644
index 0000000..793ae9e
--- /dev/null
+++ b/rules/libmemcache.in
@@ -0,0 +1,9 @@
+## SECTION=system_libraries
+
+config LIBMEMCACHE
+       tristate
+       prompt "libmemcache"
+       help
+         libmemcache is the C API for memcached(8), a high-performance,
+         distributed memory object caching system.
+
diff --git a/rules/libmemcache.make b/rules/libmemcache.make
new file mode 100644
index 0000000..509b869
--- /dev/null
+++ b/rules/libmemcache.make
@@ -0,0 +1,142 @@
+# -*-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_LIBMEMCACHE) += libmemcache
+
+#
+# Paths and names
+#
+LIBMEMCACHE_VERSION            := 1.4.0.rc2
+LIBMEMCACHE                    := libmemcache-$(LIBMEMCACHE_VERSION)
+LIBMEMCACHE_SUFFIX             := tar.bz2
+LIBMEMCACHE_URL                        := 
http://people.freebsd.org/~seanc/libmemcache/$(LIBMEMCACHE).$(LIBMEMCACHE_SUFFIX)
+LIBMEMCACHE_SOURCE             := 
$(SRCDIR)/$(LIBMEMCACHE).$(LIBMEMCACHE_SUFFIX)
+LIBMEMCACHE_DIR                := $(BUILDDIR)/$(LIBMEMCACHE)
+LIBMEMCACHE_DEP                := 
+
+# ----------------------------------------------------------------------------
+# Get
+# ----------------------------------------------------------------------------
+
+libmemcache_get: $(STATEDIR)/libmemcache.get
+
+$(STATEDIR)/libmemcache.get: $(libmemcache_get_deps_default)
+       @$(call targetinfo, $@)
+       @$(call touch, $@)
+
+$(LIBMEMCACHE_SOURCE):
+       @$(call targetinfo, $@)
+       @$(call get, LIBMEMCACHE)
+
+# ----------------------------------------------------------------------------
+# Extract
+# ----------------------------------------------------------------------------
+
+libmemcache_extract: $(STATEDIR)/libmemcache.extract
+
+$(STATEDIR)/libmemcache.extract: $(libmemcache_extract_deps_default)
+       @$(call targetinfo, $@)
+       @$(call clean, $(LIBMEMCACHE_DIR))
+       @$(call extract, LIBMEMCACHE)
+       @$(call patchin, LIBMEMCACHE)
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Prepare
+# ----------------------------------------------------------------------------
+
+libmemcache_prepare: $(STATEDIR)/libmemcache.prepare
+
+LIBMEMCACHE_PATH       := PATH=$(CROSS_PATH)
+LIBMEMCACHE_ENV        := $(CROSS_ENV)
+
+LIBMEMCACHE_ENV        += LDFLAGS+='-L$(SYSROOT)/lib 
-Wl,-rpath-link,$(SYSROOT)/lib -L$(SYSROOT)/usr/lib 
-Wl,-rpath-link,$(SYSROOT)/usr/lib'
+
+ifdef PTXCONF_ENDIAN_LITTLE
+       LIBMEMCACHE_ENV += ac_cv_c_endian=little
+else
+       LIBMEMCACHE_ENV += ac_cv_c_endian=big
+endif
+LIBMEMCACHE_ENV += ac_cv_c_alignment=need
+
+#
+# autoconf
+#
+LIBMEMCACHE_AUTOCONF := $(CROSS_AUTOCONF_USR)
+
+$(STATEDIR)/libmemcache.prepare: $(libmemcache_prepare_deps_default)
+       @$(call targetinfo, $@)
+       @$(call clean, $(LIBMEMCACHE_DIR)/config.cache)
+       cd $(LIBMEMCACHE_DIR) && \
+               $(LIBMEMCACHE_PATH) $(LIBMEMCACHE_ENV) \
+               ./configure $(LIBMEMCACHE_AUTOCONF)
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Compile
+# ----------------------------------------------------------------------------
+
+libmemcache_compile: $(STATEDIR)/libmemcache.compile
+
+$(STATEDIR)/libmemcache.compile: $(libmemcache_compile_deps_default)
+       @$(call targetinfo, $@)
+       cd $(LIBMEMCACHE_DIR) && $(LIBMEMCACHE_ENV) $(LIBMEMCACHE_PATH) make
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+
+libmemcache_install: $(STATEDIR)/libmemcache.install
+
+$(STATEDIR)/libmemcache.install: $(libmemcache_install_deps_default)
+       @$(call targetinfo, $@)
+       @$(call install, LIBMEMCACHE)
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Target-Install
+# ----------------------------------------------------------------------------
+
+libmemcache_targetinstall: $(STATEDIR)/libmemcache.targetinstall
+
+$(STATEDIR)/libmemcache.targetinstall: 
$(libmemcache_targetinstall_deps_default)
+       @$(call targetinfo, $@)
+
+       @$(call install_init, libmemcache)
+       @$(call install_fixup,libmemcache,PACKAGE,libmemcache)
+       @$(call install_fixup,libmemcache,PRIORITY,optional)
+       @$(call install_fixup,libmemcache,VERSION,$(LIBMEMCACHE_VERSION))
+       @$(call install_fixup,libmemcache,SECTION,base)
+       @$(call install_fixup,libmemcache,AUTHOR,"NovaTech-LLC")
+       @$(call install_fixup,libmemcache,DEPENDS,"$(LIBMEMCACHE_DEP)")
+       @$(call install_fixup,libmemcache,DESCRIPTION,missing)
+
+       @$(call install_lib, libmemcache, 0, 0, 0644, libmemcache)
+
+       @$(call install_finish,libmemcache)
+
+       @$(call touch, $@)
+
+# ----------------------------------------------------------------------------
+# Clean
+# ----------------------------------------------------------------------------
+
+libmemcache_clean:
+       rm -rf $(STATEDIR)/libmemcache.*
+       rm -rf $(IMAGEDIR)/libmemcache.*
+       rm -rf $(LIBMEMCACHE_DIR)
+       rm -rf $(SYSROOT)/usr/lib/liblibmemcache*
+
+# vim: syntax=make
-- 
1.6.4.2


-- 
ptxdist mailing list
[email protected]

Reply via email to