Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/pecl-memcached/
Date: Mon, 16 May 2022 23:31:13
Message-Id: 1652743819.ead31c072a82b66cafb82200bc79e0d78416158c.sam@gentoo
1 commit: ead31c072a82b66cafb82200bc79e0d78416158c
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Mon May 16 16:42:40 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Mon May 16 23:30:19 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ead31c07
7
8 dev-php/pecl-memcached: prefer dev-libs/libmemcached-awesome
9
10 Closes: https://bugs.gentoo.org/841608
11 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
12 Closes: https://github.com/gentoo/gentoo/pull/25253
13 Signed-off-by: Sam James <sam <AT> gentoo.org>
14
15 .../pecl-memcached/pecl-memcached-3.2.0-r1.ebuild | 56 ++++++++++++++++++++++
16 1 file changed, 56 insertions(+)
17
18 diff --git a/dev-php/pecl-memcached/pecl-memcached-3.2.0-r1.ebuild b/dev-php/pecl-memcached/pecl-memcached-3.2.0-r1.ebuild
19 new file mode 100644
20 index 000000000000..ec79c6932fb8
21 --- /dev/null
22 +++ b/dev-php/pecl-memcached/pecl-memcached-3.2.0-r1.ebuild
23 @@ -0,0 +1,56 @@
24 +# Copyright 1999-2022 Gentoo Authors
25 +# Distributed under the terms of the GNU General Public License v2
26 +
27 +EAPI=8
28 +PHP_EXT_NAME="memcached"
29 +DOCS=( ChangeLog README.markdown )
30 +
31 +USE_PHP="php7-4 php8-0 php8-1"
32 +PHP_EXT_NEEDED_USE="json(+)?,session(-)?"
33 +MY_P="${PN/pecl-/}-${PV/_rc/RC}"
34 +PHP_EXT_PECL_FILENAME="${MY_P}.tgz"
35 +PHP_EXT_S="${WORKDIR}/${MY_P}"
36 +
37 +inherit php-ext-pecl-r3
38 +
39 +DESCRIPTION="Interface PHP with memcached via libmemcached library"
40 +LICENSE="PHP-3.01"
41 +SLOT="7"
42 +KEYWORDS="~amd64 ~arm ~arm64 ~x86"
43 +IUSE="igbinary json sasl +session test"
44 +
45 +RESTRICT="!test? ( test )"
46 +
47 +COMMON_DEPEND="|| ( dev-libs/libmemcached-awesome[sasl(-)?] >=dev-libs/libmemcached-1.0.14[sasl(-)?] )
48 + sys-libs/zlib
49 + igbinary? ( dev-php/igbinary[php_targets_php7-4(-)?,php_targets_php8-0(-)?,php_targets_php8-1(-)?] )
50 +"
51 +DEPEND="${COMMON_DEPEND}"
52 +RDEPEND="${COMMON_DEPEND}"
53 +BDEPEND="${COMMON_DEPEND} test? ( net-misc/memcached )"
54 +
55 +S="${WORKDIR}/${MY_P}"
56 +
57 +src_configure() {
58 + local PHP_EXT_ECONF_ARGS="--enable-memcached
59 + $(use_enable session memcached-session)
60 + $(use_enable sasl memcached-sasl)
61 + $(use_enable json memcached-json)
62 + $(use_enable igbinary memcached-igbinary)"
63 +
64 + php-ext-source-r3_src_configure
65 +}
66 +
67 +src_test() {
68 + touch "${T}/memcached.pid" || die
69 + local memcached_opts=( -d -P "${T}/memcached.pid" -p 11211 -l 127.0.0.1 -U 11211 )
70 + [[ ${EUID} == 0 ]] && memcached_opts+=( -u portage )
71 + memcached "${memcached_opts[@]}" || die "Can't start memcached test server"
72 +
73 + local exit_status
74 + php-ext-source-r3_src_test
75 + exit_status=$?
76 +
77 + kill "$(<"${T}/memcached.pid")"
78 + return ${exit_status}
79 +}