From: "Michael Orlitzky" <mjo@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-php/twig/
Date: Fri, 6 Jan 2017 22:39:58 +0000 (UTC) [thread overview]
Message-ID: <1483742354.25971a5a27a4e2dec8ef93ac9915de1045e7a67e.mjo@gentoo> (raw)
commit: 25971a5a27a4e2dec8ef93ac9915de1045e7a67e
Author: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
AuthorDate: Fri Jan 6 22:11:27 2017 +0000
Commit: Michael Orlitzky <mjo <AT> gentoo <DOT> org>
CommitDate: Fri Jan 6 22:39:14 2017 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=25971a5a
dev-php/twig: fix build with USE=extension unset.
In commit 14f2ab0, I accidentally broke building with
USE="-extension". The eclass src_prepare phase was correctly skipped
(a new change), but then afterwards it became possible for the eclass
src_configure and src_compile to fail. Now those phases are skipped
when USE="-extension", too. For consistency and for a minor
performance improvement, the eclass src_unpack phase is skipped, too.
A new revision was made because I'm not 100% certain that it wasn't
possible to install the extension with USE="-extension" before. If
it was possible, any victims would want to re-emerge twig. I have
also added an unconditional RDEPEND on "dev-lang/php" that could
have been omitted before; that would itself justify a new revision.
Gentoo-Bug: 604874
Package-Manager: portage-2.3.0
.../{twig-1.29.0.ebuild => twig-1.29.0-r1.ebuild} | 30 +++++++++++++++++++++-
1 file changed, 29 insertions(+), 1 deletion(-)
diff --git a/dev-php/twig/twig-1.29.0.ebuild b/dev-php/twig/twig-1.29.0-r1.ebuild
similarity index 66%
rename from dev-php/twig/twig-1.29.0.ebuild
rename to dev-php/twig/twig-1.29.0-r1.ebuild
index 679424c..55c8675 100644
--- a/dev-php/twig/twig-1.29.0.ebuild
+++ b/dev-php/twig/twig-1.29.0-r1.ebuild
@@ -24,15 +24,43 @@ IUSE="doc extension test"
DEPEND="test? ( dev-php/phpunit )"
+# We always require *some* version of PHP; the eclass (conditionally)
+# requires *specific* versions.
+RDEPEND="dev-lang/php"
+
+src_unpack() {
+ # Don't make copies of the source tree if they won't be used.
+ if use extension; then
+ php-ext-source-r3_src_unpack
+ else
+ default
+ fi
+}
+
src_prepare(){
# We need to call eapply_user ourselves, because it may be skipped
# if either the "extension" USE flag is not set, or if the user's
# PHP_TARGETS is essentially empty (does not contain "php5-6"). In
- # the latter case, the eclass src_prepare does nothing.
+ # the latter case, the eclass src_prepare does nothing. We only call
+ # the eclass phase conditionally because the correct version of
+ # e.g. "phpize" may not be there unless USE=extension is set.
eapply_user
use extension && php-ext-source-r3_src_prepare
}
+src_configure() {
+ # The eclass phase will try to run the ./configure script even if it
+ # doesn't exist (in contrast to the default src_configure), so we
+ # need to skip it if the eclass src_prepare (that creates said
+ # script) is not run.
+ use extension && php-ext-source-r3_src_configure
+}
+
+src_compile() {
+ # Avoids the same problem as in src_configure.
+ use extension && php-ext-source-r3_src_compile
+}
+
src_install(){
use extension && php-ext-source-r3_src_install
next reply other threads:[~2017-01-06 22:40 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-01-06 22:39 Michael Orlitzky [this message]
-- strict thread matches above, loose matches on Subject: below --
2023-04-30 23:38 [gentoo-commits] repo/gentoo:master commit in: dev-php/twig/ John Helmert III
2023-04-19 4:12 John Helmert III
2022-04-29 4:49 Sam James
2022-03-25 16:42 Brian Evans
2022-03-25 16:42 Brian Evans
2019-11-25 15:57 Brian Evans
2019-08-26 13:37 Brian Evans
2019-07-07 18:42 Dirkjan Ochtman
2019-05-08 20:00 Dirkjan Ochtman
2018-03-27 20:36 Brian Evans
2018-03-22 1:29 Brian Evans
2017-01-25 14:44 Michael Orlitzky
2017-01-06 21:51 Michael Orlitzky
2016-12-22 0:58 Michael Orlitzky
2015-08-22 13:56 Brian Evans
2015-08-22 13:56 Brian Evans
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1483742354.25971a5a27a4e2dec8ef93ac9915de1045e7a67e.mjo@gentoo \
--to=mjo@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox