Gentoo Archives: gentoo-commits

From: Michael Orlitzky <mjo@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/pecl-apcu/
Date: Sun, 31 Dec 2017 03:07:32
Message-Id: 1514688979.f94e0d0ec17cc141494ad9c5983638b804241250.mjo@gentoo
1 commit: f94e0d0ec17cc141494ad9c5983638b804241250
2 Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
3 AuthorDate: Sun Dec 31 02:56:02 2017 +0000
4 Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
5 CommitDate: Sun Dec 31 02:56:19 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f94e0d0e
7
8 dev-php/pecl-apcu: new revision with php-7.2 support.
9
10 The existing stable version 5.1.8 of pecl-apcu works with php-7.2, but
11 the ebuild is missing explicit support for it. This commit adds a new
12 -r1 with that support. Thanks to Conrad Kostecki for the report and
13 the patch.
14
15 Closes: https://bugs.gentoo.org/641402
16 Package-Manager: Portage-2.3.13, Repoman-2.3.3
17
18 dev-php/pecl-apcu/pecl-apcu-5.1.8-r1.ebuild | 80 +++++++++++++++++++++++++++++
19 1 file changed, 80 insertions(+)
20
21 diff --git a/dev-php/pecl-apcu/pecl-apcu-5.1.8-r1.ebuild b/dev-php/pecl-apcu/pecl-apcu-5.1.8-r1.ebuild
22 new file mode 100644
23 index 00000000000..bcf56069751
24 --- /dev/null
25 +++ b/dev-php/pecl-apcu/pecl-apcu-5.1.8-r1.ebuild
26 @@ -0,0 +1,80 @@
27 +# Copyright 1999-2017 Gentoo Foundation
28 +# Distributed under the terms of the GNU General Public License v2
29 +
30 +EAPI=6
31 +
32 +PHP_EXT_NAME="apcu"
33 +PHP_EXT_INI="yes"
34 +PHP_EXT_ZENDEXT="no"
35 +DOCS=( NOTICE README.md TECHNOTES.txt TODO )
36 +
37 +# Define 5.6 here so we get the USE and REQUIRED_USE from the eclass
38 +# This allows us to depend on the other slot
39 +USE_PHP="php5-6 php7-0 php7-1 php7-2"
40 +
41 +inherit php-ext-pecl-r3
42 +
43 +# However, we only really build for 7.x; so redefine it here
44 +USE_PHP="php7-0 php7-1 php7-2"
45 +
46 +KEYWORDS="~amd64 ~x86"
47 +
48 +DESCRIPTION="Stripped down version of APC supporting only user cache"
49 +LICENSE="PHP-3.01"
50 +SLOT="7"
51 +IUSE="+mmap"
52 +
53 +DEPEND=""
54 +RDEPEND="${DEPEND} php_targets_php5-6? ( dev-php/pecl-apcu:0[php_targets_php5-6] )"
55 +
56 +LOCKS="pthreadmutex pthreadrw spinlock semaphore"
57 +
58 +LUSE=""
59 +for l in ${LOCKS}; do
60 + LUSE+="lock_${l} "
61 +done
62 +
63 +IUSE+=" ${LUSE/lock_pthreadrw/+lock_pthreadrw}"
64 +
65 +REQUIRED_USE="^^ ( $LUSE )"
66 +
67 +src_prepare() {
68 + if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 ; then
69 + php-ext-source-r3_src_prepare
70 + else
71 + eapply_user
72 + fi
73 +}
74 +
75 +src_configure() {
76 + if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 ; then
77 + local PHP_EXT_ECONF_ARGS=(
78 + --enable-apcu
79 + $(use_enable mmap apcu-mmap)
80 + $(use_enable lock_pthreadrw apcu-rwlocks)
81 + $(use_enable lock_spinlock apcu-spinlocks)
82 + )
83 +
84 + php-ext-source-r3_src_configure
85 + fi
86 +}
87 +
88 +src_install() {
89 + if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 ; then
90 + php-ext-pecl-r3_src_install
91 +
92 + insinto /usr/share/php7/apcu
93 + doins apc.php
94 + fi
95 +}
96 +
97 +pkg_postinst() {
98 + if use php_targets_php7-0 || use php_targets_php7-1 || use php_targets_php7-2 ; then
99 + elog "The apc.php file shipped with this release of pecl-apcu was"
100 + elog "installed into ${EPREFIX}/usr/share/php7/apcu/."
101 + elog
102 + elog "If you depend on the apc_* functions,"
103 + elog "please install dev-php/pecl-apcu_bc as this extension no longer"
104 + elog "provides backwards compatibility."
105 + fi
106 +}