diff --git a/srcpkgs/libmemcached-devel b/srcpkgs/libmemcached-devel new file mode 120000 index 0000000000..f6ef1b236c --- /dev/null +++ b/srcpkgs/libmemcached-devel @@ -0,0 +1 @@ +libmemcached \ No newline at end of file diff --git a/srcpkgs/libmemcached-docs b/srcpkgs/libmemcached-docs new file mode 120000 index 0000000000..f6ef1b236c --- /dev/null +++ b/srcpkgs/libmemcached-docs @@ -0,0 +1 @@ +libmemcached \ No newline at end of file diff --git a/srcpkgs/libmemcached/patches/libmemcached-fix-linking-with-libpthread.patch b/srcpkgs/libmemcached/patches/libmemcached-fix-linking-with-libpthread.patch new file mode 100644 index 0000000000..7660615781 --- /dev/null +++ b/srcpkgs/libmemcached/patches/libmemcached-fix-linking-with-libpthread.patch @@ -0,0 +1,19 @@ +diff -up build-aux/ltmain.sh +--- build-aux/ltmain.sh 2013-12-03 16:36:53.222107642 +0100 ++++ build-aux/ltmain.sh 2013-12-03 16:37:35.770132249 +0100 +@@ -5664,6 +5664,15 @@ func_mode_link () + *" $arg "*) ;; + * ) func_append new_inherited_linker_flags " $arg" ;; + esac ++ # As we are forced to pass -nostdlib to g++ during linking, the option ++ # -pthread{,s} is not in effect; add the -lpthread to $deplist ++ # explicitly to link correctly. ++ if test "$tagname" = CXX -a x"$with_gcc" = xyes; then ++ case "$arg" in ++ -pthread*) func_append deplibs " -lpthread" ;; ++ esac ++ fi ++ + continue + ;; + diff --git a/srcpkgs/libmemcached/patches/musl-fixes.patch b/srcpkgs/libmemcached/patches/musl-fixes.patch new file mode 100644 index 0000000000..3c63bba219 --- /dev/null +++ b/srcpkgs/libmemcached/patches/musl-fixes.patch @@ -0,0 +1,51 @@ +diff --git libhashkit/fnv_64.cc libhashkit/fnv_64.cc +index 68e4dd0..88bbace 100644 +--- libhashkit/fnv_64.cc ++++ libhashkit/fnv_64.cc +@@ -37,6 +37,9 @@ + + + #include ++#ifndef __GLIBC__ ++#include ++#endif + + #if __WORDSIZE == 64 && defined(HAVE_FNV64_HASH) + +diff --git libhashkit/has.cc libhashkit/has.cc +index 843e32e..7dbadc3 100644 +--- libhashkit/has.cc ++++ libhashkit/has.cc +@@ -37,6 +37,9 @@ + + + #include ++#ifndef __GLIBC__ ++#include ++#endif + + bool libhashkit_has_algorithm(const hashkit_hash_algorithm_t algo) + { +diff --git libtest/cmdline.cc libtest/cmdline.cc +index 29a22de..161c646 100644 +--- libtest/cmdline.cc ++++ libtest/cmdline.cc +@@ -61,7 +61,7 @@ using namespace libtest; + #include + #include + +-#ifndef __USE_GNU ++#ifndef _GNU_SOURCE + static char **environ= NULL; + #endif + +@@ -201,7 +201,7 @@ Application::error_t Application::run(const char *args[]) + + fatal_assert(posix_spawnattr_setsigmask(&spawnattr, &mask) == 0); + +-#if defined(POSIX_SPAWN_USEVFORK) || defined(__linux__) ++#if defined(POSIX_SPAWN_USEVFORK) || defined(__GLIBC__) + // Use USEVFORK on linux + flags |= POSIX_SPAWN_USEVFORK; + #endif + diff --git a/srcpkgs/libmemcached/template b/srcpkgs/libmemcached/template new file mode 100644 index 0000000000..ba203546f1 --- /dev/null +++ b/srcpkgs/libmemcached/template @@ -0,0 +1,34 @@ +# Template build file for 'libmemcached' +pkgname=libmemcached +version=1.0.18 +revision=1 +build_style=gnu-configure +configure_args="--prefix=/usr" +short_desc="C/C++ library to memcached" +maintainer="John Regan " +license="BSD" +homepage="http://libmemcached.org" +distfiles="http://launchpad.net/${pkgname}/1.0/${version}/+download/${pkgname}-${version}.tar.gz" +checksum="e22c0bb032fde08f53de9ffbc5a128233041d9f33b5de022c0978a2149885f82" +makedepends="libevent-devel libsasl-devel memcached-devel" +hostmakedepends="perl" +nocross="yes" + +libmemcached-devel_package() { + short_desc+=" - development files" + depends="${sourcepkg}>=${version}_${revision}" + pkg_install() { + vmove usr/include + vmove usr/lib/*.a + vmove usr/lib/*.so + vmove usr/lib/pkgconfig + } +} + +libmemcached-docs_package() { + short_desc+=" - documentation" + pkg_install() { + vmove "usr/share/man" + } +} +