Gentoo Archives: gentoo-dev

From: Michael Orlitzky <mjo@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] [PATCH 2/2] php-ext-pecl-r3.eclass: new revision supporting EAPI=6.
Date: Wed, 01 Jun 2016 21:20:01
Message-Id: 574F5170.7080308@gentoo.org
In Reply to: Re: [gentoo-dev] [PATCH 2/2] php-ext-pecl-r3.eclass: new revision supporting EAPI=6. by "Michał Górny"
1 I'll start with the easy one first. A new version is attached.
2
3
4 On 06/01/2016 01:53 PM, Michał Górny wrote:
5 >> +
6 >> +[[ -z ${MY_PV} ]] && MY_PV=${PV}
7 >
8 > Is MY_PV part of the API? If yes, document it, and preferably rename
9 > into something more collision-proof. If not, you shouldn't be doing
10 > [[ -z ...
11 >
12
13 Uhhhh I don't think so. It's probably leaking through from some ebuilds,
14 but I just documented that you're going to have to fix that on the wiki
15 page and made the eclass ignore it.
16
17 As part of a greater campaign for sanity, I'm also requiring that the
18 PHP_EXT_PECL_FILENAME variable contain a file name. Previously we had
19 something like SRC_URI="...${PHP_EXT_PECL_FILENAME}-${MY_PV}.tgz".
20
21
22 >> +PECL_PKG="${PHP_EXT_PECL_PKG}"
23 >> +MY_PV="${MY_PV/_/}"
24 >> +PECL_PKG_V="${PECL_PKG}-${MY_PV}"
25 >
26 > If exported as part of the API, please document it. Otherwise, remember
27 > to unset it after use.
28 >
29
30 After the MY_PV fix, I still had one undocumented variable laying around
31 in global scope. I mangled the name for safety, and unset it after use.
32
33
34 >> +
35 >> +# @FUNCTION: php-ext-pecl-r3_src_compile
36 >> +# @DESCRIPTION:
37 >> +# Compile a standard PECL package. The process is the same as for any
38 >> +# standalone PHP extension, so we delegate to php-ext-source-r3.eclass.
39 >> +php-ext-pecl-r3_src_compile() {
40 >> + php-ext-source-r3_src_compile
41 >> +}
42 >
43 > Any reason to re-export it?
44 >
45
46 Because -r2 did =P
47
48 It's fixed.
49
50
51
52 >> +
53 >> + if has examples ${IUSE} && use examples ; then
54 >
55 > This is prohibited. Use in_iuse.
56 >
57
58 Thanks, fixed.
59
60
61
62 >> + NO_INTERACTION="yes" emake test || \
63 >> + die "emake test failed for slot ${slot}"
64 >
65 > emake dies in this EAPI, so your die will never be called.
66 >
67
68 This too, thanks.

Attachments

File name MIME type
php-ext-pecl-r3.eclass text/plain