1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
8 inherit autotools eutils multilib
9 RESTRICT="test" # https://bugs.gentoo.org/show_bug.cgi?id=498250 https://bugs.launchpad.net/gentoo/+bug/1278023
11 DESCRIPTION="a C client library to the memcached server"
12 HOMEPAGE="http://libmemcached.org/libMemcached.html"
13 SRC_URI="https://launchpad.net/${PN}/1.0/${PV}/+download/${P}.tar.gz"
17 KEYWORDS="~alpha amd64 arm arm64 hppa ~ia64 ppc ppc64 s390 sparc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos"
18 IUSE="debug hsieh +libevent sasl static-libs"
20 DEPEND="net-misc/memcached
21 sasl? ( dev-libs/cyrus-sasl )
22 libevent? ( dev-libs/libevent )"
26 epatch "${FILESDIR}/debug-disable-enable-1.0.18.patch"
27 epatch "${FILESDIR}/continuum-1.0.18.patch"
28 epatch "${FILESDIR}"/${P}-gcc7.patch
29 sed -i '6i CFLAGS = @CFLAGS@' Makefile.am
30 sed -e "/_APPEND_COMPILE_FLAGS_ERROR(\[-fmudflapth\?\])/d" -i m4/ax_harden_compiler_flags.m4
37 $(use_enable static-libs static) \
38 $(use_enable sasl sasl) \
39 $(use_enable debug debug) \
40 $(use_enable debug assert) \
41 $(use_enable hsieh hsieh_hash) \
42 --libdir=/usr/$(get_libdir) \
47 emake DESTDIR="${D}" install
49 use static-libs || rm -f "${D}"/usr/$(get_libdir)/lib*.la
51 dodoc AUTHORS ChangeLog README THANKS TODO
52 # remove manpage to avoid collision, see bug #299330
53 rm -f "${D}"/usr/share/man/man1/memdump.*
54 newman man/memdump.1 memcached_memdump.1