public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: Jaco Kroon <jaco@uls.co.za>
To: gentoo-dev@lists.gentoo.org
Cc: Jaco Kroon <jaco@uls.co.za>
Subject: [gentoo-dev] [PATCH] php-ext-source-r3.eclass: Rebuild exts should dev-lang/php[threads,debug] change.
Date: Tue, 23 Jul 2024 12:42:44 +0200	[thread overview]
Message-ID: <20240723104244.8432-1-jaco@uls.co.za> (raw)

If these use flags change then the extension dir changes too, requiring
extensions to be rebuilt.

The downside of this change is that different versions of PHP can no
longer have different USE values for threads and debug.

Signed-off-by: Jaco Kroon <jaco@uls.co.za>
---
 eclass/php-ext-source-r3.eclass | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/eclass/php-ext-source-r3.eclass b/eclass/php-ext-source-r3.eclass
index 0d58db5031c9..771481ca7d3d 100644
--- a/eclass/php-ext-source-r3.eclass
+++ b/eclass/php-ext-source-r3.eclass
@@ -100,6 +100,11 @@ esac
 # php_targets_php7-0? ( dev-lang/php:7.0[mysql?,pdo,pcre(+)] )
 # @CODE
 
+# Whenever certain PHP USE flags change, we need to also rebuild all
+# extensions.
+IUSE+="threads debug"
+[ -n "${PHP_EXT_NEEDED_USE}" ] && PHP_EXT_NEEDED_USE+=,
+PHP_EXT_NEEDED_USE+=threads=,debug=
 
 # Make sure at least one target is installed. First, start a USE
 # conditional like "php?", but only when PHP_EXT_OPTIONAL_USE is
@@ -113,9 +118,7 @@ for _php_target in ${USE_PHP}; do
 	REQUIRED_USE+="php_targets_${_php_target} "
 	_php_slot=${_php_target/php}
 	_php_slot=${_php_slot/-/.}
-	if [[ ${PHP_EXT_NEEDED_USE} ]] ; then
-		_php_slot+=[${PHP_EXT_NEEDED_USE}]
-	fi
+	_php_slot+=[${PHP_EXT_NEEDED_USE}]
 	PHPDEPEND+=" php_targets_${_php_target}? ( dev-lang/php:${_php_slot} )"
 done
 
-- 
2.44.2



             reply	other threads:[~2024-07-23 10:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-23 10:42 Jaco Kroon [this message]
2024-07-25  9:47 ` [gentoo-dev] [PATCH] php-ext-source-r3.eclass: Rebuild exts should dev-lang/php[threads,debug] change Jaco Kroon

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=20240723104244.8432-1-jaco@uls.co.za \
    --to=jaco@uls.co.za \
    --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