• [gentoo-dev] [PATCH 0/6] scons-utils.eclass: EAPI 8 support and cleanup

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Oct 28 20:00:02 2022
    Hi,

    Here's a patchset that removes support for all old EAPIs from scons-utils.eclass and adds support for EAPI 8. While at it, I'm
    updating docs and removing custom MAKEOPTS parser in favor
    of makeopts_jobs.

    Note that this currently breaks one last rited package (that still
    uses EAPI 6), so it won't be merged before that one goes.


    Michał Górny (6):
    scons-utils.eclass: Remove support for EAPI 0..6
    scons-utils.eclass: Use python_has_version
    scons-utils.eclass: Enable EAPI 8 support
    scons-utils.eclass: Update documentation
    scons-utils.eclass: Default SCONS_MIN_VERSION to current stable
    scons-utils.eclass: Reuse makeopts_jobs

    eclass/scons-utils.eclass | 246 +++++-------------------------------
    eclass/tests/scons-utils.sh | 64 ----------
    2 files changed, 29 insertions(+), 281 deletions(-)
    delete mode 100755 eclass/tests/scons-utils.sh

    --
    2.38.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Oct 28 20:00:02 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/scons-utils.eclass | 7 ++-----
    1 file changed, 2 insertions(+), 5 deletions(-)

    diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
    index b8e3332a1263..cbe92f6fc385 100644
    --- a/eclass/scons-utils.eclass
    +++ b/eclass/scons-utils.eclass
    @@ -64,6 +64,7 @@
    # @DEFAULT_UNSET
    # @DESCRIPTION:
    # The minimal version of SCons required for the build to work.
    +: "${SCONS_MIN_VERSION:=4.4.0}"

    # @ECLASS_VARIABLE: SCONSOPTS
    # @USER_VARIABLE
    @@ -92,11 +93,7 @@ inherit multiprocessing

    # -- ebuild variables setup --

    -if [[ -n ${SCONS_MIN_VERSION} ]]; then
    - SCONS_DEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}"
    -else
    - SCONS_DEPEND="dev-util/scons"
    -fi
    +SCONS_DEPEND=">=dev-util/scons-${SCONS_MIN_VERSION}"

    if [[ ${_PYTHON_ANY_R1} ]]; then
    # when using python-any-r1, use any-of dep API
    --
    2.38.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Oct 28 20:00:02 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/scons-utils.eclass | 2 +-
    1 file changed, 1 insertion(+), 1 deletion(-)

    diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
    index ef26b564fb8c..78a9958ec422 100644
    --- a/eclass/scons-utils.eclass
    +++ b/eclass/scons-utils.eclass
    @@ -102,7 +102,7 @@ if [[ ${_PYTHON_ANY_R1} ]]; then
    BDEPEND="$(python_gen_any_dep "${SCONS_DEPEND}[\${PYTHON_USEDEP}]")"

    scons-utils_python_check_deps() {
    - has_version "${SCONS_DEPEND}[${PYTHON_USEDEP}]"
    + python_has_version "${SCONS_DEPEND}[${PYTHON_USEDEP}]"
    }
    python_check_deps() { scons-utils_python_check_deps; }
    elif [[ ${_PYTHON_SINGLE_R1} ]]; then
    --
    2.38.1

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Oct 28 20:00:02 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/scons-utils.eclass | 102 ++----------------------------------
    eclass/tests/scons-utils.sh | 64 ----------------------
    2 files changed, 4 insertions(+), 162 deletions(-)
    delete mode 100755 eclass/tests/scons-utils.sh

    diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
    index cbe92f6fc385..acb51300f348 100644
    --- a/eclass/scons-utils.eclass
    +++ b/eclass/scons-utils.eclass
    @@ -71,8 +71,8 @@
    # @DEFAULT_UNSET
    # @DESCRIPTION:
    # The default set of options to pass to scons. Similar to MAKEOPTS,
    -# supposed to be set in make.conf. If unset, escons() will use cleaned
    -# up MAKEOPTS instead.
    +# supposed to be set in make.conf. If unset, escons() will set -j
    +# based on MAKEOPTS.

    # @ECLASS_VARIABLE: EXTRA_ESCONS
    # @USER_VARIABLE
    @@ -148,11 +148,8 @@ escons() {
    die "EPYTHON unset in escons"
    fi

    - # if SCONSOPTS are _unset_, use cleaned MAKEOPTS
    - if [[ ! ${SCONSOPTS+set} ]]; then
    - local SCONSOPTS
    - _scons_clean_makeopts
    - fi
    + # if SCONSOPTS are
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Fri Oct 28 20:00:02 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/scons-utils.eclass | 8 ++++----
    1 file changed, 4 insertions(+), 4 deletions(-)

    diff --git a/eclass/scons-utils.eclass b/eclass/scons-utils.eclass
    index 78a9958ec422..212b29e089e8 100644
    --- a/eclass/scons-utils.eclass
    +++ b/eclass/scons-utils.eclass
    @@ -4,7 +4,7 @@
    # @ECLASS: scons-utils.eclass
    # @MAINTAINER:
    # mgorny@gentoo.org
    -# @SUPPORTED_EAPIS: 7
    +# @SUPPORTED_EAPIS: 7 8
    # @BLURB: helper functions to deal with SCons buildsystem
    # @DESCRIPTION:
    # This eclass provides a set of function to help developers sanely call
    @@ -35,10 +35,10 @@
    #
    # @EXAMPLE:
    # @CODE
    -# PYTHON_COMPAT=( python2_7 )
    +# PYTHON_COMPAT=( python3_{8..11} )
    # inherit python-any-r1 scons-utils toolchain-funcs
    #
    -# EAPI=7
    +# EAPI=8
    #
    # src_configure() {
    # MYSCONS=(
    @@ -83,7 +83,7 @@
    # -- EAPI support check --

    case ${EAPI:-0} in
    - 7) ;;
    + 7|8) ;;
    *) die "EAPI ${EAPI} unsupported."
    esac

    --
    2.38.1

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