public inbox for gentoo-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-dev] [PATCH] php-ext-source-r3.eclass: Rebuild exts should dev-lang/php[threads,debug] change.
@ 2024-07-23 10:42 Jaco Kroon
  2024-07-25  9:47 ` Jaco Kroon
  0 siblings, 1 reply; 2+ messages in thread
From: Jaco Kroon @ 2024-07-23 10:42 UTC (permalink / raw
  To: gentoo-dev; +Cc: Jaco Kroon

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [gentoo-dev] [PATCH] php-ext-source-r3.eclass: Rebuild exts should dev-lang/php[threads,debug] change.
  2024-07-23 10:42 [gentoo-dev] [PATCH] php-ext-source-r3.eclass: Rebuild exts should dev-lang/php[threads,debug] change Jaco Kroon
@ 2024-07-25  9:47 ` Jaco Kroon
  0 siblings, 0 replies; 2+ messages in thread
From: Jaco Kroon @ 2024-07-25  9:47 UTC (permalink / raw
  To: gentoo-dev

Based on no feedback I proceeded to push a PR available here: 
https://github.com/gentoo/gentoo/pull/37712

On 2024/07/23 12:42, Jaco Kroon wrote:

> 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
>   


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-07-25  9:47 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-23 10:42 [gentoo-dev] [PATCH] php-ext-source-r3.eclass: Rebuild exts should dev-lang/php[threads,debug] change Jaco Kroon
2024-07-25  9:47 ` Jaco Kroon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox