• [gentoo-dev] [PATCH 0/5] distutils-r1.eclass: sipbuild PEP517 support

    From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue May 10 23:20:01 2022
    Hi,

    Here's a patchset to support building packages using the sipbuild (dev-python/sip) backend. This requires an upstream backport to support passing options to the backend, as well as qmake-utils changes to get
    qmake options in a form suitable for passing to it. An example ebuild
    is also included.

    --
    Best regards,
    Michał Górny

    Michał Górny (5):
    dev-python/sip: Backport PEP517 argument passing support
    qmake-utils.eclass: Add a function to get qmake args
    qmake-utils.eclass: Reuse qt5_get_qmake_args in eqmake5
    distutils-r1.eclass: Introduce sipbuild backend support
    dev-python/python-poppler-qt5: Bump to 21.3.0

    dev-python/python-poppler-qt5/Manifest | 1 +
    .../python-poppler-qt5-21.3.0.ebuild | 33 +++
    .../sip/files/sip-6.5.0-pep517-args.patch | 190 ++++++++++++++++++
    dev-python/sip/sip-6.5.0-r1.ebuild | 36 ++++
    eclass/distutils-r1.eclass | 53 ++++-
    eclass/qmake-utils.eclass | 55 ++---
    6 files changed, 343 insertions(+), 25 deletions(-)
    create mode 100644 dev-python/python-poppler-qt5/python-poppler-qt5-21.3.0.ebuild
    create mode 100644 dev-python/sip/files/sip-6.5.0-pep517-args.patch
    create mode 100644 dev-python/sip/sip-6.5.0-r1.ebuild

    --
    2.35.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 Tue May 10 23:20:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    dev-python/python-poppler-qt5/Manifest | 1 +
    .../python-poppler-qt5-21.3.0.ebuild | 33 +++++++++++++++++++
    2 files changed, 34 insertions(+)
    create mode 100644 dev-python/python-poppler-qt5/python-poppler-qt5-21.3.0.ebuild

    diff --git a/dev-python/python-poppler-qt5/Manifest b/dev-python/python-poppler-qt5/Manifest
    index 1139449118c1..ac4ae3ac9c84 100644
    --- a/dev-python/python-poppler-qt5/Manifest
    +++ b/dev-python/python-poppler-qt5/Manifest
    @@ -1 +1,2 @@
    DIST python-poppler-qt5-0.75.0.tar.gz 23281 BLAKE2B 06b2b0899d2a3cfc84e623b98cc3379aa45ac9ca9267f25168cce04f2ed761fd897043376fda3386b2daff2b46850b24782cafd6aabb13a8e7d6f3920b55a02c SHA512
    2f03036a2eaeb8e28875f19a813ff85a91c1e9a94301bdb736ecc50e7ececb4de2622728e6fecbf64e114435529f82b6afd23d772e2d3910ae03d5d2b5da3205
    +DIST python-poppler-qt5-21.3.0.tar.gz 25641 BLAKE2B 5937f1ddc1493bb1ef1d98b91dd8ccec4bd8c835956d84c8d7ce7a1cedcbe16854861e1f13825812e0f74c335020f0d74aad2d2bbc7a5780c6eb3ac77437f13b SHA512
    cc942a860c2c999
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue May 10 23:20:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/distutils-r1.eclass | 53 ++++++++++++++++++++++++++++++++++++--
    1 file changed, 51 insertions(+), 2 deletions(-)

    diff --git a/eclass/distutils-r1.eclass b/eclass/distutils-r1.eclass
    index 17286070e712..0962ef5e2356 100644
    --- a/eclass/distutils-r1.eclass
    +++ b/eclass/distutils-r1.eclass
    @@ -114,6 +114,8 @@ esac
    #
    # - setuptools - distutils or setuptools (incl. legacy mode)
    #
    +# - sip - sipbuild backend
    +#
    # - standalone - standalone build systems without external deps
    # (used for bootstrapping).
    #
    @@ -227,6 +229,10 @@ _distutils_set_globals() {
    >=dev-python/setuptools-60.5.0[${PYTHON_USEDEP}]
    dev-python/wheel[${PYTHON_USEDEP}]'
    ;;
    + sip)
    + bdep+='
    + >=dev-python/sip-6.5.0-r1[${PYTHON_USEDEP}]'
    + ;;
    standalone)
    ;;
    *)
    @@ -388,8 +394,19 @@ unset -f _distutils_set_globals
    # @ECLASS_VARIABLE: DISTUTILS_ARGS
    # @DEFAULT_UNSET
    # @DESCRIPTION:
    -# An array containing options to be passed to setup.py. They ar
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue May 10 23:20:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/qmake-utils.eclass | 27 +++++++++++++++++++++++++++
    1 file changed, 27 insertions(+)

    diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass
    index 1f09cbd9ca77..a4be44fa65a5 100644
    --- a/eclass/qmake-utils.eclass
    +++ b/eclass/qmake-utils.eclass
    @@ -60,6 +60,33 @@ qt5_get_plugindir() {
    echo $(qt5_get_libdir)/qt5/plugins
    }

    +# @FUNCTION: qt5_get_qmake_args
    +# @DESCRIPTION:
    +# Echoes a multi-line string containing arguments to pass to qmake. +qt5_get_qmake_args() {
    + cat <<-EOF
    + QMAKE_AR="$(tc-getAR) cqs"
    + QMAKE_CC="$(tc-getCC)"
    + QMAKE_LINK_C="$(tc-getCC)"
    + QMAKE_LINK_C_SHLIB="$(tc-getCC)"
    + QMAKE_CXX="$(tc-getCXX)"
    + QMAKE_LINK="$(tc-getCXX)"
    + QMAKE_LINK_SHLIB="$(tc-getCXX)"
    + QMAKE_OBJCOPY="$(tc-getOBJCOPY)"
    + QMAKE_RANLIB=
    + QMAKE_STRIP=
    + QMAKE_CFLAGS="${CFLAGS}"
    + QMAKE_CFLAGS_RELEASE=
    + QMAKE_CFLAGS_DEBUG=
    + QMAKE_CXXFLAGS="${CXXFLAGS}"
    + QMAKE_CXXFLAGS_RELEASE=
    + QMAKE_CXXFLAGS_DEBUG=
    + QMAKE_LFLAGS="${LDFLAGS}"
    + QMAKE_L
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue May 10 23:20:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    eclass/qmake-utils.eclass | 28 +++++-----------------------
    1 file changed, 5 insertions(+), 23 deletions(-)

    diff --git a/eclass/qmake-utils.eclass b/eclass/qmake-utils.eclass
    index a4be44fa65a5..a86ce1fbabb8 100644
    --- a/eclass/qmake-utils.eclass
    +++ b/eclass/qmake-utils.eclass
    @@ -1,4 +1,4 @@
    -# Copyright 1999-2021 Gentoo Authors
    +# Copyright 1999-2022 Gentoo Authors
    # Distributed under the terms of the GNU General Public License v2

    # @ECLASS: qmake-utils.eclass
    @@ -102,28 +102,10 @@ eqmake5() {

    ebegin "Running qmake"

    - "$(qt5_get_bindir)"/qmake \
    - -makefile \
    - QMAKE_AR="$(tc-getAR) cqs" \
    - QMAKE_CC="$(tc-getCC)" \
    - QMAKE_LINK_C="$(tc-getCC)" \
    - QMAKE_LINK_C_SHLIB="$(tc-getCC)" \
    - QMAKE_CXX="$(tc-getCXX)" \
    - QMAKE_LINK="$(tc-getCXX)" \
    - QMAKE_LINK_SHLIB="$(tc-getCXX)" \
    - QMAKE_OBJCOPY="$(tc-getOBJCOPY)" \
    - QMAKE_RANLIB= \
    - QMAKE_STRIP= \
    - QMAKE_CFLAGS="${CFLAGS}" \
    - QMAKE_CFLAGS_RELEASE= \
    - QMAKE_CFLAGS_DEBUG= \
    - QMAKE_CXXFLAGS="${
  • From =?UTF-8?q?Micha=C5=82=20G=C3=B3rny?@21:1/5 to All on Tue May 10 23:20:01 2022
    Signed-off-by: Michał Górny <mgorny@gentoo.org>
    ---
    .../sip/files/sip-6.5.0-pep517-args.patch | 190 ++++++++++++++++++
    dev-python/sip/sip-6.5.0-r1.ebuild | 36 ++++
    2 files changed, 226 insertions(+)
    create mode 100644 dev-python/sip/files/sip-6.5.0-pep517-args.patch
    create mode 100644 dev-python/sip/sip-6.5.0-r1.ebuild

    diff --git a/dev-python/sip/files/sip-6.5.0-pep517-args.patch b/dev-python/sip/files/sip-6.5.0-pep517-args.patch
    new file mode 100644
    index 000000000000..c4d39dcf6156
    --- /dev/null
    +++ b/dev-python/sip/files/sip-6.5.0-pep517-args.patch
    @@ -0,0 +1,190 @@
    +Backport from https://www.riverbankcomputing.com/hg/sip/
    +
    +changeset: 2771:8543f04b374f
    +branch: 6.6-maint
    +tag: tip
    +user: Phil Thompson <phil@riverbankcomputing.com>
    +date: Tue May 10 13:58:28 2022 +0100
    +summary: Fixed the PEP571 backend to handle multiple instances of the same config
    +
    +changeset: 2769:c02af095a016
    +branch: 6.6-maint
    +user: Phil Thompson <phil@riverbankcomputing.com>
    +date: