• [gentoo-dev] [PATCH] php-ext-source-r3.eclass: Rebuild exts should dev-

    From Jaco Kroon@21:1/5 to All on Tue Jul 23 12:50:02 2024
    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
  • From Jaco Kroon@21:1/5 to Jaco Kroon on Thu Jul 25 11:50:01 2024
    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


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)