New package: libmemcached

This commit is contained in:
John Regan 2015-08-26 11:10:51 -04:00
parent 478ccf1679
commit 3710bb24a8
5 changed files with 106 additions and 0 deletions

1
srcpkgs/libmemcached-devel Symbolic link
View file

@ -0,0 +1 @@
libmemcached

1
srcpkgs/libmemcached-docs Symbolic link
View file

@ -0,0 +1 @@
libmemcached

View file

@ -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
;;

View file

@ -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 <libhashkit/common.h>
+#ifndef __GLIBC__
+#include <sys/reg.h>
+#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 <libhashkit/common.h>
+#ifndef __GLIBC__
+#include <sys/reg.h>
+#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 <algorithm>
#include <stdexcept>
-#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

View file

@ -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 <john@jrjrtech.com>"
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"
}
}